## Standard Deviation Channel indicator or Linear Regression indicator

Moderator: moderators

Huana
rank: <50 posts Posts: 3
Joined: Mon Nov 12, 2018 9:41 pm
Reputation: 0
Gender: ### Standard Deviation Channel indicator or Linear Regression indicator

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. Huana
rank: <50 posts Posts: 3
Joined: Mon Nov 12, 2018 9:41 pm
Reputation: 0
Gender: ### Re: Standard Deviation Channel indicator or Linear Regression indicator

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. jpmbull
rank: <50 posts Posts: 3
Joined: Sat Aug 13, 2011 4:37 pm
Reputation: 0
Gender: ### Re: Standard Deviation Channel indicator or Linear Regression indicator

Something like this?Daily chart
Attachments ESZ18 11-14-18.jpg (77.43 KiB) Viewed 1584 times