
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
If you suspect errors in iXXXXX functions, use SymbolInfoXXXXXX functions
Can an example of replacing iXXXXX with SymbolInfoXXXXXX.
My code is similar. Error in OnTick
it should be
If we have the current timeframe M5 we should compare M5 with H1 and M1
The current timeframe M5 is displayed correctly. The problem was with H1 and M1.
I checked on Alpari real EURCHF M5 only instead of Print I drew horizontal bars at each of the levels.
Yes, I did put H1 that way at first, but then decided it would be too rare comparisons. So I changed it to M5.
May I give you an example of replacing iXXXXXXX by SymbolInfoXXXXXX.
Artyom made a little mistake...
Instead of iClose you can use
something like this
This way you can get values of several bars with one move of a magic wand.
The function returns true or false, but I didn't check it in this example. You can guess it yourself...
Yeah, that's how I first put H1, but then I decided it would be too rare comparisons. So I changed it to M5.
I finished your code there and posted it above. I put your version in mine and the result is the same. There is a mismatch on almost every M5 candle. What are your results?
I finished your code there and posted it above. I put your version in mine and the result is the same. There is a mismatch on almost every M5 candle. What are your results?
Here we need to change
to
Here we have to change
to
No, better _Period. Because we will forcibly wait for the zero quotation from H1, while the current period is correctly updated. The data should be received at the first seconds of the hour, not when the hour is updated.
I want to add to the example and checkHere we have to change
to
The result is the same as with iClose(); iClose and CopyClose seem to take data from the same place.
No, better _Period. Because we will forcibly wait for the zero quotation from H1, while the current period is correctly updated. The data should be received at the first seconds of the hour, not when the hour is updated.
I want to add to the example and checkIt seems that you don't understand at all how the function of new bar appearing works.
And consequently.
The result is the same as when iClose(); iClose and CopyClose seem to take data from the same place.
You don't seem to understand how the new bar function works at all.
And consequently.
When getting bar close values and\or others from OHLC when a new TIKA arrives the values are always without problems.Answer the question. Why on a new candle does the iClose(1) function give back outdated information and not updated or an error? This is a bug.
Answer the question. Why on a new candle does the iClose(1) function return outdated information and not updated or an error? This is a bug.
If it's a bug, then everyone, or almost everyone, should have it. If it is only you, then it is a problem in the code.
I have my EA on M15 with determination of a new bar H1
And this is what the comment says.
There is no discrepancy.