requotes in history

 

Hi all,

I experience following problem - during EA operation I save the previous finished close data in a file and time to time compare with .hst file. Seldom (but unfortunately with impact onto EA function consistency upon restart) that some close data are different (between my control file and the .hst file) . Why is this, how to assure that the EA contained data  and the later .hst data are identical?? Is it a problem on my side (terminal) or is it a problem on broker's side - kind of ex post requoting?? Thanks for any answer. Michal Hatle

 
Michal Hatle:

Hi all,

I experience following problem - during EA operation I save the previous finished close data in a file and time to time compare with .hst file. Seldom (but unfortunately with impact onto EA function consistency upon restart) that some close data are different (between my control file and the .hst file) . Why is this, how to assure that the EA contained data  and the later .hst data are identical?? Is it a problem on my side (terminal) or is it a problem on broker's side - kind of ex post requoting?? Thanks for any answer. Michal Hatle

Please demonstrate your issue with some data/pictures and eventually code.

Nobody can guess.

 
Michal Hatle:

Hi all,

I experience following problem - during EA operation I save the previous finished close data in a file and time to time compare with .hst file. Seldom (but unfortunately with impact onto EA function consistency upon restart) that some close data are different (between my control file and the .hst file) . Why is this, how to assure that the EA contained data  and the later .hst data are identical?? Is it a problem on my side (terminal) or is it a problem on broker's side - kind of ex post requoting?? Thanks for any answer. Michal Hatle

 Thanks for your attention

1) data enclosed, the difference between control data in my file and the  .hst extract is marked clearly

2) the "critical"  piece of code is simple - my EA identifies that previous candle finished by time of candle with index 0 of a leading instrument (EURUSD) > time of candle with index 0 of a leading instrument returned until now, then EA waits for another 5sec (to assure that previous candles in all charts with other instruments are finished and than the Close data of index 1 candles of all used instruments are saved to a .csv control file.

As demostrated by the data and one instrument (EURCHF) it mostly works OK but sometimes, about 1% o data there is data mismatch which causes me troubles in EA restarts...it is either the same value as previous minute (that could be explained that previous close has not formed properly) but sometimes it is not any Close of any previous candle.

Do you think that refresh of all used instrument chart would help? How to do it by EA capabilities, I do not know any commands that would select one chart after another and made Refresh as possible by hand with the rightclick menu..

 

Thanks and best regards,

 

Michal 

 

There can certainly be a longer period then 5 sec.

Your method is not reliable, you should have one running that checks and verifies each pair's new candle.

if it's quiet there can be a very long time where ticks can be absent and the new bar can arrive a lot later.

so you code one EA that tracks all pairs by iTime[0] comparison to make sure the new candle has arrived.

 

Forum on trading, automated trading systems and testing trading strategies

requotes in history

Alain Verleyen, 2015.12.09 17:14

Please demonstrate your issue with some data/pictures and eventually code.

Nobody can guess.


 
Alain Verleyen:

Hi all, thank for your help on the issue of differences between .hst and my logging of previous close values of Close for several instruments  - just to be sure I understood right. the replies above 

I use the latest already (previous, index 1) closed candle whereby I test the time the of the close of previous candle by a new candle index 0  (tick) arriving from a leading instrument (EURUSD). I thought that all previous candles for all other instruments on open charts in the MT4 terminal (of course if there was at least one tick received for each of these instruments) are closed simultaneously i.e. that closing depends solely of server time i.e. is the same for all instruments. Am I wrong? Or is closing of the last previous candle for other instruments central time-wise specific for each and every instrument e.g. as if the previous candle cannot be closed earlier than a new tick arrived that falls into the most actual, not yet closed index 0 candle? Could pls explain the process and timing of last previous candle closing. Thanks. 
One of contributors to this thread wrote (above) that 5s waiting can be perhaps too short. What would be then the proper waiting time after last previous candle closed for the leading instrument to be assured that last previous candles were also closed (and logged into .hst file) for the other instruments (of course if such a candle existed at all for a given instrument - no tick might have arrived during the previous minute). Another Q: When (time or algo/process step) saving the last previous candle data to its .hst file occurs? Thanks for you insight. 
Michal
16:43