SMAcross-mvr — Strategy by vmedaram1

By vmedaram1

Performance Metrics

Description

OverviewSMAcross-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 ModesYou can now choose how trades are entered:Entry Mode A: Short SMA crosses Long SMAEntry Mode B: Price crosses Long SMAThis 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 SMAYou may enable one, both, or neither.If both are enabled, the strategy exits on whichever condition occurs first.✅ Terminology ClarityAll 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 SizingEach trade uses 100% of available equity, allowing performance to naturally compound over time during backtests.✅ Optional Visual EnhancementsOptional cross price labels (can be toggled on/off)Color-filled zone between Short and Long SMAs for quick trend recognitionOptional 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 notificationsWebhook-based automationBroker integrations🔒 Design PrinciplesNo repaintingNo line continuations (TradingView-safe formatting)Stable behavior when zooming or scrollingClear separation of entry logic, exit logic, and visuals⚠️ NotesThis script is intended for educational and research purposes.Always forward-test and apply proper risk management before live trading.

Browse all 5,900+ TradingView Pine Script strategies

View on TradingView