
この戦略は,123形反転と移動しやすい2つの戦略を組み合わせて,価格の転換点を捉えることで取引を行うことを目的としている.123形反転戦略は,株価が3日連続で特定のモデルを形成するときにシグナルを生成する.移動しやすい (EOM) 戦略は,価格と取引量の変化を使用して市場の動きを判断する.この2つの戦略は,価格の技術的形状と市場の動きの両方を考慮し,取引信号の正確性を向上させる.
この戦略は2つの部分から構成されています.
2つのシグナルを統合し,Easy of Movementと123形が同時に複数のシグナルを行うとき,多ポジションを開く.Easy of Movementと123形が同時に空調のシグナルを行うとき,空置を開く.
この戦略の利点は以下の通りです.
価格技術と市場の動向を組み合わせて,信号の正確性を向上させる
123形状の反転は,転換点を捉え,移動しやすい傾向の動きを判断し,両者は互いを補完する
ストック指数は,リストラ時に繰り返し平仓を避ける
取引の論理はシンプルでわかりやすく,実行しやすい.
異なる市場環境に対応するカスタマイズ可能なパラメータ
この戦略にはいくつかのリスクがあります.
パラメータ設定に過度に依存し,誤ったパラメータは取引頻度や漏れ表を引き起こす可能性があります.
複数のフィルタリング条件が併用され,信号発生頻度は低すぎます.
移動しやすい指標は市場の波動に敏感で,偽のシグナルを引き起こす
ポジションの規模をコントロールする
トレンド株のみで,整合には適さない
この戦略は以下の点で最適化できます.
最適化パラメータ,フィルタリング条件の厳しさの調整,取引頻度と信号品質のバランス
ストップ・ロスの戦略に加入し,単一損失を厳格に管理する
トレンドフィルターと逆転取引を避ける
資金管理モジュールを追加し,波動率に応じてポジションを動的に調整する
機械学習によるパラメータの最適化,市場への動的適応
この戦略は,価格技術指標と市場動力の指標を統合し,転換点を捕捉しながらトレンドの質を確認し,高い実戦的な価値を持っています.しかし,取引頻度,単価損失および逆転操作のリスクを制御することも注意する必要があります.パラメータ最適化,止損戦略,トレンドフィルターなどの手段によって戦略の安定性と収益性をさらに向上させることができます.この戦略の構想は,明確に実行しやすく,量化トレーダーの研究を継続して改善する価値があります.
/*backtest
start: 2023-10-15 00:00:00
end: 2023-11-14 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=4
////////////////////////////////////////////////////////////
// Copyright by HPotter v1.0 14/04/2020
// 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 gauges the magnitude of price and volume movement.
// The indicator returns both positive and negative values where a
// positive value means the market has moved up from yesterday's value
// and a negative value means the market has moved down. A large positive
// or large negative value indicates a large move in price and/or lighter
// volume. A small positive or small negative value indicates a small move
// in price and/or heavier volume.
// A positive or negative numeric value. A positive value means the market
// has moved up from yesterday's value, whereas, a negative value means the
// market has moved down.
//
// 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
EOM(BuyZone, SellZone) =>
pos = 0
xHigh = high
xLow = low
xVolume = volume
xHalfRange = (xHigh - xLow) * 0.5
xMidpointMove = mom(xHalfRange, 1)
xBoxRatio = iff((xHigh - xLow) != 0, xVolume / (xHigh - xLow), 0)
nRes = iff(xBoxRatio != 0, 1000000 * ((xMidpointMove - xMidpointMove[1]) / xBoxRatio), 0)
pos := iff(nRes > BuyZone, 1,
iff(nRes < SellZone, -1, nz(pos[1], 0)))
pos
strategy(title="Combo Backtest 123 Reversal & Ease of Movement (EOM)", shorttitle="Combo", overlay = true)
Length = input(14, minval=1)
KSmoothing = input(1, minval=1)
DLength = input(3, minval=1)
Level = input(50, minval=1)
//-------------------------
BuyZone = input(4000, minval=1)
SellZone = input(-4000)
reverse = input(false, title="Trade reverse")
posReversal123 = Reversal123(Length, KSmoothing, DLength, Level)
posEOM = EOM(BuyZone, SellZone)
pos = iff(posReversal123 == 1 and posEOM == 1 , 1,
iff(posReversal123 == -1 and posEOM == -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 )