OPEN-SOURCE SCRIPT

EMA Cross Strategy only Long

64
📈 EMA Cross Strategy – Only Long
Simple. Clean. Powerful. Designed for strong uptrends.

This is a long-only trend-following strategy based on the classic crossover of Exponential Moving Averages (EMAs). It’s designed for growth stocks and trending assets where upward momentum dominates.

⚙️ How it works:
Entry: when the Fast EMA crosses above the Slow EMA

Exit: when the Fast EMA crosses below the Slow EMA

No shorts, no reversals – just pure trend riding.

By default, the strategy uses 50/100 EMA, which has performed exceptionally well on stocks like NVIDIA (NVDA). These settings can be easily customized to fit your preferred asset or timeframe.

📊 Backtest Example – NVIDIA (NVDA, 1D timeframe)
Test parameters:

Initial capital: $10,000

Order size: 50% of equity per trade (adjustable in settings)

Results:

Net profit: +$2,037,563.63 USD

Gross profit: $2,127,432.33

Gross loss: $89,868.70

Max equity growth: $2,708,648.75 (+99.63%)

Drawdown: 20.00%

Buy & Hold profit: +$30,636,000 USD (but with far more exposure)

The strategy dramatically outperformed passive holding on a risk-adjusted basis, while keeping drawdowns and trade count under control.

🔧 Customization & Risk Management
In the Strategy Settings, you can adjust:

EMA lengths (default: 50 fast, 100 slow)

Order size as a % of equity (e.g., reduce below 50% to lower drawdown)

Backtest range and asset type (works well on growth stocks and trending commodities)

Try this on assets with strong bullish cycles like NVDA, AAPL, MSFT, or Gold (XAU/USD).

⚠️ Disclaimer
This script is for educational and backtesting purposes only. It is not financial advice. Please do your own research and test carefully before trading live.

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.