SMA Scan and within x number of bars

stormy77

Member
Trying to understand how the "within x bars" affects the scan.

Looking for stocks where currently:

50 SMA > 100 SMA
100 SMA > 200 SMA
RSI BETWEEN 30 AND 50
+ other filters like volume and price

What would the value in the "within x bars" be?
 
Solution
Within 1 bar would mean that the conditions of the scan can only be met on the right-most bar. So, hypothetically, if chart is 10 bars long, and you do within 3 bars, the conditions of the scan can be met on either bar 10, 9, or 8.

Lets say you're using 30 minute candles; there are 13 candles in a day. At the end of the day, you could scan within 13 bars to review all of the results from today, and so on. There are a lot of different reasons you might want to scan within x bars.
Within 1 bar would mean that the conditions of the scan can only be met on the right-most bar. So, hypothetically, if chart is 10 bars long, and you do within 3 bars, the conditions of the scan can be met on either bar 10, 9, or 8.

Lets say you're using 30 minute candles; there are 13 candles in a day. At the end of the day, you could scan within 13 bars to review all of the results from today, and so on. There are a lot of different reasons you might want to scan within x bars.
 
Solution
Within 1 bar would mean that the conditions of the scan can only be met on the right-most bar. So, hypothetically, if chart is 10 bars long, and you do within 3 bars, the conditions of the scan can be met on either bar 10, 9, or 8.

Lets say you're using 30 minute candles; there are 13 candles in a day. At the end of the day, you could scan within 13 bars to review all of the results from today, and so on. There are a lot of different reasons you might want to scan within x bars.
OK, so I'm using this as a scanner.
so if I'm scanning for stocks where 50 SMA > 100 SMA within 2 bars, does this mean that it will show stocks where the 50SMA>100SMA within last 2 days only?
 
It will show you stocks where the 50 is greater than the 100 on, at least, either of the last two days. It doesn't require the 50 to be under the 100 on the 3rd day back, or anything like that, if that's what you're asking.
 

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

Thread starter Similar threads Forum Replies Date
S flat sma 200 scan Questions 2
samiranadhikari SMA Stoch MACD scan Questions 2
Allen Liang SMA - simple scan Questions 2
H 20-day SMA scan Questions 7
C 150 SMA Scan Help Questions 1

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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