skip the first two years in backtest
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
Replies
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
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
@PanagiotisCharalampous
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