OPEN-SOURCE SCRIPT

Flag Detector

This script attempts to find consolidations or retracements within the context of a previous uptrend - basically looking for flag type patterns. It first measures an initial move (referred to as the flag pole in this script) and then looks for consolidation after that move within a certain range. If the consolidation is within the rage, it plots a dot under the candle to show you the consolidation areas. It's not fool proof, but seems to do a decent job of identifying pullbacks and sideways consolidations reasonably well.
BASECandlestick AnalysisconsolidationFLAGPivot points and levels

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?


Also on:

Disclaimer