전략에 따른 소용돌이 오시일레이터 트렌드

저자:차오장, 날짜: 2023-12-07 16:48:45
태그:

img

전반적인 설명

버텍스 오시일레이터 트렌드 추적 전략은 버텍스 지표에 기반한 트렌드 추적 전략이다. 잠재적인 가격 추세를 식별하기 위해 여러 시간 프레임의 이동 평균을 사용하여 버텍스 지표를 구성하고, 낮은 위험 트렌드 추적 작업을 달성하기 위해 보조 판단으로 짧은 기간 이동 평균과 결합합니다.

전략 원칙

이 전략의 핵심 지표는 소용돌이 지표입니다. 소용돌이 지표는 여러 시간 프레임의 단기, 중기 및 장기 이동 평균으로 구성됩니다. 구체적으로 전략은 6 일, 27 일, 72 일 및 234 일 이동 평균을 사용합니다. 단기 이동 평균은 가격의 최신 추세를 반영하고, 장기 이동 평균은 장기 트렌드를 반영합니다. 지표의 핵심 논리는 단기 이동 평균이 장기 이동 평균을 넘으면 상승 동력이 강화되고 구매 할 때라는 것입니다. 단기 이동 평균이 장기 이동 평균을 넘으면 상승 동력이 약화되고 판매해야한다는 것을 나타냅니다.

소용돌이 지표의 중요한 장점은 트렌드를 정확하게 판단하고 시장 소음을 효과적으로 필터한다는 것입니다. 그러나 반응은 전환점을 적시에 포착하기에 충분히 민감하지 않습니다. 따라서 전략은 보조 판단 지표를 구축하기 위해 더 민감한 6 일 이동 평균을 통합합니다. 소용돌이 지표와 보조 지표가 모두 제로선을 넘을 때 구매하고 두 지표가 모두 제로선을 넘을 때 판매합니다. 이것은 소용돌이 지표가 트렌드 방향과 강도를 결정하는 반면 보조 지표가 특정 입구 및 출구 지점을 결정하는 멀티 확인 논리를 형성하며 이는 거래의 민감성을 향상시키는 동시에 잘못된 신호를 필터링합니다.

이점 분석

이 전략의 가장 큰 장점은 판단의 정확성과 거래의 민감성이다. 소용돌이 지표와 보조 지표의 조합은 서로 간섭을 피하면서 트렌드 판단과 특정 입출점의 결정의 유기적 통일을 달성합니다. 다중 확인 메커니즘은 시장 소음을 효과적으로 필터링하고 잘못된 거래를 피할 수 있습니다. 동시에 보조 지표의 추가는 전략의 작업의 민감성을 보장합니다.

단일 지표 전략에 비해 이 전략의 장점은 여러 지표를 결합하여 시장 변화에 대한 더 강력한 능력을 달성한다는 것입니다. 변하지 않은 주요 트렌드 하에서 전략은 안정적인 이익을 얻을 수 있습니다. 주요 트렌드가 변경되면 전략은 손실을 줄이기 위해 신속하게 대응 할 수 있습니다.

위험 분석

이 전략의 주요 위험은 지표의 부적절한 매개 변수 설정과 극단적인 사건의 영향에서 비롯됩니다. 이동 평균의 매개 변수는 민감성과 노이즈 간섭 저항을 균형 잡아야합니다. 부적절한 매개 변수 설정은 비정상적인 전략 행동에 이어질 것입니다. 또한 주요 이벤트는 지표를 비활성화시키는 극단적인 가격 변동성을 유발할 수 있으며 잘못된 거래로 이어질 수 있습니다.

이러한 위험을 완화하기 위해 매개 변수를 최적화하고 역 테스트하여 지표 성능을 안정화해야합니다. 또한 주요 사건의 시장 영향에 주의를 기울이고 비정상적인 변동성 기간 동안 실수를 피하기 위해 필요한 경우 전략을 일시 중단하십시오. 가격이 하락하는 추세에 따라 점진을 점차 줄이는 것도 효과적인 자본 보존 조치입니다.

최적화 방향

이 전략은 다음과 같은 측면에서 최적화 될 수 있습니다.

  1. 이동 평균 매개 변수를 최적화하여 지표의 소음 저항성과 작동 민감도를 향상시킵니다. 부드럽지만 민감한 지표를 선택하기 위해 길이에 대한 다른 매개 변수 조합을 시도하십시오.

  2. 스톱 로스 메커니즘을 추가합니다. 추가 손실을 피하기 위해 가격이 불리한 방향으로 주요 지원 수준을 깨는 경우 스톱 로스 포인트를 설정합니다.

  3. 전략의 안정성을 높이기 위해 다른 지표 판단을 포함합니다. 예를 들어 거래량이 증폭되면 신호만 취합니다.

  4. 다른 시장 단계에 따라 다른 매개 변수 세트를 사용하십시오. 예를 들어, 황소 시장에서 더 공격적인 매개 변수 및 곰 시장에서 더 안정적인 설정.

결론

버텍스 오시일레이터 트렌드 다음 전략은 가격 트렌드 방향/강도를 결정하는 버텍스 지표와 특정 진입/출출 시기를 파악하는 민감한 단기 이동 평균을 통해 트렌드 판단과 실행을 성공적으로 결합합니다. 매개 변수를 최적화하고 스톱 손실을 추가하고 상태 메커니즘을 도입함으로써 전략은 위험 저항 역량을 더욱 향상시키고 우수한 백테스팅 메트릭과 라이브 성능을 달성 할 수 있습니다.


/*backtest
start: 2022-11-30 00:00:00
end: 2023-12-06 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=3
//swap strategy line for study line to enable backtesting
strategy(title="Vortex Ocillator" )
//study(title = "Vortex Oscillator", precision = 6)

// Component Code Start
// Example usage:
// if testPeriod()
//   strategy.entry("LE", strategy.long)
testStartYear = input(2017, "Backtest Start Year")
testStartMonth = input(01, "Backtest Start Month")
testStartDay = input(2, "Backtest Start Day")
testPeriodStart = timestamp(testStartYear,testStartMonth,testStartDay,0,0)

testStopYear = input(2048, "Backtest Stop Year")
testStopMonth = input(7, "Backtest Stop Month")
testStopDay = input(30, "Backtest Stop Day")
testPeriodStop = timestamp(testStopYear,testStopMonth,testStopDay,0,0)

// A switch to control background coloring of the test period
testPeriodBackground = input(title="Color Background?", type=bool, defval=true)
testPeriodBackgroundColor = testPeriodBackground and (time >= testPeriodStart) and (time <= testPeriodStop) ? #00FF00 : na
bgcolor(testPeriodBackgroundColor, transp=97)

testPeriod() => true
// Component Code Stop

//vortex histogram
short_input = input(6, minval = 1)
long_input = input(27, minval = 1)
longer_input = input(72, minval = 1)
longest_input = input(234, minval = 1)

short = sma(close, short_input)
long = sma(close, long_input)
longer = sma(close, longer_input)
longest = sma(close, longest_input)

hist = short - long
longhist = short - longer
longesthist = short - longest

hist_fractal = input(3, minval = 0)
longhist_fractal = input(2, minval = 0)
longesthist_fractal = input(4, minval = 0)

vortexhist = avg((hist / hist_fractal), (longhist / longhist_fractal), (longesthist / longesthist_fractal))

crossover_calc = vortexhist > 0 and vortexhist[1] < 0
crossunder_calc = vortexhist < 0 and vortexhist[1] > 0

crossover2 = crossover(vortexhist, 0)
crossunder2 = crossunder(vortexhist, 0)

hist_color = hist > 0? fuchsia : purple
longhist_color = longhist > 0? olive : orange
longesthist_color = longesthist > 0? teal : blue
vortexhist_color = vortexhist >= 0? green : red

plot(longesthist, "Longest Ocillator", style = histogram, color = longesthist_color, transp = 5)
plot(longhist, "Longer Ocillator", style = histogram, color = longhist_color, transp = 30)
plot(hist, "Short Ocillator", style = histogram, color = hist_color, transp = 30)
plot(vortexhist, "Vortex Ocillator", style = columns, color = vortexhist_color, transp = 40)
plotshape(crossover_calc,title = "Crossover",location = location.bottom, style = shape.triangleup, size = size.small, color = green)
plotshape(crossunder_calc,title = "Crossunder",location = location.bottom, style = shape.triangledown, size = size.small, color = red)

//micro
micro_ema_length = input(6,"Micro EMA Length")
micro = ema(vortexhist, micro_ema_length)
plot(micro, title = "micro", linewidth = 1, color = white)
microup = crossover(vortexhist, micro)
microdown = crossunder(vortexhist, micro)

//new micro signals
xmicroup = microup and vortexhist >=0 or crossover_calc
xmicrodown = microdown and vortexhist >=0 or crossunder_calc
plotshape(xmicroup, title = "Micro up", style = shape.circle, color = olive, location = location.bottom, size = size.tiny)
plotshape(xmicrodown, title = "Micro down", style = shape.circle, color = fuchsia, location = location.bottom, size = size.tiny)

//optional strategy options for backtesting, comment out the alertcondition rows and swap the top study row for the strategy row to compile as strategy
if testPeriod()
    strategy.entry("buy", true, 1, when = xmicroup, limit = low)
if testPeriod()
    strategy.close("buy", when = xmicrodown)

   

//if (xmicroup)
    //strategy.entry("My Long Entry Id", strategy.long)
//if (xmicroup)
    //strategy.exit("My Short Exit Id", "My Short Entry Id")
//if (xmicrodown)
    //strategy.exit("My Long Exit Id", "My Long Entry Id")

  




더 많은