感谢牛老大,编了个彩色macd
#property indicator_buffers 7#property indicator_separate_window
#property indicator_color1 Yellow//可以没有?
#property indicator_color2 Silver
#property indicator_color3 White
#property indicator_color4 Green
#property indicator_color5 Red
#property indicator_color6 Red
double Buffer1[];
double Buffer2[];
double Buffer3[];
double Buffer上[];
double Buffer下[];
double Buffer6[];
extern int Fast=12;
extern int Slow=26;
extern int Signal=9;
int init()
{
SetIndexStyle(0,DRAW_LINE,0,1);
SetIndexStyle(1,DRAW_LINE,0,1);
SetIndexStyle(2,DRAW_HISTOGRAM,0,1);//可以没有?
SetIndexStyle(3,DRAW_HISTOGRAM,0,2);
SetIndexBuffer(0,Buffer1);
SetIndexBuffer(1,Buffer2);
SetIndexBuffer(2,Buffer3);//存放数据,必须的
SetIndexBuffer(3,Buffer上);
SetIndexBuffer(4,Buffer下);
SetIndexStyle(4,DRAW_HISTOGRAM,0,2);
SetIndexBuffer(5,Buffer6);
SetIndexStyle(5,DRAW_LINE,0,2);
IndicatorShortName(\"MACD(\"+Fast+\",\"+Slow+\",\"+Signal+\")\");
SetIndexLabel(0,\"MACD_MAIN\");
SetIndexLabel(1,\"MACD_SIGNAL\");
SetIndexLabel(2,\"MAIN-SIGNAL\");
IndicatorDigits(Digits+2);
return(0);
}
int deinit()
{
return(0);
}
int start()
{
int limit,counted_bars=IndicatorCounted();
if(counted_bars0) counted_bars--;
limit=Bars-counted_bars;
for(int i=0; iBuffer1)Buffer6=Buffer1;
}
return(0);
} 好的外汇EA是稳赚的,但是,那些4%以上的收益率的都是骗人的 楼主福如东海,万寿无疆! 希望大家都有好运 看看现在变相卖EA的。。。越来越多! 哈哈,看的人少,回一下 支持楼主 努力学习。。。。。。 看看怎么样 交易顺利