老师给修改一下,这个公式不能在5.2,13 版本上用,谢谢 [博易POBO]
咨询内容:
江:=IF(JH>REF(JH,1),1,0);
QH:=IF(BACKSET(JH=0,JH+2) AND JH>0,CLOSE,IF(BARSTATUS=2,CLOSE,0));
海:=REF(JH,1);
期:=0*CLOSE;
FOR I:=DATACOUNT TO 2 DO BEGIN
IF JH[I]>海[I] THEN
期[I-1]:=期[I]+江[I];
//I:=I-1;
END;
HH:=REFX(HHV(HIGH,JH+1),期);
LL:=REFX(LLV(LOW,JH+1),期);
货:=REFX(QH,期);
交:=MA(HH,3);
易:=MA(LL,3);
FOR I:=21+1 TO DATACOUNT DO BEGIN
IF 货[I]>交[I-1] THEN
HL[I]:=1;ELSE
IF 货[I]<易[I-1] THEN
HL[I]:=-1;ELSE
HL[I]:=HL[I-1];
//I:=I+1;
END;
PARTLINE(HL=1 AND REF(HL,1)=1 AND MA(LL,3)>MA(C,60),MA(LL,3)),LINETHICK2,COLORRED;
PARTLINE(HL=1 AND REF(HL,1)=1 AND MA(LL,3)<MA(C,60),MA(LL,3)),LINETHICK2,COLORBLUE;
PARTLINE(HL=-1 AND REF(HL,1)=-1 AND MA(HH,3)>MA(C,60),MA(HH,3)),LINETHICK2,COLORRED;
PARTLINE(HL=-1 AND REF(HL,1)=-1 AND MA(HH,3)<MA(C,60),MA(HH,3)),LINETHICK2,COLORBLUE;
STICKLINE(HL=1,OPEN,CLOSE,8,0),COLOR0000FF;
STICKLINE(HL=1,HIGH,LOW,1,0),COLOR0000FF;
STICKLINE(HL=-1,OPEN,CLOSE,8,0),COLORFF0000;
STICKLINE(HL=-1,LOW,HIGH,1,0),COLORFF0000;
DRAWICON(CROSS(HL=-1 AND REF(HL,1)=-1,0.5),HH,11);
DRAWICON(CROSS(HL=1 AND REF(HL,1)=1,0.5),LL,12);
DRAWTEXT(CROSS(HL=1 AND REF(HL,1)=1,0.5),MA(LL,3),'开多平空'),COLOR00FF00;
DRAWTEXT(CROSS(HL=-1 AND REF(HL,1)=-1,0.5),MA(HH,3),'开空平多'),COLORFF00FF;
DRAWTEXT(HL=-1 AND REF(HL,1)=-1 AND HIGH>=MA(HH,3),HIGH,' 加空'),COLORFF00FF;
老师给修改一下,这个公式不能在5.2,13 版本上用,谢谢
JH:=BARSLAST(MOD(BARPOS,21)=1);江:=IF(JH>REF(JH,1),1,0);
QH:=IF(BACKSET(JH=0,JH+2) AND JH>0,CLOSE,IF(BARSTATUS=2,CLOSE,0));
海:=REF(JH,1);
期:=0*CLOSE;
FOR I:=DATACOUNT TO 2 DO BEGIN
IF JH[I]>海[I] THEN
期[I-1]:=期[I]+江[I];
//I:=I-1;
END;
HH:=REFX(HHV(HIGH,JH+1),期);
LL:=REFX(LLV(LOW,JH+1),期);
货:=REFX(QH,期);
交:=MA(HH,3);
易:=MA(LL,3);
FOR I:=21+1 TO DATACOUNT DO BEGIN
IF 货[I]>交[I-1] THEN
HL[I]:=1;ELSE
IF 货[I]<易[I-1] THEN
HL[I]:=-1;ELSE
HL[I]:=HL[I-1];
//I:=I+1;
END;
PARTLINE(HL=1 AND REF(HL,1)=1 AND MA(LL,3)>MA(C,60),MA(LL,3)),LINETHICK2,COLORRED;
PARTLINE(HL=1 AND REF(HL,1)=1 AND MA(LL,3)<MA(C,60),MA(LL,3)),LINETHICK2,COLORBLUE;
PARTLINE(HL=-1 AND REF(HL,1)=-1 AND MA(HH,3)>MA(C,60),MA(HH,3)),LINETHICK2,COLORRED;
PARTLINE(HL=-1 AND REF(HL,1)=-1 AND MA(HH,3)<MA(C,60),MA(HH,3)),LINETHICK2,COLORBLUE;
STICKLINE(HL=1,OPEN,CLOSE,8,0),COLOR0000FF;
STICKLINE(HL=1,HIGH,LOW,1,0),COLOR0000FF;
STICKLINE(HL=-1,OPEN,CLOSE,8,0),COLORFF0000;
STICKLINE(HL=-1,LOW,HIGH,1,0),COLORFF0000;
DRAWICON(CROSS(HL=-1 AND REF(HL,1)=-1,0.5),HH,11);
DRAWICON(CROSS(HL=1 AND REF(HL,1)=1,0.5),LL,12);
DRAWTEXT(CROSS(HL=1 AND REF(HL,1)=1,0.5),MA(LL,3),'开多平空'),COLOR00FF00;
DRAWTEXT(CROSS(HL=-1 AND REF(HL,1)=-1,0.5),MA(HH,3),'开空平多'),COLORFF00FF;
DRAWTEXT(HL=-1 AND REF(HL,1)=-1 AND HIGH>=MA(HH,3),HIGH,' 加空'),COLORFF00FF;
来源:程序化99网( WWW.CXH99.COM )
博易技术人员: 您好,5.5的函数系统作了较大的升级,这些函数无法改在老版本使用,所以无法修改。 来源 程序化久久网
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信号:cxh99cxh99 进行 有偿收费 编写!
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
相关文章
-
没有相关内容