aalfiann

[aalfiann] Swing Trail Signal

aalfiann 已更新   
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.
版本注释:
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.
版本注释:
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.

受保护脚本
该脚本是闭源发布的,您可以自由使用它。您可以收藏它以在图表上使用。您无法查看或修改其源代码。
免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?