Daily Simple Moving Averages For ThinkOrSwim

jintrd

New member
The daily moving averages are often used to help identify trends, gauge price strength, and find potential entry and exit points:

Trend
The 50, 100, 200 averages can indicate whether a trend is up or down. For example, if a stock is trading above its daily averages and the averages are rising, the long-term trend is considered up. If a stock drops below, it could indicate resistance and a bearish shift in price.

Price strength
The daily averages can show a security's price strength. Stocks that consistently trade above their averages are considered strong stocks.

Entry and exit points
Traders can use the daily averages in combination with other indicators to help identify entry and exit points. For example, crossovers between the 200-SMA and the 50-SMA can be technically significant and may indicate a golden cross or a death cross.

Fundamental strength
The daily averages can help identify which stocks are fundamentally strong. Stocks that perform above the moving average over a period of time may be considered fundamentally healthy and more likely to keep prices high.

See post below for the ToS script.
R9tl4hx.png
 
Last edited by a moderator:

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

This 5 Daily Simple Moving Average is from Trading View. I want to be able to view the 5dsma on any chart such as the 1min chart. Can someone translate/code this into thinkorswim.

study(title="Daily Simple Moving Averages", shorttitle="Daily SMAs", overlay=true)
sma1=input(50,"SMA Length", type=integer)
sma2=input(100,"#2", type=integer)
sma3=input(200,"#3", type=integer)
sa(x) => security(tickerid, "D", sma(close,x))

plot(sa(sma1), color=purple, linewidth=2)
plot(sa(sma2), color=blue, linewidth=2)
plot(sa(sma3), color=black, linewidth=2)
check this

CSS:
#-- Indicator for TOS
# requst from useThinkScript.com member
#study(title="Daily Simple Moving Averages", shorttitle="Daily SMAs", overlay=true)
input smaLength1 =  50; #,"SMA Length", type=integer)
input smaLength2 = 100; #,"#2", type=integer)
input smaLength3 = 200; #,"#3", type=integer)
input aggPeriod  = AggregationPeriod.DAY;

def tf = Max(GetAggregationPeriod(), aggPeriod);
def sma1 = Average(close(Period = tf), smaLength1);
def sma2 = Average(close(Period = tf), smaLength2);
def sma3 = Average(close(Period = tf), smaLength3);

plot smaLine1 = sma1; #, color=purple, linewidth=2)
plot smaLine2 = sma2; #, color=blue, linewidth=2)
plot smaLine3 = sma3; #, color=black, linewidth=2)

smaLine1.SetDefaultColor(Color.CYAN);
smaLine2.SetDefaultColor(Color.MAGENTA);
smaLine3.SetDefaultColor(Color.RED);
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
172 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