ATR Trailing Stops StrategyUpdate of Average True Range Trailing Stops Strategy by HPotter to include backtesting support
Opens longs when price crosses over trailing stop line, closes when price crosses below
Option to open/close shorts when longs are closed/opened
Option to specify a time range to test over. For example, set Max Days Back to 360 and Min Days Back to 180 to test from 1 year ago to 6 months ago. To test the entire range of data, set both to 0.
متوسط المدى الحقيقي
ATR Stop LossAdds an indicator that can be used to set stop losses.
This is the close price minus the ATR + 10%.
The 10% is there to let the market perform and avoid whipsaws.
Stoller Average Range Channels (STARC) BandsStoller Average Range Channels (STARC) Bands indicator script. This indicator was originally developed by Manning Stoller.
ka66: Volatility MomentumThis is a 'monitoring' indicator to see if an instrument is viable enough to be traded, by virtue of volatility (or lack of volatility in context may lead to a break out), or may become so. It shows the following information:
Price Range (high - low) averaged across a set of bars: Useful gauging potential trading profits. This was its initial goal, to not measure bars manually!
ATR : As a comparison point for the price range above. Divergence between true range (TR) and plain price range might signal volatility changes occurring in the instrument.
Signal volatility line : a moving average of the larger of the average price range and ATR. This takes inspiration from other indicators like MACD and Stochastic, and is a way of comparing change in recent volatility --- this achieves the momentum part. The larger was chosen to keep things simple, and not have a signal line per range!
avgRange = movingAvg(high - low, avgPeriod)
atr = movingAvg(trueRange, avgPeriod)
signal = movingAvg(max(avgRange, atr), avgPeriod)
Configurable periods and averaging mechanism.
ka66: Average Bar RangeAverages price ranges (high - low) across a set of bars in a given timeframe. Additionally, also plots the Average True Range (ATR) as a better comparison for volatility.
Configurable period and averaging mechanism.
Useful for gauging minimum profits and price movement over a period, a filter for historical volatility.
Furthermore, executing trades is better done with channels like ATR/Keltner channels, or Bollinger Bands.
SuperTrend_ChannelThis set up created to understand support and resistance as per ATR (Average True Range)
Existing setup of supertrend modified to Channel set up
It is created for study purpose , Buying or selling not suggested as per this
Thank you
Random Walk IndexRandom Walk Index indicator script. This indicator was originally developed by Michael Poulos.
As you can see, the result is very similar to the Vortex Indicator (was developed by Etienne Botes and Douglas Siepman).
Volatility RatioVolatility Ratio indicator script. This indicator was originally developed by Jack Schwager.
Pretty Good OscillatorPretty Good Oscillator indicator script. This indicator was originally developed by Mark Johnson.
Histogram ATR-SMA(ATR) by drinchiIndicator make histogram from difference of:
- classic ATR (default period - 14)
- Simple Moving Average (default period - 100) to this ATR.
Histogram colored (green when >0, red <0).
Volatility increase signal - histogram crosses the zero line.
For greater visibility, a colored variable moving average (variable SMA for histogram) was added
(green when increase, red when decrease).
Default Strategy Inputs (Forex / Crypto)The code in this post contains a set of default strategy inputs I use in new projects / backtests in Tradingview.
Full code commentary is available on the Backtest-Rookies website. To comply with house rules, I cannot post the direct link here.
Features
Trade Direction: So that you can limit the strategy for long only, short only or trade in both directions. It is important to note that when you select “Long Only”, you will still see Short signals on the chart. However, they are only used to close a position rather than reverse it. This is the default behaviour for strategies. The same applies to “Short Only”.
Date Ranges: So that you can isolate backtesting to specific periods of interest such as bull or bear markets.
Sessions: So you can easily get an idea of the expected results during your own session. You may also notice that performance of the strategy varies depending on which session it is deployed in.
Some example stop losses: It is not an exhaustive list but it should be enough to provide some inspiration for different types of stops that you can experiment with.
Happy Scripting. I hope the community finds it useful.
Daily Average True Range OverlayPlots the upper and lower average true range away from the previous days close on all time frames.
ATR+ (Stop Loss Indicator)This script is designed to aid in back-testing and trade execution.
It displays three sets of values - the teal colored value is the current ATR, the green colored value is your stop loss distance (in pips) below the most recent swing low for long trades , and the red colored value is your stop loss distance (in pips) above the most recent swing high for short trades .
You can change the stop loss settings to base your stop loss on a set pip amount or by however many multiples of the current ATR as you wish (eg. 1.5x ATR).
Feel free to ask any questions or edit the script without permission :)
- Matt.
Average Daily Range - without open barBasic ADR-indicator that is showing the daily range on lower timeframes as well, without using the current open daily bar for calculation.
Also plots as line in a separate indicator window. Updates displayed value when hovering over the candles on the chart to see historical Numbers.
ATR%A useful measure of recent volatility. I use 50 day or 50 week periods, but you can experiment with other values too. Because it measures ranges as a % of current close it can be used to make good comparisons with other historic periods of low (or high) volatility. This measure reached a new 23 year low for daily S&P 500 in July 2017.
Uses and historic examples: lunatictrader.com
Average True Range - without open barBasic ATR without the current open bar in progress, it calculates the closed bars within the chosen ATR Period
[STRATEGY][RS]Open Session Breakout TraderEXPERIMENTAL: use at your own discretion.
custom session breakout strategy, it uses a percentage of daily atr to set breakout limits. strategy only viable for intraday timeframes and is suggested under 1hour.
ATR BandThe indicator is intended to be used with daily or higher time frames.
Options:
Mark out of Band: show a symbol if price has moved beyond the band
ATR BandThe indicator is intended to be used with daily or higher time frames.
Options:
Mark out of Band: show a symbol is price has moved beyond the band