您现在的位置:程序化交易>> 期货公式>> 博易大师>> 博易大师知识>>正文内容

请老师修改下这两个公式,麻烦了! [博易POBO]

咨询内容:

请老师修改下这两个公式,麻烦了!

ZT:=REF(C,1)*1.1-C<0.01 AND H=C;{涨停}

CC:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20);
DD:=DMA(CLOSE,CC);

上轨:(1+14/100)*DD,DOTLINE,COLOR8000FF;
下轨:(1-14/100)*DD,DOTLINE,COLORD9D919;

上:(1+7/100)*DD,DOTLINE,COLORGREEN;
下:(1-7/100)*DD,DOTLINE,COLORGREEN;
中:(上+下)/2,DOTLINE,COLORGREEN;

DRAWKLINE(H,O,L,C);
{IF((上 <= REF(上,1)),上,DRAWNULL),COLORGREEN,DOTLINE;
IF((上 > REF(上,1)),上,DRAWNULL),COLORRED,DOTLINE;
IF((中 <= REF(中,1)),中,DRAWNULL),COLORGREEN,DOTLINE;
IF((中 > REF(中,1)),中,DRAWNULL),COLORRED,DOTLINE;
IF((下 <= REF(下,1)),下,DRAWNULL),COLORGREEN,DOTLINE;
IF((下 > REF(下,1)),下,DRAWNULL),COLORRED,LINETHICK2;}
顶:=(1+14/100)*DD,LINETHICK2,COLORBLACK;
底:=(1-14/100)*DD,LINETHICK2,COLORBLACK;
触底:=REF(L,1)<底 AND ZT ;
DRAWTEXT(触底,L,'反'),COLORCYAN;
STICKLINE(触底,C,O,3,1),COLORYELLOW;
STICKLINE(触底,C,O,1,0),COLORRED;

乖离涨停1:=H>上 AND ZT AND CROSS(C,上);
DRAWTEXT(乖离涨停1,L,'升'),COLORYELLOW;
STICKLINE(乖离涨停1,C,O,3,1),COLORYELLOW;
乖离涨停2:=O>上 AND ZT;
STICKLINE(乖离涨停2,C,O,3,1),COLORCYAN;
DRAWTEXT(乖离涨停2,L,'妖'),COLORCYAN;




趋势强度:=IF(C>上,IF(C>上轨,4,3),IF(C>下 AND C<上,2,IF(C<下轨,0,1)));
STICKLINE(趋势强度=0,H,L,0,1),COLORD9D919 ;
STICKLINE(趋势强度=1,H,L,0,1),COLORGREEN;
STICKLINE(趋势强度=2,H,L,0,1),COLORGRAY;
STICKLINE(趋势强度=3,H,L,0,1),COLORYELLOW;
STICKLINE(趋势强度=4,H,L,0,1),COLORMAGENTA;
STICKLINE(趋势强度=0,C,O,1,0),COLORD9D919 ;
STICKLINE(趋势强度=1,C,O,1,0),COLORGREEN;
STICKLINE(趋势强度=2,C,O,1,0),COLORGRAY;
STICKLINE(趋势强度=3,C,O,1,0),COLORYELLOW;
STICKLINE(趋势强度=4,C,O,1,0),COLORMAGENTA;
 
-----------------------------------------------
 
MA7:=MA(H,7)*0.99,COLORMAGENTA;
空线:MA(C,25),COLORGREEN;
AA:=空线>REF(空线,1);
多线:IF(AA,空线,DRAWNULL),COLORRED;
N:=MA(CLOSE,34);
F1:=REF(L,1)=LLV(L,30) AND REF(C>O*1.2,1) AND L>REF(L,1);
F2:=BARSLAST(F1);
F3:=COUNT(CROSS(C,空线),F2) AND AA AND CROSS(C,空线);
DRAWICON(F3,L,9);
MA77:=H>MA7 AND O<MA7 AND  MA7>REF(MA7,1) AND REF(MA7>REF(MA7,1),2) AND REF(MA7>空线,2) AND 空线>REF(空线,1) AND MA7>空线 AND O/空线<1.036 AND MA7/空线<1.036 AND  DYNAINFO(4)!=0 ;
STICKLINE(C>=N AND C>=O,C,O,2.8,0),COLORRED;
STICKLINE(C>=N AND C>=O,H,L,0,0),COLORRED;
STICKLINE(C>=N AND C<O,C,O,2.8,1),COLORRED;
STICKLINE(C>=N AND C<O,O,H,0,0),COLORRED;
STICKLINE(C>=N AND C<O,C,L,0,0),COLORRED;
STICKLINE(C<N AND C>O,C,O,2.8,1),COLORFFFF00;
STICKLINE(C<N AND C<=O,C,O,2.8,1),COLORFFFF00;
STICKLINE(C<N AND C<=O,H,L,0,1),COLORFFFF00;
STICKLINE(C<N AND C>O,C,H,0,1),COLORFFFF00;
STICKLINE(C<N AND C>O,O,L,0,1),COLORFFFF00;
AA1:=MA(C,5);
BB1:=MA(C,15);
A:=CROSS(AA1,BB1);
STICKLINE(A AND C<N,HHV(H,4),HHV(H,4),50,1),COLORGREEN;
DRAWTEXT(A AND C<N,HHV(H,4),'加做空'),COLORGREEN;
STICKLINE(A AND C>=N,LLV(L,4),LLV(L,4),50,1),COLORMAGENTA;
DRAWTEXT(A AND C>=N,LLV(L,4),'加做多'),COLORMAGENTA;
X:=ATAN((MA(CLOSE,5)/REF(MA(CLOSE,5),1)-1)*100)*59.3;
XX:=X>40;
AF:=C/REF(C,1)>1.095;
BB:=BARSLAST(AF);
CC:=L<=(REF(H,BB)+REF(L,BB))/2*0.98;                         
DD:=COUNT(CC,BB)=1 AND CC  AND BB<10 AND C>L AND XX ;
GG:=BARSLAST(DD);
HH:=H>0.01*REF(L,GG)*N;
卖出:=COUNT(HH,GG)=1 AND HH AND GG<10;
STICKLINE(AF,C,O,2,0),COLORMAGENTA;
STICKLINE(DD,C,O,2,0),COLORBLUE;
STICKLINE(卖出,C,O,2,0),COLORYELLOW;
DRAWICON(DD,L,27);
STICKLINE(DD,L,L,0,0),COLORGREEN;
DRAWTEXT(DD,L,'▲伏击'),COLORGREEN;
DRAWICON(卖出,H,26);
STICKLINE(卖出,H,H,0,0),COLORYELLOW;
DRAWTEXT(卖出,H,'$中枪'),COLORYELLOW;
STICKLINE(MA77,C,O,3,0),COLORGREEN;
SS:=BARSLAST(F3);
S1:=COUNT(L<REF(C,SS),SS)=1 AND L<REF(C,SS) AND SS<5;
{DRAWTEXT(S1,DYNAINFO(6)=REF(C,SS)*0.8,'-------------'),COLORYELLOW;}
MA5:=MA(O,7)*0.96;
AX:=REF(C<MA5,1) AND O<MA5 AND L<MA5  AND REF(MA(H,3),1)>REF(MA(H,3),2)  AND MA(O,3)>MA(O,6);
AO:=MA(O,7);
A2:=MA(H,7);
A3:=AO>REF(AO,1) AND REF(AO,1)<REF(AO,2);
A4:=BARSLAST(A3);
A5:=REF(C<AO,1) AND O<AO AND AO>REF(AO,1)*1.0019 AND REF(A2,1)> REF(A2,2)*1.009 ;
AY:=COUNT(A5,A4)=1 AND A5 AND  REF(MA(H,3),1)>REF(MA(H,3),2);
A10:=AX OR AY;
A11:=BARSLAST(A10);
B10:=H>REF(O,A11)*1.05 OR REF(O,A11)/L>1.05 ;
B11:=COUNT(B10,A11)=1 AND B10 AND A11>=1 AND A11<6;
买入:=FILTER(A10,2);
卖:=B11;
STICKLINE(买入,(O+C)/2,O,2.3,0)COLORGREEN;
STICKLINE(卖,(O+C)/2,C,2.3,0)COLORYELLOW;
DRAWTEXT(买入,L,'C')COLORYELLOW;
DRAWTEXT(卖,H,'C')COLORRED;
 
 

 

 来源:程序化99网( WWW.CXH99.COM )

博易技术人员: ZT:=REF(C,1)*1.1-C<0.01 AND H=C;{涨停}

CC:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20);
DD:=DMA(CLOSE,CC);

上轨:(1+14/100)*DD,POINTDOT,COLOR8000FF;
下轨:(1-14/100)*DD,POINTDOT,COLORD9D919;

上:(1+7/100)*DD,POINTDOT,COLORGREEN;
下:(1-7/100)*DD,POINTDOT,COLORGREEN;
中:(上+下)/2,POINTDOT,COLORGREEN;

DRAWKLINE(H,O,L,C);
{IF((上 <= REF(上,1)),上,DRAWNULL),COLORGREEN,DOTLINE;
IF((上 > REF(上,1)),上,DRAWNULL),COLORRED,DOTLINE;
IF((中 <= REF(中,1)),中,DRAWNULL),COLORGREEN,DOTLINE;
IF((中 > REF(中,1)),中,DRAWNULL),COLORRED,DOTLINE;
IF((下 <= REF(下,1)),下,DRAWNULL),COLORGREEN,DOTLINE;
IF((下 > REF(下,1)),下,DRAWNULL),COLORRED,LINETHICK2;}
顶:=(1+14/100)*DD,LINETHICK2,COLORBLACK;
底:=(1-14/100)*DD,LINETHICK2,COLORBLACK;
触底:=REF(L,1)<底 AND ZT ;
DRAWTEXT(触底,L,'反'),COLORCYAN;
STICKLINE(触底,C,O,3,1),COLORYELLOW;
STICKLINE(触底,C,O,1,0),COLORRED;

乖离涨停1:=H>上 AND ZT AND CROSS(C,上);
DRAWTEXT(乖离涨停1,L,'升'),COLORYELLOW;
STICKLINE(乖离涨停1,C,O,3,1),COLORYELLOW;
乖离涨停2:=O>上 AND ZT;
STICKLINE(乖离涨停2,C,O,3,1),COLORCYAN;
DRAWTEXT(乖离涨停2,L,'妖'),COLORCYAN;




趋势强度:=IF(C>上,IF(C>上轨,4,3),IF(C>下 AND C<上,2,IF(C<下轨,0,1)));
STICKLINE(趋势强度=0,H,L,0,1),COLORD9D919 ;
STICKLINE(趋势强度=1,H,L,0,1),COLORGREEN;
STICKLINE(趋势强度=2,H,L,0,1),COLORGRAY;
STICKLINE(趋势强度=3,H,L,0,1),COLORYELLOW;
STICKLINE(趋势强度=4,H,L,0,1),COLORMAGENTA;
STICKLINE(趋势强度=0,C,O,1,0),COLORD9D919 ;
STICKLINE(趋势强度=1,C,O,1,0),COLORGREEN;
STICKLINE(趋势强度=2,C,O,1,0),COLORGRAY;
STICKLINE(趋势强度=3,C,O,1,0),COLORYELLOW;
STICKLINE(趋势强度=4,C,O,1,0),COLORMAGENTA;
 

 
MA7:=MA(H,7)*0.99,COLORMAGENTA;
空线:MA(C,25),COLORGREEN;
AA:=空线>REF(空线,1);
多线:IF(AA,空线,DRAWNULL),COLORRED;
N:=MA(CLOSE,34);
F1:=REF(L,1)=LLV(L,30) AND REF(C>O*1.2,1) AND L>REF(L,1);
F2:=BARSLAST(F1);
F3:=COUNT(CROSS(C,空线),F2) AND AA AND CROSS(C,空线);
DRAWICON(F3,L,9);
MA77:=H>MA7 AND O<MA7 AND  MA7>REF(MA7,1) AND REF(MA7>REF(MA7,1),2) AND REF(MA7>空线,2) AND 空线>REF(空线,1) AND MA7>空线 AND O/空线<1.036 AND MA7/空线<1.036 AND  DYNAINFO(4)!=0 ;
STICKLINE(C>=N AND C>=O,C,O,2.8,0),COLORRED;
STICKLINE(C>=N AND C>=O,H,L,0,0),COLORRED;
STICKLINE(C>=N AND C<O,C,O,2.8,1),COLORRED;
STICKLINE(C>=N AND C<O,O,H,0,0),COLORRED;
STICKLINE(C>=N AND C<O,C,L,0,0),COLORRED;
STICKLINE(C<N AND C>O,C,O,2.8,1),COLORFFFF00;
STICKLINE(C<N AND C<=O,C,O,2.8,1),COLORFFFF00;
STICKLINE(C<N AND C<=O,H,L,0,1),COLORFFFF00;
STICKLINE(C<N AND C>O,C,H,0,1),COLORFFFF00;
STICKLINE(C<N AND C>O,O,L,0,1),COLORFFFF00;
AA1:=MA(C,5);
BB1:=MA(C,15);
A:=CROSS(AA1,BB1);
STICKLINE(A AND C<N,HHV(H,4),HHV(H,4),50,1),COLORGREEN;
DRAWTEXT(A AND C<N,HHV(H,4),'加做空'),COLORGREEN;
STICKLINE(A AND C>=N,LLV(L,4),LLV(L,4),50,1),COLORMAGENTA;
DRAWTEXT(A AND C>=N,LLV(L,4),'加做多'),COLORMAGENTA;
X:=ATAN((MA(CLOSE,5)/REF(MA(CLOSE,5),1)-1)*100)*59.3;
XX:=X>40;
AF:=C/REF(C,1)>1.095;
BB:=BARSLAST(AF);
CC:=L<=(REF(H,BB)+REF(L,BB))/2*0.98;                         
DD:=COUNT(CC,BB)=1 AND CC  AND BB<10 AND C>L AND XX ;
GG:=BARSLAST(DD);
HH:=H>0.01*REF(L,GG)*N;
卖出:=COUNT(HH,GG)=1 AND HH AND GG<10;
STICKLINE(AF,C,O,2,0),COLORMAGENTA;
STICKLINE(DD,C,O,2,0),COLORBLUE;
STICKLINE(卖出,C,O,2,0),COLORYELLOW;
DRAWICON(DD,L,27);
STICKLINE(DD,L,L,0,0),COLORGREEN;
DRAWTEXT(DD,L,'▲伏击'),COLORGREEN;
DRAWICON(卖出,H,26);
STICKLINE(卖出,H,H,0,0),COLORYELLOW;
DRAWTEXT(卖出,H,'$中枪'),COLORYELLOW;
STICKLINE(MA77,C,O,3,0),COLORGREEN;
SS:=BARSLAST(F3);
S1:=COUNT(L<REF(C,SS),SS)=1 AND L<REF(C,SS) AND SS<5;
{DRAWTEXT(S1,DYNAINFO(6)=REF(C,SS)*0.8,'-------------'),COLORYELLOW;}
MA5:=MA(O,7)*0.96;
AX:=REF(C<MA5,1) AND O<MA5 AND L<MA5  AND REF(MA(H,3),1)>REF(MA(H,3),2)  AND MA(O,3)>MA(O,6);
AO:=MA(O,7);
A2:=MA(H,7);
A3:=AO>REF(AO,1) AND REF(AO,1)<REF(AO,2);
A4:=BARSLAST(A3);
A5:=REF(C<AO,1) AND O<AO AND AO>REF(AO,1)*1.0019 AND REF(A2,1)> REF(A2,2)*1.009 ;
AY:=COUNT(A5,A4)=1 AND A5 AND  REF(MA(H,3),1)>REF(MA(H,3),2);
A10:=AX OR AY;
A11:=BARSLAST(A10);
B10:=H>REF(O,A11)*1.05 OR REF(O,A11)/L>1.05 ;
B11:=COUNT(B10,A11)=1 AND B10 AND A11>=1 AND A11<6;
买入:=FILTER(A10,2);
卖:=B11;
STICKLINE(买入,(O+C)/2,O,2.3,0),COLORGREEN;
STICKLINE(卖,(O+C)/2,C,2.3,0),COLORYELLOW;
DRAWTEXT(买入,L,'C'),COLORYELLOW;
DRAWTEXT(卖,H,'C'),COLORRED; 谢谢老师!我试试! 来源 程序化久久网

 

有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友

可联系技术人员 QQ: 262069696  点击在线交流或微信号:cxh99cxh99  进行 有偿收费 编写!

怎么收费,代编流程等详情请点击阅读!

(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)


【字体: 】【打印文章】【查看评论

相关文章

    没有相关内容