OPEN-SOURCE SCRIPT
מעודכן

Unmitigated 50% of the Range

This indicator is designed to display unmitigated 50% zones of price ranges within two swing (High and Low) points. The 50% level serves as a probable target for retracements before the price resumes its movement in the direction of the most recent swing. The underlying theory is that Price Action tends to correct unbalanced price zones by returning to 50% of the range.

The indicator identifies highs and lows utilizing the “Left Swing Sensitivity” setting, which detects the high/low points within the specified number of bars. It then ensures that the zone meets a minimum size requirement, configured via the “Minimum Leg Size” setting, to filter out smaller legs/zones that would not provide sufficient profit and loss opportunities for entries at 50% and take profit at the most recent swing point.

To prevent duplication of zones when the price is gradually moving up, an "Auto Adjust Levels" setting is available. Enabled by default, this feature automatically cleans up smaller zones, retaining only the primary zone between the most recent swing point and the outer swing.

Additionally, the indicator automatically removes mitigated zones where the price has returned to the 50% level, thus maintaining clean charts.

There are several visualization settings available, offering comprehensive control over what is displayed on the charts:
  • Control the color and style of the lines representing the 1, 0, and 50% levels.
  • Choose whether to display labels and if they should show the price at the rendered levels.
  • Optionally extend the lines/labels to the right for each level.

הערות שחרור
Added a new setting "Threshold in Points" that is used when the "Auto Adjust Legs" setting is enabled. It establishes a limit on the when two legs with the same outer edge/swing and different most recent swings should be consolidated into a single leg. This prevents instances where price is very volatile and can generate large swings from being consolidate into a single leg.
Here is an example of how this setting works:
תמונת-בזק
הערות שחרור
Fixed a bug when 50% is made by lower high or higher low.
הערות שחרור
Updated minimum leg size and threshold limits to allow it to work better for stocks

כתב ויתור