aalfiann

[aalfiann] Swing Trail Signal

aalfiann Updated   
Description
The idea is when we want to swing trading with Trend Follower strategy.
This indicator technicaly only display the Support and Resistent with Trailing line. So we can follow the price to gain efficient profit.

Very simple strategy, clean and efficient.
Alert condition supported.

HOW TO USE
1. Buy Signal / Long Trend
The Buy Signal is appear once the resistent breakout. You can directly buy or setup for long trade after the bar is closed.

2. Sell Signal / Short Trend
The Sell signal is appear once the support breakdown. You can directly sell or setup for short trade after the bar is closed.

Concept
There are many Support and Resistent indicator out there, but mostly display two lines, support lines and resistance lines. The reason I've create this indicator is, if the Long Trend is ended, why we display the support line anymore? and vice versa.

The important thing in this indicator is how to know that the trend is ended. So that we can focus or prepare on the new trend. For example, if the Long trend is ended, then we should focus only to resistance line.

How I get into this?
Firstly, I do calculate the support and resistent per 1 candle length and multiplier 2.0 and I calculate the Average True Range atr = mult * ta.atr(length) .

After we have the ATR value, then we are able :
- To get Long Stop is by calculate ta.highest(close, length) - atr and then I compared the max value with the previous Long Stop by calculate math.max(longStop, longStopPrev).
- To get Short Stop is by calculate ta.lowest(close, length) + atr and then I compared the min value with the previous Short Stop by calculate math.min(shortStop, shortStopPrev).

How I know the direction trend has changed?
var int dir = 1
dir := close > shortStopPrev ? 1 : close < longStopPrev ? -1 : dir
changeCond = dir != dir


so we can draw the trailing line until the trend is ended also we will know when the trend direction is changed.
Release Notes:
Now the calculation of ATR has been changed to 2 length (before is 1 length) and Multiplier still 2.0 so we can get more better resist and support line.
Release Notes:
Update change calculation method to avoid false breakout and breakdown so now we will be more safe from high volatility. Before the based source price is from close, now I use hl2.

Protected script
This script is published closed-source but you may use it freely. You can favorite it to use it on a chart. You cannot view or modify its source code.
Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?