
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
I checked quickly: there is a function that has been working for more than a day, I substitutediBarShift3 instead and got the EA to work incorrectly. That's the conclusion I drew from it.
Here is the one I use
Try with your function do this:
Your function will give out different values, but the hour is the same. That means it is not working.
The native function in MQL4 gives the same values.
iBarShift3 also gives same values, but for periods D1, W1 and MN1 it is equally wrong. I need to tweak the code a bit. I know how to do it and will do it later when I have enough time.
Otherwise, these functions behave the same, only iBarShift3 is much faster.
ZS: Sorry. Your function works correctly. I put in the wrong code. It's mine that doesn't behave correctly on periods D1,W1 and MN1. I will fix it today.
I'm already confused by the programming pillars - so which function counts accurately on all TFs nowadays?
I'm already confused by the programming pillars - so which function now exactly counts everything on all TFs?
I'm already confused by the programming pillars - so which function now exactly counts everything on all TFs?
If you look at the logic, the slowest one seems to get it right :-)
No, the slowest one is not correct, judging from the indicator posted earlier.
And do all of them work correctly when there are gaps in the bars!
This is very important, because sometimes time goes by and there is no bar, especially on small TFs, then different number of bars with minutes may be different on different days...
I checked quickly: there is a function that has been working for more than a day, I substituted iBarShift3 instead and got the EA to work incorrectly. That's the conclusion I drew from it.
Here is the one I am using
This is my code. Any problems ?
...
All the algorithms that were available before, including @Alain Verleyen' s one, have abnormal situations.
You can create a full analogue of iBarShift MQL4, but the code will be very cumbersome and I don't see any sense in it.
What problem have you found?
What problem have you detected?
Forum on trading, automated trading systems and strategy testing
iBarShift Analogue
Nikolai Semko, 2018.04.04 17:47
Try with your function do this:
Your function will give different values, but the hour is the same. So it's not working.
In MQL4 the native function gives the same values.
iBarShift3 also gives same values, but for periods D1, W1 and MN1 it is equally mistaken. I need to tweak the code a bit. I know how to do it and will do it later when I have enough time.
Otherwise, these functions behave the same, only iBarShift3 is much faster.
ZS: Sorry. Your function works correctly. I put in the wrong code. It's mine that doesn't behave correctly on periods D1,W1 and MN1. I will fix it today.