Low Volatility UpTrending Stocks with Average Weekly Returns of 1% -- Scan For ThinkOrSwim

justAnotherTrader

Active member
VIP
VIP Enthusiast
Hey ThinkScripters! Been a long time since I have been on the forum so I figured I should come back with some fruit for the group. The following is designed to be used as a scan and is mostly explained in the title:

I recommend setting a price for your stock to be at least $10. In my usage I have it set up for $30 but obviously that is a preference
The Parameters are as follows (the paramaters are hard coded but can be easily adjusted by you:

GradualIncrease - We look for continuously increasing SMA to indicate an uptrend
LowVolatility = Used to ensure that the trend has been gradually increasing and not choppy
weeklyReturn = Used to ensure that our stock is returning at least 1% a wee



Code:
# Calculate the Simple Moving Average (SMA)

def sma = Average(close, 20);



# Check for gradual increase

def GradualIncrease = sma > sma[5] and sma[5] > sma[10] and sma[10] > sma[15] and sma[15] > sma[20];



# Calculate the daily returns

def dailyReturns = close / close[1] - 1;



# Calculate the standard deviation of the daily returns

def stdev = StDev(dailyReturns, 60);



# Check if the standard deviation is below 0.02

def LowVolatility = stdev < 0.02;



# Define the closing price 5 days ago

def close5DaysAgo = close[5];



# Calculate the weekly return

def weeklyReturn = (close - close5DaysAgo) / close5DaysAgo;



# Calculate the average weekly return over the past 60 trading days

def avgWeeklyReturn = Average(weeklyReturn, 20);



# Check if the average weekly return is at least 1%

def HighAvgWeeklyReturn = avgWeeklyReturn >= 0.01;



# Combine all the conditions into one final plot

plot Scan = GradualIncrease and LowVolatility and HighAvgWeeklyReturn;
 
Hey ThinkScripters! Been a long time since I have been on the forum so I figured I should come back with some fruit for the group. The following is designed to be used as a scan and is mostly explained in the title:

I recommend setting a price for your stock to be at least $10. In my usage I have it set up for $30 but obviously that is a preference
The Parameters are as follows (the paramaters are hard coded but can be easily adjusted by you:

GradualIncrease - We look for continuously increasing SMA to indicate an uptrend
LowVolatility = Used to ensure that the trend has been gradually increasing and not choppy
weeklyReturn = Used to ensure that our stock is returning at least 1% a wee



Code:
# Calculate the Simple Moving Average (SMA)

def sma = Average(close, 20);



# Check for gradual increase

def GradualIncrease = sma > sma[5] and sma[5] > sma[10] and sma[10] > sma[15] and sma[15] > sma[20];



# Calculate the daily returns

def dailyReturns = close / close[1] - 1;



# Calculate the standard deviation of the daily returns

def stdev = StDev(dailyReturns, 60);



# Check if the standard deviation is below 0.02

def LowVolatility = stdev < 0.02;



# Define the closing price 5 days ago

def close5DaysAgo = close[5];



# Calculate the weekly return

def weeklyReturn = (close - close5DaysAgo) / close5DaysAgo;



# Calculate the average weekly return over the past 60 trading days

def avgWeeklyReturn = Average(weeklyReturn, 20);



# Check if the average weekly return is at least 1%

def HighAvgWeeklyReturn = avgWeeklyReturn >= 0.01;



# Combine all the conditions into one final plot

plot Scan = GradualIncrease and LowVolatility and HighAvgWeeklyReturn;
Thanks for your contributions, may I know how will you shortlist the stocks after the scan is completed and what is your entry setup and what timeframe do you enter? thanks
 
Thanks for your contributions, may I know how will you shortlist the stocks after the scan is completed and what is your entry setup and what timeframe do you enter? thanks
I don't know if I am allowed to plug other sites, if not I am sure admin will let me know. But stockrover.com allows me to take an entire watchlist an import it so I can sort it for fundamentals. I try to trade stocks that if I get upside down in the trade I dont mind holding onto. Then my entries are looking for oversold areas (using the tmo rsi indicator) and support levels on the daily to buy into.
 
Thank you for sharing this. What would be your trade plan for the scan results? It will show you up trending stocks for 20 days and returned less volatile ones, however, 20 days of up might be the turning point for these stocks.
 

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

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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