1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.
Source Code
The code stays on GitHub. The author has not published this script under an open licence, so ForexR does not show its code. Copy script reads the file straight from GitHub into your clipboard, so you can still try it on your own chart. Ask the author before reusing the code anywhere else.
Overview
ATR Based Stoploss TakeProfit calculates ATR, NATR, and surge detection using lookback periods and crossover logic. Settings control ATR lookback, length, profit and loss multipliers, moving average length, and stop loss take profit type. When ATR Surge Average is selected, it averages historical surge levels for dynamic targets. A dashboard table shows fund and profit estimates. All elements draw directly on the price chart with no entry or exit signals. It serves as a visual risk management tool without executing trades and may repaint based on live bar data.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
ATR Lookback Period
int
30
atrLookbackPeriod
ATR Length
int
14
atrLength
ATR Profit Multiplier
float
4.0
atrProfitMultiplier
ATR Loss Multiplier
float
1.0
atrLossMultiplier
MA Length
int
8
maLength
Stop Loss Take Profit Type
string
ATR Surge Average
stopLossTakeProfitType
Table Position
string
Bottom right
tablePosition
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.
This indicator calculates a base moving average (EMA, SMA, WMA, or HMA) and projects multiple symmetrical envelope bands around it directly on the price chart. Users can adjust the length, source, moving average type, and initial envelope multiplier. Additiona
Bottom Level Finder is a support identification indicator designed to locate correction and re-entry zones directly on the price chart. It calculates horizon-adaptive Fibonacci retracements, drawdown percentage levels, moving averages, and integrated VIX volat
Calculates volume-weighted average price anchored to automatically detected swing pivots, period starts, or a custom manual timestamp. It plots volume-weighted standard deviation bands with configurable multiples and measures price distance from VWAP in standa
This indicator plots standard Bollinger Bands alongside scaled Average True Range (ATR) bands directly on the price chart. It is designed to assist traders in identifying price consolidation zones, potential breakout levels, dynamic stops, and take-profit targ
This overlay indicator plots a Supertrend from an ATR length and factor, four exponential moving averages, and a selectable VWAP or TWAP taken from a chosen timeframe on the price chart. It also shows MACD and stochastic with adjustable lengths, smoothing, ver
This indicator plots a custom Anchored Volume-Weighted Average Price (VWAP) directly on the price chart along with optional standard deviation bands. Users can anchor the VWAP to standard time periods like sessions, weeks, or months, or to corporate events suc