Signal Error "Not enough series length"

Questions about MultiCharts and user contributed studies.
Posts: 50
Joined: 11 Nov 2005

Signal Error "Not enough series length"

Postby t123knight » 22 Feb 2010

I'm sure this is a very easy question to answer. I have a very basic Signal based on a ERG calculation. However, when I try to apply it to a chart I get the following error message

Error in Study "ERG LE"::Not enough series length. Bars reference value:5000

I try increasing the bar reference value inside "signals"-->"Properties"-->"Max number of bars study will reference" But I'm still getting the same error message.

Below is my code.

Input: Price(c);
Input: r(49);
Input: s(147);
Input: u(49);

var: TSI (0) ; {TSI = True Strength Index by Bill Blau}

Value5 = WAverage(price-price[1], r);
Value6 = WAverage(Value5, s);
Value7 = WAverage(AbsValue(Price-Price[1]), r);
Value8 = WAverage(Value7, s);

Value9 = 100 * value6; { ERG Numerator }
Value10 = value8; { ERG Denominator }

If Value10 <> 0 then TSI = Value9 / Value10 else TSI = 0;
value1 = TSI ;
value2= XAverage(TSI, u); {this is the TRENDING ERG Value}

if value2[1]>value2[2] and value2[2]<value2[3] then
Buy ( "NewLogicLE" ) next bar at market ;

Any ideas what might be going wrong?

User avatar
Posts: 6873
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 984 times
Been thanked: 1976 times

Postby TJ » 22 Feb 2010

what is your chart resolution? (eg. 5 min? 2401 volume bar?)

how many bars do you have on the chart?

Posts: 50
Joined: 11 Nov 2005

Postby t123knight » 23 Feb 2010

I actually had a 50 volume bar chart on the NQ but I was only going back 2 days. When I increased it to 10 I finally got a signal. Is there any good literature on Signals. I'm having weird thinks happen when I'm using arrays within a signal. I have to have over 10k bars referenced before I can get it to work. Then its giving me weird output.

I'm basically trying to turn an indicator I'm using into a signal

Posts: 100
Joined: 17 Jul 2009
Location: Germany

Postby geektrader » 23 Feb 2010

In your case you need to DECREASE the Max Bars Back Setting. Your System doesn´t seem to require more than 200 Bars Back, so set the Max Bars Back to 300 (for safety). Now you should be able to get signals already with setting your days back about to 3 or 4 days.

What happened in your case: since the max bars back setting was at 5000, you need at least 5001 bars on the chart to see a signal generated. That is because 5000 of the plotted bars in your chart alone are reserved for the Max Bars Back. Then the first signal can only occur on bar 5001. In theory you though most likely have to plot about 7000 bars to see any signal.

So what you have to do as explained above, drastically reduce your Max Bars Back setting and you will be able to see signals with much less bars plotted on the chart.

Return to “MultiCharts”