backtesting help

Created at 27 Jul 2020, 21:41
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!
LU

luca.tocchi

Joined 25.03.2020

backtesting help
27 Jul 2020, 21:41


Hi I have a question.

why if in my bot I put the function System.Threading.Thread.Sleep (); does backtesting wait for real and non-virtual time?

or why if I put a similar logic

 

while ((Mv.Result.LastValue - Mv.Result.Last(30)) < Symbol.PipSize * 60)
                                {
                                    Print("waiting for triger");
                                }
                                ExecuteOrder(position.Quantity * 2, TradeType.Buy);

 

the backtesting dosn't work?

should i change settings?

thanks


@luca.tocchi
Replies

PanagiotisCharalampous
31 Jul 2020, 08:07

Hi Luca,

Sleep() method is a .Net method, it suspends the execution of the thread for the specified timespan. It has nothing to do with backtesting.

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous