when the angle goes from neg. to pos., i.e. crosses to above zero.
Am I overlooking some (painfully) obvious detail here?
I can't imagine making the code much simpler.
Code: Select all
Inputs:Price(Close);
Vars:Angle(0);
Angle=ArcTangent(Price-Price[1]);
SetPlotColor(1,DarkGray);
If Angle > 0 and Angle[1] < 0 then
SetPlotColor(1,Red);
Plot1(Angle);
Plot2(0);