複数の指標に基づく短期定量取引戦略


作成日: 2023-09-14 19:46:55 最終変更日: 2023-09-14 19:46:55
コピー: 1 クリック数: 785
1
フォロー
1617
フォロワー

この記事では,複数の指標の組み合わせによるショートラインの量化取引戦略について詳しく説明する.この戦略は,強力な技術指標のセットを使用して,低時間周期 (例えば15分) で取引信号を生成する.

戦略の原則

この戦略の核心には,以下の複数の指標の組み合わせが用いられています.

(1) 双均線システム: 2つのHull移動平均を計算し,その交差関係によってトレンドの方向を判断する.

(2) イチモクシステム: 変換線,基準線等を計算し,雲図形状判断傾向と支持抵抗を組み合わせる.

(3) ドンチアン通路:最高値と最低値を使って通路を構築し,価格突破を判断する.

(4) MACD: MACDと信号線を計算し,その交差点に基づいて操作する.

これらの指標がトレンド判断に一致するときに,より信頼性の高い取引信号が生成されます.

Hull MA上を高速で横断する Hull MA,AND Ichimoku線上をクロードマップで横断する AND Donchian通路を突破する AND MACD上を信号線で横断する時,多めに行います.

また,日々のK線閉店価格の変動を補助判断として利用することで,反転の危険を回避できます.

さらに,ストップ・ロズとストップ・ストップのロジックは,単一の取引のリスク・リターンを制御する戦略を含んでいる.

2 戦略的優位性

この戦略の最大の利点は,指標の組み合わせが相互補完し,信号の質を向上させることです.異なる指標は,複数の角度からトレンドを判断し,一致した合意のみで信号を生成し,これは単一の指標の限界を回避します.

第二に,多時間周期の組み合わせも大きな利点である.毎日のKlineの補助判断は,短期間のLow周期がセットされるリスクをフィルターすることができます.

最後に,ストップ・ロスト・ストップ・メカニズムを含む戦略は,各取引のリスクをコントロールできます.

3 潜在的リスク

この戦略は合理的に設計されていますが,取引には以下のリスクがあります.

まず,多指標組合せはパラメータの最適化を困難にし,不適切な設定は過最適化につながる可能性がある.

第二に,強気なトレンドでは,ストップレスは破綻して損失をもたらす可能性があります.

最後に,多時間周期判断にも complexesignals を判断するのが難しい状況がある.

全体として,この戦略は,論理科学を総合し,パラメータテストによって常に最適化され,有効な短線量化戦略となる.

内容と要約

この記事では,複数の指標の組み合わせのショートライン量化取引戦略について詳しく説明する.これは,二均線,イチモク,ドンチアン通路,MACDなどの指標を組み合わせて,信号の質を向上させる.同時に,複数の時間周期の判断と止損停止ロジック制御のリスクを使用する.全体的に,この戦略が最適化されると,高効率のショートライン量化取引システムとなる.

ストラテジーソースコード
/*backtest
start: 2023-08-14 00:00:00
end: 2023-09-13 00:00:00
period: 4h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=2
// Any timeFrame ok but good on 15 minute & 60 minute , Ichimoku + Daily-Candle_cross(DT) + HULL-MA_cross + MacD combination 420 special blend
strategy("Custom 15m strat",overlay=true)
keh=input(title="Double HullMA",defval=14, minval=1)
dt = input(defval=0.0010, title="Decision Threshold (0.001)", step=0.0001)`
SL = input(defval=-500.00, title="Stop Loss in $", step=1)
TP = input(defval=25000.00, title="Target Point in $", step=1)
ot=1
n2ma=2*wma(close,round(keh/2))
nma=wma(close,keh)
diff=n2ma-nma
sqn=round(sqrt(keh))
n2ma1=2*wma(close[1],round(keh/2))
nma1=wma(close[1],keh)
diff1=n2ma1-nma1
sqn1=round(sqrt(keh))
n1=wma(diff,sqn)
n2=wma(diff1,sqn)
b=n1>n2?lime:red
c=n1>n2?green:red
d=n1>n2?red:green
confidence=(security(syminfo.tickerid, 'D', close)-security(syminfo.tickerid, 'D', close[1]))/security(syminfo.tickerid, 'D', close[1])
conversionPeriods = input(9, minval=1, title="Conversion Line Periods")
basePeriods = input(26, minval=1, title="Base Line Periods")
laggingSpan2Periods = input(52, minval=1, title="Lagging Span 2 Periods")
displacement = input(26, minval=1, title="Displacement")
donchian(len) => avg(lowest(len), highest(len))
conversionLine = donchian(conversionPeriods)
baseLine = donchian(basePeriods)
leadLine1 = avg(conversionLine, baseLine)
leadLine2 = donchian(laggingSpan2Periods)
LS=close, offset = -displacement
MACD_Length = input(9)
MACD_fastLength = input(12)
MACD_slowLength = input(26)
MACD = ema(close, MACD_fastLength) - ema(close, MACD_slowLength) //macd
aMACD = ema(MACD, MACD_Length) //signal
closelong = n1<n2 and close<n2 and confidence<dt or strategy.openprofit<SL or strategy.openprofit>TP
if (closelong)
    strategy.close("Long")
closeshort = n1>n2 and close>n2 and confidence>dt or strategy.openprofit<SL or strategy.openprofit>TP
if (closeshort)
    strategy.close("Short")
longCondition = n1>n2 and strategy.opentrades<ot and confidence>dt and close>n2 and leadLine1>leadLine2 and open<LS and MACD>aMACD
if (longCondition)
    strategy.entry("Long",strategy.long)
shortCondition = n1<n2 and strategy.opentrades<ot and confidence<dt and close<n2 and leadLine1<leadLine2 and open>LS and MACD<aMACD
if (shortCondition)
    strategy.entry("Short",strategy.short)

a1=plot(n1,color=c)
a2=plot(n2,color=c)
plot(cross(n1, n2) ? n1 : na, style = circles, color=b, linewidth = 4)
plot(cross(n1, n2) ? n1 : na, style = line, color=d, linewidth = 4)
plot(conversionLine, color=#0496ff, title="Conversion Line")
plot(baseLine, color=#991515, title="Base Line")
//plot(longCondition == true ? 4000:4100,title="long")
plot(close, offset = -displacement, color=#459915, title="Lagging Span")
p1=plot (leadLine1, offset = displacement, color=green,  title="Lead 1")
p2=plot (leadLine2, offset = displacement, color=red,  title="Lead 2")
fill(p1, p2, color = leadLine1 > leadLine2 ? green : red)
// remove the "//" from before the plot script if want to see the indicators on chart