老师帮我改一下这个指标 [博易POBO]
咨询内容:
分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,MA(LL,3)),LINETHICK2,COLOR00FFFF;
PARTLINE(HL=-1 AND REF(HL,1)=-1,MA(HH,3)),LINETHICK2,COLORFFFFFF;
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;
DRAWTEXT(HL=1 AND REF(HL,1)=1 AND LOW<=MA(LL,3),LOW,' 加多'),COLOR00FF00; 老师这个指标这个线21根K线去掉,用MA60,当MA5站上MA60,就写开多平空,当MA5跌破MA60,就写开多平空,老师要是能把加空,加多保留下来最好。 <!-- 咨询内容:
MA5:MA(C,5);
MA60:MA(C,60);
A:=CROSS(MA5,MA60);
B:=CROSS(MA60,MA5);
DRAWTEXT(A,MA5,'开多平空');
DRAWTEXT(B,MA5,'开空平多');
来源 程序化久久网
老师帮我改一下这个指标
分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,MA(LL,3)),LINETHICK2,COLOR00FFFF;
PARTLINE(HL=-1 AND REF(HL,1)=-1,MA(HH,3)),LINETHICK2,COLORFFFFFF;
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;
DRAWTEXT(HL=1 AND REF(HL,1)=1 AND LOW<=MA(LL,3),LOW,' 加多'),COLOR00FF00; 老师这个指标这个线21根K线去掉,用MA60,当MA5站上MA60,就写开多平空,当MA5跌破MA60,就写开多平空,老师要是能把加空,加多保留下来最好。 <!-- 咨询内容:
附件 :
-->
来源:程序化99网( WWW.CXH99.COM )
博易技术人员: 公式不全,无法修改。如果说加一个ma5 ma60 交叉的代码如下MA5:MA(C,5);
MA60:MA(C,60);
A:=CROSS(MA5,MA60);
B:=CROSS(MA60,MA5);
DRAWTEXT(A,MA5,'开多平空');
DRAWTEXT(B,MA5,'开空平多');
来源 程序化久久网
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信号:cxh99cxh99 进行 有偿收费 编写!
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
相关文章
-
没有相关内容