请问哪里写错了? [金字塔]
- 咨询内容:
if BARPOS=1 then begin
haClose: = (Open + High + Low + Close) / 4;
haOpen :=open;
haHigh := Max (High, max(haOpen, haClose));
haLow := Min (Low, min(haOpen, haClose));
end
haClose := (Open + High + Low + Close) / 4 ;
haOpen := (ref(haOpen,1)+ ref(haClose,1))/2;
X1:ref(haOpen,1),NODRAW;X2:ref(haClose,1),NODRAW;X3:ref(haOpen,1)+ ref(haClose,1),NODRAW;X4:(ref(haOpen,1)+ ref(haClose,1))/2,NODRAW;X5:haOpen,NODRAW;
haHigh := Max (High, max(haOpen, haClose));
haLow := Min (Low, min(haOpen, haClose));
aa:stickline(haClose>haOpen,haClose,haOpen,8,1),colored;
ab:stickline(haClose>haOpen,haHigh,max(haClose,haOpen),0,1),colored;
ac:stickline(haClose>haOpen,min(haClose,haOpen),haLow,0,1),colored;
ad:stickline(haClose<haOpen,haClose,haOpen,8,0),colorblue;
ae:stickline(haClose<haOpen,haHigh,max(haClose,haOpen),0,1),colorblue;
af:stickline(haClose<haOpen,min(haClose,haOpen),haLow,0,1),colorblue;
此主题相关图片如下:2014-11-25_22-07-48.png为什么图中K线的X5没有值?导致副图中K线总是间隔一根K线才显示.哪里写错了呢?
- 金字塔客服:
variable:haclose=0,haopen=0,hahigh=0,halow=0;
if BARPOS=1 then begin
haClose: = (Open + High + Low + Close) / 4;
haOpen := open;
haHigh := Max (High, max(haOpen, haClose));
haLow := Min (Low, min(haOpen, haClose));
end
r1:=(ref(haOpen,1)+ ref(haClose,1))/2;
r2:=ref(haOpen,1);
r3:=ref(haClose,1);
r4:=ref(haOpen,1)+ ref(haClose,1);
r5:=(ref(haOpen,1)+ ref(haClose,1))/2;
if barpos>1 then begin
haClose : =(Open + High + Low + Close) / 4 ;
haOpen : =r1;
X1:r2,NODRAW;
X2:r3,NODRAW;
X3:r4,NODRAW;
X4:r5,NODRAW;
X5:haOpen,NODRAW;
haHigh := Max (High, max(haOpen, haClose));
haLow := Min (Low, min(haOpen, haClose));end
stickline(haClose>haOpen,haClose,haOpen,8,1),colored;
stickline(haClose>haOpen,haHigh,max(haClose,haOpen),0,1),colored;
stickline(haClose>haOpen,min(haClose,haOpen),haLow,0,1),colored;
stickline(haClose<haOpen,haClose,haOpen,8,0),colorblue;
stickline(haClose<haOpen,haHigh,max(haClose,haOpen),0,1),colorblue;
stickline(haClose<haOpen,min(haClose,haOpen),haLow,0,1),colorblue;
有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友
可联系技术人员 QQ: 511411198 进行 有偿 编写!(不贵!点击查看价格!)
相关文章
-
没有相关内容