BEST ATR Stop Multiple StrategyHello traders
Here we go again.... with another strategy snippet.
Reminder: it's an alternative of this Trailing Stop strategy script
Entry logic
The entry is based on a Simple Moving Averages (SMA) cross.
This part doesn't matter here - as I wanted to focus on the ATR multiple stop loss component.
ATR STOP
This strategy snippet uses an entry stop loss defined based on a multiple of the average true range value.
The soure code detects ATR value at entry price, applies the multiplier and will set a static (= non trailing) stop-loss to each position
A pinescript v4 label will appear for each new signal displaying the ATR*multiplier value at signal time
All the BEST
Dave
ATR
SuperTrendSuperTrend is one of the most common ATR based trailing stop indicators.
In this version you can change the ATR calculation method from the settings. Default method is RMA, when the alternative method is SMA.
The indicator is easy to use and gives an accurate reading about an ongoing trend. It is constructed with two parameters, namely period and multiplier. The default values used while constructing a superindicator are 10 for average true range or trading period and three for its multiplier.
The average true range (ATR) plays an important role in 'Supertrend' as the indicator uses ATR to calculate its value. The ATR indicator signals the degree of price volatility.
The buy and sell signals are generated when the indicator starts plotting either on top of the closing price or below the closing price. A buy signal is generated when the ‘Supertrend’ closes above the price and a sell signal is generated when it closes below the closing price.
It also suggests that the trend is shifting from descending mode to ascending mode. Contrary to this, when a ‘Supertrend’ closes above the price, it generates a sell signal as the colour of the indicator changes into red.
A ‘Supertrend’ indicator can be used on equities, futures or forex, or even crypto markets and also on daily, weekly and hourly charts as well, but generally, it fails in a sideways-moving market.
I had converted Supertrend indicator code for various platforms like Metastock in 2017, but in this TradingView version special credit goes to everget - Alex Orekhov which gave a great inspiration to look my indicators better with highlights, signals and alarms. Thank you Alex.
Zero Lag Keltner ChannelsThis is Keltner Channelz (KC) with Zero Lag Moving Average (ZLMA as base). It is smoother and has less lag than the original (EMA/SMA) variant.
It also can be used as a trend indicator and trend confirmation indicator. The upper and lower bands are green if it is an up trend, and red if a down trend. If both have the same color it is a stronger trend.
Trailing SL Strategy [QuantNomad]I'm a big fan of simple strategies.
This one is a very simple one. So it consists only from one Trailing SL. When SL is hit, the position is reversed and SL is tracked for a new position.
You can choose one of 3 types of SL:
% of your price
ATR - it is calculated as current ATR * multiplier
Absolute
As you can see even this simple strategy can show pretty good results.
ATR based Stop and Take-Profit levels in realtime Little tool to quickly identify stops and take-profit levels based on Average True Range. User can change ATR multipiers, as well as the ATR length used. Green and red lines show these levels; plot is visible over last 8 bars only to reduce clutter. Label showing the current ATR, up above the last bar
UT Bot AlertsUT Bot indicator was initially developer by @Yo_adriiiiaan
The idea of original code belongs @HPotter
These are v4 alerts for my previously published strategy:
Original script:
Volatility (Body and Weighted Shadow)- Volatility Indicator
- Replacement for ATR
- As each pair holds a different level of volatility, a stop loss can be set using this indicator rather than via a ratio 2:1, etc. e.g. 2 X Volatility Value = S/L...
- This indicator averages the bodies of candlesticks over a default length of 14 periods. It also considers the length of shadows via a weighted average. This is done as it is assumed that financial institutions tend to move price to levels that do not hold (shadows). Therefore, wick lengths are less significant than the candlestick bodies, so they are weighted to hold less value.
Simple Moving Average - ATR Trailing StopThe old adage goes "Cut losers fast and let the winners run"
With this in mind, this will plot a dynamic trailing stop by subtracting any multiplier of the Average True Range (ATR) from the SMA of your choice.
UT Bot Strategy with Backtesting Range [QuantNomad]UT Bot indicator was inially developer by @Yo_adriiiiaan
Idea of original code belongs @HPotter
I can't update my original UT Bot Strategy so I publishing new strategy with backtesting range included.
I just took code of Yo_adriiiiaan, cleaned it, deleted all useless pieces of code, transformet to v4 and created a strategy from it.
Also I added an input that allows you to swich to signals from Heiking Ashi. I saw that author uses HA for the indicator and on HA it look much nices then on real candles.
Do not add this strategy to HA candles, use usual candles and this checkbox.
Original script:
UT Bot
ATR [Gu5]ATR (Average True Range) by Sylvain Vervoort
In contrast to other ATR indicators, the line changes color when profits start
A diferencia de otros indicadores ATR, la linea cambia de color cunado empezamos a tomas ganancias
BEST Supertrend MAHello traders,
That one is an experiment
I was curious to see what a supertrend based on moving average cross could give
How does it work?
Bull event: fast moving average crossing over the slow moving average
Bear event: fast moving average crossing under the slow moving average
When the event is triggered, the script will plot the Supertrend as follow
UP Trend = ohlc4+ ATR * Factor
DOWN Trend = ohlc4- ATR * Factor
Interesting to see the results given by ohlc4 vs hl2 and hl3
Documentation: www.tradingview.com
This is an alternative of the classical Supertrend based on candle close being above/beyond the previous Supertrend level.
Hope you'll enjoy it and it will improve your trading making you a better trader
Dave
BEST Supertrend CCIHello traders
Today I present you a Supertrend not based on candle close but based on a CCI (Commodity Channel Index)
How does it work?
Bull event: CCI crossing over the 0 line
Bear event: CCI crossing below the 0 line
When the event is triggered, the script will plot the Supertrend as follow
UP Trend = High + ATR * Factor
DOWN Trend = Low - ATR * Factor
This is an alternative of the classical Supertrend based on candle close being above/beyond the previous Supertrend level.
Hope you'll enjoy it and it will improve your trading making you a better trader
Dave
Average True Range Percentage (ATRP)ATR measures volatility, but you can't compare one instrument vs. another with it because the ATR value will be different depending on the price of the instrument. I went searching for something like ATR but with percentages, so you could compare one stock vs. another to find who is more volatile and found this .
It was exactly what I was looking for, so decided to re-create it in TradingView. Enjoy!
Description
Average True Range Percent (ATRP) expresses the Average True Range (ATR) indicator as a percentage of a bar’s closing price.
How this indicator works
ATRP is used to measure volatility just as the Average True Range (ATR) indicator is. ATRP allows securities to be compared, where ATR does not.
ATR measures volatility at an absolute level, meaning lower priced stock will have lower ATR values than higher price stocks. ATRP displays the indicator as a percentage, to allow for securities trading at different prices per share to be compared.
Calculation
ATRP = (Average True Range / Close) * 100
Maximum True RamgePlots the the highest true range for the entire dataset.
Beneficial for determine an emergency stopp loss.
Volty Expan Close Strategy with Backtest Date RangeInput Information
Length Numeric 5 Number of bars used to determine the average true range.
NumATRs Numeric .75 Factor used to calculate a percentage of the average true range, used to
Long and short entry based on a percentage of price movement beyond the average range.
Profitable and simple strategy..
Trailing ATR StopsThis script plots a trailing stop of the ATR multiplied by a user-defined number. Since it is meant to be used as a trailing stop, the value doesn't fluctuate with the price as a normal ATR indicator does, but stays fixed unless price moves away from it. In that case it follows the price. If price crosses the stop level, it resets itself based on current price and starts trailing all over again.
User Settings:
Support - Use for a trailing stop while long
Resistance - Use for a trailing stop while short
Both - Acts like a channel and can spot periods of lower volatility
Premarket High/LowThe script draws the high and low of the premarket session and based on these levels the ATR is added and also displayed on the chart as lines.
You can change:
- The Session Timeframe
- The ATR Multiple
- If the Aftermarket Session should be included
UT Bot StrategyUT Bot indicator was inially developer by @Yo_adriiiiaan
Idea of original code belongs @HPotter
I just took code of Yo_adriiiiaan, cleaned it, deleted all useless pieces of code, transformet to v4 and created a strategy from it.
Also I added an input that allows you to swich to signals from Heiking Ashi. I saw that author uses HA for the indicator and on HA it look much nices then on real candles.
Do not add this strategy to HA candles, use usual candles and this checkbox.
Original script:
ATR Info Panel by JustUncleLDescription:
Display Last completed ATR values in a text information panel on the chart. These values are handy for calculating Stop Loss.
This script includes input offsets to optionally position the Panel, these can be Positive or Negative offsets.
References:
Thanks go to RicardoSantos for showing us the way to create a Panel with his Function - InfoPanel
Adaptive Pivot (HLC3)SUMMARY:
Standard Pivot (HLC3) with ATR leeway added to make it adaptive to market volatility.
DESCRIPTION:
Adaptive Pivot is an indicator utilizing the simplicity of HLC3 Pivots as a turning point (and sometimes a trend indicator) while addressing it's fixed and inflexible nature.
Because the indicator is just a single line in the chart, the price may go near it but never touch it. Or it can go pass through it and never retest it again. In an attempt to lessen these from occurring, we can combine pivots with average true range (ATR). This is the specific formula I applied in this indicator:
>Upper Pivot = HLC3 + ATR
>Lower Pivot = HLC3 - ATR
This creates a kind of a range or cloud around the Pivot, making it possibly a more accurate indicator for market turning points.
ADJUSTABLE PARAMETERS:
The usual ATR parameters are included in this indicator:
>ATR_Length = input(14, title="ATR Length", minval=1)
>ATR_Smoothing = input(title="ATR Smoothing", defval="RMA", options="RMA", "SMA", "EMA", "WMA")
Added to the usual ones is this:
>ATR_Multiplier = input(1, title="ATR Multiplier", minval=0.1)
which modifies the extent of the ATR (similar to Chandelier Exit) as it is added/subtracted from the pivot values.
Pivot’s timeframe is also adjustable:
>Pivot_Timeframe = input("3M", title='Pivot Resolution')
Note: I did not lock the type to input.resolution to allow for more possible timeframes.
OTHER PARAMETERS
Indicator color will change to green when the open is above the HLC3 Pivot and change to red when the reverse is true.
Baseline-C [ID: AC-P]The "AC-P" version of jiehonglim's NNFX Baseline script is my personal customized version of the NNFX Baseline concept as part of the NNFX Algorithm stack/structure for 1D Trend Trading for Forex. Everget's JMA implementation is used for the baseline smoothing method, with optional ATR bands at 1.0x and 1.5x from the baseline.
NNFX = No Nonsense Forex
Baseline = Component of the NNFX Algorithm that consists of a single moving average
Baseline ---> Meant to be used in conjunction with ATR/C1/C2/Vol Indicator/Exit Indicator as per NNFX Algorithm setup/structure. C1 is 1st Confirmation Indicator, C2 is 2nd Confirmation Indicator.
JMA (Jurik Moving Average) is used for the baseline and slow baseline.
A slow baseline option is included, but disabled by default.
The faint orange/purple lines are 1.0x/1.5x ATR from the Baseline, and are what I use as potential TP/SL targets or to evaluate when to stay out of a trade (chop/missed entry/exit/other/ATR breach), depending on the trade setup (in conjunction with C1/C2/Vol Indicator/Exit Indicator)
This script is heavily based upon jiehonglim's NNFX Baseline script for signaling, barcoloring, and ATR.
SSL Channel option included but disabled by default (Erwinbeckers SSL component)
POC (Point of Control) from Volume Profile is included/enabled by default for both the current timeframe and 12HR timeframe
03.freeman's InfoPanel Divergence Indicator was used a reference to replace the current/previous ATR information infopanel/info draw from jiehonglim's script. I'm not sure whether I like the previous way ATR info was displayed vs how I have it currently, but it's something that is completely optional:
Specifically: I am tuning this baseline/indicator for 1D trading as part of the NNFX system, for Forex.
DO NOT USE THIS INDICATOR WITHOUT PROPER TUNING/ADJUSTMENT for your timeframe and asset class.
Note about lack of alerts:
Alerts for baseline crosses (and other crosses) have been purposefully omitted for this version upon initial publication. While getting alerts for baseline crosses under certain conditions/filtered conditions that eliminate low-importance signals and crossover whipsaw would be great, it's something I'm still looking into.
SPECIFICALLY: There are entry, exit, take profit, and continuation signal components in relation to the Baseline to the rest of the NNFX Algorithm stack (ATR/C1/C2/Vol Indicator/Exit Indicator), including but limited to the "1 candle rule" and the "7 candle rule" as per NNFX.
Implementing alerts that are significant that also factor in these rules while reducing alert spam/false signals would be ideal, but it's also the HTF/Daily chart - visually, entry/exit/continuation signal alignment is easy to spot when trading 1D - alerts may be redundant/a pursuit in diminishing returns (for now).
//-------------------------------------------------------------------
// Acknowledgements/Reference:
// jiehonglim, NNFX Baseline Script - Moving Averages
//
// Fractured, Many Moving Averages
//
// everget, Jurik Moving Average/JMA
//
// 03.freeman, InfoPanel Divergence Indicator
//
// Ggqmna Volume stops
//
// Libertus RSI Divs
//
// ChrisMoody, CM_Price-Action-Bars-Price Patterns That Work
//
// Erwinbeckers SSL Channel
//