
단선 반전 전략은 단선 형태를 기반으로 한 트렌드 거래 전략이다. 단선 형태를 신호로 사용하여 이동 평균과 결합하여 트렌드 방향을 판단하여 높은 승률의 진입을 달성한다. 동시에, 독특한 추적 스톱 손실 메커니즘을 사용하여 초고 수익률을 달성한다.
이 전략은 출입 신호를 짧은 선 모양으로 뚫어 낸다. 구체적으로, 다음 두 가지 조건을 충족하면 신호를 생성한다:
이러한 조합 신호는 대부분의 소음을 필터링하여 입구 정확도를 향상시킵니다.
이 전략은 세 개의 다른 주기의 이동 평균을 사용하여 추세를 판단한다. 구체적으로, 빠른 라인, 중간 라인, 그리고 느린 라인은 동방향으로 배열될 때 추세로 정의되며, 그렇지 않으면 평형으로 정의된다.
다목적으로 들어오는 경우, 빠른 선 > 중선 > 느린 선이 요구된다. 공중으로 들어오는 경우, 빠른 선 < 중선 < 느린 선이 요구된다.
이 전략은 독특한 추적 스톱 메커니즘을 사용한다. 포지션을 열고 나면, 사용자가 설정한 포인트 수와 오차량에 따라 최적의 스톱 스톱을 추적한다. 이것은 최대 수익을 잠금화하면서 위험을 통제한다.
단선 투여 신호는 전략이 높은 확률의 기회에서만 입장을 열 수 있도록 하며, 과도한 노이즈 거래를 방지한다. 동시에 추세 판단과 결합하여 대부분의 비주류 방향의 작업을 필터링 할 수 있다. 이것은 전략의 높은 정확성을 보장한다.
독특한 추적 스톱 손실 메커니즘이 이 전략의 가장 큰 특징이다. 그것은 최대 이익을 보장하는 전제 하에, 각 스톱 손실을 정확하게 작은 범위에서 제어하여 높은 승률과 초강한 수익성을 보장한다.
시뮬레이션 결과, 이 메커니즘을 사용하면 여러 통화 쌍이 1000% 이상의 총 수익률을 달성하고 최대 수익률이 100배 이상 증가하여 수익률이 전례없는 새로운 수준으로 상승했습니다.
테스트 결과가 거의 성배를 다는 것을 감안할 때, 이것은 시장의 과도한 시뮬레이션으로 인해 발생하는 결과일 가능성이 높습니다. 실디스크 중지 손실 메커니즘은 테스트만큼 정확하게 작동하지 않을 수 있으며, 반드시 철회 될 것입니다.
또한, 테스트 기간은 2년이며, 시장 구조의 변화는 실적에도 영향을 미칠 수 있다.
트레이킹 스톱의 너무 민감함은 과도한 스톱 트리거를 유발할 수 있다. 또한, 시장의 갑작스러운 사건은 스톱의 무효를 초래할 수도 있다. 이것은 트레이킹 스톱을 사용하는 데 필요한 위험이다.
스톱로드를 추적하는 것은 전체 전략의 수익 폭발의 핵심이다. 민감하고 신뢰할 수 있도록, 스톱로드 포인트를 적절하게 느슨하게 추적하여 덜 민감하게 만들 수 있습니다.
추가 테스트 시간 창은 또한 변수 안정성을 검사할 수 있다.
현재 이동 평균 주기는 최적의 변수 조합이 아닙니다. 최적화 테스트를 통해 더 나은 변수를 찾아서 더 나은 효과를 얻을 수 있습니다.
예를 들어, 단선과 중선 사이클 간격을 늘리거나, 3선 교차 방식을 조정하는 등
단선 반전 전략은 효율적인 입구와 강력한 정지로 놀라운 시뮬레이션 테스트 지표를 얻었습니다. 그러나 우리는 과도한 적합성의 위험을 인식하고 위험을 통제 할 준비가되어 있습니다.
적절한 변수 조정이나 최적화를 통해, 이 전략은 실전에서 상당한 수익을 얻을 수 있고, 강력한 트렌드 시스템으로 발전할 수 있을 것이다. 그것의 고유한 추적 손실 개념은 우리에게 귀중한 교훈을 제공하며, 더 많은 혁신적인 전략을 낳을 수 있다.
/*backtest
start: 2023-12-01 00:00:00
end: 2023-12-31 23:59:59
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=4
//Time Frame: H1
strategy("Pin Bar Magic v1", overlay=true)
// User Input
usr_risk = input(title="Equity Risk (%)",type=input.integer,minval=1,maxval=100,step=1,defval=3,confirm=false)
atr_mult = input(title="Stop Loss (x*ATR, Float)",type=input.float,minval=0.1,maxval=100,step=0.1,defval=0.5,confirm=false)
slPoints = input(title="Stop Loss Trail Points (Pips)",type=input.integer,minval=1,maxval=1000,step=1,defval=1,confirm=false)
slOffset = input(title="Stop Loss Trail Offset (Pips)",type=input.integer,minval=1,maxval=1000,step=1,defval=1,confirm=false)
sma_slow = input(title="Slow SMA (Period)",type=input.integer,minval=1,maxval=500,step=1,defval=50,confirm=false)
ema_medm = input(title="Medm EMA (Period)",type=input.integer,minval=1,maxval=500,step=1,defval=18,confirm=false)
ema_fast = input(title="Fast EMA (Period)",type=input.integer,minval=1,maxval=500,step=1,defval=6,confirm=false)
atr_valu = input(title="ATR (Period)",type=input.integer,minval=1,maxval=500,step=1,defval=14,confirm=false)
ent_canc = input(title="Cancel Entry After X Bars (Period)",type=input.integer,minval=1,maxval=500,step=1,defval=3,confirm=false)
// Create Indicators
slowSMA = sma(close, sma_slow)
medmEMA = ema(close, ema_medm)
fastEMA = ema(close, ema_fast)
bullishPinBar = ((close > open) and ((open - low) > 0.66 * (high - low))) or ((close < open) and ((close - low) > 0.66 * (high - low)))
bearishPinBar = ((close > open) and ((high - close) > 0.66 * (high - low))) or ((close < open) and ((high - open) > 0.66 * (high - low)))
atr = atr(atr_valu)
// Specify Trend Conditions
fanUpTrend = (fastEMA > medmEMA) and (medmEMA > slowSMA)
fanDnTrend = (fastEMA < medmEMA) and (medmEMA < slowSMA)
// Specify Piercing Conditions
bullPierce = ((low < fastEMA) and (open > fastEMA) and (close > fastEMA)) or ((low < medmEMA) and (open > medmEMA) and (close > medmEMA)) or ((low < slowSMA) and (open > slowSMA) and (close > slowSMA))
bearPierce = ((high > fastEMA) and (open < fastEMA) and (close < fastEMA)) or ((high > medmEMA) and (open < medmEMA) and (close < medmEMA)) or ((high > slowSMA) and (open < slowSMA) and (close < slowSMA))
// Specify Entry Conditions
longEntry = fanUpTrend and bullishPinBar and bullPierce
shortEntry = fanDnTrend and bearishPinBar and bearPierce
// Long Entry Function
enterlong() =>
risk = usr_risk * 0.01 * strategy.equity
stopLoss = low[1] - atr[1] * atr_mult
entryPrice = high[1]
units = risk / (entryPrice - stopLoss)
strategy.entry("long", strategy.long, units, stop=entryPrice)
strategy.exit("exit long", from_entry="long", trail_points=slPoints, trail_offset=slOffset)
// Short Entry Function
entershort() =>
risk = usr_risk * 0.01 * strategy.equity
stopLoss = high[1] + atr[1] * atr_mult
entryPrice = low[1]
units = risk / (stopLoss - entryPrice)
strategy.entry("short", strategy.short, units, stop=entryPrice)
strategy.exit("exit short", from_entry="short", trail_points=slPoints, trail_offset=slOffset)
// Execute Long Entry
if (longEntry)
enterlong()
// Execute Short Entry
if (shortEntry)
entershort()
// Cancel the Entry if Bar Time is Exceeded
strategy.cancel("long", barssince(longEntry) > ent_canc)
strategy.cancel("short", barssince(shortEntry) > ent_canc)
// Force Close During Certain Conditions
strategy.close_all(when = hour==16 and dayofweek==dayofweek.friday, comment = "exit all, market-closed")
strategy.close_all(when = crossunder(fastEMA, medmEMA), comment = "exit long, re-cross")
strategy.close_all(when = crossover(fastEMA, medmEMA), comment = "exit short, re-cross")
// Plot Moving Averages to Chart
plot(fastEMA, color=color.red)
plot(medmEMA, color=color.blue)
plot(slowSMA, color=color.green)
// Plot Pin Bars to Chart
plotshape(bullishPinBar, text='Bull PB', style=shape.labeldown, location=location.abovebar, color=color.green, textcolor=color.white, transp=0)
plotshape(bearishPinBar, text='Bear PB', style=shape.labelup, location=location.belowbar, color=color.red, textcolor=color.white, transp=0)
// Plot Days of Week
plotshape(hour==0 and dayofweek==dayofweek.monday, text='Monday', style=shape.labeldown, location=location.abovebar, color=color.black, textcolor=color.white, transp=0)
plotshape(hour==0 and dayofweek==dayofweek.tuesday, text='Tuesday', style=shape.labeldown, location=location.abovebar, color=color.black, textcolor=color.white, transp=0)
plotshape(hour==0 and dayofweek==dayofweek.wednesday, text='Wednesday', style=shape.labeldown, location=location.abovebar, color=color.black, textcolor=color.white, transp=0)
plotshape(hour==0 and dayofweek==dayofweek.thursday, text='Thursday', style=shape.labeldown, location=location.abovebar, color=color.black, textcolor=color.white, transp=0)
plotshape(hour==0 and dayofweek==dayofweek.friday, text='Friday', style=shape.labeldown, location=location.abovebar, color=color.black, textcolor=color.white, transp=0)
plotshape(hour==16 and dayofweek==dayofweek.friday, text='Market Closed', style=shape.labeldown, location=location.abovebar, color=color.black, textcolor=color.white, transp=0)