OPEN-SOURCE SCRIPT

[ZP] Fixed v6 test

155
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.

Declinazione di responsabilità

Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.