# single regression channel

## Recommended Posts

Hi
Question 1:
Does anyone have thoughts on how you can create a rule that would, for a single regression channel, calculate the "tilt angle" for the channel?
For example,
If "title angle" >= 5 (%)
Then do this
else do this

Question 2:
Any thoughts on how to calculate the "price percent" from the bottom to top of the currently defined channel width?

Thanks so much in advance for you help.
Colin

##### Share on other sites

Tilt angle doesn't really make sense, at least as the actual "angle" - look at the chart, zoom in/out, the angle changes. You can do "rate of change" by subtracting value one candle back from current value, and then finding out what % it is of the price. Something like (SRC-SRC[1])*100/Close. That is somewhat indicative. Obviously the value would be positive for channel going up, negative for one going down.

Price Percent - you mean basically where the price is in between the upper and lower value? If so - let's say the variable for Single Regression Channel Upper is SRCU and for Lower is SRCL -

var ChannelRangePercent = (Close-SRCL)*100/(SRCU-SRCL);

That will give you 0% to 100%.

##### Share on other sites

Mike thank you so much for the insight.
You are right, I was actually talking about rate of change.
Will give this a go and report back.

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.