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 put this code in an indicator with only OnCalculate function. Just this indicator on chart. No expert, no objects, no other indicators.
I tried it on these TimeFrames: M1, M5, M15, M30, H1, H4, D1, W1, MN.
In TF <= H1, it works ok, return 1. In TF >=H4 it returns -1.
If i change iClose index to iBars-1, it returns 1 in all TF, works OK!
Checked with more symbols (eg. EURUSD, EURJPY), and also with an other fresh MT5 installation, latest MT5 from MetaQuotes build 2401.
I put this code in an indicator with only OnCalculate function. Just this indicator on chart. No expert, no objects, no other indicators.
I tried it on these TimeFrames: M1, M5, M15, M30, H1, H4, D1, W1, MN.
In TF <= H1, it works ok, return 1. In TF >=H4 it returns -1.
If i change iClose index to iBars-1, it returns 1 in all TF, works OK!
Checked with more symbols (eg. EURUSD, EURJPY), and also with an other fresh MT5 installation, latest MT5 from MetaQuotes build 2401.
Sorry Alain, didn't understand you mean the file itself.
Here the file.
Sorry Alain, didn't understand you mean the file itself.
Here the file.
On Build 2361. It's erratic, even with Bars-1, it sometimes return -1 or an Close value of 0.0
On build 2401, it's better (but it also report -1, though the close value is always ok).
When index is = to bars, what is happening is the platform starts to download more data, so the -1.
I know that, I just reported my results and as you can see have with an available index, it sometimes return -1.
It would be time for Metaquotes to fix all that mess once for all. We agree.
I'm having same trouble in other indicators where i use iBarShift!!! And problem this time is not iClose, it seems random! I can't fix it.
In this condition, MT5 is unusable!
Alain please let me know if you have any news, i'm thinking to roll back to MT4, but i hope you can give me good news as soon as possible.
Thanks
I'm having same trouble in other indicators where i use iBarShift!!! And problem this time is not iClose, it seems random! I can't fix it.
In this condition, MT5 is unusable!
Alain please let me know if you have any news, i'm thinking to roll back to MT4, but i hope you can give me good news as soon as possible.
Thanks