Calculate the time distance using number of bars * PeriodSeconds() ( or _Period*60 )
It will need to be recalculated every new bar until the calculated time is smaller or = the current bar.
Keith Watford:
Calculate the time distance using number of bars * PeriodSeconds() ( or _Period*60 )
It will need to be recalculated every new bar until the calculated time is smaller or = the current bar.
Keith Watford
thanks for your replay .i will try this
appreciate

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
hi ..as a new to mql programming ...still want to learn and have a question
i try to write a code to draw a Vline a head from a predetermined bar or (datetime)
first i draw a rectangle (i need it in my strategy) and want the the indicator to draw a line at the end to the rectangle
lets say the first point of the rectangle is at 2015.07.01 00:00 and the second point of the rectangle is after 150 bars
i used 86400 as the number of seconds in the day
but: the Vline is drawn after 104 bars....it seems the the indicator count for holidays ....
how to fix this and make this code count also for holidays