Multi Symbols testing with accurate real ticks access for each symbol

 

Hi everybody,

I am trying to test a strategy with mulitple symbols, but ticks from the differnet symbols are not accurate because MT5 tester needs a unique Symbol to run. I use EURUSD as main to get the ticks for each symbol at each EURUSD tick, but the results are wrong compared to separate symbols testing (with same algo).

Is there any way to get the real ticks for all symbols WHEN a new tick for the symbol is present in the database, without waiting for a new tick generated by the tester?


I use a struct for the 4 different symbols and get the ticks like this :

struct Paire{string symb;};
MqlTick tick;    for(int i=4;i>=0;i--){SymbolInfoTick(P[p].symb,tick); ask=tick.ask;  bid=tick.bid; couref=med=(ask+bid)/2; }


Thanks for your help ...

 

You can try EventTickSpy.mq5 example indicator from the algotrading book.

Other similar implementations are also available in the codebase and articles.

MQL5 Book: Creating application programs / Interactive events on charts / Generation of custom events
MQL5 Book: Creating application programs / Interactive events on charts / Generation of custom events
  • www.mql5.com
In addition to standard events, the terminal supports the ability to programmatically generate custom events, the essence and content of which are...
 
Stanislav Korotky #:

You can try EventTickSpy.mq5 example indicator from the algotrading book.

Other similar implementations are also available in the codebase and articles.

Thanks Stanislas.. Looks like that's what I need ...