OPEN-SOURCE SCRIPT
[ZP] Fixed v6 test

Benefits
Alternate signal mode works correctly: signals only fire when switching from the opposite state.
No duplicate signals: plotshape fires only on state changes.
State tracking is reliable: CondIni persists across bars.
Cleaner code: removed redundant assignments.
Consistent behavior: long and short signals use the same state-change logic.
Testing recommendations
Test on multiple timeframes (1m, 5m, 15m, 1h, 4h, 1D) to verify:
Signals appear only on state changes.
Alternate signal mode requires switching from the opposite state.
No duplicate signals on consecutive bars.
Expiry logic works as expected.
These changes should make the indicator more reliable and predictable.
Alternate signal mode works correctly: signals only fire when switching from the opposite state.
No duplicate signals: plotshape fires only on state changes.
State tracking is reliable: CondIni persists across bars.
Cleaner code: removed redundant assignments.
Consistent behavior: long and short signals use the same state-change logic.
Testing recommendations
Test on multiple timeframes (1m, 5m, 15m, 1h, 4h, 1D) to verify:
Signals appear only on state changes.
Alternate signal mode requires switching from the opposite state.
No duplicate signals on consecutive bars.
Expiry logic works as expected.
These changes should make the indicator more reliable and predictable.
Skrip sumber terbuka
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Penafian
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.
Skrip sumber terbuka
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Penafian
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.