OPEN-SOURCE SCRIPT
Telah dikemas kini 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:
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.
Nota Keluaran
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:
Nota Keluaran
Fixed a bug when 50% is made by lower high or higher low.Nota Keluaran
Updated minimum leg size and threshold limits to allow it to work better for stocksNota Keluaran
Fixed label duplication when edge of a leg is the same as previous legNota Keluaran
Added configuration option to allow control where the label should be positioned when it is extended to the right. The default value is (5) bars/candles, which in most cases will prevent it from appearing outside of the chart or being cut-off, it can be adjust up/down depending on preference.
Nota Keluaran
Added alert capability, you can now enable alerts for this indicator that will generate an alert whenever 50% is tapped.You can also configure the alert to optionally include the leg size (points/$) & time it took to form it (in minutes), as well as time & close when 50% was tapped.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.