OPEN-SOURCE SCRIPT

Bollinger + EMA Strategy with Stats

234
This strategy is a mean-reversion trading model that combines Bollinger Band deviation entries with EMA-based exits. It enters a long position when the price drops significantly below the lower Bollinger Band by a user-defined multiple of standard deviation (x), and a short position when the price exceeds the upper band by the same logic. To manage risk, it uses a wider Bollinger Band threshold (y standard deviations) as a stop loss, while take profit occurs when the price reverts to the n-period EMA, indicating mean reversion. The strategy maintains only one active position at a time—either long or short—and allocates a fixed percentage of capital per trade. Performance metrics such as equity curve, drawdown, win rate, and total trades are tracked and displayed for backtesting evaluation.

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.