황소시장 추적 시스템

저자:차오장, 날짜: 2024-01-31 11:01:45
태그:

img

전반적인 설명

불시장 추적 시스템은 트렌드 추적을 기반으로 한 기계적 거래 시스템이다. 트렌드 신호를 필터하기 위해 4시간 차트에서 트렌드 지표를 사용하며, 15분 차트에서 표시된 지표에 따라 엔트리 결정이 이루어진다. 주요 지표에는 RSI, 스토카스틱, MACD가 포함된다. 이 시스템의 장점은 여러 시간 프레임의 조합이 잘못된 신호를 효과적으로 필터링할 수 있고, 짧은 시간 프레임 지표가 보다 정확한 엔트리 타이밍을 파악할 수 있다는 것이다. 그러나 이 시스템에는 오버 트레이딩과 잘못된 브레이크아웃 문제와 같은 일부 위험도 있다.

원칙

이 시스템의 핵심 논리는 트렌드 방향과 진입 시기를 식별하기 위해 다른 시간 프레임의 지표를 결합하는 것입니다. 구체적으로, 4 시간 차트에서 RSI, 스토카스틱, EMA는 전체 트렌드 방향을 결정하기 위해 정렬되어야합니다. 이것은 대부분의 소음을 효과적으로 필터 할 수 있습니다. 동시에, 15 분 차트에서 RSI, 스토카스틱, MACD 및 EMA는 정확한 진입 시기를 결정하기 위해 상승 또는 하락 편향에 동의해야합니다. 이것은 좋은 진입 및 출구 지점을 찾을 수 있습니다. 4 시간 및 15 분 시간 프레임에 대한 판단이 기준을 충족 할 때만 시스템이 거래 신호를 생성합니다.

장점

  1. 여러 시간 프레임 조합은 잘못된 신호를 효과적으로 필터링하고 주요 추세를 식별 할 수 있습니다.
  2. 15분 분량의 세부 지표는 비교적 정확한 입시 시기를 파악할 수 있습니다.
  3. RSI, 스토카스틱스, MACD 및 다른 주류 기술 지표를 포함한 지표 조합은 이해하기 쉽고 최적화 할 수 있습니다.
  4. 엄격한 리스크 관리 방법, 예를 들어 수익, 스톱 로스, 트레일링 스톱 로스 등을 채택하여 개별 거래의 위험을 효과적으로 제어합니다.

위험성

  1. 과도한 거래 위험. 시스템은 단기 시간 프레임에 매우 민감합니다. 이는 많은 거래 신호를 생성하여 과도한 거래로 이어질 수 있습니다.
  2. 잘못된 파업 위험. 단기 지표 판단은 잘못된 것으로 인해 잘못된 파업 신호가 발생할 수 있습니다.
  3. 지표 실패 위험 기술 지표 자체는 특정 한계를 가지고 있으며 극단적인 시장 조건에서 실패 할 수 있습니다.

따라서 시스템은 다음 측면에서 최적화 될 수 있습니다.

  1. 다른 시장 환경에 더 적합하도록 지표 매개 변수를 조정
  2. 거래 빈도를 줄이고 과잉 거래를 방지하기 위해 필터 조건을 높여
  3. 시장 변동 범위에 더 잘 맞게 수익 중지 및 손실 중지 전략을 최적화하십시오.
  4. 최적의 솔루션을 찾기 위해 여러 가지 지표 조합을 테스트합니다.

요약

전체적으로 볼 마켓 추적 시스템은 기계적 거래 시스템을 따르는 매우 실용적인 트렌드입니다. 시장 트렌드와 주요 진입 시기를 식별하기 위해 멀티 타임프레임 지표의 조합을 사용합니다. 합리적인 매개 변수 설정과 지속적인 최적화 테스트로 시스템은 대부분의 시장 환경에 적응하고 안정적인 이익을 얻을 수 있습니다. 그러나 우리는 또한 잠재적 인 위험의 일부에 대해 인식하고 이러한 위험을 예방하고 완화하기 위해 적극적인 조치를 취해야합니다.


/*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
strategy("Cowabunga System from babypips.com", overlay=true)
// 4 Hour Stochastics
length4 = input(162, minval=1, title="4h StochLength"), smoothK4 = input(48, minval=1, title="4h StochK"), smoothD4 = input(48, minval=1, title="4h StochD")
k4 = sma(stoch(close, high, low, length4), smoothK4)
d4 = sma(k4, smoothD4)

//15 min Stoch
length = input(10, minval=1, title="15min StochLength"), smoothK = input(3, minval=1, title="15min StochK"), smoothD = input(3, minval=1, title="15min StochD")
k = sma(stoch(close, high, low, length), smoothK)
d= sma(k, smoothD)

//4 hour RSI
src1 = close, len1 = input(240, minval=1, title="4H RSI Length")
up1 = rma(max(change(src1), 0), len1)
down1 = rma(-min(change(src1), 0), len1)
rsi4 = down1 == 0 ? 100 : up1 == 0 ? 0 : 100 - (100 / (1 + up1 / down1))

//15 min RSI
src = close, len = input(9, minval=1, title="15M RSI Length")
up = rma(max(change(src), 0), len)
down = rma(-min(change(src), 0), len)
rsi15 = down == 0 ? 100 : up == 0 ? 0 : 100 - (100 / (1 + up / down))

//MACD Settings
source = close
fastLength = input(12, minval=1, title="MACD Fast"), slowLength=input(26,minval=1, title="MACD Slow")
signalLength=input(9,minval=1, title="MACD Signal")
fastMA = ema(source, fastLength)
slowMA = ema(source, slowLength)
macd = fastMA - slowMA
signal = ema(macd, signalLength)

// Stops and Profit inputs
inpTakeProfit   = input(defval = 1000, title = "Take Profit", minval = 0)
inpStopLoss     = input(defval = 0, title = "Stop Loss", minval = 0)
inpTrailStop    = input(defval = 400, title = "Trailing Stop", minval = 0)
inpTrailOffset  = input(defval = 0, title = "Trailing Stop Offset", minval = 0)

// Stops and Profit Targets
useTakeProfit   = inpTakeProfit  >= 1 ? inpTakeProfit  : na
useStopLoss     = inpStopLoss    >= 1 ? inpStopLoss    : na
useTrailStop    = inpTrailStop   >= 1 ? inpTrailStop   : na
useTrailOffset  = inpTrailOffset >= 1 ? inpTrailOffset : na

//Specific Time to Trade
myspecifictradingtimes = input('0500-1600', title="My Defined Hours")

longCondition1 = time(timeframe.period, myspecifictradingtimes) != 0
longCondition2 = rsi4 <= 80
longCondition3 = k4 >= d4 and k4 <= 80
longCondition4 = ema(close, 80) >= ema(close, 162)
allLongerLongs = longCondition1 and longCondition2 and longCondition3 and longCondition4

longCondition5 = rsi15 <= 80
longCondition6 = k >= d and k <= 80 and fastMA >= slowMA
longCondition7 = ema(close, 5) >= ema(close, 10)
allLongLongs = longCondition5 and longCondition6 and longCondition7

if crossover(close, ema(close, 5)) and allLongerLongs and allLongLongs
    strategy.entry("Long", strategy.long, comment="LongEntry")

shortCondition1 = time(timeframe.period, myspecifictradingtimes) != 0
shortCondition2 = rsi4 >= 20
shortCondition3 = k4 <= d4 and k4 >= 20
shortCondition4 = ema(close, 80) <= ema(close, 162)
allShorterShorts = shortCondition1 and shortCondition2 and shortCondition3 and shortCondition4

shortCondition5 = rsi15 >= 20
shortCondition6 = k <= d and k >= 20 and fastMA <= slowMA
shortCondition7 = ema(close, 5) <= ema(close, 10)
allShortShorts = shortCondition5 and shortCondition6 and shortCondition7

if crossunder(close, ema(close,5)) and allShorterShorts and allShortShorts
    strategy.entry("Short", strategy.short, comment="ShortEntry")

strategy.exit("Exit Long", from_entry = "Long", profit = useTakeProfit, loss = useStopLoss, trail_points = useTrailStop, trail_offset = useTrailOffset)
strategy.exit("Exit Short", from_entry = "Short", profit = useTakeProfit, loss = useStopLoss, trail_points = useTrailStop, trail_offset = useTrailOffset)

더 많은