RefreshRates() - page 3

 
heelflip43:
If your just using an EA then have your code in the start(), it gets called everytime a new tick arrives. Also RefreshRates() doesn't refresh the history only pre-defined variables as Raptor said earlier. If you wanted to make sure that your history is up to date then run a iHigh on all the time frames which your using during the init() (or the very start of your script) then wait for the 4066's to finish. The data should be downloaded and you shouldn't have a 4066 problem later on.

That won't help, it will initially but the History will get out of date as time passes. The OP is running on D1 and trying to get M1 highs and lows . . . he needs to keep accessing M1 from within start(), that will keep the M1 history up to date.
 
RaptorUK:

That won't help, it will initially but the History will get out of date as time passes. The OP is running on D1 and trying to get M1 highs and lows . . . he needs to keep accessing M1 from within start(), that will keep the M1 history up to date.

I have an EA which uses standard RefreshRates() (no catching 4066 or anything) and outputs this:

10:45:19 test #FDXU2,Daily: Ask: 6662
10:45:19 test #FDXU2,Daily: Bid: 6660.5
10:45:19 test #FDXU2,Daily: iHigh(Symbol(), PERIOD_M1, 1): 6624.5

10:45:20 test#FDXU2,Daily: iTime(Symbol(), PERIOD_M1, 1): 2012.08.03 10:44:00


The iTime is correct but the iHigh data is wrong nevertheless...

Strange.

 
TradeIT:

I have an EA which uses standard RefreshRates() (no catching 4066 or anything) and outputs this:

The iTime is correct but the iHigh data is wrong nevertheless...

Strange.


I could see how that might happen . . . I assume Time is only written once to the History, when the bar is opened, but High, Low and Close are updated for each tick, if you miss some ticks it is possible for the Time to be correct but some of the other info to be wrong . . . don't quote me on this though, it's just what I think happens, i have no reference material from Metaquotes to back this up.

I would expect that your data would be correct a few ticks later than the time you got the info you posted.

 
RaptorUK:


I could see how that might happen . . . I assume Time is only written once to the History, when the bar is opened, but High, Low and Close are updated for each tick, if you miss some ticks it is possible for the Time to be correct but some of the other info to be wrong . . . don't quote me on this though, it's just what I think happens, i have no reference material from Metaquotes to back this up.

I would expect that your data would be correct a few ticks later than the time you got the info you posted.

Well, it is off by about 40 points. I think too much for your possible explanation. The range in this minute was maybe 5 points - not more.

By the way - in your demo code you do a index += 2;

Is this increment necessary in this case? Can't you just call iHigh with index = 0 ?