OPEN-SOURCE SCRIPT

SMT Divergences [OutOfOptions]

Smart Money Technique (SMT) Divergence is designed to identify discrepancies between correlated assets within the same timeframe. It occurs when two related assets exhibit opposing signals, such as one forming a higher low while the other forms a lower low. This technique is particularly useful for anticipating market shifts or reversals before they become evident through other Premium Discount (PD) Arrays.

This indicator works by identifying the highs and lows that have formed for an asset on the current chart and the correlated symbol defined in the settings. Once a pivot on either asset is formed, it checks if the pivot has taken liquidity as identified by the previous pivot in the same direction (i.e., a new high taking out a previous high). If this is the case and the corresponding asset has not taken a similar pivot, the condition is determined to be a potential valid divergence. The indicator will then filter out SMTs formed by adjacent candles, requiring at least one candle difference between the candles forming the SMT.

If the “Candle Direction Validation” setting is enabled, the indicator will further check both assets to ensure that for bullish SMTs, the last high on both assets was formed by down candle, and for bearish SMTs, the low was formed by an up candle. This check can often eliminate low-probability SMTs that are frequently broken.

The referenced chart shows divergence between Nasdaq (NQ) and S&P 500 (ES) futures, which are normally closely correlated assets that move in the same direction. The lines shown represent bullish and bearish divergences between the two when they are formed. As you can see from the chart, SMT Divergences may not always indicate a reversal, or a reversal might be just a short-term retrace. Therefore, SMT Divergences should not be used independently. However, in conjunction with other PD arrays, they can provide strong confirmation of a change in market direction.

Configurability:
  • Pivot strength - Indicates how many bars to the left/right of a high for pivot to be considered, recommended to keep at 1 for maximum detection speed
  • Candle Direction Validation - Additional SMT validation to filter out weak/low-probability SMTs be examining candle direction
  • Line Styling for Bullish/Bearish SMTs - Ability to customize line style, color & width for bullish/bearish SMTs
  • Label Control - Whether or not to show SMT label and if shown what font size & color should be used


What makes this indicator different:
Unlike other SMT indicators, this indicators has additional built-in controls to remove low-probability SMTs
Candlestick AnalysisChart patternsictictconceptsSMCsmcconceptsSMTsmtdivergence

Script de código aberto

No verdadeiro espírito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam compreendê-lo e analisá-lo. Parabéns ao autor! Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações é regida pelas Regras da Casa. Você pode favoritá-lo para usá-lo em um gráfico.

Quer usar esse script no gráfico?

Aviso legal