
이 전략은 14주기 지수 이동 평균 ((EMA) 에 기반한 구매 전략으로, 그래프 기술 분석과 결합된다. 이 전략은 가격과 EMA의 교차 관계를 관찰하여, 유체의 형태적 특징과 결합하여 시장의 구매 시기를 결정한다. 이 방법은 추세 요소를 고려할 뿐만 아니라, 가격 구조 분석에 통합되어, 보다 포괄적인 거래 시스템을 형성한다.
전략의 핵심 논리는 다음과 같은 몇 가지 핵심 조건의 조합에 기반합니다.
이것은 기술 분석의 여러 차원을 결합한 구매 전략이며, EMA 트렌드 추적과 그래프 형태 분석을 결합하여 비교적 완벽한 거래 시스템을 구축한다. 전략의 주요 장점은 신호 확인 메커니즘의 신뢰성과 위험 통제의 합리성에 있다. 일부 고유한 위험이 있지만, 제안된 최적화 방향에 의해 전략의 안정성과 신뢰성이 더욱 향상될 전망이다.
/*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)