2023买卖顺应趋势 炒股轻而易举《通达信+指标+公式+副图+源码》
副图公式源码支持 手机/电脑
顶部:=BBI+3*STD(BBI,13),COLOR004AFF;
底部:=BBI-3*STD(BBI,13),COLOR67FF00;
DRAWBAND(BBI,RGB(97,95,00),顶部,RGB(97,95,00));
DRAWBAND(BBI,RGB(25,75,150),底部,RGB(25,75,250));
STICKLINE(C>REF(C,1),H,L,0,1 ),COLORRED;
STICKLINE(C>REF(C,1),O,C,3,0 ),COLOR000055;
STICKLINE(C>REF(C,1),O,C,2.7,0 ),COLOREEEEEE;
STICKLINE(C>REF(C,1),O,C,2.1,0 ),COLOR000099;
STICKLINE(C>REF(C,1),O,C,1.5,0 ),COLOR0000BB;
STICKLINE(C>REF(C,1),O,C,0.9,0 ),COLOR0000DD;
STICKLINE(C>REF(C,1),O,C,0.3,0 ),COLOR0000FF;
STICKLINE(C=REF(C,1),H,L,0,1 ),COLORWHITE;
STICKLINE(C=REF(C,1),O,C,3,0 ),COLOR555555;
STICKLINE(C=REF(C,1),O,C,2.7,0 ),COLOR777777;
STICKLINE(C=REF(C,1),O,C,2.1,0 ),COLOR999999;
STICKLINE(C=REF(C,1),O,C,1.5,0 ),COLORBBBBBB;
STICKLINE(C=REF(C,1),O,C,0.9,0 ),COLORDDDDDD;
STICKLINE(C=REF(C,1),O,C,0.3,0 ),COLORFFFFFF;
STICKLINE(C<REF(C,1),H,L,0,1 ),COLORCYAN;
STICKLINE(C<REF(C,1),O,C,3,0 ),COLOR990000;
STICKLINE(C<REF(C,1),O,C,2.7,0 ),COLORCC0000;
STICKLINE(C<REF(C,1),O,C,2.1,0 ),COLORFF4400;
STICKLINE(C<REF(C,1),O,C,1.5,0 ),COLORFF8800;
STICKLINE(C<REF(C,1),O,C,0.9,0 ),COLORFFCC00;
STICKLINE(C<REF(C,1),O,C,0.3,0 ),COLORCYAN;
GUA1:=H<REF(H,1) AND L<REF(L,1);
GUA2:=H<REF(H,1) AND L>REF(L,1);
GUA3:=H>REF(H,1) AND L<REF(L,1);
GUA4:=H>REF(H,1) AND L>REF(L,1);
GUA5:=REF(H,2) <H AND REF(L,2) <L AND REF(H,2) >REF(H,1) AND REF(L,2) <REF(L,1);
GUB1:=COUNT(GUA1,6)>=3 AND COUNT(GUA2 OR GUA3,5)=0 AND LLVBARS(L,6) =1 AND HHVBARS(H,6) >=5 AND GUA4;
GUB2:=COUNT(GUA1,7)>=3 AND COUNT(GUA2 OR GUA3,6)=1 AND LLVBARS(L,7) =2 AND HHVBARS(H,7) >=6 AND GUA5;
GUB3:=COUNT(GUA1,7)>=3 AND COUNT(GUA2 OR GUA3,6)=1 AND LLVBARS(L,7) =1 AND HHVBARS(H,7) >=6 AND GUA4;
GUB4:=COUNT(GUA1,8)>=3 AND COUNT(GUA2 OR GUA3,7)<=2 AND LLVBARS(L,8) =2 AND HHVBARS(H,8) >=7 AND GUA5;
GUB5:=COUNT(GUA1,8)>=3 AND COUNT(GUA2 OR GUA3,7)<=2 AND LLVBARS(L,8) =1 AND HHVBARS(H,8) >=7 AND GUA4;
GUB6:=COUNT(GUA1,9)>=3 AND COUNT(GUA2 OR GUA3,8)<=3 AND LLVBARS(L,9) =2 AND HHVBARS(H,9) >=8 AND GUA5;
GUB7:=COUNT(GUA1,9)>=3 AND COUNT(GUA2 OR GUA3,8)<=3 AND LLVBARS(L,9) =1 AND HHVBARS(H,9) >=8 AND GUA4;
GUB8:=COUNT(GUA1,10)>=3 AND COUNT(GUA2 OR GUA3,9)<=4 AND LLVBARS(L,10) =2 AND HHVBARS(H,10) >=9 AND GUA5;
GUB9:=COUNT(GUA1,10)>=3 AND COUNT(GUA2 OR GUA3,9)<=4 AND LLVBARS(L,10) =1 AND HHVBARS(H,10) >=9 AND GUA4;
GUB10:=COUNT(GUA1,11)>=3 AND COUNT(GUA2 OR GUA3,10)<=5 AND LLVBARS(L,11) =2 AND HHVBARS(H,11) >=10 AND GUA5;
选股:=GUB1 OR GUB2 OR GUB3 OR GUB4 OR GUB5 OR GUB6 OR GUB7 OR GUB8 OR GUB9 OR GUB10;
DRAWTEXT(FILTER(选股=1,5),L*0.97,'买');
HGUA1:=H>REF(H,1) AND L>REF(L,1);
HGUA2:=H<REF(H,1) AND L>REF(L,1);
HGUA3:=H>REF(H,1) AND L<REF(L,1);
HGUA4:=H<REF(H,1) AND L<REF(L,1);
HGUA5:=REF(H,2) >H AND REF(L,2) >L AND REF(H,2) >REF(H,1) AND REF(L,2) <REF(L,1);
HGUB1:=COUNT(HGUA1,6)>=3 AND COUNT(HGUA2 OR HGUA3,5)=0 AND HHVBARS(H,6) =1 AND LLVBARS(L,6) >=5 AND HGUA4;
HGUB2:=COUNT(HGUA1,7)>=3 AND COUNT(HGUA2 OR HGUA3,6)=1 AND HHVBARS(H,7) =2 AND LLVBARS(L,7) >=6 AND HGUA5;
HGUB3:=COUNT(HGUA1,7)>=3 AND COUNT(HGUA2 OR HGUA3,6)=1 AND HHVBARS(H,7) =1 AND LLVBARS(L,7) >=6 AND HGUA4;
HGUB4:=COUNT(HGUA1,8)>=3 AND COUNT(HGUA2 OR HGUA3,7)<=2 AND HHVBARS(H,8) =2 AND LLVBARS(L,8) >=7 AND HGUA5;
HGUB5:=COUNT(HGUA1,8)>=3 AND COUNT(HGUA2 OR HGUA3,7)<=2 AND HHVBARS(H,8) =1 AND LLVBARS(L,8) >=7 AND HGUA4;
HGUB6:=COUNT(HGUA1,9)>=3 AND COUNT(HGUA2 OR HGUA3,8)<=3 AND HHVBARS(H,9) =2 AND LLVBARS(L,9) >=8 AND HGUA5;
HGUB7:=COUNT(HGUA1,9)>=3 AND COUNT(HGUA2 OR HGUA3,8)<=3 AND HHVBARS(H,9) =1 AND LLVBARS(L,9) >=8 AND HGUA4;
HGUB8:=COUNT(HGUA1,10)>=3 AND COUNT(HGUA2 OR HGUA3,9)<=4 AND HHVBARS(H,10) =2 AND LLVBARS(L,10) >=9 AND HGUA5;
HGUB9:=COUNT(HGUA1,10)>=3 AND COUNT(HGUA2 OR HGUA3,9)<=4 AND HHVBARS(H,10) =1 AND LLVBARS(L,10) >=9 AND HGUA4;
HGUB10:=COUNT(HGUA1,11)>=3 AND COUNT(HGUA2 OR HGUA3,10)<=5 AND HHVBARS(H,11) =2 AND LLVBARS(L,11) >=10 AND HGUA5;
H选股:=HGUB1 OR HGUB2 OR HGUB3 OR HGUB4 OR HGUB5 OR HGUB6 OR HGUB7 OR HGUB8 OR HGUB9 OR HGUB10;
DRAWTEXT(FILTER(H选股=1,3),H*1.02,'卖');
选股公式源码
{选股公式:买}
GUA1:=H<REF(H,1) AND L<REF(L,1);
GUA2:=H<REF(H,1) AND L>REF(L,1);
GUA3:=H>REF(H,1) AND L<REF(L,1);
GUA4:=H>REF(H,1) AND L>REF(L,1);
GUA5:=REF(H,2) <H AND REF(L,2) <L AND REF(H,2) >REF(H,1) AND REF(L,2) <REF(L,1);
GUB1:=COUNT(GUA1,6)>=3 AND COUNT(GUA2 OR GUA3,5)=0 AND LLVBARS(L,6) =1 AND HHVBARS(H,6) >=5 AND GUA4;
GUB2:=COUNT(GUA1,7)>=3 AND COUNT(GUA2 OR GUA3,6)=1 AND LLVBARS(L,7) =2 AND HHVBARS(H,7) >=6 AND GUA5;
GUB3:=COUNT(GUA1,7)>=3 AND COUNT(GUA2 OR GUA3,6)=1 AND LLVBARS(L,7) =1 AND HHVBARS(H,7) >=6 AND GUA4;
GUB4:=COUNT(GUA1,8)>=3 AND COUNT(GUA2 OR GUA3,7)<=2 AND LLVBARS(L,8) =2 AND HHVBARS(H,8) >=7 AND GUA5;
GUB5:=COUNT(GUA1,8)>=3 AND COUNT(GUA2 OR GUA3,7)<=2 AND LLVBARS(L,8) =1 AND HHVBARS(H,8) >=7 AND GUA4;
GUB6:=COUNT(GUA1,9)>=3 AND COUNT(GUA2 OR GUA3,8)<=3 AND LLVBARS(L,9) =2 AND HHVBARS(H,9) >=8 AND GUA5;
GUB7:=COUNT(GUA1,9)>=3 AND COUNT(GUA2 OR GUA3,8)<=3 AND LLVBARS(L,9) =1 AND HHVBARS(H,9) >=8 AND GUA4;
GUB8:=COUNT(GUA1,10)>=3 AND COUNT(GUA2 OR GUA3,9)<=4 AND LLVBARS(L,10) =2 AND HHVBARS(H,10) >=9 AND GUA5;
GUB9:=COUNT(GUA1,10)>=3 AND COUNT(GUA2 OR GUA3,9)<=4 AND LLVBARS(L,10) =1 AND HHVBARS(H,10) >=9 AND GUA4;
GUB10:=COUNT(GUA1,11)>=3 AND COUNT(GUA2 OR GUA3,10)<=5 AND LLVBARS(L,11) =2 AND HHVBARS(H,11) >=10 AND GUA5;
选股:=GUB1 OR GUB2 OR GUB3 OR GUB4 OR GUB5 OR GUB6 OR GUB7 OR GUB8 OR GUB9 OR GUB10;
买:FILTER(选股=1,5);
{卖出公式:卖}
HGUA1:=H>REF(H,1) AND L>REF(L,1);
HGUA2:=H<REF(H,1) AND L>REF(L,1);
HGUA3:=H>REF(H,1) AND L<REF(L,1);
HGUA4:=H<REF(H,1) AND L<REF(L,1);
HGUA5:=REF(H,2) >H AND REF(L,2) >L AND REF(H,2) >REF(H,1) AND REF(L,2) <REF(L,1);
HGUB1:=COUNT(HGUA1,6)>=3 AND COUNT(HGUA2 OR HGUA3,5)=0 AND HHVBARS(H,6) =1 AND LLVBARS(L,6) >=5 AND HGUA4;
HGUB2:=COUNT(HGUA1,7)>=3 AND COUNT(HGUA2 OR HGUA3,6)=1 AND HHVBARS(H,7) =2 AND LLVBARS(L,7) >=6 AND HGUA5;
HGUB3:=COUNT(HGUA1,7)>=3 AND COUNT(HGUA2 OR HGUA3,6)=1 AND HHVBARS(H,7) =1 AND LLVBARS(L,7) >=6 AND HGUA4;
HGUB4:=COUNT(HGUA1,8)>=3 AND COUNT(HGUA2 OR HGUA3,7)<=2 AND HHVBARS(H,8) =2 AND LLVBARS(L,8) >=7 AND HGUA5;
HGUB5:=COUNT(HGUA1,8)>=3 AND COUNT(HGUA2 OR HGUA3,7)<=2 AND HHVBARS(H,8) =1 AND LLVBARS(L,8) >=7 AND HGUA4;
HGUB6:=COUNT(HGUA1,9)>=3 AND COUNT(HGUA2 OR HGUA3,8)<=3 AND HHVBARS(H,9) =2 AND LLVBARS(L,9) >=8 AND HGUA5;
HGUB7:=COUNT(HGUA1,9)>=3 AND COUNT(HGUA2 OR HGUA3,8)<=3 AND HHVBARS(H,9) =1 AND LLVBARS(L,9) >=8 AND HGUA4;
HGUB8:=COUNT(HGUA1,10)>=3 AND COUNT(HGUA2 OR HGUA3,9)<=4 AND HHVBARS(H,10) =2 AND LLVBARS(L,10) >=9 AND HGUA5;
HGUB9:=COUNT(HGUA1,10)>=3 AND COUNT(HGUA2 OR HGUA3,9)<=4 AND HHVBARS(H,10) =1 AND LLVBARS(L,10) >=9 AND HGUA4;
HGUB10:=COUNT(HGUA1,11)>=3 AND COUNT(HGUA2 OR HGUA3,10)<=5 AND HHVBARS(H,11) =2 AND LLVBARS(L,11) >=10 AND HGUA5;
H选股:=HGUB1 OR HGUB2 OR HGUB3 OR HGUB4 OR HGUB5 OR HGUB6 OR HGUB7 OR HGUB8 OR HGUB9 OR HGUB10;
卖:FILTER(H选股=1,3);