チャイキン振動器戦略

作者: リン・ハーンチャオチャン開催日:2023年10月12日 16時41分54秒
タグ:

概要

チャイキンオシレーター戦略は,チャイキンオシレーター指標を使用して市場における資本流動を判断し,トレンド変化を把握する.この戦略は,指標曲線を形成するために,高速および遅い移動平均を組み合わせ,曲線がトレンドラインの上を横切ると購入し,曲線が下を横切ると販売し,市場のトレンドを追跡する.

戦略の論理

この戦略は,見逃した開盤価格問題に対処するために開盤価格の代わりに高値と低価格の平均を使用することで,ウィリアムズ蓄積/分配指標を改善したチャイキン振動器指標に基づいています.指標の式は:

Chaikin オシレーター = 蓄積/分配指数の速い EMA - 蓄積/分配指数の遅い EMA

蓄積/分配指数は以下のように計算される.

蓄積/分配指数 = (閉じる - オープン) / (高い - 低い) *量

オープニング価格がないので,以下のように計算されます.

蓄積/分配指数 = (近 - (高 + 低) /2) / (高 - 低) * 量

この指標は,インデックスの速いEMAと遅いEMAの違いをチャイキンオシレーターとして用いる. 0以上のクロスリングは購入信号を示し,0以下のクロスリングは販売信号を示します.

具体的な論理は

  1. 蓄積/分配指数を計算する
  2. 急速なEMAと遅いEMAを計算する
  3. この違いをチャイキン振動器として
  4. オシレーターが0を超えると買い,0を下回ると売る.

利点分析

この戦略の利点は次のとおりです.

  1. 市場動向を決定するために資本流を記録する
  2. 誤差をフィルタリングするために,高速と遅い移動平均を組み合わせます.
  3. シンプルで明快なルール 実行が簡単

リスク分析

この戦略のリスクは以下の通りです

  1. チャイキンオシレーターが遅れて,トレンドターニングポイントが欠けている可能性があります
  2. 過剰な取引を避けるために設定パラメータを必要とします
  3. 損失を抑えるためのストップ損失の必要性

パラメーターの最適化や他の指標との組み合わせなどによってリスクを管理できます

改善 の 方向

この戦略を改善する方法:

  1. 頻度と安定性をバランスさせるため,速いEMAと遅いEMAを最適化する
  2. トレンド逆転シグナルのような出口条件を追加
  3. RSI,MACDのようなフィルターを追加して信号を確認します
  4. 損失を制御するためにストップ・ロスの戦略を組み込む
  5. パーソナライズされた戦略を作成するために,異なる製品のパラメータを調整

結論

チェイキン振動器戦略は比較的安定して信頼性がある.微調整パラメータは収益性とリスクをバランスできる.フィルターとストップロスを追加することで強度がさらに向上する.この傾向に従う戦略は,カスタマイズされた最適化によって満足のいく結果を達成することができる.


/*backtest
start: 2023-09-11 00:00:00
end: 2023-10-11 00:00:00
period: 3h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=2
////////////////////////////////////////////////////////////
//  Copyright by HPotter v1.0 18/09/2017
//    Indicator plots Money Flow Indicator (Chaikin). This indicator looks 
//    to improve on Larry William's Accumulation Distribution formula that 
//    compared the closing price with the opening price. In the early 1970's, 
//    opening prices for stocks stopped being transmitted by the exchanges. 
//    This made it difficult to calculate Williams' formula. The Chaikin 
//    Oscillator uses the average price of the bar calculated as follows 
//    (High + Low) /2 instead of the Open.
//    The indicator subtracts a 10 period exponential moving average of the 
//    AccumDist function from a 3 period exponential moving average of the 
//    AccumDist function.    
//
// You can change long to short in the Input Settings
// WARNING:
//  - For purpose educate only
//  - This script to change bars colors.
////////////////////////////////////////////////////////////
strategy(title="Money Flow Indicator (Chaikin Oscillator)", shorttitle="MFI")
Fast = input(3, minval=1)
Slow = input(10, minval=1)
reverse = input(false, title="Trade reverse")
hline(0, color=gray, linestyle=hline.style_dashed)
lenMax = max(Fast, Slow)
lenMin = min(Fast, Slow)
xDiv = (high - low) * volume
SumMax = sum(iff(xDiv > 0, (close - open) / (high - low) * volume , 0) , lenMax)
SumMin = sum(iff(xDiv > 0, (close - open) / (high - low) * volume , 0) , lenMin)
emaMax = ema(SumMax, lenMax)
emaMin = ema(SumMin, lenMin)
nRes = emaMax - emaMin
pos = iff(nRes > 0, 1,
	   iff(nRes < 0, -1, nz(pos[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)	   	    
barcolor(possig == -1 ? red: possig == 1 ? green : blue ) 
plot(nRes, color=blue, title="RMI")

もっと