RozaniGhani-RG

Auto AB=CD 1 to 1 Ratio Experimental

RozaniGhani-RG Updated   
This indicator was experimental based AB=CD, shows last AB=CD either Standard AB=CD or Reciprocal AB=CD which uses time instead of bar_index.
This build is based upon educational materials (refer below resources).
ABCD are based on 1 to 1 Ratio for price and time.

Features / Pros:
1. Show last AB=CD points and lines including table value.
2. Customize table position and size.
3. For desktop display only, not for mobile.

Cons:
1. Time for point D less accurate for intraday timeframe (minute, hour, etc) which may including holidays and depends on price volatility.
2. Label ratio not shown properly depends on timeframe especially for intraday timeframe and maybe for Daily and Weekly timeframe.
3. Experimental code, use at your own risk.

FAQ
1. Credits
Scott M Carney, Harmonic Trading: Volume One and Two.
LonesomeTheBlue for zigzag array source code.
HeWhoMustNotBeNamed for some guidance and advice.

2. Previous Build / Resources
Link 1
Link 2
Link 3
Link 4

3. Code Usage
Free to use for personal usage.

Left : Bullish AB=CD, Right : Bullish Reciprocal AB=CD

Left : Bearish AB=CD, Right : Bearish Reciprocal AB=CD
Release Notes:
Code clean up.
1. Follow Pine Script Coding Conventions
2. Add dependencies comment
3. Remove fun_avg()
4. Add abs() to ratio_CD
Release Notes:
Convert to Pine Script v5
Release Notes:
Change Ternary function to switch
Release Notes:
Code clean up

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

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?