Sharad_Gaikwad

Trend/Retracement - ZigZag - New way

ZigZag for Trend and Retracements - New way

It's another way to plot ZigZag based on lookback period for trend and % of trend lookback period to plot retracements.

OVERVIEW
Plot ZigZag, Trend lines, Retracements, Support levels, Resistance levels

Objective:
Draw ZigZag lines along with unbroken support and resistance levels. ZigZag lines are drawn for main trend and the retracements.
Main Trend – This is calculated based on lookback period.
Retracements – Retracements are calculated as 25% of main trend.
Support and Resistance line: The indicator draws 2 types of support and resistance lines
1. Un-broken – Once formed (plotted), these are the support and resistance which are not yet broken
2. Tested – One can also choose to see support and resistance lines which are tested but not broken. Tested support/resistance are those levels which are touched by high/low price but close price has not crossed the level.

How main trend point is calculated:
E.g.
Chart timeframe = 15m
Lookback period = 250
Retracement = 25% of main trend ( 25% of 250 = 62 )
A price point on a chart is considered as trend point if distance between current price and previous highest price is 250 candles
A price point is considered as a retracement if distance between current price and previous highest price is 62 candles. Please note retracements are calculated only after finding a main trend point.

Input parameters:

Zigzag Parameters
  • Use predefined Lookback – If checked pre-defined timeframe-based lookback parameters are used.
  • Trend lookback candles – If ‘Use predefined Lookback’ is unchecked then this value is used as lookback period.
  • Retracement % of look back candles– If ‘Use predefined Lookback’ is unchecked then this value is used for calculating retracement lookback period
  • Mark retracements – If unchecked only main trend lines are plotted
  • Plot support/resistance – To plot support/resistance levels
  • Show support/resistance tested lines – If checked tested support/resistance liens are shown on the chart

TF based Lookback period config (Defaults are set as specified below, One can change these defaults to use different lookback periods)
The defaults set here are used based on the chart timeframe. e.g. if chart timeframe is changed from say 15m to 60m then 60m chart defaults (i.e. trend lookback = 90) are used to plot the trend and the retracements. At the bottom-right of the chart, parameters used for plotting are displayed all the time.
  • Timeframe in minute – Default = 5m
  • Trend lookback candles – Default = 375 (~ 5 days of data)

  • Timeframe in minute – Default = 15m
  • Trend lookback candles – Default = 250 (~10 days of data)

  • Timeframe in minute – Default = 60m
  • Trend lookback candles = Default = 90 (~ 15 days of data)

  • Trend lookback candles for timeframe 'D' – Default = 30 (~1 month data)
  • Trend lookback candles for timeframe 'W' – Default = 21 (~6 months data)
  • Trend lookback candles for timeframe 'M' – Default = 12 (~1year data)
  • Retracement % of look back candles – Default = 25%


    When and where one can use this indicator (Refer to chart examples)
  • To view support and resistance based on lookback period
  • To view ZigZag lines
  • One can use it to find chart patterns easily
  • Trend and retracement lines can help in drawing Elliott waves.

    █ Chart examples:
    1. Chart patterns can be easily identified - One can disable the candle charts which will help to identify and draw chart patterns easily

    2. Trend and retracement lines can also help is analyzing charts (e.g. Elliott Waves can be marked based on trend lines)

    3. Tested but not broken support and resistance lines can be viewed

    4. You can select 'NOT' to plot tested support and resistance lines

    5. Uncheck the Mark retracements to plot main trend lines (Retracements are not marked)




오픈 소스 스크립트

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

면책사항

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

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