市場促進指数に基づく取引戦略


作成日: 2023-09-19 15:56:29 最終変更日: 2023-09-19 15:56:29
コピー: 0 クリック数: 670
1
フォロー
1617
フォロワー

概要

この戦略は,市場のトレンド化程度とトレンドの逆転の可能性を判断するために,市場促進指数 (MFI) を用いる.それは,価格範囲と取引量の関係を計算して,価格運動の効率性を評価し,取引信号を生成する.

戦略原則

  1. 市場促進指数を計算する.公式は: ((最高価格 - 最低価格) /取引量*10000

  2. MFIが1より大きい時に買取シグナルを生じ,0.8より小さい時に売出シグナルを生成するなど,買取と売却の値を設定する

  3. MFIは値下げ時に多額の買取を行い,値下げ時に空売りを行います.

  4. 信号に応じてK線に異なる色を設定し,市場状況を直感的に表示する

  5. 選択可能な取引信号の方向を反転

優位分析

  1. 市場動向と価格運動の効率性を評価する能力

  2. パラメータの設定はシンプルで,値は簡単に決定できます.

  3. 取引のシグナルが明確で判断し実行しやすい

  4. 市場状況を視覚的に表示する直感的なK線

  5. 必要な時に余分な時間や空いた時間を使うことができます.

リスク分析

  1. 傾向の強さを判断できず,利益の不足のリスクがある

  2. 普通の波動と逆転を区別できない

  3. 突発的な出来事の影響を受けやすく,誤った信号を生成します.

  4. 遅滞があるため,入場地点が欠けています.

  5. 単一損失をコントロールできない

最適化の方向

  1. 異なるパラメータの値設定をテストする

  2. 値上げに関する指標の確認

  3. 移動平均線などの指標を組み合わせてトレンドの方向を判断する

  4. リスク管理策の構築

  5. ポジション管理のルールを設定し,市場に応じてポジションを調整する

  6. 異なる品種と周期で実効をテストする

要約する

この戦略は,MFI指標によって市場のトレンド化程度を判断し,簡単な取引シグナルを与えます.さらなる最適化パラメータの設定,ストップダストメカニズムの構築などが必要ですが,リスクを厳格に制御します.しかし,全体的な考え方は明確で実行可能であり,トレンド追跡戦略の構成要素として,実用的な価値があります.

ストラテジーソースコード
/*backtest
start: 2023-08-19 00:00:00
end: 2023-09-18 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=2
////////////////////////////////////////////////////////////
//  Copyright by HPotter v1.0 12/09/2018
// The Market Facilitation Index is an indicator that relates price range to 
// volume and measures the efficency of price movement. Use the indicator to 
// determine if the market is trending. If the Market Facilitation Index increased, 
// then the market is facilitating trade and is more efficient, implying that the 
// market is trending. If the Market Facilitation Index decreased, then the market 
// is becoming less efficient, which may indicate a trading range is developing that 
// may be a trend reversal.
//
// You can change long to short in the Input Settings
// WARNING:
// - For purpose educate only
// - This script to change bars colors.
////////////////////////////////////////////////////////////
strategy(title="Market Facilitation Index (MFI) Backtest", shorttitle="MFI")
SellZone = input(6.2, minval=0.01, step = 0.01)
BuyZone = input(1, minval=0.01, step = 0.01)
reverse = input(false, title="Trade reverse")
hline(BuyZone, color=green, linestyle=line)
hline(SellZone, color=red, linestyle=line)
xmyVol = volume
xmyhigh = high
xmylow = low
nRes = (xmyhigh - xmylow) / xmyVol * 10000
pos = iff(nRes > BuyZone, 1,
       iff(nRes < SellZone, -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=green, title="MFI", style = histogram)