The indicator shows the maximum price for the period specified in the input parameters of the indicator, taking into account the timeframe, in which the price was searched for:
//+------------------------------------------------+ //| Indicator input parameters | //+------------------------------------------------+ input ENUM_TIMEFRAMES TimeFrame=PERIOD_H4; // Chart period for the timeseries input string level_name="Price_HIGHEST_HIGH_VALUE_1";// Level name input string level_comment="trigger level"; // A comment to the level input uint level_period=5; // Level search period input uint level_start=0; // The number of the starting bar input color level_color=clrLime; // Level color input ENUM_LINE_STYLE level_style=STYLE_SOLID; // The style of the trigger level input ENUM_WIDTH level_width=w_3; // The width of the trigger level input bool Deletelevel=true; // Deleting the level

Figure 1. The HIGHEST_HIGH_VALUE_HTF indicator