OPEN-SOURCE SCRIPT

forex swing

2 866
It detects swing highs and lows based on a chosen length.
When price breaks these levels, it marks BOS (Break of Structure) or CHOCH (Change of Character).
It tracks the current trend (bullish or bearish) based on these breaks.
👉 Then it adds a filter using the Weekly Pivot:
If price is above Weekly Pivot + bullish structure → green background
If price is below Weekly Pivot + bearish structure → red background
✔️ It also plots the Weekly Pivot line on the chart.
In simple terms:
➡️ It shows market structure (SMC) + confirms it using Weekly Pivot to highlight bullish/bearish zones visually.

Aviso legal

As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.