老王吧 发表于 2016-5-19 15:59:54

YTG DveMashki





//+------------------------------------------------------------------+
//|                                          ytg_DveMashki_ind.mq4 |
//|                                                   Yuriy Tokman |
//|                                          yuriytokman@gmail.com |
//+------------------------------------------------------------------+
#property copyright "Yuriy Tokman"
#property link      "yuriytokman@gmail.com"

#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Lime
#property indicator_color2 Red
#property indicator_width1 6
#property indicator_width2 6
//----
extern color color1 = Lime;
extern color color2 = Red;
extern int ma_1 = 25;
extern int ma_2 = 50;
extern int method = 0;
extern int price = 0;
//---- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
//----
int ExtCountedBars=0;
//\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
int init()
{
string char; int i;
for (i = 0; i < 256; i++) char = CharToStr(i);
string txt =
char+char+char+char+char+char+char
+char+char+char+char+char+char+char
+char+char+char+char+char+char+char;
//---- indicators
   SetIndexStyle(0,DRAW_HISTOGRAM, 0, 6, color1);
   SetIndexBuffer(0, ExtMapBuffer1);
   SetIndexStyle(1,DRAW_HISTOGRAM, 0, 6, color2);
   SetIndexBuffer(1, ExtMapBuffer2);
   IndicatorShortName(txt);
   SetIndexLabel(0,txt);
   SetIndexLabel(1,txt);   
//----
   SetIndexDrawBegin(0,10);
   SetIndexDrawBegin(1,10);
//---- indicator buffers mapping
   SetIndexBuffer(0,ExtMapBuffer1);
   SetIndexBuffer(1,ExtMapBuffer2);
   
Comment("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"+txt);

   return(0);
}
//\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
int start()
{
   if(Bars<=10) return(0);
   ExtCountedBars=IndicatorCounted();
//---- check for possible errors
   if (ExtCountedBars<0) return(-1);
//---- last counted bar will be recounted
   if (ExtCountedBars>0) ExtCountedBars--;
   int pos=Bars-ExtCountedBars-1;
   while(pos>=0)
   {
      ExtMapBuffer1=iMA(Symbol(),0,ma_1,0,method,price,pos);
      ExtMapBuffer2=iMA(Symbol(),0,ma_2,0,method,price,pos);
           pos--;
   }
//----
   return(0);
}
//\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n



aishang 发表于 2018-9-9 09:00:00

LZ说的很不错

jsnjhz 发表于 2019-3-13 11:55:42

打不开\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
复制代码

jaryk 发表于 2019-3-13 12:48:53

感谢分享!!!!

365 发表于 2020-6-10 13:31:12

小手一抖,积分到手!

外汇博客 发表于 2020-7-8 17:39:07

谢谢楼主分享

zjn1688 发表于 2020-8-22 16:35:53

帮你顶下哈!!

avril 发表于 2020-8-25 15:44:46

帮你顶下哈!!

enob冯存抒 发表于 2020-11-8 15:03:20

{:1_179:}

小女人COCO 发表于 2021-7-7 11:38:13

支持下
页: [1]
查看完整版本: YTG DveMashki