
이것은 지수 이동 평균 (EMA) 을 기반으로 한 지능형 거래 전략 시스템이다. 이 전략은 단기 및 장기 EMA의 교차 신호를 사용하여 가격과 단기 EMA의 관계를 결합하여 시장 추세와 거래 기회를 식별한다. 이 전략은 AI 보조 개발을 사용하여 가격 움직임의 동적 분석을 통해 자동 거래를 구현한다.
전략의 핵심 논리는 다음과 같은 핵심 구성 요소를 기반으로 합니다.
이것은 구조가 완전하고, 논리가 명확한 트렌드 추적 전략이다. EMA 지표의 조합 사용으로 시장 추세를 효과적으로 파악한다. 전략의 최적화 공간은 주로 신호 필터링과 위험 관리 측면에 있으며, 지속적인 개선을 통해 전략의 안정성과 수익성을 더욱 향상시킬 수 있다.
/*backtest
start: 2024-12-19 00:00:00
end: 2024-12-25 08:00:00
period: 45m
basePeriod: 45m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Jerryorange
//@version=6
strategy("Smart EMA Algo", overlay=true)
// Inputs
emaShortLength = input.int(9, title="Short EMA Length", minval=1)
emaLongLength = input.int(21, title="Long EMA Length", minval=1)
src = input(close, title="Source")
// EMA Calculations
emaShort = ta.ema(src, emaShortLength)
emaLong = ta.ema(src, emaLongLength)
// Market Direction
isUptrend = emaShort > emaLong
isDowntrend = emaShort < emaLong
// Entry Conditions
longCondition = isUptrend and ta.crossover(close, emaShort)
shortCondition = isDowntrend and ta.crossunder(close, emaShort)
// Exit Conditions
exitLong = ta.crossunder(close, emaShort)
exitShort = ta.crossover(close, emaShort)
// Strategy Logic
if (longCondition)
strategy.entry("Buy", strategy.long)
if (shortCondition)
strategy.entry("Sell", strategy.short)
if (exitLong)
strategy.close("Buy")
if (exitShort)
strategy.close("Sell")
// Plot EMAs
plot(emaShort, color=color.blue, title="Short EMA")
plot(emaLong, color=color.red, title="Long EMA")