
평평선 교차동력 역전량화 거래 전략은 규칙 기반의 트렌드 추적 시스템으로, 이 시스템의 핵심 논리는 21 주기 지수 이동 평균 ((21 EMA) 을 중심으로 전개된다. 이 전략은 가격과 21 EMA의 관계를 모니터링하며, 가격이 평평선을 가로질러 상향으로 할 때, 평평선을 가로질러 하향으로 할 때, 그리고 가격이 다시 평평선을 가로질러 평평 포지션을 열고 역으로 포지션을 열는다. 이 전략은 또한 사용자 정의 된 거래 시기의 교두보, 중지 손실 설정, 하루 최대 거래 수 제한 및 첫 번째 수익 후에 자동으로 거래를 잠금하는 등의 위험 제어 장치를 포함하고 있으며, 규율이 엄격하고 논리적으로 명확한 거래 시스템을 제공하기 위해 고안되었습니다.
이 전략의 핵심 원칙은 21 EMA를 중심으로 가격의 동적 변화를 포착하고, 트렌드를 따라와 반전 거래를 실현하는 것이다. 구체적으로:
이 전략은 또한 거래량 가중 평균 가격 (VWAP) 을 보조적인 참조 지표로 통합하여 추가적인 시장 배경 정보를 제공합니다.
이러한 최적화 방향은 전략의 안정성과 적응성을 높이고, 잘못된 신호를 줄이고, 수익성을 높이기 위한 것이다.
평행선 교차동력 반전량화 거래 전략은 21 EMA 교차에 기반한 트렌드 추적 시스템으로, 논리적으로 명확하고 규칙이 엄격한 특징이 있다. 가격과 평행선과의 관계를 모니터링하여 엄격한 위험 관리 메커니즘과 결합하여 이 전략은 시장 추세 전환점을 효과적으로 포착하고 위험을 제어할 수 있다.
전략의 주요 장점은 간결하고 직관적인 거래 논리와 완벽한 징계 집행 장치, 특히 첫 번째 수익 후 거래를 잠금하는 디자인이 과도한 거래와 수익 회귀를 효과적으로 방지한다는 것입니다. 그러나, 전략에는 평평한 지연, 단일 지표에 지나치게 의존하는 등의 잠재적인 위험도 있습니다.
미래 최적화 방향은 변수 동적화, 다중 인자 신호 확인, 위험 관리 강화 및 시장 상태 분류와 같은 측면에 중점을 두어야합니다. 이러한 최적화를 통해 전략이 다른 시장 환경에서 적응력을 향상시킬 수 있습니다. 이 전략은 더 안정적이고 신뢰할 수있는 수량 거래 시스템으로 발전할 수 있습니다.
DSPLN 방법의 일환으로, 이 전략은 “Do So Patiently Listening Now”의 거래 철학을 반영하고, 규율과 체계성을 강조하며, 거래자에게 감정적 방해를 극복하고, 규칙 집행에 집중하는 거래 프레임워크를 제공합니다.
/*backtest
start: 2025-06-15 00:00:00
end: 2025-06-21 08:00:00
period: 3m
basePeriod: 3m
exchanges: [{"eid":"Futures_Binance","currency":"ETH_USDT"}]
*/
// This Pine Script® code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © EnvisionTrades
//@version=5
strategy("DSPLN EMA Flip Strategy v6", overlay=true)
// 🔹 Inputs
startHour = input.int(8, "Start Hour")
startMinute = input.int(30, "Start Minute")
endHour = input.int(10, "End Hour")
endMinute = input.int(30, "End Minute")
useTPSL = input.bool(true, "Use TP/SL?")
tpPoints = input.int(40, "Take Profit (points)")
slPoints = input.int(20, "Stop Loss (points)")
// 🔹 Time Filter
isWithinTradingHours = (hour > startHour or (hour == startHour and minute >= startMinute)) and
(hour < endHour or (hour == endHour and minute < endMinute))
// 🔹 Indicators
ema21 = ta.ema(close, 21)
vwap = ta.vwap
plot(ema21, title="21 EMA", color=color.orange)
plot(vwap, title="VWAP", color=color.blue)
// 🔹 State Variables
var int tradesToday = 0
var bool lastTradeWon = false
var float entryPrice = na
var label winLabel = na
var int prevTradeCount = 0
// 🔹 Entry Conditions
longEntry = isWithinTradingHours and close > ema21 and close[1] <= ema21[1]
shortEntry = isWithinTradingHours and close < ema21 and close[1] >= ema21[1]
// 🔹 Exit Conditions
longExit = strategy.position_size > 0 and close < ema21
shortExit = strategy.position_size < 0 and close > ema21
// 🔹 Trade Control
canTrade = tradesToday < 5 and not lastTradeWon
// 🔹 Entry Logic
if canTrade and strategy.position_size == 0 and longEntry
strategy.entry("Long", strategy.long)
entryPrice := close
if useTPSL
strategy.exit("TP Long", from_entry="Long", stop=close - slPoints * syminfo.mintick, limit=close + tpPoints * syminfo.mintick)
if canTrade and strategy.position_size == 0 and shortEntry
strategy.entry("Short", strategy.short)
entryPrice := close
if useTPSL
strategy.exit("TP Short", from_entry="Short", stop=close + slPoints * syminfo.mintick, limit=close - tpPoints * syminfo.mintick)
// 🔹 EMA Manual Exit Logic
if longExit
strategy.close("Long")
tradesToday += 1
lastTradeWon := close > entryPrice
if lastTradeWon
winLabel := label.new(bar_index, high, "✅ WIN - No More Trades", style=label.style_label_down, color=color.green)
if shortExit
strategy.close("Short")
tradesToday += 1
lastTradeWon := close < entryPrice
if lastTradeWon
winLabel := label.new(bar_index, low, "✅ WIN - No More Trades", style=label.style_label_up, color=color.green)
// 🔹 Detect Closed Trades (TP/SL exits)
tradeCount = strategy.closedtrades
if tradeCount > prevTradeCount
closedProfit = strategy.netprofit - strategy.netprofit[1]
tradesToday += 1
lastTradeWon := closedProfit > 0
if lastTradeWon
winLabel := label.new(bar_index, high, "✅ TP WIN - No More Trades", style=label.style_label_down, color=color.green)
prevTradeCount := tradeCount
// 🔹 Reset Daily
if (hour == endHour and minute == endMinute)
tradesToday := 0
lastTradeWon := false
entryPrice := na
prevTradeCount := 0
if not na(winLabel)
label.delete(winLabel)