I have a strategy I would like to implement - it's fairly simple, but I find the coding really difficult. I would like to just pay someone to do it. Does anyone write code for pay?
I want to hand the routine a date range (or time range if intraday), and have it plot a channel - two parallel lines that include all the points, including highs and lows, for that date range. Buy/sell decisions will be made based on the ratio of length to width of the two lines, a higher ratio indicating a narrow trading range, and also the slope of the lines, indicating rate of gain/loss.
The two lines could be calculated this way - take the lowest possible line that is above or equal to all highs in the range, then draw the closest parallel line that is below or equal to all lows in the range.
The height between the two lines could be measured by taking a ratio of the higher and lower values at the midpoint of the line. Hope that makes sense.
The hope is that when I find a trading channel that is sufficiently narrow, it will be an indicator that the channel will continue for a while. A breakout from the channel, for example, a bottom breakout for an ascending channel would be a sell indicator.
There may already be some indicator like this, but I can't use bollinger bands because I want straight lines.
Suggestions welcome. Thanks.
Size:
Color: