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?

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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.