Happymono
New member
Tried to edit a script i found posted here to show different colors depending on the location of price around the ema's the script edited below is getting there but i can't figure out the transition colors correctly or when its between ema's
Code:
input evg1 = 50;
input evg2 = 200;
def EMA1 = ExpAverage(close[-0], evg1);
def EMA2 = ExpAverage(close[-0], evg2);
AssignPriceColor (if close > EMA2
then if open > close
then Color.cyan
else Color.cyan
else if close > EMA1
then if open > close
then Color.green
else Color.green
else if close < EMA2
then if open < close
then Color.red
else Color.red
else if close < EMA1
then if open < close
then Color.dark_ORANGE
else Color.dark_ORANGE
else color.yellow );
Last edited by a moderator: