![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
here we go.
Time[i -(int)Fr]
The loop goes like this
for(i=100; i>=0; i--)
with analysis no less than zero this: i -(int)Fr
but the line to the future (at i<0) anyway - only by time or add weekend
although...
may be clue - how to shift to a negative number of bars, I do not remember
Now I made Time[(i+Fr)-x_bar] from the fractal point to the future,
now all lines are in the right places from the fractal plus the necessary bars ahead, but beyond the zero bar the lines do not rise anymore
Now from the fractal point to the future I made Time[(i+Fr)-x_bar],
now all lines stand on the needed places from the fractal plus the needed bars ahead, but lines do not stand behind the zero bar anymore
maybe try in this case to draw another buffer in present time and shift to the future?
https://docs.mql4.com/ru/customind/setindexshift
maybe try drawing in the present tense and shifting to the future in this case?
Hmm, I'll have to try that.
I.e. I draw a line at the first point and shift by bars.
My line is not a buffer but an object, how do I organise this.
Hmmm, I'll have to try that.
I.e. I draw a line at the first point and shift by bars.
I don't have the line as a buffer but as an object, how do I organise this.
if an object, calculate the time of the future bar, taking into account the weekend
but if it is an indicator, then two buffers at >=0 and at <0
in the latter case, the command from the link above inside the loop
in this case, only the last line of the indicator for the second buffer and everything for the first buffer will be true
What's wrong with it? There is a start time, there is a current time.
if an object, then calculate the time of the future bar taking into account the outputs
and if it is an indicator, then two buffers at >=0 and at <0
in the latter case, the command following the link above would be correct
in this case, only the last indicator line will be correct
OK, thank you.
I think that's enough for today, I will try it tomorrow, I will put the line in the buffer and shift it by bars forward.
What's wrong with it? There is a start time, there is acurrent time.
Doesn't work, I've tried it.
forex2030:
It doesn't work, I've tried it.
As far as is clear from all your posts. You can't set the start time correctly for counting the bar gap.
It's a variant of what you need. Start of previous or current week/month/year
Alright, thanks.
That's probably enough for today, I'll try it tomorrow, I'll put the line in the buffer and shift it forward by bars.
It doesn't work, I've tried it.
The most interesting indicators, of course, are the ones that draw the future.
I have now done Time[(i+Fr)-x_bar] from the fractal point into the future,
now all lines stand on the correct places from the fractal plus the necessary bars ahead, but lines do not stand behind the zero bar
Make a check, if bar is negative, then add time to zero bar. You must write your own function MyTime(int bar), if the bar is less than zero, add time to the zero bar, otherwise use Time[].