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】2024年6月総括 地獄から天国へ?
2024年6月の第4週の FXトレードが終わりました。 5週目はないので、6月まるまる 1ヶ月の終
-
-
【FX】2024年6月第1週総括
2024年6月の第1週の FXトレード(Fintokei 以外)が終わり、総括します。 まあ、
-
-
[FX] Tokyo Box(ロンドン・コーリング)プログラム完成
「 Tokyo Box(ロンドン・コーリング)プログラムにトレーリングストップをつける(2)」の続き
-
-
[FX] 異国のゴールデンゲート
異国の戦士さんという作者の作った自動売買プログラム「異国のゴールデンゲート」がなかなかよいという評判
-
-
【FX】 2024年4月第1週総括
4月第1週の総括 今週の FXトレード時間が終わりましたので、4月第1週を総括したいと思います。
-
-
FX 裁量トレード 現在の方法
(↑クリックすれば拡大) FX の裁量トレードはキライなので、一番ラクチンな方法を模索していま
-
-
ふるさと納税5回め / 牛肉 和木町
以前の記事「ふるさと納税4回め / 無洗米 大館市」でエツにいった私はさらに続けて納税(寄付)す
-
-
[FX] EA の使い方&デモ口座成績 2015/4/1-8
デモ口座近況 EA 日 売買時刻 取引 lots 通貨 売買値 決済
- PREV
- Seagate HDD また一位
- NEXT
- 2015年2月アメリカ雇用統計







