Page 1 of 1

Standard Deviation Channel indicator or Linear Regression indicator

Posted: Mon Nov 12, 2018 10:29 pm
by Huana
Hello Traders

I am searching Standard Devation Channel indicator or Linear Regression indicator for tradestation but have not found the right one.

I have searched those and found some but the calculation if different. Most of them can't calculate from opening and by one day basis. The right calculation is in TOS and it is called "StandardDevChannel" Basically I would like to see one big channel from 9:30am to 4:00pm market range. The indicator draws a channel even it has one bar for calculations and when time goes on the new calculation goes in.

Is it complicated to modify TOS indicator for Tradestation?

Hopefully you understand my explanation. :roll:

Re: Standard Deviation Channel indicator or Linear Regression indicator

Posted: Tue Nov 13, 2018 11:27 am
by Huana
TOS standardDevChannel code:

input price = close;
input deviations = 2.0;
input fullRange = Yes;
input length = 21;

def regression;
def stdDeviation;
if (fullRange) {
regression = InertiaAll(price);
stdDeviation = stdevAll(price);
} else {
regression = InertiaAll(price, length);
stdDeviation = stdevAll(price, length);
}

plot UpperLine = regression + deviations * stdDeviation;
plot MiddleLine = regression;
plot LowerLine = regression - deviations * stdDeviation;

UpperLine.SetDefaultColor(GetColor(8));
MiddleLine.SetDefaultColor(GetColor(8));
LowerLine.SetDefaultColor(GetColor(8));

Can someone modify it to Tradestation? But I don't see the "code" what make's it calculate from first bar? Length seems to be 21 in default, but if you put timeframe "today only" then it starts calculating from first bar. :roll:

Re: Standard Deviation Channel indicator or Linear Regression indicator

Posted: Thu Nov 15, 2018 2:24 am
by jpmbull
Something like this?Daily chart