
ダイナミックトレンドトラッキング逆転戦略は,JD Sequential指標に基づく短期的量化取引戦略である.この戦略は,価格の高点と低点をリアルタイムで追跡し,現在のトレンドの方向と強さを判断し,市場逆転点を効率的に捕捉し,入場と退出のタイミングを設定する.従来のJD Sequential戦略と比較して,この戦略は,次のように改善されています.
この策略は,5分,15分といった短い時間周期で用いられ,短期的な価格変動と反転の機会を効果的に捉えることができます.
ダイナミックなトレンドを追跡する反転戦略の核心的な論理は,JDシーケンス指数に基づいています.この指数は,現在の周期と前2回の高点と低点を比較して,価格が連続してより高い高点またはより低い低点を作っているかどうかを判断し,1-7のシーケンス数を与えます.当計が7に累積すると取引が生じます.
具体的には,以下のような変数が定義されています.
取引シグナルが生成される論理は次のとおりです.
ストップダストの論理は
この戦略は,リアルタイムの高低点を用いてトレンドの方向と強さを判断し,カウンターで入場時間を計測し,短期的な反転の機会を効果的に捉えることができる.同時に,リスクを管理するためにストップラインを設定する.
JD Sequentialの従来の戦略と比較して,動的トレンド追跡逆転戦略は以下の利点があります.
この戦略の主な優点は,迅速な対応で,短期的な突発事件によって引き起こされる大幅な変動を効果的に捕捉できる点である.また,完全の手動取引と比較して,アルゴリズム信号生成とストップロスは,トレーダーの感情的な影響を軽減し,その結果,安定性を高めることができる.
ダイナミックなトレンドを追跡する逆転策には,いくつかのリスクがあります.
上記のリスクを低減するために,以下の点で最適化することができます.
ダイナミックトレンドトラッキングの逆転戦略は,以下のような主要方向性で,多くの改善の余地があります.
多時間周期のポーチ。より高い時間周期で主動トレンドの方向を決定し,主動トレンドとの対抗取引を避ける。
他の指標と組み合わせます.波動率指標,交付量指標などと組み合わせて信号の質を向上させることができます.
機械学習フィルター. 機械学習アルゴリズムを使用して取引シグナルの補助判断を行い,誤った取引を減らす.
パラメータ最適化. 計数周期数,取引期間,保有比率などのパラメータを最適化して,異なる市場条件に合わせることができる.
リスク管理の強化 移動停止,ポジションコントロールなどのより豊富なリスク管理手段を追加し,リスクをさらに制限する
回測累積データ。回測サンプル量と時間範囲を拡大し,テストパラメータの安定性。
ダイナミックトレンド追跡逆転戦略は,トレンドの方向と強さをリアルタイムで比較して判断し,JD Sequential指標の7カウントルールを用いて取引信号を生成し,短期的な逆転機会を高頻度で捉える.従来のJD戦略と比較して,この戦略は,高低点判断,カウントサイクルを短縮し,ストップダスの仕組みを追加するなどの改善を行い,よりタイムリーな取引信号を得ることができます.
この戦略の主な優点は,迅速な応答で,短線捕捉反転に適していることであり,同時に,取引頻度,損失の激化などのリスクもある.将来の最適化の方向は,パラメータ調整,風力制御機構の強化,複数の時間周期の組み合わせなどである.継続的な最適化と代によって,この戦略は,短期的な反転信号を高効率に捕捉する強力なツールになる可能性がある.
/*backtest
start: 2023-12-16 00:00:00
end: 2024-01-15 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
// @NeoButane 7 Dec. 2018
// JD Aggressive Sequential Setup
// Not based off official Tom DeMarke documentation. As such, I have named the indicator JD instead oF TD to reflect this, and as a joke.
//
// Difference vs. TD Sequential: faster trade exits and a unique entry. Made for low timeframes.
// - Highs or lows are compared instead of close.
// - Mirrors only the Setup aspect of TD Sequential (1-9, not to 13)
// - Count maxes out at 7 instead of 9. Also part of the joke if I'm going to be honest here
// v1 - Release - Made as a strategy, 7 count
// . S/R on 7 count
// .. Entry on 7 count
// ... Exit on 5 count or S/R cross
//@version=3
title = "JD Aggressive Sequential Setup"
vers = " 1.0 [NeoButane]"
total = title + vers
strategy(total, total, 1, 0)
xx = input(true, "Include S/R Crosses Into Stop Loss")
show_sp = input(true, "Show Count 1-4")
sp_ct = 0
inc_sp(x) => nz(x) == 7 ? 1 : nz(x) + 1
sp_up = high > high[2]
sp_dn = low < low[2]
sp_col = sp_up ? green : red
sp_comCol = sp_up ? red : green
sp_ct := sp_up ? (nz(sp_up[1]) and sp_col == sp_col[1] ? inc_sp(sp_ct[1]) : 1) : sp_dn ? (nz(sp_dn[1]) and sp_col == sp_col[1] ? inc_sp(sp_ct[1]) : 1) : na
sp_com = sp_ct == 7
sp_sr = valuewhen(sp_ct == 5, close, 0)
sp_usr = valuewhen(sp_ct == 7 and sp_up, sma(hlc3, 2), 0)
sp_usr := sp_usr <= sp_usr[1] * 1.0042 and sp_usr >= sp_usr[1] * 0.9958 ? sp_usr[1] : sp_usr
sp_dsr = valuewhen(sp_ct == 7 and sp_dn, sma(hlc3, 2), 0)
sp_dsr := sp_dsr <= sp_dsr[1] * 1.0042 and sp_dsr >= sp_dsr[1] * 0.9958 ? sp_dsr[1] : sp_dsr
locc = location.abovebar
plotchar(show_sp and sp_ct == 1, 'Setup: 1', '1', locc, sp_col, editable=false)
plotchar(show_sp and sp_ct == 2, 'Setup: 2', '2', locc, sp_col, editable=false)
plotchar(show_sp and sp_ct == 3, 'Setup: 3', '3', locc, sp_col, editable=false)
plotchar(show_sp and sp_ct == 4, 'Setup: 4', '4', locc, sp_col, editable=false)
plotshape(sp_ct == 5, 'Setup: 5', shape.xcross, locc, sp_comCol, 0, 0, '5', sp_col)
plotshape(sp_ct == 6, 'Setup: 6', shape.circle, locc, sp_comCol, 0, 0, '6', sp_col)
plotshape(sp_ct == 7, 'Setup: 7', shape.circle, locc, sp_comCol, 0, 0, '7', sp_col)
// plot(sp_sr, "5 Count Support/Resistance", gray, 2, 6)
plot(sp_usr, "7 Count Resistance", maroon, 2, 6)
plot(sp_dsr, "7 Count Support", green, 2, 6)
long = (sp_com and sp_dn)
short = (sp_com and sp_up)
sl_l = xx ? crossunder(close, sp_dsr) or (sp_ct == 5 and sp_up) or short : (sp_ct == 5 and sp_up) or short
sl_s = xx ? crossover(close, sp_usr) or (sp_ct == 5 and sp_dn) or long : (sp_ct == 5 and sp_dn) or long
strategy.entry('L', 1, when = long)
strategy.close('L', when = sl_l)
strategy.entry('S', 0, when = short)
strategy.close('S', when = sl_s)