This strategy is a buying system that combines the 14-period Exponential Moving Average (EMA) with candlestick technical analysis. It determines market entry points by observing the price-EMA crossover relationship along with candlestick pattern characteristics. This approach incorporates both trend factors and price structure analysis, forming a comprehensive trading system.
The core logic is based on the combination of several key conditions: 1. Uses 14-period EMA as the main trend reference line 2. Requires current closing price to break above EMA, forming an upward crossover 3. Confirms current candle is bullish (close higher than open) 4. Requires at least 50% of the candle body to be above the EMA 5. Total wick length must not exceed 40% of the total candle length A buy signal is generated when all these conditions are met simultaneously. This multi-filter mechanism effectively reduces false signals.
This is a buying strategy that integrates multiple dimensions of technical analysis, building a relatively complete trading system through the combination of EMA trend following and candlestick pattern analysis. The strategy’s main advantages lie in its signal confirmation mechanism reliability and reasonable risk control. While there are some inherent risks, the strategy’s stability and reliability can be further enhanced through the suggested optimization directions.
/*backtest start: 2019-12-23 08:00:00 end: 2024-12-18 08:00:00 period: 1d basePeriod: 1d exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}] */ //@version=5 strategy("Buy Entry with EMA Crossing and Wick Conditions", overlay=true) // Define the EMA length ema_length = input.int(14, title="EMA Length") // Calculate the 14 EMA ema_14 = ta.ema(close, ema_length) // Calculate the candle body and wicks body = close - open upper_wick = high - close lower_wick = open - low total_candle_length = high - low // Define the condition for the candle to be green (bullish) is_green_candle = close > open // Condition for crossing the 14 EMA (previous close was below, current close is above) crossing_ema = ta.crossover(close, ema_14) // Condition for at least 50% of the candle's body crossing the 14 EMA body_crossed_ema = (close - open) * 0.5 <= (close - ema_14) and close > ema_14 // Condition for wick percent being less than or equal to 40% of the total candle length wick_percent = (upper_wick + lower_wick) / total_candle_length valid_wick_condition = wick_percent <= 0.4 // Define the buy condition buy_condition = is_green_candle and crossing_ema and body_crossed_ema and valid_wick_condition // Plot the 14 EMA on the chart plot(ema_14, color=color.blue, linewidth=2, title="14 EMA") // Plot the buy signal as an arrow on the chart plotshape(buy_condition, color=color.green, style=shape.labelup, location=location.belowbar, text="BUY") // Optional: Add a strategy for backtesting if (buy_condition) strategy.entry("Buy", strategy.long)