MENU
  • FX必要証拠金計算ツール(ハイレバ対応)
  • CFD必要証拠金計算ツール(XM専用)
  • FX複利計算シミュレーター
  • 余力に応じたロット計算ツール
  • お問い合わせ
FX取引に関するあれこれ
  • FX必要証拠金計算ツール(ハイレバ対応)
  • CFD必要証拠金計算ツール(XM専用)
  • FX複利計算シミュレーター
  • 余力に応じたロット計算ツール
  • お問い合わせ
FX取引に関するあれこれ
  • FX必要証拠金計算ツール(ハイレバ対応)
  • CFD必要証拠金計算ツール(XM専用)
  • FX複利計算シミュレーター
  • 余力に応じたロット計算ツール
  • お問い合わせ
  1. ホーム
  2. インジケーター
  3. 【MT4マルチタイムフレーム】ゲーターオシレーター(MTF-Gator)

【MT4マルチタイムフレーム】ゲーターオシレーター(MTF-Gator)

2023 4/22
インジケーター
2023年4月22日
目次

ソースコード

//+------------------------------------------------------------------+
//|                                                    MTF-Gator.mq4 |
//|                                  Copyright 2022,Greeds Co., Ltd. |
//|                                               https://greeds.net |
//+------------------------------------------------------------------+
#property copyright "Copyright 2022,Greeds Co., Ltd."
#property link      "https://greeds.net"
#property version   "1.00"
#property strict
#property indicator_separate_window

#property  indicator_buffers 4
#property indicator_color1  Green
#property indicator_color2  Red
#property indicator_color3  Red
#property indicator_color4  Green

double     Buf1[];
double     Buf2[];
double     Buf3[];
double     Buf4[];


input ENUM_TIMEFRAMES in_timeFrame = PERIOD_CURRENT;  // マルチタイムフレーム
input int InpJawsPeriod=13;                           // ジョーライン平均期間
input int InpJawsShift=8;                             // ジョーラインシフト
input int InpTeethPeriod=8;                           // トゥースライン平均期間
input int InpTeethShift=5;                            // トゥースラインシフト
input int InpLipsPeriod=5;                            // リップライン平均期間
input int InpLipsShift=3;                             // リップラインシフト
input ENUM_MA_METHOD in_method=MODE_SMMA;                // 移動平均の種別
input ENUM_APPLIED_PRICE in_applied_price=PRICE_MEDIAN;  // 適用価格
int OnInit()
{
  SetIndexBuffer(0, Buf1 );
  SetIndexBuffer(1, Buf2 );
  SetIndexBuffer(2, Buf3 );
  SetIndexBuffer(3, Buf4 );
  SetIndexStyle(0, DRAW_HISTOGRAM , STYLE_SOLID , 1 );
  SetIndexStyle(1, DRAW_HISTOGRAM , STYLE_SOLID , 1 );
  SetIndexStyle(2, DRAW_HISTOGRAM , STYLE_SOLID , 1 );
  SetIndexStyle(3, DRAW_HISTOGRAM , STYLE_SOLID , 1 );
  SetIndexShift(0,InpTeethShift);
  SetIndexShift(1,InpTeethShift);
  SetIndexShift(2,InpTeethShift);
  SetIndexShift(3,InpTeethShift);


  return( INIT_SUCCEEDED );
}

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[],
                const long &volume[],
                const int &spread[])
{
    int JawsShift=InpJawsShift;
    int TeethShift=InpTeethShift;
    int LipsShift=InpLipsShift;
    if(JawsShift*Period()>in_timeFrame && in_timeFrame != NULL)
    JawsShift = JawsShift*Period()/in_timeFrame;
    if(TeethShift*Period()>in_timeFrame && in_timeFrame != NULL)
    TeethShift = TeethShift*Period()/in_timeFrame;
    if(LipsShift*Period()>in_timeFrame && in_timeFrame != NULL)
    LipsShift = LipsShift*Period()/in_timeFrame;
  int limit = Bars - prev_calculated;
  for(int i=0; i<limit; i++)
  {
    
 
    int shift = iBarShift(NULL, in_timeFrame, time[i]);
    double jaw = iGator(NULL,in_timeFrame,InpJawsPeriod,InpJawsShift,InpTeethPeriod,InpTeethShift,InpLipsPeriod,InpLipsShift,in_method,in_applied_price,MODE_GATORJAW,shift-TeethShift);
    double jaw1 = iGator(NULL,in_timeFrame,InpJawsPeriod,InpJawsShift,InpTeethPeriod,InpTeethShift,InpLipsPeriod,InpLipsShift,in_method,in_applied_price,MODE_GATORJAW,shift+1-TeethShift);
    double teeth = iGator(NULL,in_timeFrame,InpJawsPeriod,InpJawsShift,InpTeethPeriod,InpTeethShift,InpLipsPeriod,InpLipsShift,in_method,in_applied_price,MODE_GATORTEETH,shift-TeethShift);
    double teeth1 = iGator(NULL,in_timeFrame,InpJawsPeriod,InpJawsShift,InpTeethPeriod,InpTeethShift,InpLipsPeriod,InpLipsShift,in_method,in_applied_price,MODE_GATORTEETH,shift+1-TeethShift);

    if(jaw>jaw1)
    {Buf1[i] = jaw;}
    else if(jaw<=jaw1)
    {Buf2[i] = jaw;}
    
    if(teeth>teeth1)
    {Buf3[i] = teeth;}
    else if(teeth<=teeth1)
    {Buf4[i] = teeth;}
  }
  return(rates_total);
}

パラメータ

基本的にMT4標準の入力パラメータと同じにしています。

数値以外の設定項目に関しては、リストボックスで選択可能です。

  • マルチタイムフレーム
  • ジョーライン平均期間
  • トゥースライン平均期間
  • トゥースラインシフト
  • リップライン平均期間
  • リップラインシフト
  • 移動平均の種別
  • 適用価格

ダウンロード

“MTF-Gator” をダウンロード

MTF-Gator.ex4 – 12 回のダウンロード – 15.67 KB
インジケーター
MQL
よかったらシェアしてね!
  • URLをコピーしました!
  • URLをコピーしました!
  • 【MT4マルチタイムフレーム】フォースインデックス(MTF-ForceIndex)
  • 【MT4マルチタイムフレーム】モメンタム(MTF-Momentum)

この記事を書いた人

たかはしのアバター たかはし

FX取引に関するあれこれVER2.0の管理人たかはしです。
ギャンブルに近い無謀なトレードを繰り返して損失を膨らませてきた元ハイレバトレーダーです。
レバレッジは使い方次第で大きな武器となる可能性を信じ、今までとは違う戦略的なトレードで生まれ変わろうとしています。

関連記事

  • 【MT4マルチタイムフレーム】WPR(MTF-WPR)
    2023年4月22日
  • 【MT4マルチタイムフレーム】ストキャスティクス(MTF-Stochastic)
    2023年4月22日
  • 【MT4マルチタイムフレーム】標準偏差(MTF-StdDev)
    2023年4月22日
  • 【MT4マルチタイムフレーム】RVI(MTF-RVI)
    2023年4月22日
  • 【MT4マルチタイムフレーム】パラボリックSAR(MTF-ParabolicSAR)
    2023年4月22日
  • 【MT4マルチタイムフレーム】オンバランスボリューム(MTF-OBV)
    2023年4月22日
  • 【MT4マルチタイムフレーム】MoneyFlowIndex(MTF-MoneyFlowIndex)
    2023年4月22日
  • 【MT4マルチタイムフレーム】モメンタム(MTF-Momentum)
    2023年4月22日
新着記事
  • ダウンロードしたMT4インジケータをマルチタイムフレーム化する方法
    2023年4月23日
    MQL
人気記事
カテゴリー
  • FX初心者向け (2)
  • MQL (4)
  • XM (8)
  • お知らせ (6)
  • インジケーター (38)
  • ツール (2)
  • テクニカル分析方法 (1)
  • 市況 (10)
  • 手法 (4)
  • 環境認識 (3)
  • 運用ルール (1)
スポンサーリンク
目次

© FX取引に関するあれこれ.

目次