MaxBarsBack bug?!  [SOLVED]

Questions about MultiCharts and user contributed studies.
User avatar
Gargoyle
Posts: 92
Joined: 18 May 2014
Has thanked: 7 times
Been thanked: 5 times

MaxBarsBack bug?!

Postby Gargoyle » 08 Sep 2016

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....
Attachments
Testing Set.png
(6.2 KiB) Downloaded 839 times

User avatar
Gargoyle
Posts: 92
Joined: 18 May 2014
Has thanked: 7 times
Been thanked: 5 times

Re: MaxBarsBack bug?!

Postby Gargoyle » 08 Sep 2016

Here you have the error message:
Attachments
Error MSG.png
(8.93 KiB) Downloaded 839 times

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

Re: MaxBarsBack bug?!

Postby TJ » 08 Sep 2016

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.

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

Re: MaxBarsBack bug?!

Postby TJ » 08 Sep 2016

What is your chart resolution?

How many bars do you have on the chart? (ie how far back in history)

User avatar
Gargoyle
Posts: 92
Joined: 18 May 2014
Has thanked: 7 times
Been thanked: 5 times

Re: MaxBarsBack bug?!

Postby Gargoyle » 08 Sep 2016

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...

User avatar
Gargoyle
Posts: 92
Joined: 18 May 2014
Has thanked: 7 times
Been thanked: 5 times

Re: MaxBarsBack bug?!  [SOLVED]

Postby Gargoyle » 08 Sep 2016

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...

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

Re: MaxBarsBack bug?!

Postby TJ » 08 Sep 2016

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...


Return to “MultiCharts”