Download MetaTrader 5

Setting a one second time delay to an indicator rather than a bar delay or tick delay

To add comments, please log in or register
Do you want to learn MQL5? 300 articles will help you!
ronstar
5
ronstar 2011.05.26 11:36 

Hello,

I have an indicator that measures the spread on a tick basis and writes it out to a file in order to create a history.


However, given that prices and spreads are time series then in order to get accurate statistics for analysis one needs the intervals to be identical (ticks do not produce identical intervals).


Can someone please advise how to create such a delay. I am new to MQL so would really appreciate if the answer could be detailed.


Thank you kindly

R

investeo
4098
investeo 2011.05.26 11:44  
ronstar:

Hello,

I have an indicator that measures the spread on a tick basis and writes it out to a file in order to create a history.


However, given that prices and spreads are time series then in order to get accurate statistics for analysis one needs the intervals to be identical (ticks do not produce identical intervals).


Can someone please advise how to create such a delay. I am new to MQL so would really appreciate if the answer could be detailed.


Thank you kindly

R

You could analyse data on per-second basis. This would not involve changing anything on MQL5 part but rather writing a proper parser for your output file. If you get more than one tick within a second you would choose the worst spread.

cheers.

 

 

To add comments, please log in or register