Greetings!
I'm trying to create a TEMA cross over chart AND label
For example: 5/14 day
and a label so when the shorter line crosses over the longer line, the label shows "Bullish" and turns green. It would turn red when lines reverse.
Ultimately, I may want to add one for a shorter term indicator and one for medium term (say 20/50)
even more idea would be to identify different levels. example, if the 5 crosses above 14, it would show "slightly bullish", but once it goes at least 2 ticks over then we could show "bullish" and so on. I hope I'm making sense.
Here's the code I have but need to fine tune it and add labels
I'm trying to create a TEMA cross over chart AND label
For example: 5/14 day
and a label so when the shorter line crosses over the longer line, the label shows "Bullish" and turns green. It would turn red when lines reverse.
Ultimately, I may want to add one for a shorter term indicator and one for medium term (say 20/50)
even more idea would be to identify different levels. example, if the 5 crosses above 14, it would show "slightly bullish", but once it goes at least 2 ticks over then we could show "bullish" and so on. I hope I'm making sense.
Here's the code I have but need to fine tune it and add labels
Code:
input price = close;
input length = 5;
input length2 = 14;
def ema1 = ExpAverage(price, length);
def ema2 = ExpAverage(ema1, length);
def ema3 = ExpAverage(ema2, length);
def ema1a = ExpAverage(price, length2);
def ema2a = ExpAverage(ema1a, length2);
def ema3a = ExpAverage(ema2a, length2);
plot TEMA = 3 * ema1 - 3 * ema2 + ema3;
TEMA.SetDefaultColor(GetColor(0));
plot TEMA2 = 3 * ema1a - 3 * ema2a + ema3a;
TEMA2.SetDefaultColor(GetColor(1));