- You can check an unlimited number of the high/low points. Use the "Number of points to check" option to configure how many points to check. Remember that checking for too many points in the past will make this script slower (or it can even timeout and cause a 'Script Error').
- You can configure the error margin using the "Error tolerance (in %)" configuration option. It defines how much the detected pattern can differ from the "ideal" pattern. With a 5% error tolerance, if the "ideal" retracement is equal to 0.618, we accept a retracement between 0.5871 and 0.6489.
- You can change how many previous candles are considered when checking for the high/low points by changing the "Depth of a pattern" option. If you choose a high number, there will be fewer points to check, and the script will be faster. If you choose a low number, the script will be slower, but it will check more points. To see the high/low points on the chart, enable the "Draw ZigZag" option.
- You can change the lines' width using the "ZigZag line width" and "Formation line width". It's a purely cosmetic option, and it doesn't change how the script works.
It's currently using the 0.382 to levels for the ABC leg and 1.13 to 2. levels for the BCD leg. In the future, there will be a configuration option to use the "ideal" ratio proposed by Scott Carney (more strict than the current one).
The first update adds the "Strict" ratio option for those of you who want to use a more strict variant for the retracement levels.
- Added option to select between "Strict" or "Standard" ratios. "Standard" means that we check 0.382, 0.5, 0.618, 0.786 and 0.886 retracement levels for point C (in the ABC leg) and 1.13, 1.272, 1.414, 1.618, 2.0, 2.24 and 2.618 for point D (in the BCD leg). "Strict" means that only check 0.618 and 0.786 for point C and 1.272 and 1.618 for point D.
- Added "Move charts" option. When you have many formations on the chart, and they share the same points, only the topmost line is visible. With the "Move Charts" option enabled (it's disabled by default), we move all those points up/down a bit to make all the lines nicely visible and easy to follow.
- Alerts - you can now add alerts to get a notification when a new AB=CD pattern appears.
- Configurable "Move charts" option - you can select by how many percent you want to move charts that are hiding each other. This is useful when you use a small interval where moving charts by 1% of a total price will move them too much.
- Indicator is much more stable for smaller intervals. Before, when you used a short interval (seconds or minutes), the script crashed almost immediately after the first few bars. Now it should work much better. However, it might still crash from time to time - that's when it's referencing points from the past that TradingView discards when new bars are added to the chart. If this happens, refresh the page or hide and show the indicator again (also, decrease the "Number of points to check" for better performance). If you are using 1H or a larger interval, you probably won't see this problem at all.
Is it possible for me to have access to the chart script/ source code?