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
Backetest is working only from the past 5 days and misteriously dosn't before that date [SOLVED]
- TJ
- Posts: 7744
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: Backetest is working only from the past 5 days and misteriously dosn't before that date
Look up the definition of
MaxBarsBack
MaxBarsBack
Re: Backetest is working only from the past 5 days and misteriously dosn't before that date
Hello Tj,Look up
MaxBarsBack
do you mean this settings?
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
- TJ
- Posts: 7744
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: Backetest is working only from the past 5 days and misteriously dosn't before that date
Why do you need 2,500 bars of MBB?
Please go to the wiki and study the purpose and usage of the MaxBarsBack.
Please go to the wiki and study the purpose and usage of the MaxBarsBack.
Re: Backetest is working only from the past 5 days and misteriously dosn't before that date
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.Why do you need 2,500 bars of MBB?
Please go to the wiki and study the purpose and usage of the MaxBarsBack.
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?
- ABC
- Posts: 722
- Joined: 16 Dec 2006
- Location: www.abctradinggroup.com
- Has thanked: 125 times
- Been thanked: 410 times
- Contact:
Re: Backetest is working only from the past 5 days and misteriously dosn't before that date [SOLVED]
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
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
Re: Backetest is working only from the past 5 days and misteriously dosn't before that date
Hello ABC,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
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