Using isBacktesting call to speed up tests

Created at 19 Mar 2015, 13:00
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
97

9718853

Joined 14.10.2014

Using isBacktesting call to speed up tests
19 Mar 2015, 13:00


Hi all,

 

Just wondering how the call isBacktesting can be used to speed up tests?

and can the Optimiser results be sped up in the same way?

 


@9718853
Replies

Spotware
19 Mar 2015, 14:50

You can exclude some code from backtesting and optimization:

if (!IsBacktesting)
{
   //do something only if it is NOT backtesting
}

 


@Spotware

cjdduarte
26 Mar 2015, 05:01

RE:

there is something equivalent to otimization?
IsOtimization?

Spotware said:

You can exclude some code from backtesting and optimization:

if (!IsBacktesting)
{
   //do something only if it is NOT backtesting
}

 

 


@cjdduarte

Spotware
02 Apr 2015, 17:22

You can use IsBacktesting in optimization as well. It is true for both backtesting and optimization.


@Spotware

AlexanderRC
07 Apr 2015, 13:32

RE:

Spotware said:

You can use IsBacktesting in optimization as well. It is true for both backtesting and optimization.

It would be trivial to implement IsOptimizing() call to return true if the cBot was launched under the optimizer. The cBot may do some internal optimizations by caching data somehow between invocations.


@AlexanderRC

Spotware
09 Apr 2015, 11:09

Thank you for your feedbacks. We will add IsOptimizing property in the future.


@Spotware