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
 
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
 

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

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);
 
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);
 
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. I was looking for it for very long time. Can I get the colored for 50 SMA?
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
271 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top