您需要 登录 才可以下载或查看,没有帐号?注册
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Red
#property indicator_color2 Green
extern int 变色均线=18;
double duo[];
double kong[];
int init()
{
SetIndexBuffer(0,duo);
SetIndexBuffer(1,kong);
SetIndexStyle(0,DRAW_LINE);
SetIndexStyle(1,DRAW_LINE);
SetIndexDrawBegin(0,变色均线);
SetIndexDrawBegin(1,变色均线);
IndicatorDigits(Digits);
return(0);
}
int start()
{
double temp0,temp1;
int limit;
int counted_bars=IndicatorCounted();
if(counted_bars0) counted_bars--;
limit=Bars-counted_bars;
for(int i=limit; i i--)
{
duo i =EMPTY_VALUE;
kong i =EMPTY_VALUE;
temp0=iMA(NULL,0,变色均线,0,MODE_SMA,PRICE_CLOSE,i);
temp1=iMA(NULL,0,变色均线,0,MODE_SMA,PRICE_CLOSE,i+1);
if(iClose(NULL,0,i) =iMA(NULL,0,变色均线,0,MODE_SMA,PRICE_CLOSE,i))
{duo i =temp0; duo[i+1]=temp1;}
else {kong i =temp0; kong[i+1]=temp1;}
}
return(0);
}[/td][/tr]
外汇交易有很大的风险性,本站所有资源均来自网络,请选择使用,如若出现亏损,本站不承担任何责任!