atr stop loss for double SMA v6 — Strategy by genlius

By genlius

Performance Metrics

Description

Strategy Nameatr stop loss for double SMA v6 Credit: This v6 update is based on Daveatt’s “BEST ATR Stop Multiple Strategy.”Core LogicEntry: Go long when the 15-period SMA crosses above the 45-period SMA; go short on the inverse cross.Stop-Loss: On entry, compute ATR(14)×2.0 and set a fixed stop at entry ± that amount. Stop remains static until hit.Trend Tracking: Uses barssince() to ensure only one active long or short position; stop is only active while that trend persists.VisualizationPlots fast/slow SMA lines in teal/orange.On each entry bar, displays a label showing “ATR value” and “ATR×multiple” positioned at the 30-bar low (long) or high (short).Draws an “×” at the stop-price level in green (long) or red (short) while the position is open.Execution SettingsInitial Capital: $100 000, Size = 100 shares per trade.Commission: 0.075% per trade.Pyramiding: 1.Calculations: Only on bar close (no intra-bar ticks).Usage NotesStatic ATR stop adapts to volatility but does not trail.Ideal for trending, liquid markets (stocks, futures, FX).Adjust SMA lengths or ATR multiple for faster/slower signals.

Browse all 5,900+ TradingView Pine Script strategies

View on TradingView