ATR StopLine (Chandelier-style)

ATR-based trailing stop that flips sides when price closes beyond the stop. Helps keep losers small and let winners run.

Settings

  • ATR Length — lookback for true range.
  • ATR Multiplier — distance from HH/LL; higher = looser.
  • Show Only Active Side — hides opposite band to reduce clutter.

How to use (TradingView)

  1. Open Pine Editor → New
  2. Paste the code below → Save → Add to chart

How to use (MT4)

  1. MT4 → File → Open Data Folder
  2. MQL4/Indicators → drop ATR_TrailingStop.mq4 → restart MT4

Download

Licensing: free to use and modify with attribution “myfxeducation”.

add_action('wp_footer', function(){ echo '
Risk warning: CFDs are complex instruments and come with a high risk of losing money rapidly due to leverage. Consider whether you understand how CFDs work and whether you can afford to take the high risk of losing your money.
'; });