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
The Bars function returns the number of bars. When we need to get the index of a bar with index 9 (sorry for the tautology), it will return 10, because the index of the first bar is 0.
Here are two variants of the iBarShift() analogue: post #5 and post #7
Just a variant:
Only it won't work correctly in all cases. GetBarShift() from fxsaber is more versatile.
Try to put TimeCurrent() instead of t in your function, you'll see the result.
Only it won't work correctly in all cases. GetBarShift() by fxsaber is more universal.
Try putting TimeCurrent() instead of t in your function, you'll see the result.
The result will be the same.
You haven't even checked.
I've tested it many times before, so I just know. But you haven't even tried it yourself.
Here's the script.
It just hangs. Forcibly removing it from the chart gets the result.
So I tried it, that's why I advised you too. But since you used it and it suits you, I won't change your mind.
That's fine, too