[MT4指标]Custom Moving Average指标
主图指标
附图指标,
mt4指标类型:趋势指标
是否能用在mt4手机版上:否
mt4指标类型:震荡指标
是否能用在mt4手机版上:否
是否含有未来函数:无
//+------------------------------------------------------------------+
//|                                        Custom Moving Average.mq4 |
//|                      Copyright ? 2004, MetaQuotes Software Corp. |
//|                                       http://www.metaquotes.net/ |
//+------------------------------------------------------------------+
#property copyright "TraderSeven"
#property link      "[email protected]"
#property indicator_chart_window
#property indicator_buffers 6
#property indicator_color1 Red
#property indicator_color2 Orange
#property indicator_color3 Blue
#property indicator_color4 MediumSeaGreen
#property indicator_color5 Red
#property indicator_color6 White
//---- indicator parameters
extern int MA_Period=10;
extern double Percent=2;
double UpperBand;
double LowerBand;
//---- indicator buffers
double ExtMapBuffer1;
double ExtMapBuffer2;
double ExtMapBuffer3;
double ExtMapBuffer4;
double ExtMapBuffer5;
double ExtMapBuffer6;
//----
int ExtCountedBars=0;
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
   int    draw_begin;
   string short_name;
//---- drawing settings
   SetIndexStyle(0,DRAW_LINE);
   IndicatorDigits(MarketInfo(Symbol(),MODE_DIGITS));
   if(MA_Period<2) MA_Period=13;
   draw_begin=MA_Period-1;
   IndicatorShortName(short_name+MA_Period+")");
   SetIndexDrawBegin(0,draw_begin);
//---- indicator buffers mapping
   SetIndexBuffer(0,ExtMapBuffer1);
   SetIndexBuffer(1,ExtMapBuffer2);
   SetIndexBuffer(2,ExtMapBuffer3);
   SetIndexBuffer(3,ExtMapBuffer4);
   SetIndexBuffer(4,ExtMapBuffer5);
   SetIndexBuffer(5,ExtMapBuffer6);
//---- initialization done
   return(0);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int start()
  {
UpperBand=(1+Percent/100);
LowerBand=1-Percent/100;
   if(Bars<=MA_Period) return(0);
   ExtCountedBars=IndicatorCounted();
//---- check for possible errors
   if (ExtCountedBars<0) return(-1);
//---- last counted bar will be recounted
   if (ExtCountedBars>0) ExtCountedBars--;
//+------------------------------------------------------------------+
//| Simple Moving Average          Firebird.jpg
Firebird.jpg
 Firebird.jpg
Firebird.jpg发表于:2018-02-24 03:41只看该作者
3楼 
我今天最想说
韬客社区www.talkfx.co
发表于:2018-02-24 04:41只看该作者
4楼 
心觉得国内股票控股吃散的状况很严重


















