OPEN-SOURCE SCRIPT
Telah dikemas kini Adaptive Volatility Stop by Pedro Paulo de Melo

Stop ATR is a clean and reliable volatility-based trailing stop system, built to adapt dynamically to market conditions using the Average True Range (ATR).
It identifies trend direction, adjusts the stop level using stair-step logic, and automatically flips the stop when price reversals occur.
How it works
Uses ATR × Multiplier to calculate an adaptive volatility buffer
Tracks trend direction internally
Recomputes and repositions the stop when a trend flip is detected
Plots separate lines for bullish and bearish stop states
Works on any market and timeframe (crypto, forex, commodities, indices, stocks)
Why it’s useful
This Stop ATR implementation is extremely stable and visually clean.
It is particularly effective for:
Trend following
Position management
Swing and position trading
Systematic stop placement
Unlike many ATR-based stop versions, this script uses a corrected flip-handling method that prevents stop misalignment and ensures consistent trend state tracking.
Inputs
Period — ATR length
Multiplier — ATR factor that defines stop distance
Author
Developed by Pedro Paulo de Melo, open-source version.
It identifies trend direction, adjusts the stop level using stair-step logic, and automatically flips the stop when price reversals occur.
How it works
Uses ATR × Multiplier to calculate an adaptive volatility buffer
Tracks trend direction internally
Recomputes and repositions the stop when a trend flip is detected
Plots separate lines for bullish and bearish stop states
Works on any market and timeframe (crypto, forex, commodities, indices, stocks)
Why it’s useful
This Stop ATR implementation is extremely stable and visually clean.
It is particularly effective for:
Trend following
Position management
Swing and position trading
Systematic stop placement
Unlike many ATR-based stop versions, this script uses a corrected flip-handling method that prevents stop misalignment and ensures consistent trend state tracking.
Inputs
Period — ATR length
Multiplier — ATR factor that defines stop distance
Author
Developed by Pedro Paulo de Melo, open-source version.
Nota Keluaran
Addition of the disclaimer "code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org/MPL/2.0/"Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.