GOOD AFTERNOON CODERS,
I have the current code that I'm looking to change so that it displays "Bullish" when price is above the 50ema on the 10 min time frame and "Bearish" when price is below the 10 min time frame. In addition to that, I would like an alert sent when these two conditions are met. I will put the code below.
input EMA_1_Length = 50; #exponential
input EMA_1_closeType = ohlc4;
def EMA_1_avg = ExpAverage(EMA_1_closeType, EMA_1_Length);
def pricevs50ema = ( 100 * (close - EMA_1_avg) / EMA_1_avg);
plot pricev50ema = If (IsNaN(EMA_1_avg), 0 , pricevs50ema);
pricev50ema.AssignValueColor(Color.BLACK );
AssignBackgroundColor(if pricevs50ema > 0 then createcolor(177,213,242) else createcolor(255,234,202) );
I have the current code that I'm looking to change so that it displays "Bullish" when price is above the 50ema on the 10 min time frame and "Bearish" when price is below the 10 min time frame. In addition to that, I would like an alert sent when these two conditions are met. I will put the code below.
input EMA_1_Length = 50; #exponential
input EMA_1_closeType = ohlc4;
def EMA_1_avg = ExpAverage(EMA_1_closeType, EMA_1_Length);
def pricevs50ema = ( 100 * (close - EMA_1_avg) / EMA_1_avg);
plot pricev50ema = If (IsNaN(EMA_1_avg), 0 , pricevs50ema);
pricev50ema.AssignValueColor(Color.BLACK );
AssignBackgroundColor(if pricevs50ema > 0 then createcolor(177,213,242) else createcolor(255,234,202) );