OPEN-SOURCE SCRIPT

Step-Based Trailing Stop-Loss Indicator

172
This indicator is built for momentum traders who want to maximize winning trades and minimize losses through a smart, step-based trailing stop-loss system. Instead of using a fixed Take Profit, this tool dynamically protects profits once the trade reaches a favorable RR (Risk-to-Reward) level.

How It Works:
Manual Entry Input

You enter your Entry Price and select Buy/Sell in the settings.

This flexibility allows backtesting or live trade tracking.

Initial Setup

Default SL: 50 ticks(Tested on us30,but works on any pair you just need to adjust SL)

TP for reference: 4R — can be used for benchmarking, but we don't limit profits with a hard TP.

Trailing Logic

Once price reaches 3R in profit:

The SL begins trailing.

It starts at 2R, keeping a 1R cushion behind the max profit.

For every 0.5R gain, SL also moves up by 0.5R:

Example: At 3.5R → SL is at 2.5R
At 5.0R → SL is at 4.0R

This trailing continues until the SL is hit or the trend exhausts.

Chart Features

🟧 Entry Line

🔴 Initial SL

🟢 Reference TP (4R, optional)

🟣 Dynamic Trailing SL

🏷️ Labels for Entry & SL levels

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.