您需要 登录 才可以下载或查看,没有帐号?注册
本帖最后由 chief 于 2012-10-30 18:05 编辑
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Red
#property indicator_width1 2
#property indicator_color2 Lime
#property indicator_width2 2
extern int SignalGap = 4;
int dist=24;
double b1[];
double b2[];
int init() {
SetIndexStyle(0,DRAW_ARROW,STYLE_SOLID,1);
SetIndexStyle(1,DRAW_ARROW,STYLE_SOLID,1);
SetIndexArrow(1,233);
SetIndexArrow(0,234);
SetIndexBuffer(0,b1);
SetIndexBuffer(1,b2);
return(0);
}
int start() {
int counted_bars=IndicatorCounted();
int k,i,j,limit,hhb,llb;
if (counted_bars0) counted_bars--;
limit=Bars-1;
if(counted_bars =1) limit=Bars-counted_bars-1;
if (limit=0;i--) {
hhb = Highest(NULL,0,MODE_HIGH,dist,i-dist/2);
llb = Lowest(NULL,0,MODE_LOW,dist,i-dist/2);
if (i==hhb)
b1=High[hhb]+SignalGap*Point;
if (i==llb)
b2=Low[llb]-SignalGap*Point;
}
return(0);
}
复制代码
【已解决】多谢多位高手。【常来520论坛,高枕外汇眠,家中无历日,寒尽不知年。】
外汇交易有很大的风险性,本站所有资源均来自网络,请选择使用,如若出现亏损,本站不承担任何责任!