
이 전략은 양자 모델에 기반한 고효율의 양자 거래 전략이다. 이 전략은 모델리우스 볼륨 모델을 기본 모델로 사용했으며, 이를 기반으로 확장 및 최적화했다. 이 전략은 시장에서 양자 거래 기회를 포착하여 안정적인 수익을 창출할 수 있다.
이 전략의 핵심은 Modelius Volume 모델이다. 이 모델은 가격, 거래량 변화를 사용하여 시장에서 양적 거래 기회를 식별한다. 구체적으로, 전략은 클로즈 가격, 오픈 가격, 최고 가격, 최저 가격을 사용하여 특정 규칙에 따라 현재 K선 방향을 계산한다. K선 방향이 변경되면 거래량의 크기에 따라 거래 기회의 질을 측정한다. 또한, 전략은 SAR 지표와 평평선 지표를 결합하여 진입시 및 출입시 판단을 돕는다.
기본 거래 논리는, 지표가 마이너스에서 긍정으로 돌파 할 때, 더 많이; 지표가 긍정에서 마이너스으로 돌파 할 때, 공백. 또한, 전략은 위험을 제어하기 위해 중지, 중지, 추적 중지 손실을 설정합니다.
이 전략의 가장 큰 장점은 Modelius Volume 모델을 활용하여 양적 거래 기회를 효과적으로 식별할 수 있다는 것입니다. 전통적인 기술 지표에 비해 이 모델은 거래량 변화에 더 많은 관심을 가지고 있으며, 이는 현재 고주파 양적 거래에서 매우 실용적입니다. 또한, 전략의 입시 규칙은 상대적으로 엄격하며, 양적 거래 기회를 놓치지 않도록 효과적으로 방지하면서도 무질서의 가능성을 최소화 할 수 있습니다.
이 전략의 주요 위험은 Modelius Volume 모델 자체로 잡음을 완전히 피할 수 없다는 것입니다. 시장이 비정상적으로 변동할 때 거래 신호가 오류로 발생할 수 있습니다. 또한 전략의 매개 변수 설정은 최종 결과에 영향을 미칩니다.
위험을 제어하기 위해, 적절한 변수를 조정할 수 있으며, 다른 지표와 결합하여 보조 판단을 할 수 있다. 또한, 합리적인 스톱 포지션을 설정할 필요가 있다.
이 전략에는 또한 약간의 최적화 공간이 있습니다. 예를 들어, 기계 학습 알고리즘과 결합하여 동적으로 최적화 파라미터 설정을 고려할 수 있습니다. 또는 감정 분석과 같은 지표와 결합하여 의사 결정의 정확성을 향상시킬 수 있습니다. 또한 다양한 품종 간의 연관성을 연구하여 다종 품종 모형을 구축 할 수 있습니다.
전체적으로, 이 전략은 Modelius Volume의 양적 모델의 장점을 활용하여, 동작성이 강한 양적 거래 전략을 설계했다. 매개 변수 조정, 모델 확장, 기계 학습 등의 방법으로 최적화 업그레이드를 할 수 있으며, 실제 거래에서 더 나은 안정적인 수익을 얻을 수 있다.
/*backtest
start: 2022-12-15 00:00:00
end: 2023-12-21 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=3
strategy(title="strategy modelius volume model ", shorttitle="mvm",overlay=true, calc_on_order_fills=true, default_qty_type=strategy.percent_of_equity, default_qty_value=50, overlay=false)
method = input(defval="ATR", options=["ATR", "Traditional", "Part of Price"], title="Renko Assignment Method")
methodvalue = input(defval=14.0, type=float, minval=0, title="Value")
pricesource = input(defval="Close", options=["Close", "Open / Close", "High / Low"], title="Price Source")
useClose = pricesource == "Close"
useOpenClose = pricesource == "Open / Close" or useClose
useTrueRange = input(defval="Auto", options=["Always", "Auto", "Never"], title="Use True Range instead of Volume")
isOscillating=input(defval=true, type=bool, title="Oscillating")
normalize=input(defval=false, type=bool, title="Normalize")
vol = useTrueRange == "Always" or (useTrueRange == "Auto" and na(volume))? tr : volume
op = useClose ? close : open
hi = useOpenClose ? close >= op ? close : op : high
lo = useOpenClose ? close <= op ? close : op : low
if method == "ATR"
methodvalue := atr(round(methodvalue))
if method == "Part of Price"
methodvalue := close/methodvalue
currclose = na
prevclose = nz(currclose[1])
prevhigh = prevclose + methodvalue
prevlow = prevclose - methodvalue
currclose := hi > prevhigh ? hi : lo < prevlow ? lo : prevclose
direction = na
direction := currclose > prevclose ? 1 : currclose < prevclose ? -1 : nz(direction[1])
directionHasChanged = change(direction) != 0
directionIsUp = direction > 0
directionIsDown = direction < 0
barcount = 1
barcount := not directionHasChanged and normalize ? barcount[1] + barcount : barcount
vol := not directionHasChanged ? vol[1] + vol : vol
res = barcount > 1 ? vol/barcount : vol
x=isOscillating and directionIsDown ? -res : res
TP = input(0) * 10
SL = input(0) * 10
TS = input(1) * 10
TO = input(3) * 10
CQ = 100
TPP = (TP > 0) ? TP : na
SLP = (SL > 0) ? SL : na
TSP = (TS > 0) ? TS : na
TOP = (TO > 0) ? TO : na
longCondition = crossover(x,0)
if (longCondition)
strategy.entry("Long", strategy.long)
shortCondition = crossunder(x,0)
if (shortCondition)
strategy.entry("Short", strategy.short)
strategy.exit("Close Short", "Short", qty_percent=CQ, profit=TPP, loss=SLP, trail_points=TSP, trail_offset=TOP)
strategy.exit("Close Long", "Long", qty_percent=CQ, profit=TPP, loss=SLP, trail_points=TSP, trail_offset=TOP)