この戦略は123形状の反転とCCI指標を融合させ,累積信号のショートライン取引戦略を形成する.これは,グラフィック形状と超買い超売区分析を組み合わせて,価格反転の機会を追求する.この戦略は,株式指数,外為などの波動的な特徴を持つ取引品種に適用される.
この戦略の取引論理は以下の通りです.
123形を使って反転信号を判断する. 価格が2日連続で閉店価格を反転させ,ストキャスティック指標の反転に伴い,取引信号を生成する.
補助CCI指標の反転確認。CCIは,超買い超売り状況を認識できる。高速CCIが遅いCCIを横切るとき,反転を提示する。
123形とCCI信号を組み合わせて,より信頼性の高い累積信号を生成する.両者が同時に反転する時にのみ入場する.
逆向きの取引を選択する.多頭信号は空白し,空頭信号は多頭,逆向きの取引を実現する.
ストカスティックパラメータ設定で反転感度が制御される.CCIパラメータ設定では,オーバーバイオーバーセール判断の感度が制御される.
目標のない利益設定,逆転の場合はシグナル平仓.
この戦略は,価格行動と指数分析を統合し,二重検証の下で高確率の反転取引機会を探します. 同時に,反転取引の選択肢を提供し,多様化取引を実現します.
この戦略の主な利点は,
双指数フィルタリングにより信号の質が向上し,偽突破を防ぐ.
123形は直観的に信頼性があり,逆転を容易に判断できる.
CCIは,超買超売の区間を明確に識別し,反転時間を判断するのに役立ちます.
逆転取引の選択肢を提供することで 取引の多様化を実現します.
パラメータ設定はシンプルで操作しやすい.
停止と停止の設定は不要で,リスクを減らす.
株価指数や外貨などの波動的な取引品種に適用する.
複製しやすく,初心者にも便利です.
この戦略の主なリスクは
頻繁に取引するリスクは,取引費用とスライドポイントの損失を増加させるだろう.
逆転の失敗のリスク,形状,指標は逆転を完全に予測できない.
取引品種はリスクの高い品種で,安定した上昇に適さない.
パラメータ最適化リスク,不適切なパラメータ設定は失敗につながる可能性があります.
トレンドを逆転させるリスク,トレンドの主な方向を逃すリスク.
低効率のリスク,逆転のチャンスは比較的限られ,効率は高いとは限りません.
リスク管理手段を用いて取引頻度を制御し,適切な品種を選択し,最適化パラメータをリターンして,上記のリスクを最小限に抑える.
この戦略は以下の方法で最適化できます.
単一損失を制限するストップ・ロスト・ストップ戦略を追加する.
他のトレンド指数と組み合わせたフィルター信号は,偽突破を回避します.
異なる品種特性に応じてパラメータを最適化し,適応性を向上させる.
ポジション管理モジュールを追加し,状況に応じてポジションのサイズを調整します.
継続的な損失を防ぐために,撤回制御モジュールを設定します.
機械学習モジュールを追加し,パラメータの自己適応最適化を実現する.
戦略の効率性を向上させるための勝利率と利益率の最適化.
市場を区分して,大トレンドに合わせて空き時間を増やす.
継続的な最適化と改善によって,この戦略は安定したショートライン取引戦略にすることができます.
この戦略は123形状とCCI指標を統合し,二重検証の下で価格逆転の機会を識別する.これは信号品質の高さ,使用の柔軟性,操作の容易さなどの利点があり,ショートライン逆転の取引機会を効果的に捕捉することができる.しかし,パラメータと品種選択の最適化,取引頻度と連続損失のリスクを制御する注意が必要です.この戦略は,継続的な改善によって,効率的なショートライン逆転取引戦略になることができます.
/*backtest
start: 2023-08-25 00:00:00
end: 2023-09-24 00:00:00
period: 3h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=4
////////////////////////////////////////////////////////////
// Copyright by HPotter v1.0 11/07/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
// The Commodity Channel Index (CCI) is best used with markets that display cyclical or
// seasonal characteristics, and is formulated to detect the beginning and ending of these
// cycles by incorporating a moving average together with a divisor that reflects both possible
// and actual trading ranges. The final index measures the deviation from normal, which indicates
// major changes in market trend.
// To put it simply, the Commodity Channel Index (CCI) value shows how the instrument is trading
// relative to its mean (average) price. When the CCI value is high, it means that the prices are
// high compared to the average price; when the CCI value is down, it means that the prices are low
// compared to the average price. The CCI value usually does not fall outside the -300 to 300 range
// and, in fact, is usually in the -100 to 100 range.
//
// 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
CCI(FastMA, SlowMA) =>
pos = 0
xCCI = cci(close, 10)
xSMA = sma(xCCI,SlowMA)
xFMA = sma(xCCI,FastMA)
pos := iff(xSMA < xFMA , 1,
iff(xSMA > xFMA, -1, nz(pos[1], 0)))
pos
strategy(title="Combo Strategy 123 Reversal & CCI", shorttitle="Combo", overlay = true)
Length = input(14, minval=1)
KSmoothing = input(1, minval=1)
DLength = input(3, minval=1)
Level = input(50, minval=1)
//-------------------------
FastMA = input(10, minval=1)
SlowMA = input(20, minval=1)
reverse = input(false, title="Trade reverse")
posReversal123 = Reversal123(Length, KSmoothing, DLength, Level)
posCCI = CCI(FastMA, SlowMA)
pos = iff(posReversal123 == 1 and posCCI == 1 , 1,
iff(posReversal123 == -1 and posCCI == -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 )