Configurable EMA Stack Strategy by E_M_C_S

By E_M_C_S

Performance Metrics

Description

This strategy uses a configurable exponential moving average (EMA) stack to define directional bias and an EMA cross to manage entries and exits.The script calculates six user-defined EMAs (EMA 1 through EMA 6). Each EMA can be shown or hidden on the chart independently, and each can also be included or excluded from the bias filter. When multiple EMAs are enabled for bias, the script requires them to be strictly aligned in sequence:Bullish bias: shorter enabled EMAs must be above longer enabled EMAsBearish bias: shorter enabled EMAs must be below longer enabled EMAsTrade execution is driven by the EMA 1 / EMA 2 cross:Long entries occur when bullish bias is active and EMA 1 crosses above EMA 2, or when bullish bias becomes active while EMA 1 is already above EMA 2Short entries occur when bearish bias is active and EMA 1 crosses below EMA 2, or when bearish bias becomes active while EMA 1 is already below EMA 2Long exits occur when EMA 1 crosses below EMA 2Short exits occur when EMA 1 crosses above EMA 2Default script settings use 0.10% commission and 1 tick of slippage. These are baseline placeholders for testing and should be adjusted to match the instrument, market, and timeframe being evaluated.This is a simple, transparent trend-following baseline designed for testing EMA alignment behavior across different symbols and timeframes. The main configurable element is not a proprietary signal model, but the ability to control which EMAs participate in the bias stack and which EMA plots are visible on the chart. That makes it useful as a flexible template for studying how stricter or looser EMA alignment changes trade frequency and behavior.Default strategy properties currently include commission and slippage. Those settings should be reviewed and adjusted to fit the market being tested. TradingView’s strategy rules require realistic cost assumptions, and if you change the defaults used in the script, the publication description should match the settings shown in your published backtest.Important notes:This is not presented as a complete trading system or a promise of performanceResults will vary by symbol, timeframe, market conditions, fees, slippage, and position sizingThis script is intended as an educational and analytical baseline that users can test and adapt to their own process

Browse all 5,900+ TradingView Pine Script strategies

View on TradingView