Drawing Line every 15 minutes
therustytrader:
I am trying to make an indicator that just draws a line every quarter hour to help me be able to keep track of time better.
Right now it only draws one line at the nearest hour. I am new to mql so any help would be greatly appreciated.
Try the following code:
MqlDateTime str1; TimeToStruct(TimeLocal(),str1); if(str1.min%15==0) ObjectCreate("Quarter Hours",OBJ_VLINE,0,Time[0],0);
Thanks but this is just drawing a line on the candle where the indicator is added to the chart at.
Ok thanks for your help, one last question on this. How do I get it to draw the line on previous candles?
I am trying to make an indicator that just draws a line every quarter hour to help me be able to keep track of time better.
Right now it only draws one line at the nearest hour. I am new to mql so any help would be greatly appreciated.