Forum

MT5 new functions, help

I'm using the new mt5 functions to generate a history graph of highs and lows of the day, but it's not working. Basically it's taking the highs and lows of the whole graphic, I'm wanting it to take day by day. In mt4 I made a similar code and everything worked out, but in mt5 something is wrong

High and Low of Day Indicator

I would filter by day in MT5, can someone help me? Thanks! #property indicator_chart_window #property indicator_buffers 2 #property indicator_plots 2 double day_high = 0 ; double day_low = 0 ; double hi[]; double lo[]; int OnInit () { SetIndexBuffer ( 0 , hi, INDICATOR_DATA );