OPEN-SOURCE SCRIPT
Atualizado Swing Move Area

Highlights sustained directional price swings — stretches where a stock has moved significantly in one direction over several days or weeks — while filtering out normal day-to-day noise.
How it works:
The indicator tracks price in one of two states: an up-swing or a down-swing. While in an up-swing, it continuously records the highest close reached. If price pulls back from that high by more than your Reversal Threshold (default 25%), the swing is considered over — a new down-swing begins, and the indicator starts tracking the low from there. The same logic applies in reverse for down-swings. Small retracements that don't exceed the threshold are ignored, so the swing keeps building through normal volatility instead of resetting on every wiggle.
The plotted area shows the cumulative % change from the start of the current swing to the current close — so a stock that ran from ₹100 to ₹432 over 54 days will show as one continuous green area reaching +332%, and a decline from ₹443 to ₹32 will show as one continuous red area reaching -93%.
Reading the chart:
Green area (above zero) — active up-swing; height = % gained from the swing's starting point
Red area (below zero) — active down-swing; height (depth) = % lost from the swing's starting point
Tall towers — large, sustained moves, exactly the kind of high-momentum stretches worth investigating
Flat/shallow ripples — normal chop that stayed within the reversal threshold
Inputs:
Reversal Threshold (%) — how much of a pullback from the peak/trough is needed to flip the swing direction. Lower = more sensitive, flips more often. Higher = smoother, only flags major trend changes.
Up/Down Swing Fill colors — customizable.
Note: This is a pane-only indicator (no chart overlay). It's a confirmed/lagging signal by design — a swing's full height is only known once it reverses, so use it for identifying and studying historical high-momentum moves rather than as a real-time entry trigger.
How it works:
The indicator tracks price in one of two states: an up-swing or a down-swing. While in an up-swing, it continuously records the highest close reached. If price pulls back from that high by more than your Reversal Threshold (default 25%), the swing is considered over — a new down-swing begins, and the indicator starts tracking the low from there. The same logic applies in reverse for down-swings. Small retracements that don't exceed the threshold are ignored, so the swing keeps building through normal volatility instead of resetting on every wiggle.
The plotted area shows the cumulative % change from the start of the current swing to the current close — so a stock that ran from ₹100 to ₹432 over 54 days will show as one continuous green area reaching +332%, and a decline from ₹443 to ₹32 will show as one continuous red area reaching -93%.
Reading the chart:
Green area (above zero) — active up-swing; height = % gained from the swing's starting point
Red area (below zero) — active down-swing; height (depth) = % lost from the swing's starting point
Tall towers — large, sustained moves, exactly the kind of high-momentum stretches worth investigating
Flat/shallow ripples — normal chop that stayed within the reversal threshold
Inputs:
Reversal Threshold (%) — how much of a pullback from the peak/trough is needed to flip the swing direction. Lower = more sensitive, flips more often. Higher = smoother, only flags major trend changes.
Up/Down Swing Fill colors — customizable.
Note: This is a pane-only indicator (no chart overlay). It's a confirmed/lagging signal by design — a swing's full height is only known once it reverses, so use it for identifying and studying historical high-momentum moves rather than as a real-time entry trigger.
Notas de Lançamento
title changeScript de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
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.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
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.