OPEN-SOURCE SCRIPT
Mis à jour Zenova

1. Key Levels (Daily Reference Levels)
Previous Day High
Previous Day Low
Midpoint = (High + Low) ÷ 2
These are plotted with clouds:
Green fill above Mid (High → Mid).
Red fill below Mid (Mid → Low).
Midpoint is shown as a yellow cross line.
Only today’s levels are shown (current day only).
2. Indicators
RSI (14)
Z-Score (lookback = 75 by default, configurable)
Z-Score Moving Average (SMA of Z-Score, same length as Z-Score lookback)
3. Daily Flags
Two internal “flags” are used to confirm reversal conditions:
hadOBAbove → set when RSI ≥ 70 and price is above Midline.
hadOSBelow → set when RSI ≤ 30 and price is below Midline.
These flags reset at the start of each new trading day.
4. Sell Reversal (Short Entry Signal)
A Sell Reversal is triggered when:
RSI previously went overbought (≥ 70) above the Midline.
RSI crosses below 50.
Current open price is above Midline.
Z-Score < Z-Score MA.
✅ If true → plot SELL REVERSAL (red triangle above bar).
5. Buy Reversal (Long Entry Signal)
A Buy Reversal is triggered when:
RSI previously went oversold (≤ 30) below the Midline.
RSI crosses above 50.
Current open price is below Midline.
Z-Score > Z-Score MA.
✅ If true → plot BUY REVERSAL (green triangle below bar).
6. Notes
Only one signal per OB/OS event (flags reset daily).
Works intraday, signals based on previous day levels.
No PSAR or IFZ in this version — this is the clean base.
Previous Day High
Previous Day Low
Midpoint = (High + Low) ÷ 2
These are plotted with clouds:
Green fill above Mid (High → Mid).
Red fill below Mid (Mid → Low).
Midpoint is shown as a yellow cross line.
Only today’s levels are shown (current day only).
2. Indicators
RSI (14)
Z-Score (lookback = 75 by default, configurable)
Z-Score Moving Average (SMA of Z-Score, same length as Z-Score lookback)
3. Daily Flags
Two internal “flags” are used to confirm reversal conditions:
hadOBAbove → set when RSI ≥ 70 and price is above Midline.
hadOSBelow → set when RSI ≤ 30 and price is below Midline.
These flags reset at the start of each new trading day.
4. Sell Reversal (Short Entry Signal)
A Sell Reversal is triggered when:
RSI previously went overbought (≥ 70) above the Midline.
RSI crosses below 50.
Current open price is above Midline.
Z-Score < Z-Score MA.
✅ If true → plot SELL REVERSAL (red triangle above bar).
5. Buy Reversal (Long Entry Signal)
A Buy Reversal is triggered when:
RSI previously went oversold (≤ 30) below the Midline.
RSI crosses above 50.
Current open price is below Midline.
Z-Score > Z-Score MA.
✅ If true → plot BUY REVERSAL (green triangle below bar).
6. Notes
Only one signal per OB/OS event (flags reset daily).
Works intraday, signals based on previous day levels.
No PSAR or IFZ in this version — this is the clean base.
Notes de version
Cycle DefinitionsLong Cycle
Begins when IFZ crosses above the upperThreshold (80 by default).
Ends when IFZ crosses below the upperThreshold.
During the cycle:
Track if RSI ever reached overbought (>= rsiOB).
Track if Z-score ever reached extended level (>= zScoreExtendedLevel).
Short Cycle
Begins when IFZ crosses below the lowerThreshold (20 by default).
Ends when IFZ crosses above the lowerThreshold.
During the cycle:
Track if RSI ever reached oversold (<= rsiOS).
Track if Z-score ever reached extended level (<= -zScoreExtendedLevel).
Reversal Signal Rules
Sell Reversal Signal
Trigger conditions:
Within a long cycle or outside the cycle if onlyExtendedCycle = false.
The RSI had been overbought (>= rsiOB) at any point during the long cycle.
The Z-score reached extended level (>= zScoreExtendedLevel) at any point during the long cycle.
Current Z-score ≤ zFilter (0.75 by default).
Candle open above the previous day mid line.
IFZ below its SMA (21).
RSI rounded down ≤ 50.
Only one sell reversal per long cycle.
Buy Reversal Signal
Trigger conditions:
Within a short cycle or outside the cycle if onlyExtendedCycle = false.
The RSI had been oversold (<= rsiOS) at any point during the short cycle.
The Z-score reached extended level (<= -zScoreExtendedLevel) at any point during the short cycle.
Current Z-score ≥ -zFilter (-0.75 by default).
Candle open below the previous day mid line.
IFZ above its SMA (21).
RSI rounded up ≥ 50.
Only one buy reversal per short cycle.
Additional Notes
Next Candle Plotting: Reversal signals are plotted on the next candle’s open to avoid repainting.
Extended Cycle Logic:
If onlyExtendedCycle = true, reversal signals will only be generated during a long/short cycle where the Z-score reached the extended threshold.
If false, the reversal can occur outside the cycle if all conditions are met.
RSI/Z-score Re-test:
During a cycle, if RSI re-tests overbought/oversold and the Z-score reached extended level, the signal can be raised again once per cycle.
High/Low/Mid Lines: Used only for visual reference; they do not affect signal generation (except for candle open requirement relative to mid line).
Notes de version
Zenova issues reversal signals only when multiple conditions align:5.1 Long Reversal Signal (SELL)
A long reversal signal is triggered if all of the following are true:
Currently not issued (longSignalIssued = false).
RSI has been overbought during the long cycle.
Z-Score has reached extended level during the long cycle.
Z-Score < Z-Score MA (reversion from extended level).
IFZ < IFZ SMA (momentum weakening).
RSI ≤ 50 (confirmed downward pressure).
Open > prevMid AND open > todayMid (price above daily midlines).
Z-Score ≤ zScoreFilter (limits extremely small retracements).
Optional: Only trigger during extended cycle if onlyExtendedSignals = true.
5.2 Short Reversal Signal (BUY)
A short reversal signal is triggered if all of the following are true:
Currently not issued (shortSignalIssued = false).
RSI has been oversold during the short cycle.
Z-Score has reached extended level during the short cycle.
Z-Score > Z-Score MA (reversion from extended level).
IFZ > IFZ SMA (momentum weakening).
RSI ≥ 50 (confirmed upward pressure).
Open < prevMid AND open < todayMid (price below daily midlines).
Z-Score ≥ -zScoreFilter (limits extremely small retracements).
Optional: Only trigger during extended cycle if onlyExtendedSignals = true.
Notes de version
Sure! Here’s a draft outline for a professional Word document describing the Zenova strategy, including all rules, indicators, and execution steps.________________________________________
Zenova Trading Strategy Documentation
1. Strategy Overview
Zenova is an advanced trading indicator designed to identify potential reversal points using a combination of momentum, mean-reversion, and daily reference levels. It combines the IFZ (Internal Force Zone), RSI (Relative Strength Index), and Z-Score calculations to detect extended cycles and predict market reversals.
2. Inputs and Configuration
Zenova accepts the following configurable parameters:
Input Description Default
Timezone Offset Adjust all time calculations to a different time zone (hours from UTC) 0
IFZ Length Lookback period for the IFZ calculation 75
Upper Threshold Upper threshold of IFZ for long cycle trigger 80
Lower Threshold Lower threshold of IFZ for short cycle trigger 20
Z-Score Length Lookback period for Z-Score calculation 75
IFZ SMA Length SMA length for IFZ smoothing 21
RSI Length Lookback period for RSI calculation 14
RSI Overbought RSI level indicating overbought condition 70
RSI Oversold RSI level indicating oversold condition 30
Z-Score Filter Maximum Z-Score allowed for reversal signals 0.75
Z-Score Extended Level Level at which Z-Score is considered extended 2.5
Only Extended Signals Restrict reversals to extended cycles only false
3. Daily Reference Levels
Zenova uses daily high, low, and midline levels for both the current day and previous day: - Prev Mid: Midpoint of the previous day’s high and low. - Today Mid: Midpoint of the current day’s high and low.
Signals respect these midlines to filter potential reversals.
4. Indicator Calculations
4.1 IFZ (Internal Force Zone)
• Formula: zIFZ = (ohlc4 - SMA(ohlc4, ifzLength)) / StdDev(ohlc4, ifzLength)
• IFZ = ((exp(2zIFZ) - 1) / (exp(2zIFZ) + 1) + 1) * 50
• IFZ SMA = SMA(IFZ, ifzMaLen)
• Purpose: Identifies cycles based on momentum and strength.
4.2 RSI (Relative Strength Index)
• Standard RSI with user-defined period.
• Tracks overbought (RSI ≥ RSI OB) and oversold (RSI ≤ RSI OS) conditions.
4.3 Z-Score
• Z-Score = (Close - SMA(Close, zScoreLength)) / StdDev(Close, zScoreLength)
• Z MA = SMA(Z-Score, zScoreLength)
• Purpose: Measures price deviation from mean and identifies extended cycles.
5. Cycle Detection
Long Cycle
• Trigger: IFZ crosses above the upper threshold.
• Track if RSI becomes overbought.
• Track if Z-Score reaches extended level.
• Exit: IFZ crosses below upper threshold.
Short Cycle
• Trigger: IFZ crosses below the lower threshold.
• Track if RSI becomes oversold.
• Track if Z-Score reaches extended level.
• Exit: IFZ crosses above lower threshold.
6. Reversal Signal Conditions
Long Reversal Signal (SELL)
Triggered if: 1. Signal not already issued. 2. RSI has been overbought in the cycle. 3. Z-Score reached extended level. 4. Z-Score < Z MA. 5. IFZ < IFZ SMA. 6. RSI ≤ 50. 7. Open > Prev Mid AND Open > Today Mid. 8. Z-Score ≤ Z-Score Filter. 9. Optional: Only during extended cycles.
Short Reversal Signal (BUY)
Triggered if: 1. Signal not already issued. 2. RSI has been oversold in the cycle. 3. Z-Score reached extended level. 4. Z-Score > Z MA. 5. IFZ > IFZ SMA. 6. RSI ≥ 50. 7. Open < Prev Mid AND Open < Today Mid. 8. Z-Score ≥ -Z-Score Filter. 9. Optional: Only during extended cycles.
7. Plotting and Alerts
• Daily midlines plotted (orange = today, yellow = previous day).
• Reversal signals plotted on next candle (Triangle up = BUY, Triangle down = SELL).
• Debug panel shows IFZ, RSI, Z-Score, Z MA, Cycle status, and midlines.
• Alerts can be set for both BUY and SELL reversal signals.
8. Execution Flow
1. Update daily highs, lows, and midlines.
2. Compute IFZ, IFZ SMA, RSI, Z-Score, Z MA.
3. Detect long/short cycles.
4. Track extended conditions (RSI, Z-Score).
5. Check reversal conditions including midline filter.
6. Plot signals and update debug panel.
7. Trigger alerts if conditions met.
9. Notes
• Signals respect both current and previous day midlines.
• Midline filter can be toggled on/off in future enhancements.
• Debug panel provides a real-time snapshot of all relevant values.
Notes de version
Sure! Here’s a draft outline for a professional Word document describing the Zenova strategy, including all rules, indicators, and execution steps.________________________________________
Zenova Trading Strategy Documentation
1. Strategy Overview
Zenova is an advanced trading indicator designed to identify potential reversal points using a combination of momentum, mean-reversion, and daily reference levels. It combines the IFZ (Internal Force Zone), RSI (Relative Strength Index), and Z-Score calculations to detect extended cycles and predict market reversals.
2. Inputs and Configuration
Zenova accepts the following configurable parameters:
Input Description Default
Timezone Offset Adjust all time calculations to a different time zone (hours from UTC) 0
IFZ Length Lookback period for the IFZ calculation 75
Upper Threshold Upper threshold of IFZ for long cycle trigger 80
Lower Threshold Lower threshold of IFZ for short cycle trigger 20
Z-Score Length Lookback period for Z-Score calculation 75
IFZ SMA Length SMA length for IFZ smoothing 21
RSI Length Lookback period for RSI calculation 14
RSI Overbought RSI level indicating overbought condition 70
RSI Oversold RSI level indicating oversold condition 30
Z-Score Filter Maximum Z-Score allowed for reversal signals 0.75
Z-Score Extended Level Level at which Z-Score is considered extended 2.5
Only Extended Signals Restrict reversals to extended cycles only false
3. Daily Reference Levels
Zenova uses daily high, low, and midline levels for both the current day and previous day: - Prev Mid: Midpoint of the previous day’s high and low. - Today Mid: Midpoint of the current day’s high and low.
Signals respect these midlines to filter potential reversals.
4. Indicator Calculations
4.1 IFZ (Internal Force Zone)
• Formula: zIFZ = (ohlc4 - SMA(ohlc4, ifzLength)) / StdDev(ohlc4, ifzLength)
• IFZ = ((exp(2zIFZ) - 1) / (exp(2zIFZ) + 1) + 1) * 50
• IFZ SMA = SMA(IFZ, ifzMaLen)
• Purpose: Identifies cycles based on momentum and strength.
4.2 RSI (Relative Strength Index)
• Standard RSI with user-defined period.
• Tracks overbought (RSI ≥ RSI OB) and oversold (RSI ≤ RSI OS) conditions.
4.3 Z-Score
• Z-Score = (Close - SMA(Close, zScoreLength)) / StdDev(Close, zScoreLength)
• Z MA = SMA(Z-Score, zScoreLength)
• Purpose: Measures price deviation from mean and identifies extended cycles.
5. Cycle Detection
Long Cycle
• Trigger: IFZ crosses above the upper threshold.
• Track if RSI becomes overbought.
• Track if Z-Score reaches extended level.
• Exit: IFZ crosses below upper threshold.
Short Cycle
• Trigger: IFZ crosses below the lower threshold.
• Track if RSI becomes oversold.
• Track if Z-Score reaches extended level.
• Exit: IFZ crosses above lower threshold.
6. Reversal Signal Conditions
Long Reversal Signal (SELL)
Triggered if: 1. Signal not already issued. 2. RSI has been overbought in the cycle. 3. Z-Score reached extended level. 4. Z-Score < Z MA. 5. IFZ < IFZ SMA. 6. RSI ≤ 50. 7. Open > Prev Mid AND Open > Today Mid. 8. Z-Score ≤ Z-Score Filter. 9. Optional: Only during extended cycles.
Short Reversal Signal (BUY)
Triggered if: 1. Signal not already issued. 2. RSI has been oversold in the cycle. 3. Z-Score reached extended level. 4. Z-Score > Z MA. 5. IFZ > IFZ SMA. 6. RSI ≥ 50. 7. Open < Prev Mid AND Open < Today Mid. 8. Z-Score ≥ -Z-Score Filter. 9. Optional: Only during extended cycles.
7. Plotting and Alerts
• Daily midlines plotted (orange = today, yellow = previous day).
• Reversal signals plotted on next candle (Triangle up = BUY, Triangle down = SELL).
• Debug panel shows IFZ, RSI, Z-Score, Z MA, Cycle status, and midlines.
• Alerts can be set for both BUY and SELL reversal signals.
8. Execution Flow
1. Update daily highs, lows, and midlines.
2. Compute IFZ, IFZ SMA, RSI, Z-Score, Z MA.
3. Detect long/short cycles.
4. Track extended conditions (RSI, Z-Score).
5. Check reversal conditions including midline filter.
6. Plot signals and update debug panel.
7. Trigger alerts if conditions met.
9. Notes
• Signals respect both current and previous day midlines.
• Midline filter can be toggled on/off in future enhancements.
• Debug panel provides a real-time snapshot of all relevant values.
Script open-source
Dans l'esprit de TradingView, le créateur de ce script l'a rendu open-source, afin que les traders puissent examiner et vérifier sa fonctionnalité. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit de TradingView, le créateur de ce script l'a rendu open-source, afin que les traders puissent examiner et vérifier sa fonctionnalité. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.