Hello,
I am trying to make a Genetic Optimization on a trading signal. The highest value of the testing parameters, is 192, as you can see in the file I am attaching.... but when I start the optimization, soon I receive the error of:
"Tried to reference back more bars... etc".... Initially I was using 200 MaxBarsBack.. but now I incremented up to 100 000, the max allowed, and I still have the error!!! the Optimization set is the same....
What could be that?! Any idea?
I am actually unable to perform the optimization....
MaxBarsBack bug?! [SOLVED]
Re: MaxBarsBack bug?!
Here you have the error message:
- Attachments
-
- Error MSG.png
- (8.93 KiB) Downloaded 839 times
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: MaxBarsBack bug?!
Hello,
I am trying to make a Genetic Optimization on a trading signal. The highest value of the testing parameters, is 192, as you can see in the file I am attaching.... but when I start the optimization, soon I receive the error of:
"Tried to reference back more bars... etc".... Initially I was using 200 MaxBarsBack.. but now I incremented up to 100 000, the max allowed, and I still have the error!!! the Optimization set is the same....
What could be that?! Any idea?
I am actually unable to perform the optimization....
You have a misunderstanding on the meaning of "MaxBarsBack".
You are not alone.
Please go to wiki (or any EasyLanguage manual) and read the definition again.
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: MaxBarsBack bug?!
What is your chart resolution?
How many bars do you have on the chart? (ie how far back in history)
How many bars do you have on the chart? (ie how far back in history)
Re: MaxBarsBack bug?!
What is your chart resolution?
How many bars do you have on the chart? (ie how far back in history)
Actually the historical has +274 000 bars, 5minutes resolution.
I am reviewing the definition now. It is the first time I am having such problem, I always used a value around 300-500 for MaxBarsBack, without a problem...
Re: MaxBarsBack bug?! [SOLVED]
I find that for backtesting a single signal set, with 192 value in one parameter, Max Bars Back of 200, allows me to open the SPR.
While trying an optimization with variations between 3 and 192 of this and some other parameters, with Max Bars Back=200, on the same historical, same signal, gives me a Max Bars Back error...
This happens both for Exhaustive and Genetic Optimization, I did tried...
While trying an optimization with variations between 3 and 192 of this and some other parameters, with Max Bars Back=200, on the same historical, same signal, gives me a Max Bars Back error...
This happens both for Exhaustive and Genetic Optimization, I did tried...
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: MaxBarsBack bug?!
I find that for backtesting a single signal set, with 192 value in one parameter, Max Bars Back of 200, allows me to open the SPR.
While trying an optimization with variations between 3 and 192 of this *** and some other parameters *** , with Max Bars Back=200, on the same historical, same signal, gives me a Max Bars Back error...
This happens both for Exhaustive and Genetic Optimization, I did tried...
You have to check your compound formulas and "Look backs".
eg. MACD 6,26,9.
On the surface, the longest parameter is 26.
But you are doing a 9 MA on the CD,
so the MaxBarsBack is 26+9 = 35.
Can't tell you more without looking at the code...