
トレンド反転量複合策略は,トレンド反転策略と動量突破策略を組み合わせた複合取引策略である.この戦略は,価格反転信号と動量指標信号を同時に利用することによって,市場転換点をより正確に捕捉し,価格が反転し始めるときに間に合うように入場する.
この戦略は2つの部分から構成されています.
123逆転策略:閉盘価格が前日の閉盘価格より2日連続で下回り,そして9日連続で緩やかなK線が50より下回りすると多額の取引を行う.閉盘価格が前日の閉盘価格より2日連続で上回り,そして9日連続で緩やかなK線が50より上回りすると空売りを行う.
DAPD動力突破戦略:DAPDは,近21日間の高点と近21日間の低点の平均差値であり,DAPD上下突破に基づいてエントリーとエグジットポイントを判断する.
2つの戦略信号が同方向であるときは,入場信号を発信する.信号が逆方向であるときは,一時的に待命する.
この戦略は,反転戦略と動量戦略の優位性を組み合わせて,価格の転換点をより正確に捉えることができる.主な優位性は以下の通りである.
双重フィルタリングにより信号の信頼性が向上する.同方向信号の場合,成功率が高くなる.
123 形状判断は,ポジションの逆転のリスクを軽減します.
DAPD動量指標判断,トレンド型品種に適している。
信号の時間点マッチングのリスク.二つの戦略信号の発生時間には偏差がある可能性がある.
2つの戦略のパラメータを同時に最適化することは容易ではない.
二重取引コストのリスク. ポジションを開設するたびに,両方の戦略の手数料を同時に支払わなければならない.
2つの戦略のパラメータのマッチングを最適化して,信号を可能な限り同期させる.
異なる品種で異なるパラメータの組み合わせによる効果を研究する.
戦略的な信号が強くなるときにのみポジションを開き,弱い信号をフィルターする.
トレンド反転量複合策略は,反転策略と動量策略の優位性を利用し,価格が反転し始めるときに正確に及時に入場することができる. 二重フィルタリング機構は,信号の成功率を向上させる. パラメータのマッチングを最適化することによって,パフォーマンスをさらに向上させることができる. この戦略は,一定の資金力と取引経験を持つ投資家に適しています.
/*backtest
start: 2023-12-28 00:00:00
end: 2024-01-04 00:00:00
period: 10m
basePeriod: 1m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=4
////////////////////////////////////////////////////////////
// Copyright by HPotter v1.0 10/12/2019
// This is combo strategies for get a cumulative signal.
//
// First strategy
// This System was created from the Book "How I Tripled My Money In The
// Futures Market" by Ulf Jensen, Page 183. This is reverse type of strategies.
// The strategy buys at market, if close price is higher than the previous close
// during 2 days and the meaning of 9-days Stochastic Slow Oscillator is lower than 50.
// The strategy sells at market, if close price is lower than the previous close price
// during 2 days and the meaning of 9-days Stochastic Fast Oscillator is higher than 50.
//
// Second strategy
// This indicator is similar to Bollinger Bands. It based on DAPD - Daily
// Average Price Delta. DAPD is based upon a summation for each of the
// highs (hod) for the 21 days prior to today minus the summation for
// each of the lows (lod) for the last 21 days prior to today. The result
// of this calculation would then be divided by 21.
// It will be buy when high above previos DAPD high and sell if low below previos DAPD low
//
// WARNING:
// - For purpose educate only
// - This script to change bars colors.
////////////////////////////////////////////////////////////
Reversal123(Length, KSmoothing, DLength, Level) =>
vFast = sma(stoch(close, high, low, Length), KSmoothing)
vSlow = sma(vFast, DLength)
pos = 0.0
pos := iff(close[2] < close[1] and close > close[1] and vFast < vSlow and vFast > Level, 1,
iff(close[2] > close[1] and close < close[1] and vFast > vSlow and vFast < Level, -1, nz(pos[1], 0)))
pos
DAPD(Length) =>
pos = 0.0
xHighSMA = sma(high, Length)
xLowSMA = sma(low, Length)
nDAPD = xHighSMA - xLowSMA
nTop = high + nDAPD
nBottom = low - nDAPD
pos := iff(high > nTop[1], 1,
iff(low < nBottom[1], -1, nz(pos[1], 0)))
pos
strategy(title="Combo Backtest 123 Reversal & DAPD", shorttitle="Combo", overlay = true)
Length = input(14, minval=1)
KSmoothing = input(1, minval=1)
DLength = input(3, minval=1)
Level = input(50, minval=1)
//-------------------------
LengthDAPD = input(21, minval=1)
reverse = input(false, title="Trade reverse")
posReversal123 = Reversal123(Length, KSmoothing, DLength, Level)
posDAPD = DAPD(LengthDAPD)
pos = iff(posReversal123 == 1 and posDAPD == 1 , 1,
iff(posReversal123 == -1 and posDAPD == -1, -1, 0))
possig = iff(reverse and pos == 1, -1,
iff(reverse and pos == -1 , 1, pos))
if (possig == 1)
strategy.entry("Long", strategy.long)
if (possig == -1)
strategy.entry("Short", strategy.short)
if (possig == 0)
strategy.close_all()
barcolor(possig == -1 ? #b50404: possig == 1 ? #079605 : #0536b3 )