Trendoscope

Band-Zigzag Based Trend Follower

Trendoscope Wizard 업데이트됨   
We defined new method to derive zigzag last month - which is called Channel-Based-Zigzag. This script is an example of one of the use case of this method.

🎲 Trend Following
Defining a trend following method is simple. Basic rule of trend following is Buy High and Sell Low (Yes, you heard it right). To explain further - methodology involve finding an established trend which is flying high and join the trend with proper risk and optimal stop. Once you get into the trade, you will not exit unless there is change in the trend. Or in other words, the parameters which you used to define trend has reversed and the trend is not valid anymore.

Few examples are:

🎯 Using bands

When price breaks out of upper bands (example, Bollinger Band, Keltener Channel, or Donchian Channel), with a pre determined length and multiplier, we can consider the trend to be bullish and similarly when price breaks down the lower band, we can consider the trend to be bearish.

Here are few examples where I have used bands for identifying trend


🎯 Using Pivots

Simple logic using zigzag or pivot points is that when price starts making higher highs and higher lows, we can consider this as uptrend. And when price starts making lower highs and lower lows, we can consider this as downtrend. There are few supertrend implementations I have published in the past based on zigzags and pivot points.


Drawbacks of both of these methods is that there will be too many fluctuations in both cases unless we increase the reference length. And if we increase the reference length, we will have higher drawdown.

🎲 Band Based Zigzag Method
Band Based Zigzag will help overcome these issues by combining both the methods.

  • Here we use bands to define our pivot high and pivot low - this makes sure that we are identifying trend only on breakouts as pivots are only formed on breakouts.
  • Our method also includes pivot ratio to cross over 1.0 to be able to consider it as trend. This means, we are waiting for price also to make new high high or lower low before making the decision on trend. But, this helps us ignore smaller pivot movements due to the usage of bands.
  • I have also implemented few tricks such as sticky bands (Bands will not contract unless there is breakout) and Adaptive Bands (Band will not expand unless price is moving in the direction of band). This makes the trend following method very robust.
  • To avoid fakeouts, we also use percentB of high/low in comparison with price retracement to define breakout.

🎲 The indicator

The output of indicator is simple and intuitive to understand.

🎯 Trend Criteria
  • Uptrend when last confirmed pivot is pivot high and has higher retracement ratio than PercentB of High. Else, considered as downtrend.
  • Downtrend when last confirmed pivot is pivot low and has higher retracement ratio than PercentB of High. Else, considered as uptrend.

🎯 Settings

Settings allow you to select the band type and parameters used for calculating zigzag and then trend. Also has few options to hide the display.


릴리즈 노트:
Updated logic to use secondary confirmation of recent pivot. Can be disabled via settings.
릴리즈 노트:
Minor bugfix with trend calculation

오픈 소스 스크립트

이 스크립트의 오써는 참된 트레이딩뷰의 스피릿으로 이 스크립트를 오픈소스로 퍼블리쉬하여 트레이더들로 하여금 이해 및 검증할 수 있도록 하였습니다. 오써를 응원합니다! 스크립트를 무료로 쓸 수 있지만, 다른 퍼블리케이션에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

차트에 이 스크립트를 사용하시겠습니까?