トップ  >  MQL4リファレンス  >  カスタムインジケータ  >  IndicatorShortName
スポンサーリンク
検索

↑の検索エンジンが表示されない人は、
↓の古い検索エンジンを使用して下さい。
カスタム検索
MQL4リファレンスツリー
IndicatorShortName


IndicatorShortName


カスタムインジケータの短縮名は、データウインドウとチャートサブウインドウの左上に表示されます。


関数書式:
void  IndicatorShortName(
   string  name         // 短縮名
   );



■引数
引数名 初期値 I/O 詳細
name - In 短縮名


■戻り値
無し



■備考
無し

サンプルソース:
// インジケータウインドウ設定
#property  indicator_separate_window          // インジケータをサブウインドウに表示
#property  indicator_minimum        0         // サブウインドウのスケール下限:-1000
#property  indicator_maximum     3500         // サブウインドウのスケール上限: 3500

// インジケータ設定
#property  indicator_buffers   1                // インジケータバッファ:1つ設定
#property  indicator_color1    clrGreen       // インジケータ1の色:Green
#property  indicator_width1    2                // インジケータ1の太さ:2
#property  indicator_type1     DRAW_HISTOGRAM // インジケータ1の種類:ヒストグラム

double ExIndVol[100];                           // インジケータバッファ:ヒストグラム用

//+------------------------------------------------------------------+
//| OnInit(初期化)イベント                         |
//|------------------------------------------------------------------|
void OnInit()
{
    SetIndexBuffer(0,ExIndVol);              // ExIndVolをインジケータ1に登録

}


//+------------------------------------------------------------------+
//| OnCalculate(tick受信)イベント                              |
//+------------------------------------------------------------------+
int OnCalculate(
                const int       rates_total,    // 入力された時系列のバー数
                const int       prev_calculated,// 計算済み(前回呼び出し時)のバー数
                const datetime& time[],         // 時間
                const double&   open[],         // 始値
                const double&   high[],         // 高値
                const double&   low[],          // 安値
                const double&   close[],        // 終値
                const long&     tick_volume[],  // Tick出来高
                const long&     volume[],       // Real出来高
                const int&      spread[])       // スプレッド
{
    int icount = 0;
    int icountend;
    
    icountend = rates_total -  prev_calculated;
    if ( icountend >= rates_total ) {
        icountend = rates_total - 1;
    }

    for( icount = 0; icount <= icountend ; icount++ ) {
        ExIndVol[icount]  = tick_volume[icount];   // インジケータバッファに出来高を代入
    }

    IndicatorShortName( "精度テスト");

    return(rates_total);
}








スポンサーリンク
スポンサーリンク


Copyright ©2015 MT4でEA自作しちゃお~ All Rights Reserved.


Top

inserted by FC2 system