I have been developing an indicator that creates an automated trend channel.
My indicator calculates a the initial starting point from the high side (in green below) which i'm happy with. My issue is for how to calculate the other variables in red and im stuck here.
TChighs = Draw.TrendChannel(this, @"TChighs", false, highestBarZone3, highestBarZone3Price, NextHighestBar, NextHighestBarPrice, LowestBar, LowestBarPrice );
These are substantially more difficult, and clearly using next highest bar and next lowest bar didnt work as you can see in picture below. Green is from the indicator and the purple is what it is supposed to look like:
Is there a way or has anyone solved this? im guessing have to gradually decrease the slope of the top line until it makes contact with price and then save that BarNumber and High price?
then do some similar other calculation with the lower trend line and raise it incrementally ? I have no idea how to begin to calculate this stuff but i think if anyone has, or can help, it would be good for the community (and me ) to derive a full trend channel from just one given price point.
Comment