Every tick parameter of CExpert class Init method

 

Hi

1) When to set initialize an EA to use every tick ( every_tick = true) ?

bool  Init(
    string             symbol,      
    ENUM_TIMEFRAMES    period,      
    bool               every_tick,           // <-------  flag
    ulong              magic        

)

2)  What is the connection between setting every_tick parameter to true and the 3 modes of tick generation of the Strategy Tester?

- Every tick
- 1 Minute OHLC (OHLC prices with minute bars)
- Open prices only

Thanks!

 
fx1cloud9:

Hi

1) When to set initialize an EA to use every tick ( every_tick = true) ?

bool  Init(
    string             symbol,      
    ENUM_TIMEFRAMES    period,      
    bool               every_tick,           // <-------  flag
    ulong              magic        

)

2)  What is the connection between setting every_tick parameter to true and the 3 modes of tick generation of the Strategy Tester?

- Every tick
- 1 Minute OHLC (OHLC prices with minute bars)
- Open prices only

Thanks!

It is very simple when you set every_tick true the expert will process every tick if every_tick false it will only process once on every new bar. So if you use Every Tick in Strategy Tester the EA will still only evaluate only once one every new bar if every_tick is false.

Good luck!

 
Candles:

It is very simple when you set every_tick true the expert will process every tick if every_tick false it will only process once on every new bar. So if you use Every Tick in Strategy Tester the EA will still only evaluate only once one every new bar if every_tick is false.

Good luck!

To clarify this in more details, I have experimented with the following settings:

1)  every_tick = false  and  Every tick is selected in Strategy Tester  ==>  I get more realistic test results.

     I have been using this setting so far.

2)  every_tick = true  and  Every tick is selected in Strategy Tester   ==>  Slow and fast optimization for selected parameters don't work properly ( e.g. 0 is always returned for profit factor and total trades).

     So when to use this setting at all? is this setting considered for certain kinds of strategies. If yes, which strategies are expected to be used here.

3) every_tick = false  and  Open prices only is selected in Strategy Tester  ==>  I get unrealistic results which are too good (e.g. 5000% profit).

     As stated in the documentation, we should then test the EA in every tick mode.


What do you think?

Thank you!

 

 

In every case the mode used in Strategy Tester depends on the EAs strategy. If the signal can hapen anytime during the forming bar then you should always use Every tick. If the signal is based on the OHLC of the previous bar, then you can use Open prices only.

1)  every_tick = false  and  Every tick is selected in Strategy Tester  ==>  I get more realistic test results.

In my understanding if you use this signals, trailing stops etc. are still only evaluated once on the open of every new bar, so there is no need to go through every tick of the bar or 1 minute OHLC.

2)  every_tick = true  and  Every tick is selected in Strategy Tester   ==>  Slow and fast optimization for selected parameters don't work properly ( e.g. 0 is always returned for profit factor and total trades).

This depends on your strategy as I stated earlier. If you always get zero trades, then there might be something wrong with the EA.

3) every_tick = false  and  Open prices only is selected in Strategy Tester  ==>  I get unrealistic results which are too good (e.g. 5000% profit).

I cannot tell too much about this without knowing the decision making logic and trade management of the EA tested. In any case the EA only does evaluatoin once at the open of the new bar.

Reason: