Backetest is working only from the past 5 days and misteriously dosn't before that date  [SOLVED]

Questions about MultiCharts and user contributed studies.
dvdkite
Posts: 65
Joined: 16 May 2018
Has thanked: 10 times
Been thanked: 1 time

Backetest is working only from the past 5 days and misteriously dosn't before that date

Postby dvdkite » 11 Oct 2019

Hello Everyone,

I have a very simply strategy ( it's just at the first step of development ) that buy after a green candle with a body of minimum 15 pts and sell after a red candle of 15 pts..... TArget and stop are fixed... It's that simple .

So I have a Chart with the 10 minute DAX future and when I run the backtest it is only doing backtest starting from the 7th of october (today: now is the 11th) so I can only see the last 5 days... The chart settings date start from the 6 of september.....
So anyone has ever experienced an issue like this? There's not date indication or limitations in the code...

If I run the strategy with 1 minute chart it is running from the 10 of september... so almost from the beginning of the chart... but with 10 minutes it is only calculating the last 5 days...
Any Ideas???

Thanks

David
MISTERY_DAX_10min.JPG
(353.45 KiB) Downloaded 208 times

User avatar
TJ
Posts: 7742
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: Backetest is working only from the past 5 days and misteriously dosn't before that date

Postby TJ » 11 Oct 2019

Look up the definition of

MaxBarsBack

dvdkite
Posts: 65
Joined: 16 May 2018
Has thanked: 10 times
Been thanked: 1 time

Re: Backetest is working only from the past 5 days and misteriously dosn't before that date

Postby dvdkite » 12 Oct 2019

Look up

MaxBarsBack
Hello Tj,

do you mean this settings?
Cattura.JPG
(59.17 KiB) Downloaded 196 times
But as I said for example if I simply switch the chart from 10 minutes to 1 minutes it is calculating the strategy from the 10th of septemper (almost close to the 6th where the charts starts) so it is already ABLE to go back many and many bars.

Any idea?

It is really a mistery.

thanks

User avatar
TJ
Posts: 7742
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: Backetest is working only from the past 5 days and misteriously dosn't before that date

Postby TJ » 12 Oct 2019

Why do you need 2,500 bars of MBB?

Please go to the wiki and study the purpose and usage of the MaxBarsBack.

dvdkite
Posts: 65
Joined: 16 May 2018
Has thanked: 10 times
Been thanked: 1 time

Re: Backetest is working only from the past 5 days and misteriously dosn't before that date

Postby dvdkite » 13 Oct 2019

Why do you need 2,500 bars of MBB?

Please go to the wiki and study the purpose and usage of the MaxBarsBack.
That 2500 setting has been forgotten there because in the past I had a studh to run that required that number just to start.... then I simply let as it was the setting.
But that's not the problem here and it's not the purpose of this post.

Can we please focus on what is the cause that avoid the backtest to work on the entire period of the chart?

dvdkite
Posts: 65
Joined: 16 May 2018
Has thanked: 10 times
Been thanked: 1 time

Re: Backetest is working only from the past 5 days and misteriously dosn't before that date

Postby dvdkite » 14 Oct 2019

Nobody has any idea about what could be the problem?? I really don't know what else to check.... Thanks

User avatar
ABC
Posts: 718
Joined: 16 Dec 2006
Location: www.abctradinggroup.com
Has thanked: 125 times
Been thanked: 408 times
Contact:

Re: Backetest is working only from the past 5 days and misteriously dosn't before that date  [SOLVED]

Postby ABC » 14 Oct 2019

David,

can you elaborate why Max Bars back is not the problem here? How many bars do you have on the chart in total and was is the bar number of the first signal?
In fact with 10 minute bars for the Dax and starting on the 6th of September it's not unlikely that the high Max bars setting you are using is causing the trades to appear only on the last 5 days as your settings will skip the first 2500 bars.

Regards,

ABC

dvdkite
Posts: 65
Joined: 16 May 2018
Has thanked: 10 times
Been thanked: 1 time

Re: Backetest is working only from the past 5 days and misteriously dosn't before that date

Postby dvdkite » 15 Oct 2019

David,

can you elaborate why Max Bars back is not the problem here? How many bars do you have on the chart in total and was is the bar number of the first signal?
In fact with 10 minute bars for the Dax and starting on the 6th of September it's not unlikely that the high Max bars setting you are using is causing the trades to appear only on the last 5 days as your settings will skip the first 2500 bars.

Regards,

ABC
Hello ABC,

surprisingly your're right. That was the problem. I thought that max bars back was referred to the maximum number of bars that a function can use to calcolate a value starting from the actual bar and going in the past direction...
By setting it at a lower number I solved the problem.
Also thanks to TJ but he's "ermetic" reply didn't make me think that it could really be a problem...

Regards,

David


Return to “MultiCharts”