OPEN-SOURCE SCRIPT
PSAR with ATR Trailing Stop + SMA Filter

📈 Strategy Overview: PSAR + 6×ATR Trailing Stop with SMA Filter
This strategy is built around the principle of “Cut the losers, let the winners run” — a disciplined, trend-following approach that combines the Parabolic SAR indicator with dynamic risk management and a Simple Moving Average (SMA) trend filter.
🔍 Strategy Logic
Trend Filter Trades are only taken in the direction of the prevailing trend, defined by a user-selected SMA (default: 100).
✅ Long trades only when price is above the SMA
✅ Short trades only when price is below the SMA
Entry Signal: A trade is triggered when the Parabolic SAR flips to the opposite side of the price bars, signaling a potential trend reversal.
Stop Loss: The stop loss is dynamically set at 6×ATR from the entry price. This adapts to market volatility and is recalculated every bar — effectively acting as a trailing stop.
Exit Logic: There is no fixed take profit. The trade remains open until the trailing stop is hit — allowing winners to run and losers to be cut quickly.
Risk Management: Each trade risks 0.5% of total equity, ensuring consistent position sizing and capital preservation.
📊 Visual Elements
PSAR dots mark trend direction changes
SMA line shows the broader trend filter
Trailing stop crosses (with 50% opacity) indicate the current stop level without cluttering the chart
⚙️ Customizable Inputs
PSAR parameters: Start, Increment, Maximum
ATR length and multiplier
SMA length
Risk percentage per trade
This strategy is ideal for traders who want to stay aligned with the trend, automate disciplined exits, and avoid emotional decision-making. Clean, simple, and powerful.
Wishing you calm and successful trades!
This strategy is built around the principle of “Cut the losers, let the winners run” — a disciplined, trend-following approach that combines the Parabolic SAR indicator with dynamic risk management and a Simple Moving Average (SMA) trend filter.
🔍 Strategy Logic
Trend Filter Trades are only taken in the direction of the prevailing trend, defined by a user-selected SMA (default: 100).
✅ Long trades only when price is above the SMA
✅ Short trades only when price is below the SMA
Entry Signal: A trade is triggered when the Parabolic SAR flips to the opposite side of the price bars, signaling a potential trend reversal.
Stop Loss: The stop loss is dynamically set at 6×ATR from the entry price. This adapts to market volatility and is recalculated every bar — effectively acting as a trailing stop.
Exit Logic: There is no fixed take profit. The trade remains open until the trailing stop is hit — allowing winners to run and losers to be cut quickly.
Risk Management: Each trade risks 0.5% of total equity, ensuring consistent position sizing and capital preservation.
📊 Visual Elements
PSAR dots mark trend direction changes
SMA line shows the broader trend filter
Trailing stop crosses (with 50% opacity) indicate the current stop level without cluttering the chart
⚙️ Customizable Inputs
PSAR parameters: Start, Increment, Maximum
ATR length and multiplier
SMA length
Risk percentage per trade
This strategy is ideal for traders who want to stay aligned with the trend, automate disciplined exits, and avoid emotional decision-making. Clean, simple, and powerful.
Wishing you calm and successful trades!
オープンソーススクリプト
TradingViewの精神に則り、この作者はスクリプトのソースコードを公開しているので、その内容を理解し検証することができます。作者に感謝です!無料でお使いいただけますが、このコードを投稿に再利用する際にはハウスルールに従うものとします。
KONSTANTINOS TROVAS
免責事項
これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、この作者はスクリプトのソースコードを公開しているので、その内容を理解し検証することができます。作者に感謝です!無料でお使いいただけますが、このコードを投稿に再利用する際にはハウスルールに従うものとします。
KONSTANTINOS TROVAS
免責事項
これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。