Jump to content
Medved Trader Forums

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

Link to comment
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%.

 

 

 

Link to comment
Share on other sites

Join the conversation

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

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...