副图公式源码 :支持手机/电脑
趋势:=3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1);
底部:=10,COLORRED,LINETHICK2;
底1:=CROSS(趋势,底部);
GUA1:=(2*CLOSE+HIGH+LOW)/4;
GUA2:=LLV(LOW,27);
GUA3:=HHV(HIGH,27);
GUA4:=EMA((GUA1-GUA2)/(GUA3-GUA2)*100,13);
GUA5:=EMA(0.618*REF(GUA4,1)+0.382*GUA4,3);
底2:=CROSS(GUA4,GUA5) AND GUA4<16;
波段底:=底1 AND 底2;
GUP2:=(CLOSE-LLV(LOW,20))/(HHV(HIGH,20)-LLV(LOW,20))*100;
GUP3:=SMA(SMA(GUP2,3,1),3,1)/28.57;
GUP4:=EMA(GUP3,5);
GUP5:=3*GUP3-2*GUP4;
牛:=CROSS(GUP5,GUP3) AND GUP3<2.1 AND C>O;
GUC22:=LLV(LOW,10);
GUC23:=HHV(HIGH,25);
动力线:= EMA((CLOSE-GUC22)/(GUC23-GUC22)*4,4);
N:=19;
GUPB1:=HHV(HIGH,N);
GUPB2:=LLV(LOW,N);
阻力线:=EMA((CLOSE-GUPB2)/(GUPB1-GUPB2),21)-0.5;
操盘线:=EMA((CLOSE-GUPB2)/(GUPB1-GUPB2),5)-0.5;
突破:=CROSS(操盘线,阻力线) AND 阻力线<0.1;
破位:=CROSS(阻力线,操盘线) AND 阻力线>0.25;
V2:=IF(CURRBARSCOUNT=1,VOL*240/FROMOPEN/REF(VOL,1)-1,VOL/REF(VOL,1)-1);
GUT12:=V2>=1;
GUT0:=BARSLAST(GUT12);
L1:=REF(L,GUT0);
H1:=REF(H,GUT0);
L11:=MIN(REF(L,1),L);
L10:=MIN(L11,REF(L,2));
L21:=MAX(REF(L,1),L);
L20:=MAX(L21,REF(L,2));
GUT111:=(REF(V2>=1,3) OR REF(V2>=1,2) OR REF(V2>=1,1)) AND ((L10>L1 AND L20>H1) OR (L11>L1 AND L21>H1) OR (L>H1));
GUT11:=GUT111 AND REF(GUT111,1)=0;
C3:=REF(C,1);
涨停:=IF((C-C3)*100/C3>=(10-0.01*100/C3),1,0);
跌停:=IF((C3-C)*100/C3>=(10-0.01*100/C3),1,0);
LC:=REF(CLOSE,1);
RSI:=((SMA(MAX((CLOSE - LC),0),3,1) / SMA(ABS((CLOSE - LC)),3,1)) * 100);
FF:=EMA(CLOSE,3);
MA15:=EMA(CLOSE,21);
顶背离:=CROSS(88,RSI);
底背离:=CROSS(FF,MA15);
X1:=(C+L+H)/3;
BB13:=ATAN(EMA(X1,13)-REF(EMA(X1,13),1))*3.1416*10;
EMA8:=EMA(C,8);
GUT1:=FILTER(BB13>1 AND EMA(X1,13)>REF(EMA(X1,8),1),10);
VOLUME:VOL,VOLSTICK;
MAVOL1:MA(VOLUME,5),COLORWHITE;
MAVOL2:MA(VOLUME,35),COLORYELLOW;MAVOL3:MA(VOLUME,135),COLORGREEN;
STICKLINE(V2>=1,0,VOL*0.5,2,0),COLORYELLOW;
STICKLINE(动力线>=3.2,0,VOL,1,0),COLOR238E23;
STICKLINE(波段底,0,VOL,2,0),COLORMAGENTA;
DRAWTEXT(波段底,VOL*0.8,'抄底'),COLORWHITE;
DRAWICON(波段底,VOL*1.1,5);
STICKLINE(牛,0,VOL,2,0),COLORRED;
DRAWTEXT(牛,VOL*1.15,'牛股'),COLORWHITE;
STICKLINE(突破,0,VOL,1,0),COLORBLUE;
DRAWTEXT(突破,VOL*0.5,'突破'),COLORWHITE;
DRAWICON(突破,VOL*1.2,1);
STICKLINE(破位,0,VOL,0.5,0),COLORBROWN;
DRAWTEXT(破位,VOL*0.5,'破位'),COLORWHITE;
DRAWICON(破位,VOL*1.05,2);
STICKLINE(GUT11,O,VOL,2,0),COLORFF00FF;
STICKLINE(涨停,VOL*0.5,VOL,2.5,0),COLORLIRED;
STICKLINE(涨停,VOL*0.5,VOL,0,0),COLORRED;
STICKLINE(跌停,VOL*0.5,VOL,2.5,0),COLOR2F4F2F;
STICKLINE(跌停,VOL*0.5,VOL,0,0),COLORBLACK;
STICKLINE(顶背离,VOL*0.8,VOL,2.5,0),COLORGREEN;
STICKLINE(底背离,0,VOL*0.2,3,0),COLOR7F017F;
DRAWTEXT(GUT1,VOL*1.1,'∠45'),COLOR007575;
选股公式源码
{选股公式一:抄底}
趋势:=3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1);
底部:=10,COLORRED,LINETHICK2;
底1:=CROSS(趋势,底部);
GUA1:=(2*CLOSE+HIGH+LOW)/4;
GUA2:=LLV(LOW,27);
GUA3:=HHV(HIGH,27);
GUA4:=EMA((GUA1-GUA2)/(GUA3-GUA2)*100,13);
GUA5:=EMA(0.618*REF(GUA4,1)+0.382*GUA4,3);
底2:=CROSS(GUA4,GUA5) AND GUA4<16;
波段底:=底1 AND 底2;
抄底:波段底;
{选股公式二:牛股}
GUP2:=(CLOSE-LLV(LOW,20))/(HHV(HIGH,20)-LLV(LOW,20))*100;
GUP3:=SMA(SMA(GUP2,3,1),3,1)/28.57;
GUP4:=EMA(GUP3,5);
GUP5:=3*GUP3-2*GUP4;
牛:=CROSS(GUP5,GUP3) AND GUP3<2.1 AND C>O;
牛股:牛;
{选股公式三:突破}
N:=19;
GUPB1:=HHV(HIGH,N);
GUPB2:=LLV(LOW,N);
阻力线:=EMA((CLOSE-GUPB2)/(GUPB1-GUPB2),21)-0.5;
操盘线:=EMA((CLOSE-GUPB2)/(GUPB1-GUPB2),5)-0.5;
突破:CROSS(操盘线,阻力线) AND 阻力线<0.1;
{选股公式四:角度∠45}
X1:=(C+L+H)/3;
BB13:=ATAN(EMA(X1,13)-REF(EMA(X1,13),1))*3.1416*10;
EMA8:=EMA(C,8);
GUT1:=FILTER(BB13>1 AND EMA(X1,13)>REF(EMA(X1,8),1),10);
角度∠45:GUT1; |