Profile Picture

Changing Indicator length on the fly

Posted By kaizen 6 Years Ago
Posted Monday December 12 2011
Is there a way to change the length of an indicator when a system is running?

i.e I use (in startup)

linregInd = New LinearRegressionSlope(32, rsi)

But I want to able to change the length of the indicator on the fly. The length is based of peaks and troughs so the length I need is not known until the system runs.

I tried


in NewBar but it throws an error saying "An exception of type System.ArgumentException was thrown.
count should have been 200, but was 10"

While I am here what does NewSeries actully do and how is it used?


Posted Tuesday December 13 2011
There's not a way to do this with indicators. You can use the LinearRegressionQueue class to calculate a linear regression over arbitrary inputs.

You shouldn't use the NewSeries method. It's purpose was to recalculate the indicator on new data, but shouldn't be used when running a system.


Similar Topics

Reading This Topic

2005-2017 © RightEdge Systems