What are the best scripts to detect periods of consolidation?

I'm looking for something that can detect consolidation so I can stick to trading trends.

Consolidation where? Top of a given range, middle, etc? It makes a big difference. And what is a trend? There is always a trend, it all depends on how you define it.
 
Here is scanning script for base formation with a breakout. Though the source of this is unknown I have used it for quite a long time and find it very helpful.
Code:
input spanOfBase = 8;
input maxPrctCorrection = 10;
input spanOfBreakoutHigh = 42;
def flatBaseHigh = highest(high[1], spanOfBase);
def flatBaseLow = lowest(low[1], spanOfBase);
def percentMaxCorrection = AbsValue(100 * (flatBaseLow / flatBaseHigh - 1));
def withinPrctCorrectionLimits = percentMaxCorrection <= maxPrctCorrection; def highShade = if withinPrctCorrectionLimits then flatBaseHigh else flatBaseLow; def lowShade = if withinPrctCorrectionLimits then flatBaseLow else flatBaseHigh; def flatBase = highShade > lowShade;
def highestHighForBreakout = highest(high[1], spanOfBreakoutHigh);
def currentBreakoutHigh = high > highestHighForBreakout;
# only one of these can be scanned for at one time. Use "#" comment marks to turn off
# the one you don't need
#plot flatBaseFormation = flatBase and currentBreakOutHigh == 0;
plot breakOutSignal = currentBreakOutHigh and currentBreakOutHigh[1] == 0 and flatBase;
 
To use the heiken mtf strategy to the best of its ability it needs a pairing with a study pf sorts. Anyone who has a favorite trend/chop/consolidation study please post it here so we can find the best pairing. I may end up asking @diazlaz to make a combo trend/chop/consolidation paintbar script with many of these indicators if they have promise put together.

So far stoplight v2 seems to be the best pairing.
 
@tomsk Hi, when we are selecting the plot, is there a way to have the flat base formation or the breakout signal plotted on the price chart?

Unable to attach the pic link

320k3WX.jpg


Thanks
 
I am looking for a scanner that identifies stocks that are currently in consolidation and moving sideways. Ideally, this would identify stocks that have hit their support line twice.

Does anyone have anything similar? Thank you!
 
Does anyone know of a script or how to make a script to scan stocks in consolidation patters? I tried thinkorswim's pattern search option and it isn't that great. The things I've noticed about consolidation patterns is that it follows after an impulsive move up. I guess the correct search parameters would be to scan for a stock that has high volume with large price movement in the last 10-25 days followed by a decrease in volume. I wanted to add that I tried using the thinkorswim quick script wizard and I did more harm than good. lol. Can anyone offer any insight or point me to the right location? Thank you all.
 
Does anyone know of a script or how to make a script to scan stocks in consolidation patters? I tried thinkorswim's pattern search option and it isn't that great. The things I've noticed about consolidation patterns is that it follows after an impulsive move up. I guess the correct search parameters would be to scan for a stock that has high volume with large price movement in the last 10-25 days followed by a decrease in volume. I wanted to add that I tried using the thinkorswim quick script wizard and I did more harm than good. lol. Can anyone offer any insight or point me to the right location? Thank you all.
heres an idea. Its not what you are refering to, but why dont you try to look for stocks where the daily rsi is between 60 and 40. because usually when rsi is above 70 or below 30 is trending. or reversing back to the mean, but it is moving, consolidation is difficult to gauge in my opion, just like trend is difficult, because things are consolidating or trending until they are not. you could also look for wedge patterns. technically thats a geometrical consolidation.
 
heres an idea. Its not what you are refering to, but why dont you try to look for stocks where the daily rsi is between 60 and 40. because usually when rsi is above 70 or below 30 is trending. or reversing back to the mean, but it is moving, consolidation is difficult to gauge in my opion, just like trend is difficult, because things are consolidating or trending until they are not. you could also look for wedge patterns. technically thats a geometrical consolidation.
That's some good advice. I had no luck with the RSI in the past but I think I have to learn to stick with one method and use it for while before I determine if the method is right for me. The wedge pattern is also good thinking. I'm gonna give those a try as well.
 
That's some good advice. I had no luck with the RSI in the past but I think I have to learn to stick with one method and use it for while before I determine if the method is right for me. The wedge pattern is also good thinking. I'm gonna give those a try as well.
i mean the rsi on a daily chart, each candle as a day. but honestly when people say follow "trend" its bullshit because something thats trending on a 5 minute chart might not be on a 4 hour chart. thats why is good to look at different time frames. and in my opinion thats why consolidation happens, price gets caught up between two time frames. so one time frame want to go up and then the other down. usually the higher time frame wins(usually i think). hopefully thats not confusing.
 
Does anyone know of a script or how to make a script to scan stocks in consolidation patters? I tried thinkorswim's pattern search option and it isn't that great. The things I've noticed about consolidation patterns is that it follows after an impulsive move up. I guess the correct search parameters would be to scan for a stock that has high volume with large price movement in the last 10-25 days followed by a decrease in volume. I wanted to add that I tried using the thinkorswim quick script wizard and I did more harm than good. lol. Can anyone offer any insight or point me to the right location? Thank you all.
Just a few observations I had when thinking about your question. Consolidation will often times occur after large spikes in volatility (which can be measured with Bollinger Bandwidth or Keltner Bandwidth). After a spike, you can look for Balance of Volume to fade along with a fade in volatility and a narrowing price range (typically leading to a squeeze before the next big move). Just some thoughts. You can see some of what I am referring to in the image below. I would scan for bandwidth pulling off the 75 period length bulge and BoV pulling away from its 40 period length bulge. Again, I haven't tried this out yet, its just a thought. I hope it helps!
ORf4LJL.png
 

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