skip the first two years in backtest

Created at 26 Mar 2020, 17:47
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!
TW

twoheartzin1soul

Joined 24.01.2020

skip the first two years in backtest
26 Mar 2020, 17:47


Hi guys i need some help, i need to skip the first two years in back testing because i need the data but not to operate,  my bot works OnTick and need time to back test.

So i need to load data but i need to jump directly from 2011 to 2014

thanks all


@twoheartzin1soul
Replies

PanagiotisCharalampous
27 Mar 2020, 07:55

Hi twoheartzin1soul,

You can use Server.Time, check the date and decide if the cBot will execute any actions or not.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

twoheartzin1soul
27 Mar 2020, 16:26

it works until the bot start

PanagiotisCharalampous said:

Hi twoheartzin1soul,

You can use Server.Time, check the date and decide if the cBot will execute any actions or not.

Best Regards,

Panagiotis 

Join us on Telegrathanks a lot for your answer, i tried with your method and BarsCount too and i have the sam problem, the bot goes fast to the moment i need but when he has sto start operate it doesent go and he freeze on this date like he is blocked

 protected override void OnTick()
        {
            if ((Server.Time.Year == 2014) || (Server.Time.Year == 2015) || (Server.Time.Year == 2016) || (Server.Time.Year == 2017) || (Server.Time.Year == 2018) || (Server.Time.Year == 2019) || (Server.Time.Year == 2020))
            {
               var macd1 = macd.MACD;
               var signal = macd.Signal;
               var histomacd = macd.Histogram;
               var trigg = fibtrg.Trigger;
               var adxx = adx.ADX;
               var dIplus = adx.DIPlus;
               var dIminus = adx.DIMinus;


        it's like freezed with no giving error but the time doesent go further

 


@twoheartzin1soul

PanagiotisCharalampous
30 Mar 2020, 08:01

Hi twoheartzin1soul,

Can you please post the complete cBot code?

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous