Can anyone please tell me how to identify and apply the current time frame showing on my chart to a variable?
Basically what I want to do is to only show specified vertical lines on certain time frames.
What I was planning on doing (rightly or wrongly) was to say - if the current time frame == a time frame on which I want to see the line - in this case, m1, m5, m15 and m30 - then I was going to set the OBJPROP_TIMEFRAMES to that time frame.
If the chart is showing a time frame on which I don't want to see the lines, I was going to set the OBJPROP_TIMEFRAMES to another time frame so it would be invisible on the chart I was currently looking at .
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Hi All
Can anyone please tell me how to identify and apply the current time frame showing on my chart to a variable?
Basically what I want to do is to only show specified vertical lines on certain time frames.
What I was planning on doing (rightly or wrongly) was to say - if the current time frame == a time frame on which I want to see the line - in this case, m1, m5, m15 and m30 - then I was going to set the OBJPROP_TIMEFRAMES to that time frame.
If the chart is showing a time frame on which I don't want to see the lines, I was going to set the OBJPROP_TIMEFRAMES to another time frame so it would be invisible on the chart I was currently looking at .
I hope that make sense.
Thanks in advance for any help.
Regards
Paul Eamonn