How can I plot the Projection Oscillator with dark red, dark orange, and dark green colors when values are > 80, between 80 and 20, and < 20.
Code:
#Customized Projection Oscillator...Mike
declare lower;
input length = 14;
def MaxBound = HighestWeighted(high, length, LinearRegressionSlope(price = high, length = length));
def MinBound = LowestWeighted(low, length, LinearRegressionSlope(price = low, length = length));
def diff = MaxBound - MinBound;
plot PROSC = if diff != 0 then 100 * (close - MinBound) / diff else 0;
plot OverBought = 80;
plot OverSold = 20;
Here's my attempt........................
def H = PROSC > 80;
def N = PROSC between 80 and 20;
def L = PROSC < 20;
PROSC.DefineColor("H", Color.DOWNTICK);
PROSC.DefineColor("N", Color.DARK_ORANGE);
PROSC.DefineColor("L", Color.UPTICK);
Last edited by a moderator: