이 전략은 단기 외환 트렌드를 포착하기 위해 EMA와 RSI를 거래 신호로 사용하고 ADX 필터와 결합하여 트렌드를 추적하는 스톱로드를 사용하여 수익을 고정합니다. 이 전략은 모든 통화 쌍에 적용되지만 주요 통화 쌍의 1 시간 차트에 주로 적용됩니다.
이 전략은 다음과 같은 지표와 조건에 따라 거래 신호를 만듭니다.
트레이드 엔트리 신호:
출구 신호:
이 전략은 평균선 교차, RSI 과잉 구매 과잉 판매 및 ADX 트렌드 판단 지표를 집중적으로 사용하여, 비교적 엄격한 입문 메커니즘을 형성하고, 트렌드 생성 후 순차적으로, 스톱 손실을 추적하여 수익을 잠금하여 단기 트렌드를 효과적으로 포착한다.
이 전략은 다음과 같은 장점을 가지고 있습니다.
EMA 빠른 느린 선의 교차를 기본으로 트렌드 판단, 빠른 선의 상향 교차는 느린 선의 교차는 부어 트렌드에 들어간 것을 나타내고, 하향 교차는 하향으로, 트렌드의 변화를 식별 할 수 있다.
RSI 지표에 추가된 판단은 일부 가짜 돌파 신호를 필터링 할 수 있습니다. RSI 과잉 구매 과잉 판매 지역은 단기 조정 신호로 간주되어 흔들리는 시장에 불필요한 진입을 피합니다.
ADX 지표는 진정한 트렌드가 존재하는지 판단하는 데 사용되며, 일부 잡음을 효과적으로 필터링 할 수 있습니다. ADX 값이 25보다 크면 거래 신호를 고려하여 명확한 트렌드가 있음을 보장합니다.
이동식 스톱 및 스톱 방식을 채택하여 수익을 극대화하고, 스톱 보장 위험을 제어하고, 150 점의 스톱 거리를 추적하고, 400 점의 스톱 거리를 추적하여 트렌드를 지속적으로 추적 할 수 있습니다.
매주 금요일 시장이 닫기 전에 모든 지분을 청산하여 주말의 다양한 위험을 피하고 운영의 규칙성을 유지하십시오.
이 전략에는 다음과 같은 위험도 있습니다.
EMA 평행선 교차 전략은 거짓된 돌파 신호를 발생시키며, 가상화는 손실을 초래할 수 있다. 평행선 변수를 적절히 조정하거나, 다른 지표에 필터링을 추가할 수 있다.
RSI 지표는 오버 바이 오버 셀 상태를 판단할 수 있으며, 트렌드 반전을 확인 할 수 없습니다. 시각화는 트렌드를 놓치거나 반전 입장을 고려할 수 있습니다. 다른 지표와 조합하여 사용하거나 변수를 조정할 수 있습니다.
ADX 지표는 트렌드가 존재하는지 여부를 판단할 뿐이며, 진입 시기는 정확하지 않을 수 있으며, 다른 판단을 추가하거나 ADX 필터링 조건을 낮추는 것을 고려할 수 있다.
스톱패스 설정은 너무 고정되어 시장의 변화에 적응할 수 없으며, 다양한 매개 변수를 테스트하거나 수동 개입으로 조정을 할 수 있다.
주간 강제 평준화는 좋은 트렌드 운용 기회를 놓칠 수 있으며, 일일 종식 시장으로 조정하거나 나중에 조건부 평준화로 수정하는 것을 고려할 수 있습니다.
이 전략은 다음과 같은 방향으로 최적화될 수 있습니다.
다른 평평선 파라미터 조합을 테스트하여 최적의 평평선 길이를 찾습니다. 평평선 기울기를 결정할 수 있습니다.
다른 RSI 변수를 시도하거나 KDJ 지표와 조합하여 과매매 판단을 더 최적화하십시오.
ADX 매개 변수를 최적화하여 더 적합한 ADX 필터링 조건을 찾아 입시 품질을 향상시킵니다.
모바일 스톱 스톱의 고정 점수와 ATR 동적 추적 스톱의 조합을 테스트한다.
일간 돌파 회귀 전략을 도입하고, 트렌드 확인 후 출전하여 5분 또는 15분 차트를 고려할 수 있다.
변동률에 기반한 포지션 관리 모듈을 추가하여 시장 변동에 따라 포지션을 동적으로 조정합니다.
기계학습 기술을 사용해 자동으로 최적화하고, 전략의 적응성을 구현한다.
이 전략은 전체적으로 매우 간단하고 직접적인 트렌드 추적 전략으로, 평행선 교차 판단 트렌드 방향, RSI 필터링 가짜 돌파구, ADX 판단 트렌드 존재, 중지 중지 손실 지속적으로 추세를 추적, 단기간에 수익을 잡는다. 전략 최적화 방향은 주로 더 나은 지표 조합을 찾고, 트렌드 판단의 유연성을 구현하고, 동적 위치 관리를 도입한다. 코드 논리 분석을 통해, 이 전략은 약간의 가용성을 가지고 있지만, 실제 적용되기 전에 추가 테스트 및 최적화가 필요합니다.
/*backtest
start: 2022-09-21 00:00:00
end: 2023-09-27 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=3
strategy("Hucklekiwi Pip - HLHB Trend-Catcher System", shorttitle="HLHB TCS", overlay=true,
default_qty_type=strategy.percent_of_equity, default_qty_value=100)
// -----------------------------------------------------------------------------
// HLHB Trend-Catcher System as described on BabyPips.com
//
// Strategy Author: Hucklekiwi Pip
// Coded By: Backtest Rookies
// -----------------------------------------------------------------------------
//
// Refs:
// - Original System: https://www.babypips.com/trading/forex-hlhb-system-explained
// - Updated System: https://www.babypips.com/trading/forex-hlhb-system-20190311
//
//
// Description (From Hucklekiwi Pip)
//
// The HLHB System simply aims to catch short-term forex trends.
// It is patterned after the Amazing Crossover System that Robopip once backtested.
// In fact, it was one of his highest-scoring mechanical systems in 2014!
// The system can be applied to any pair, but since I’m into major pairs,
// I’m applying it to the 1-hour charts of EUR/USD and GBP/USD.
// -----------------------------------------------------------------------------
// STRATEGY REQUIREMENTS
// -----------------------------------------------------------------------------
//
// Setup
// -----
// - EUR/USD 1-hour chart
// - GBP/USD 1-hour chart
// - 5 EMA: blue line
// - 10 EMA: red line
// - RSI (10) applied to the median price (HL/2)
// - ADX (14)
//
// Entry
// -----
// - BUY when the 5 EMA crosses above the 10 EMA from underneath and the RSI
// crosses above the 50.0 mark from the bottom.
// - SELL when the 5 EMA crosses below the 10 EMA from the top and the RSI
// crosses below the 50.0 mark from the top.
// - Make sure that the RSI did cross 50.0 from the top or bottom and not just
// ranging tightly around the level.
// - ADX > 25 for Buy and Sells
//
// Exit
// ----
// - Use a 50-pip trailing stop and a 200-pip profit target. This increases the
// chances of the system riding longer trends.
// - Close the trade when a new signal materializes.
// - Close all trades by the end of the week.
//
// -----------------------------------------------------------------------------
// Strategy Varaibles
// -------------------
ema_fast_len = input(5, title='Fast EMA Length')
ema_slow_len = input(10 , title='Slow EMA Length')
rsi_len = input(10, title='Slow EMA Length')
session_end_hour = input(16, minval=0, maxval=23, title='Weekly Session End (Hour)')
session_end_minute = input(0, minval=0, maxval=59, title='Weekly Session End (Minute)')
// Targets taken from the update post which states 150 & 400 instead of 50 and 200.
profit_target = input(400, title='Profit Target (Pips/Points)')
trailing_stop_dist = input(150, title='Trailing Stop Distance (Pips/Points)')
adx_filt = input(true, title='User ADX Filter')
adx_min = input(25, minval=0, title='Minimum ADX Level')
adx_len = input(14, title="ADX Smoothing")
di_len = input(14, title="DI Length")
// Setup the Indicators
ema_fast = ema(close, ema_fast_len)
ema_slow = ema(close, ema_slow_len)
rsi_ind = rsi(close, rsi_len)
// ADX
adx_dirmov(len) =>
up = change(high)
down = -change(low)
plusDM = na(up) ? na : (up > down and up > 0 ? up : 0)
minusDM = na(down) ? na : (down > up and down > 0 ? down : 0)
truerange = rma(tr, len)
plus = fixnan(100 * rma(plusDM, len) / truerange)
minus = fixnan(100 * rma(minusDM, len) / truerange)
[plus, minus]
adx_adx(dilen, adxlen) =>
[plus, minus] = adx_dirmov(dilen)
sum = plus + minus
adx = 100 * rma(abs(plus - minus) / (sum == 0 ? 1 : sum), adxlen)
[adx, plus, minus]
[adx_sig, adx_plus, adx_minus] = adx_adx(di_len, adx_len)
// Strategy Logic
ema_long_cross = crossover(ema_fast, ema_slow)
ema_short_cross = crossunder(ema_fast, ema_slow)
rsi_long_cross = crossover(rsi_ind, 50)
rsi_short_cross = crossunder(rsi_ind, 50)
adx_check = adx_filt ? adx_sig >= adx_min : true
longCondition = ema_long_cross and rsi_long_cross and adx_check
if (longCondition)
strategy.entry("Long", strategy.long)
shortCondition = ema_short_cross and rsi_short_cross and adx_check
if (shortCondition)
strategy.entry("Short", strategy.short)
strategy.exit("SL/TP", "Long", profit=profit_target, loss=trailing_stop_dist, trail_points=trailing_stop_dist)
strategy.exit("SL/TP", "Short", profit=profit_target, loss=trailing_stop_dist, trail_points=trailing_stop_dist)
// Friday = 6
// If we miss the hour for some reason (due to strange timeframe), then close immediately
// Else if we are on the closing hour, then check to see if we are on or passed the close minute
close_time = dayofweek == 6 ?
hour[0] > session_end_hour ? true :
hour[0] == session_end_hour ?
minute[0] >= session_end_minute :
false : false
strategy.close_all(when=close_time)
// Plotting
plot(ema_fast, color=blue, title="Fast EMA")
plot(ema_slow, color=red, title="Slow EMA")
plotshape(rsi_long_cross, style=shape.triangleup, size=size.tiny, location=location.belowbar, color=green, title='RSI Long Cross Marker')
plotshape(rsi_short_cross, style=shape.triangledown, size=size.tiny, location=location.abovebar, color=red, title='RSI Short Cross Marker')
// ADX Filter Highlight
bgcolor(adx_filt and adx_check ? orange : na, transp=90)