Colored EMA/SMA

cashman

New member
I have been trying to find a colored EMA/SMA for quite sometime & have had trouble finding such. I saw a member (Chewie76) post this below as this is the kind of colored EMA/SMA I am looking for. Wondering if anyone has something similar & is willing to share the script or help me create me own. Thank you in advance, and have a wonderful day.


-Cash

6oUXClm.png
 

Slippage

Active member
Those widening and narrowing bands of color attached to the upper and lower averages are just "clouds" between two different averages. There's an example here with some other bells and whistles. Or you can use the search feature here and search for "cloud" to find other options.
https://usethinkscript.com/threads/...rossover-cloud-with-scan-for-thinkorswim.229/

The middle line in your pic, changing between red and green, and it looks like orange in one place and dark green in another, can be accomplished using AssignValueColor, with whatever calculations are relevant. That coloring doesn't appear to be simply based on a rising or falling average but takes some other calculation into account to show when it's slowing.
https://tlc.thinkorswim.com/center/reference/thinkScript/Functions/Look---Feel/AssignValueColor
 

Gymini

New member
I have been trying to find a colored EMA/SMA for quite sometime & have had trouble finding such. I saw a member (Chewie76) post this below as this is the kind of colored EMA/SMA I am looking for. Wondering if anyone has something similar & is willing to share the script or help me create me own. Thank you in advance, and have a wonderful day.


-Cash

6oUXClm.png
input price = close;
input length = 21;
input displace = 0;
input showBreakoutSignals = no;

plot MovAvgExponential = Average(price[-displace], length);
plot UpSignal = price crosses above MovAvgExponential;
plot DownSignal = price crosses below MovAvgExponential;

UpSignal.SetHiding(!showBreakoutSignals);
DownSignal.SetHiding(!showBreakoutSignals);
def higher = MovAvgExponential > MovAvgExponential[1];
def lower = MovAvgExponential < MovAvgExponential[1];

MovAvgExponential.SetDefaultColor(GetColor(1));
UpSignal.SetDefaultColor(Color.UPTICK);
UpSignal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
DownSignal.SetDefaultColor(Color.DOWNTICK);
DownSignal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

MovAvgExponential.SetPaintingStrategy(PaintingStrategy.LINE);
MovAvgExponential.AssignValueColor(if Higher then Color.green else if Lower then color. RED else Color. CYAN);
MovAvgExponential.SetLineWeight(2);
I have been trying to find a colored EMA/SMA for quite sometime & have had trouble finding such. I saw a member (Chewie76) post this below as this is the kind of colored EMA/SMA I am looking for. Wondering if anyone has something similar & is willing to share the script or help me create me own. Thank you in advance, and have a wonderful day.


-Cash

6oUXClm.png
This is for 21 EMA so if you need different avg# just go in script and change the numbers...

input price = close;
input length = 21;
input displace = 0;
input showBreakoutSignals = no;

plot MovAvgExponential = Average(price[-displace], length);
plot UpSignal = price crosses above MovAvgExponential;
plot DownSignal = price crosses below MovAvgExponential;

UpSignal.SetHiding(!showBreakoutSignals);
DownSignal.SetHiding(!showBreakoutSignals);
def higher = MovAvgExponential > MovAvgExponential[1];
def lower = MovAvgExponential < MovAvgExponential[1];

MovAvgExponential.SetDefaultColor(GetColor(1));
UpSignal.SetDefaultColor(Color.UPTICK);
UpSignal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
DownSignal.SetDefaultColor(Color.DOWNTICK);
DownSignal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

MovAvgExponential.SetPaintingStrategy(PaintingStrategy.LINE);
MovAvgExponential.AssignValueColor(if Higher then Color.green else if Lower then color. RED else Color. CYAN);
MovAvgExponential.SetLineWeight(2);
 

cashman

New member
input length = 21;
input displace = 0;
input showBreakoutSignals = no;

plot MovAvgExponential = Average(price[-displace], length);
plot UpSignal = price crosses above MovAvgExponential;
plot DownSignal = price crosses below MovAvgExponential;

UpSignal.SetHiding(!showBreakoutSignals);
DownSignal.SetHiding(!showBreakoutSignals);
def higher = MovAvgExponential > MovAvgExponential[1];
def lower = MovAvgExponential < MovAvgExponential[1];

MovAvgExponential.SetDefaultColor(GetColor(1));
UpSignal.SetDefaultColor(Color.UPTICK);
UpSignal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
DownSignal.SetDefaultColor(Color.DOWNTICK);
DownSignal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

MovAvgExponential.SetPaintingStrategy(PaintingStrategy.LINE);
MovAvgExponential.AssignValueColor(if Higher then Color.green else if Lower then color. RED else Color. CYAN);
MovAvgExponential.SetLineWeight(2);

This is for 21 EMA so if you need different avg# just go in script and change the numbers...

input price = close;
input length = 21;
input displace = 0;
input showBreakoutSignals = no;

plot MovAvgExponential = Average(price[-displace], length);
plot UpSignal = price crosses above MovAvgExponential;
plot DownSignal = price crosses below MovAvgExponential;

UpSignal.SetHiding(!showBreakoutSignals);
DownSignal.SetHiding(!showBreakoutSignals);
def higher = MovAvgExponential > MovAvgExponential[1];
def lower = MovAvgExponential < MovAvgExponential[1];

MovAvgExponential.SetDefaultColor(GetColor(1));
UpSignal.SetDefaultColor(Color.UPTICK);
UpSignal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
DownSignal.SetDefaultColor(Color.DOWNTICK);
DownSignal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

MovAvgExponential.SetPaintingStrategy(PaintingStrategy.LINE);
MovAvgExponential.AssignValueColor(if Higher then Color.green else if Lower then color. RED else Color. CYAN);
MovAvgExponential.SetLineWeight(2);
Thank you my friend!
Cheers
 

Emp1011

New member
I have been trying to find a colored EMA/SMA for quite sometime & have had trouble finding such. I saw a member (Chewie76) post this below as this is the kind of colored EMA/SMA I am looking for. Wondering if anyone has something similar & is willing to share the script or help me create me own. Thank you in advance, and have a wonderful day.

hope this is what you're looking for:
Code:
#Multiple EMA Cloud
#For Stock Analysis : http://TheTopList.com
input ema1low = 8;
input ema1high = 13;
input ema2low = 34;
input ema2high = 50;
input ema3low = 100;
input ema3high =200;
def ema8 = ExpAverage(close, ema1low);
def ema13 = ExpAverage(close, ema1high);
AddCloud(ema8, ema13, Color.green, Color.RED);
def ema34 = ExpAverage(close, ema2low);
def ema50 = ExpAverage(close, ema2high);
AddCloud(ema34, ema50, Color.magenta, Color.cyan);
def ema100 = ExpAverage(close, ema3low);
def ema200 = ExpAverage(close, ema3high);
AddCloud(ema100, ema200, Color.yellow, Color.pink);

AddLabel(1, " 8 green" + ema1low+ ")",color.greeN);
AddLabel(7, " 13 red(" +ema1high + ")",color.red);

AddLabel(1, " 34 magenta" + ema2low + ")",color.magenta);
AddLabel(7, " 50 cyan(" + ema2high + ")",color.cyan);

AddLabel(1, " 100 Yellow" + ema3low + ")",color.yellow);
AddLabel(7, " 200 Pink(" +ema3high + ")",color.pink);
 

Similar threads

Top