OPEN-SOURCE SCRIPT
SMAcross-mvr

Overview
SMAcross-mvrNew is a flexible, non-repainting moving-average strategy designed for clarity, configurability, and reliable backtesting.
It supports multiple entry styles, optional layered exits, and full-capital position sizing, while remaining stable during chart zooming and dragging.
🚀 What’s New in v2
✅ Multiple Entry Modes
You can now choose how trades are entered:
Entry Mode A: Short SMA crosses Long SMA
Entry Mode B: Price crosses Long SMA
This allows both classic MA-crossover trading and trend-continuation pullback entries using the same strategy.
✅ Modular Exit System (Checkbox-Based)
Exit logic is now fully modular using independent checkboxes:
☑ Exit on opposite signal
☑ Exit when price closes beyond Short SMA
You may enable one, both, or neither.
If both are enabled, the strategy exits on whichever condition occurs first.
✅ Terminology Clarity
All labels, inputs, and alerts now use semantic naming:
Short SMA (formerly 13 SMA)
Long SMA (formerly 30 SMA)
This makes the strategy easier to understand and future-proof if SMA lengths are changed.
✅ Full-Capital Position Sizing
Each trade uses 100% of available equity, allowing performance to naturally compound over time during backtests.
✅ Optional Visual Enhancements
Optional cross price labels (can be toggled on/off)
Color-filled zone between Short and Long SMAs for quick trend recognition
Optional 200 SMA (off by default) for higher-timeframe context
✅ Alert-Ready (TV-Safe)
All alerts use static messages compatible with TradingView’s alert system, making the strategy suitable for:
Manual trade notifications
Webhook-based automation
Broker integrations
🔒 Design Principles
No repainting
No line continuations (TradingView-safe formatting)
Stable behavior when zooming or scrolling
Clear separation of entry logic, exit logic, and visuals
⚠️ Notes
This script is intended for educational and research purposes.
Always forward-test and apply proper risk management before live trading.
SMAcross-mvrNew is a flexible, non-repainting moving-average strategy designed for clarity, configurability, and reliable backtesting.
It supports multiple entry styles, optional layered exits, and full-capital position sizing, while remaining stable during chart zooming and dragging.
🚀 What’s New in v2
✅ Multiple Entry Modes
You can now choose how trades are entered:
Entry Mode A: Short SMA crosses Long SMA
Entry Mode B: Price crosses Long SMA
This allows both classic MA-crossover trading and trend-continuation pullback entries using the same strategy.
✅ Modular Exit System (Checkbox-Based)
Exit logic is now fully modular using independent checkboxes:
☑ Exit on opposite signal
☑ Exit when price closes beyond Short SMA
You may enable one, both, or neither.
If both are enabled, the strategy exits on whichever condition occurs first.
✅ Terminology Clarity
All labels, inputs, and alerts now use semantic naming:
Short SMA (formerly 13 SMA)
Long SMA (formerly 30 SMA)
This makes the strategy easier to understand and future-proof if SMA lengths are changed.
✅ Full-Capital Position Sizing
Each trade uses 100% of available equity, allowing performance to naturally compound over time during backtests.
✅ Optional Visual Enhancements
Optional cross price labels (can be toggled on/off)
Color-filled zone between Short and Long SMAs for quick trend recognition
Optional 200 SMA (off by default) for higher-timeframe context
✅ Alert-Ready (TV-Safe)
All alerts use static messages compatible with TradingView’s alert system, making the strategy suitable for:
Manual trade notifications
Webhook-based automation
Broker integrations
🔒 Design Principles
No repainting
No line continuations (TradingView-safe formatting)
Stable behavior when zooming or scrolling
Clear separation of entry logic, exit logic, and visuals
⚠️ Notes
This script is intended for educational and research purposes.
Always forward-test and apply proper risk management before live trading.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que la republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como asesoramiento o recomendaciones financieras, de inversión, de trading o de otro tipo proporcionadas o respaldadas por TradingView. Más información en Condiciones de uso.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que la republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como asesoramiento o recomendaciones financieras, de inversión, de trading o de otro tipo proporcionadas o respaldadas por TradingView. Más información en Condiciones de uso.