Indicator · Pine Script v5 · On the chart

ATR Based Stoploss

by rubystar0512

ATR Based Stoploss is an overlay indicator that calculates dynamic stop loss and take profit bands around a central simple moving average.

View on GitHub

GitHub stars5on the repository
Pine versionv5runs as is
Lines of code121
Settings8inputs
LicenceNone stated
Last update2 years ago13 Sep 2024

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
  4. 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 uses standard Average True Range or an ATR Surge Average derived from volatility spikes to offset profit and loss boundary lines. The indicator plots a baseline SMA along with short and long stop loss and take profit channels directly on the main price chart. Settings allow users to adjust ATR lookback, length, multipliers, and dashboard table position.

Details

Published by

rubystar0512 on GitHub

Type

Indicator, Pine Script v5

Draws

On the price chart

Category

Volatility & bands, Moving averages, Support & resistance, Screeners & dashboards

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
ATR Lookback Periodint30natrlbprd
ATR Lengthint14atrLength
Stop Loss Take Profit TypestringATR Surge Averageusenavg
ATR Profit Multiplierfloat4natrPM
ATR Loss Multiplierfloat1natrLM
MA Lengthint8maLength
Table PositionstringBottom righttablePosition
$Riskfloat0.3risK
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.

Similar Pine Scripts

20 stars

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

Indicator v5 Moving averagesVolatility & bands
Updated 1 year ago · None stated GitHub repository of Multiple Moving Average Envelope

Bottom Level Finder

by chris-c-thomas
14 stars

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

Indicator v6 Support & resistanceMoving averages
Updated 6 months ago · MIT GitHub repository of Bottom Level Finder
9 stars

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

Indicator v6 Moving averagesVolatility & bands Repaints
Updated yesterday · MIT GitHub repository of Anchored VWAP [WavesUnchained]
7 stars

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

Indicator v5 Moving averagesVolatility & bands
Updated 1 year ago · MPL-2.0 GitHub repository of Bollinger and ATR Bands

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

Indicator v5 Oscillators & momentumMoving averages
Updated 1 year ago · MPL-2.0 GitHub repository of Momentum Setup: Vijay Thakare Option Buying Scalping Setup

Snag - VWAP

by dearvn
257 stars

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

Indicator v5 Moving averagesVolatility & bands Repaints
Updated 6 weeks ago · None stated GitHub repository of Snag - VWAP

More indicators

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers