Chande’s Momentum Oscillator シャンデ・モメンタム・オシレーター
公開日:
:
マネー
シャンデモメンタムオシレーター(CMO と略される)という指標が本に載っていました。
アメリカの Tushar S. Chande が発表したようで、オシレーター系指標の一つです。
CMOの計算式は次のようになります。
CMO(N) = (CMO1 – CMO2) ÷ (CMO1 + CMO2) × 50 + 50
N = 指標の設定期間
CMO1 = N日間で前日比プラスとした日の値幅合計
CMO2 = N日間で前日比マイナスとした日の値幅合計
RSI(相対力指数)と似ています。
RSIと異なり、値幅を評価しているのでトレンドの強弱を知ることができるのが強みです。
ネットに転がっている CMO はシグナルのない1本線で、スケールも -100~100 とやや異なるので、改造してみました。
一番下のサブウィンドウが CMO です。一つ上は BBW ratio ですね。
CMO も 70 以上で買われすぎ、30以下で売られすぎ。
シグナルとクロスしたゴールデンクロス、デッドクロスは売買シグナルに使えます。
- 70 以上でデッドクロスは売り
- 30以下でゴールデンクロスは買い
です。
プログラムソース
//+------------------------------------------------------------------+
//| Chande's Momentum Oscillator CMO_S.mq4 |
//+------------------------------------------------------------------+
#property indicator_separate_window
#property indicator_buffers 2
#property indicator_color1 Orange
#property indicator_color2 Violet
#property indicator_minimum 0
#property indicator_maximum 100
#property indicator_level1 50
//---- input parameters
extern bool LastBarOnly = false;
extern int CMO_Range = 20;
extern int Sig_Period =9;
//---- buffers
double CMO_Buffer[];
double CMO_signal[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
IndicatorBuffers(2);
IndicatorShortName("Chande`s Momentum Oscillator (" + CMO_Range + ")");
SetLevelStyle(STYLE_DASHDOT, 1, DodgerBlue);
SetIndexStyle(0, DRAW_LINE);
SetIndexLabel(0, "CMO");
SetIndexBuffer(0, CMO_Buffer);
SetIndexDrawBegin(0, CMO_Range);
SetIndexBuffer(1, CMO_signal);
SetIndexDrawBegin(1, CMO_Range);
SetIndexStyle(1, DRAW_LINE);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int counted_bars = IndicatorCounted();
int i, j, Limit, cnt_bars;
double dif_close, cmo_up, cmo_dw;
static bool run_once;
if(counted_bars < 0)
{
return(-1);
}
Limit = Bars - counted_bars;
// run once on start
if(run_once == false)
cnt_bars = Limit - CMO_Range;
else
if(LastBarOnly == false)
cnt_bars = Limit;
else
cnt_bars = 0;
//----
for(i = cnt_bars; i >= 0; i--)
{
cmo_up = 0.0;
cmo_dw = 0.0;
//----
for(j = i + CMO_Range - 1; j >= i; j--)
{
dif_close = Close[j] - Close[j+1];
if(dif_close > 0)
cmo_up += dif_close;
else
if(dif_close < 0)
cmo_dw -= dif_close;
}
CMO_Buffer[i] = 50.0 +50.0 * (cmo_up - cmo_dw) / (cmo_up + cmo_dw);
}
for (i=cnt_bars - Sig_Period; i>=0; i--)
{
CMO_signal[i] = iMAOnArray(CMO_Buffer,0,Sig_Period,0,MODE_EMA,i);
}
//----
if(run_once == false)
run_once = true;
//----
return(0);
}
###
関連記事
-
-
[FX] 15分足スキャルピング自動運転プログラム(2)
昨日の記事の 「15分足スキャルピング自動運転プログラム」は、トレンドのないときと正の向きのトレンド
-
-
【FX】2本の CCI をフィルタに使う EA
Youtube を観ていると、1本の EMA と 2本の CCI を使うトレード方法を伝授している人
-
-
【FX】Closed Profit と Open Loss
今週の FX 自動売買は 9月の最終週でもう少し荒れるかなと思っていましたが、結構堅調でした。
-
-
アンディさんのリアルタイム雲(2)
前回の記事「アンディさんのリアルタイム雲」で紹介したリアルタイム雲 ですが、本日ちょっと使ってみたと
-
-
アメリカ株投資 2021-4-26
4月11日に純益が 81万円を超えたアメリカ株投資ですが、本日も同じくらいの純益です。
-
-
[FX] THV Trix と VQ(と Trend Scalp)の売買サイン
FX の裁量トレードで信奉者の多い THV Trix と VQ とを比べてみました(サブウィンドゥ1
-
-
名波はるか&Kumaさんが教える!![日経225&mini]で始めるシステムトレード入門
名波はるか&Kumaさんが教える!!で始めるシステムトレード入門 名波
-
-
三越伊勢丹HD株買いました
三越と伊勢丹などで使える割引カードがもらえるので 100株買いました。 チャートを見る
-
-
韓国経済 やばい デフォルト 誰が助ける?
* 最近、韓国経済に関しての気になるニュースを2つ。 1 「韓国やばい! 誰か助けろ!」 警
- PREV
- Seagate HDD また一位
- NEXT
- 2015年2月アメリカ雇用統計







