OPEN-SOURCE SCRIPT
mean reversion Spread Z-Score

Your main "actor" is the Blue Line 🔵 (the Z-Score). It tells you if your spread is "expensive" or "cheap" compared to its average.
The other lines are your action zones.
Here is how to read the signals:
Scenario 1: SELL the Spread (The spread is TOO EXPENSIVE)
• ENTRY Signal: The Blue Line 🔵 moves up and crosses the Red Line 🔴 (at +1.8).
• Meaning: MNQ has become far too expensive compared to MES. The rubber band is stretched too far upwards.
• Your Action (Sell):
• ✅ SELL MNQ
• ✅ BUY MES
• EXIT Signal: The Blue Line 🔵 comes back down and crosses the Dotted Red Line (at +0.5).
• Meaning: The rubber band is back to normal. It's time to take your profits.
• Your Action (Close):
• ✅ BUY BACK your MNQ
• ✅ SELL your MES
Scenario 2: BUY the Spread (The spread is TOO CHEAP)
• ENTRY Signal: The Blue Line 🔵 moves down and crosses the Green Line 🟢 (at -1.8).
• Meaning: MNQ has become far too cheap compared to MES. The rubber band is stretched too far downwards.
• Your Action (Buy):
• ✅ BUY MNQ
• ✅ SELL MES
• EXIT Signal: The Blue Line 🔵 moves back up and crosses the Dotted Green Line (at -0.5).
• Meaning: The rubber band is back to normal. It's time to take your profits.
• Your Action (Close):
• ✅ SELL your MNQ
• ✅ BUY BACK your MES
In summary:
• Blue Line 🔵 touches Red Line 🔴 = Sell the spread.
• Blue Line 🔵 touches Green Line 🟢 = Buy the spread.
The other lines are your action zones.
Here is how to read the signals:
Scenario 1: SELL the Spread (The spread is TOO EXPENSIVE)
• ENTRY Signal: The Blue Line 🔵 moves up and crosses the Red Line 🔴 (at +1.8).
• Meaning: MNQ has become far too expensive compared to MES. The rubber band is stretched too far upwards.
• Your Action (Sell):
• ✅ SELL MNQ
• ✅ BUY MES
• EXIT Signal: The Blue Line 🔵 comes back down and crosses the Dotted Red Line (at +0.5).
• Meaning: The rubber band is back to normal. It's time to take your profits.
• Your Action (Close):
• ✅ BUY BACK your MNQ
• ✅ SELL your MES
Scenario 2: BUY the Spread (The spread is TOO CHEAP)
• ENTRY Signal: The Blue Line 🔵 moves down and crosses the Green Line 🟢 (at -1.8).
• Meaning: MNQ has become far too cheap compared to MES. The rubber band is stretched too far downwards.
• Your Action (Buy):
• ✅ BUY MNQ
• ✅ SELL MES
• EXIT Signal: The Blue Line 🔵 moves back up and crosses the Dotted Green Line (at -0.5).
• Meaning: The rubber band is back to normal. It's time to take your profits.
• Your Action (Close):
• ✅ SELL your MNQ
• ✅ BUY BACK your MES
In summary:
• Blue Line 🔵 touches Red Line 🔴 = Sell the spread.
• Blue Line 🔵 touches Green Line 🟢 = Buy the spread.
Script de código abierto
Siguiendo fielmente el espíritu de TradingView, el creador de este script lo ha publicado en código abierto, permitiendo que otros traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la publicación de este código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.
Script de código abierto
Siguiendo fielmente el espíritu de TradingView, el creador de este script lo ha publicado en código abierto, permitiendo que otros traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la publicación de este código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.