|
尼古拉斯·明
均线.zip
(560 Bytes, 下载次数: 0)
#property indicator_separate_window
#property indicator_buffers 3
#property indicator_color1 Red
#property indicator_color2 Blue
#property indicator_color3 Green
#property indicator_level1 0
extern int MA=60;
extern int MA1=15;
extern int MA2=8;
double sbuf[];
double sbuf1[];
double sbuf2[];
int init()
{
IndicatorBuffers(3);
SetIndexStyle(0,DRAW_LINE,0,2,Red);
SetIndexBuffer(0,sbuf);
SetIndexStyle(1,DRAW_LINE,0,2,Blue);
SetIndexBuffer(1,sbuf1);
SetIndexStyle(2,DRAW_LINE,0,2,Green);
SetIndexBuffer(2,sbuf2);
SetIndexDrawBegin(0, MA);
SetIndexDrawBegin(1, MA1);
SetIndexDrawBegin(2, MA2);
IndicatorDigits(Digits-2);
return(0);
}
int start()
{
int limit=Bars-IndicatorCounted();
for(int i=0; i<limit; i++)
{
sbuf=(iMA(NULL,0,30,0,MODE_SMMA,PRICE_CLOSE,i)-iMA(NULL,0,120,0,MODE_SMMA,PRICE_CLOSE,i+1))/Point*7;
sbuf1=(iMA(NULL,0,30,0,MODE_SMMA,PRICE_CLOSE,i)-iMA(NULL,0,60,0,MODE_SMMA,PRICE_CLOSE,i+1))/Point*7;
sbuf2=(iMA(NULL,0,30,0,MODE_SMMA,PRICE_CLOSE,i)-iMA(NULL,0,40,0,MODE_SMMA,PRICE_CLOSE,i+1))/Point*7;
}
return(0);
} |
|