BC Trading
New member
Can anyone tell me what the verbage should be instead of DefineColor below?
declare lower;
def AE = if IsNaN(GetActualEarnings()) then 0 else GetActualEarnings();
def EPS_TTM = Sum(AE, 252);
plot pe = close / EPS_TTM;
plot MedianPE = Median(pe);
MedianPE.SetDefaultColor (Color.WHITE);
pe.DefineColor (if pe <= MedianPE then color.green else color.red);
declare lower;
def AE = if IsNaN(GetActualEarnings()) then 0 else GetActualEarnings();
def EPS_TTM = Sum(AE, 252);
plot pe = close / EPS_TTM;
plot MedianPE = Median(pe);
MedianPE.SetDefaultColor (Color.WHITE);
pe.DefineColor (if pe <= MedianPE then color.green else color.red);