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.
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。