in code does, shift=Bars-counted_bars-1; return -1, if there are 500 bars in data history?
If counted_bars==500, then yes.
so.. then if =-1 does close[shift+.05] reference the 4th bar counting back from the current bar,
If accessing an index, you must use integers.
0.05 is not an integer.
Whether it counts back from the current bar depends on whether the array is set as series or not.
sorry misprint, should read as such:n Close[shift+05]
i have attached the file. Does it count back from current bar 5 bars, counting current bar as bar number 1? is array set as series?
what does shift-counted_bars-1 equal to?
Files:
3c_dm_363.mq4
9 kb
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
in code does, shift=Bars-counted_bars-1; return -1, if there are 500 bars in data history?
so.. then if =-1 does close[shift+.05] reference the 4th bar counting back from the current bar, c1=current bar, so c4 is 4th bar back in series.
or does shift=Bars-counted_bars-1= 0?