back test LoadMoreHistory or LoadMoreHistoryAsync.

Created at 28 Mar 2021, 22:06
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!
EY

eynt

Joined 08.05.2020

back test LoadMoreHistory or LoadMoreHistoryAsync.
28 Mar 2021, 22:06


To my knowledge, when running a strategy on a back test, it is not possible to use the LoadMoreHistory or LoadMoreHistoryAsync.

Has anything changed in the last version which  made it possible?

 

Thanks


@eynt
Replies

PanagiotisCharalampous
29 Mar 2021, 10:13

Hi yuval.ein,

No there was no change.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

eynt
29 Mar 2021, 11:26

RE:

Is it panned for a future version? Is there a feature I can vote for? If not, hoe can I submit a feature request?

 

Thanks

 


@eynt

eynt
31 Mar 2021, 10:31

RE: RE:

?


@eynt

amusleh
31 Mar 2021, 10:56

RE: RE:

yuval.ein said:

Is it panned for a future version? Is there a feature I can vote for? If not, hoe can I submit a feature request?

 

Thanks

 

You can open a thread on suggestions section, but your request is not that useful because when you back test you know how much data is available and there is no need to call load more history as all your backtest data will be loaded and no more or less, during live market condition its useful because you don't know the exact amount of available data so you can ask to load more if you need more data.


@amusleh

eynt
31 Mar 2021, 21:31

RE: RE: RE:

Of course it is useful. If I start running a back test from a specific date, I will need a certain amount of past data before that date. This amount (bars or days) is not always known and can be decided when starting the back test. For example, on the start of my cBot I will keep calling LoadMoreHistory until a specific condition is filled. The amount of times I will call the function (and as a result the bars count loaded) is not fixed and can be changed according to market conditions.

 


@eynt

JerryTrader
06 Apr 2021, 19:25

I think I got a similar issue due to a lack of history during backtest.

I have a complex multitimeframe indicator. 
I use it on M5 and it draws a dozen of [Output] from a referenced indicator used in M30.
Every outputs are well displayed in the cTrader Automate Indicator tab, as well as the cBot tab on a live instance, and in the cTrader Trade section.

But when I want to backtest a bot and display my indicator on the backtested chart, my outputs are not displayed before 11-Feb-21.
 

From the below code, I figured out that I'm missing data before this date.

Bars _trendFilterBars = MarketData.GetBars(TimeFrame.Minute30);

// This returns "11-Feb-21 13:30:00"
var firstMtfOpenTime = _trendFilterBars.OpenTime[0];

 

I guess this is a good example of why LoadMoreHistory could be useful, even on the backtest part.


@JerryTrader

eynt
06 Apr 2021, 20:08

RE:

I've added a feature suggestion. Please vote for it on the following link:

cTDN Forum - Load more History on Backtest (ctrader.com)


@eynt