Watch how to order a trading robot
It is very simple indicator draw red line between the top (point
A to B) and green line between the bottom (point C to D), indicator drew the
red line between highest high A and B , as in picture (trend line) for point B 2 >1 && 2 >3, and for point A 5 > 4 && 5 > 6. Same for green line but we drew
between lowest low as in picture (trend line). For the red trend the high of
any candle between point A and B must less than or equal to trend, and for
green trend the low of any candle between point C and D must greater or equal
to green trend (picture trend_line2) you can see red trend is not correct as
there is high of the candle > red trend so this is not our trend indicator must
not to draw it.
Indicator Drew Red line (color can be change from input).
Indicator Drew Green line (color can be change from input).
Indicator Drew letters A, B, C, and D as in picture (colors
can be change from input).
Indicator writes value of A, B, C, and D in comment.
Indicator drew the trend red or green whatever the direction
A>B or B>A.
Note: numbers 1, 2, 3….. Not required this only for explain.