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
Can you make this addition and re-run it please.
20:20:27 test #FDXU2,Daily: iHigh(Symbol(), PERIOD_M1, 1): 6767
20:20:27 test #FDXU2,Daily: iLow(Symbol(), PERIOD_M1, 1): 6766.5
20:20:27 test #FDXU2,Daily: iTime(Symbol(), PERIOD_M1, 1): 2012.07.31 20:19:00
This time the returned data matches the data I see in history center! I don't understand this.
This time the returned data matches the data I see in history center! I don't understand this.
I must admit, neither do I . . .
What Operating System are you running ? and is your MT4 installed in Program Files ?
I must admit, neither do I . . .
What Operating System are you running ? and is your MT4 installed in Program Files ?
WinXP SP3
It is MetaTrader 4.
I've installed multiple instances of MT4
C:\Programme\MetaTrader\MetaTrader18
WinXP SP3
OK, I'm out of ideas . . . if I think of anything I'll post again.
OK, I'm out of ideas . . . if I think of anything I'll post again.
OK. Thanks for your help!
I watch this behaviour over the next days to see whether this happens again.
Bid and Ask never had any problems though. Just iHigh() and iLow() had this issue. Maybe it is some sort of a caching thing? Is there some cache to clean?
Hi,
Try this ?!?
Refresh the chart:
Read the article https://www.mql5.com/en/articles/1407
:D
OK, I'm out of ideas . . . if I think of anything I'll post again.
I have been thinking and experimenting a little today :-)
I think the "issue" we are seeing is due to the fact that we are using a script. I'm guessing that once the history tries to update the updated history is not available until the next tick, and a script won't "see" the next tick . . . but an EA will . . .
Try the attached EA, what you should see is that for the first tick it runs you will get an error 4066 and for subsequent ticks the error will go away and the data will be correct. All the info is reported and updated to the screen top left. It only updates every 5 seconds, so you have a chance to see what is being put on screen.
I have been thinking and experimenting a little today :-)
I think the "issue" we are seeing is due to the fact that we are using a script. I'm guessing that once the history tries to update the updated history is not available until the next tick, and a script won't "see" the next tick . . . but an EA will . . .
Try the attached EA, what you should see is that for the first tick it runs you will get an error 4066 and for subsequent ticks the error will go away and the data will be correct. All the info is reported and updated to the screen top left. It only updates every 5 seconds, so you have a chance to see what is being put on screen.
Great! That's working today. But I'll keep checking over the next days ;)
So it is: RefreshRates() -> wait until 4066 is gone -> wait for next tick -> RefreshRates()
This "wait for next tick" step: I currently do a Sleep(5000). Could you think of any way to replace this Sleep(5000) with something dynamic?
Something that tells the function when the next tick has come in?
Great! That's working today. But I'll keep checking over the next days ;)
So it is: RefreshRates() -> catch 4066 -> wait for next tick -> RefreshRates()
This "wait for next tick" thing: I currently do a Sleep(5000). Could you think of any way to replace this Sleep(5000) with something dynamic?
Something that tells the function when the next tick has come in?
In an EA you don't need to worry about that, start() is run on each tick . . . assuming it completes in time for the next tick.