Code: Select all
inputs:
MA_Length (20),
Sensitivity (1),
Color_Up (green),
Color_Down (red),
Color_Neutral (yellow);
variables:
MA (0),
MA_Rising (false),
MA_Falling (false);
MA = round(XAverage(Close, MA_Length), 1);
MA_Rising = MA > MA[Sensitivity];
MA_Falling = MA < MA[Sensitivity];
if MA_Rising then Plot1(MA, "MA", Color_Up)
else if MA_Falling then Plot1(MA, "MA", Color_Down)
else Plot1(MA, "MA", Color_Neutral);
Here's how I think it should look: Can Plot be used to do this?
-pdq