诚信为本
量力而为
当前位置:峰汇在线 > MetaTrader 4 > MT4指标 > 正文

Calculation the future day.mq4

Calculation the future day指标创建箭头信号指示特定的高低点变化。

图表:Calculation the future day指标

源码:

//+------------------------------------------------------------------+
//|                                   Calculation the future day.mq4 |
//|                                                  Copyright @2005 |
//|                                           1Vladimir_nvkz@mail.ru |
//+------------------------------------------------------------------+
#property copyright ""
#property link      "http://www.125808047.com"
//----
#property indicator_chart_window
#property indicator_buffers 4
#property indicator_color1 Blue
#property indicator_color2 Red
#property indicator_color3 Lime
#property indicator_color4 Green 
//----
double ExtBlueBuffer[];
double ExtRedBuffer[];
double ExtLimeBuffer[];
double ExtgreenBuffer[];
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int OnInit(void)
{
   SetIndexShift(0,1);
   SetIndexShift(1,1);
   SetIndexShift(2,1);
   SetIndexShift(3,1);

   SetIndexBuffer(0, ExtBlueBuffer);
   SetIndexBuffer(1, ExtRedBuffer);
   SetIndexBuffer(2, ExtLimeBuffer);
   SetIndexBuffer(3, ExtgreenBuffer);

   SetIndexStyle(0, DRAW_ARROW );
   SetIndexStyle(1, DRAW_ARROW);
   SetIndexStyle(2, DRAW_ARROW);
   SetIndexStyle(3, DRAW_ARROW);
   Comment("www.125808047.com");
 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[])
  {
   for(int i=1; i<=3; i++)
     {
       ExtRedBuffer[i] = (((Low[i] + High[i] + Close[i]) / 3)*2 - Low[i]);

       ExtgreenBuffer[i] = (((Low[i] + High[i] + Close[i]) / 3)*2 - High[i]);

       ExtBlueBuffer[i] = (Low[i] + High[i] + Close[i]) / 3 - (((Low[i] + High[i] + 
                           Close[i]) / 3)*2 - High[i]) + (((Low[i] + High[i] + 
                           Close[i]) / 3)*2 - Low[i]); 

       ExtLimeBuffer[i] = (Low[i] + High[i] + Close[i]) / 3 + (((Low[i] + High[i] + 
                           Close[i]) / 3)*2 - High[i]) - (((Low[i] + High[i] + 
                           Close[i]) / 3)*2 - Low[i]);
     } 
   return(rates_total);
  }
//+------------------------------------------------------------------+
打赏
版权所有转载请注明标题及链接:峰汇在线 » Calculation the future day.mq4
上一篇:
下一篇:
分享到: 更多 (0)

如您觉得此文不错请扫码打赏!

支付宝扫一扫打赏

微信扫一扫打赏