OPEN-SOURCE SCRIPT

Backtest with Date Range

46
### 📝 Strategy Description for Publishing

**Title**: SMA Crossover Strategy with Custom Date Range

**Description**:

This strategy implements a classic SMA (Simple Moving Average) crossover system, enhanced with a custom backtesting window defined by start and end dates.

It generates:

* **Buy signals** when the 10-period SMA crosses above the 50-period SMA (bullish momentum).
* **Sell signals** when the 10-period SMA crosses below the 50-period SMA (bearish momentum).

Key features:

* Trades only occur within a user-defined date range, allowing precise control over the backtest period.
* Uses 100% of available capital per trade by default.
* No leverage or stop loss/take profit is applied—pure trend-following logic.

Ideal for users looking to validate moving average-based strategies during specific market conditions or events.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.