副图公式源码支持 手机/电脑
G1:=CLOSE;G2:=LOW;G3:=OPEN;G4:=HIGH;N:=10;
GUP1:=1240303;
GUP2:=IF(DATE<GUP1,1,0);
GUP3:=EMA(G1,8)-EMA(G1,13);
GUP4:=EMA(GUP3,5);
GUP5:=(GUP3>GUP4)*GUP2;
GUP6:=IF(GUP5,1,0)*GUP2;
GUP7:=(G1-LLV(G2,8))/(HHV(G4,8)-LLV(G2,8))*100;
GUP8:=SMA(GUP7,3,1);
GUP9:=SMA(GUP8,3,1);
GUP10:=(GUP8>GUP9)*GUP2;
GUP11:=IF(GUP10,2,0)*GUP2;
GUP12:=REF(G1,1);
GUP13:=SMA(MAX(G1-GUP12,0),5,1)/SMA(ABS(G1-GUP12),5,1)*100;
GUP14:=SMA(MAX(G1-GUP12,0),13,1)/SMA(ABS(G1-GUP12),13,1)*100;
GUP15:=(GUP13>GUP14)*GUP2;
GUP16:=IF(GUP15,3,0);
GUP17:=(-(HHV(G4,13)-G1))/(HHV(G4,13)-LLV(G2,13))*100;
GUP18:=SMA(GUP17,3,1);
GUP19:=SMA(GUP18,3,1);
GUP20:=GUP18>GUP19;
GUP21:=IF(GUP20,4,0);
GUP22:=(MA(G1,3)+MA(G1,6)+MA(G1,12)+MA(G1,24))/4;
GUP23:=G1>GUP22;
GUP24:=IF(GUP23,5,0);
GUP25:=IF(YEAR>2023,1,0);
GUP26:=G1-REF(G1,1);
GUP27:=100*EMA(EMA(GUP26,5),3)/EMA(EMA(ABS(GUP26),5),3);
GUP28:=100*EMA(EMA(GUP26,13),8)/EMA(EMA(ABS(GUP26),13),8);
GUP29:=GUP27>GUP28;
GUP30:=IF(GUP29,7,0);
买:=IF(GUP5 AND GUP10 AND GUP15 AND GUP20 AND GUP23 AND GUP29 AND REF(GUP5 AND GUP10 AND GUP15 AND GUP20 AND GUP23 AND GUP29,1)=0,6,0),COLORYELLOW,LINETHICK2;
DRAWTEXT(买=6,L*0.99,'短买'),COLORYELLOW;
STICKLINE(买=6,O,C,3,0),COLORYELLOW;
GUP31:=(GUP3<GUP4)+(GUP8<GUP9)+(GUP13<GUP14)+(GUP18<GUP19)+(G1<GUP22)+(GUP27<GUP28);
卖:=GUP31>=3 AND REF(GUP31<=2,1);
DRAWTEXT(GUP31>=3 AND REF(GUP31<=2,1) AND BARSLAST(REF(买,1))<BARSLAST(REF(卖,1)),H*1.01,'短卖'),COLORGREEN;
选股公式源码
{选股公式:短买}
G1:=CLOSE;G2:=LOW;G3:=OPEN;G4:=HIGH;N:=10;
GUP1:=1240303;
GUP2:=IF(DATE<GUP1,1,0);
GUP3:=EMA(G1,8)-EMA(G1,13);
GUP4:=EMA(GUP3,5);
GUP5:=(GUP3>GUP4)*GUP2;
GUP6:=IF(GUP5,1,0)*GUP2;
GUP7:=(G1-LLV(G2,8))/(HHV(G4,8)-LLV(G2,8))*100;
GUP8:=SMA(GUP7,3,1);
GUP9:=SMA(GUP8,3,1);
GUP10:=(GUP8>GUP9)*GUP2;
GUP11:=IF(GUP10,2,0)*GUP2;
GUP12:=REF(G1,1);
GUP13:=SMA(MAX(G1-GUP12,0),5,1)/SMA(ABS(G1-GUP12),5,1)*100;
GUP14:=SMA(MAX(G1-GUP12,0),13,1)/SMA(ABS(G1-GUP12),13,1)*100;
GUP15:=(GUP13>GUP14)*GUP2;
GUP16:=IF(GUP15,3,0);
GUP17:=(-(HHV(G4,13)-G1))/(HHV(G4,13)-LLV(G2,13))*100;
GUP18:=SMA(GUP17,3,1);
GUP19:=SMA(GUP18,3,1);
GUP20:=GUP18>GUP19;
GUP21:=IF(GUP20,4,0);
GUP22:=(MA(G1,3)+MA(G1,6)+MA(G1,12)+MA(G1,24))/4;
GUP23:=G1>GUP22;
GUP24:=IF(GUP23,5,0);
GUP25:=IF(YEAR>2023,1,0);
GUP26:=G1-REF(G1,1);
GUP27:=100*EMA(EMA(GUP26,5),3)/EMA(EMA(ABS(GUP26),5),3);
GUP28:=100*EMA(EMA(GUP26,13),8)/EMA(EMA(ABS(GUP26),13),8);
GUP29:=GUP27>GUP28;
GUP30:=IF(GUP29,7,0);
买:=IF(GUP5 AND GUP10 AND GUP15 AND GUP20 AND GUP23 AND GUP29 AND REF(GUP5 AND GUP10 AND GUP15 AND GUP20 AND GUP23 AND GUP29,1)=0,6,0),COLORYELLOW,LINETHICK2;
短买:买=6;
{卖出公式:短卖}
G1:=CLOSE;G2:=LOW;G3:=OPEN;G4:=HIGH;N:=10;
GUP1:=1240303;
GUP2:=IF(DATE<GUP1,1,0);
GUP3:=EMA(G1,8)-EMA(G1,13);
GUP4:=EMA(GUP3,5);
GUP5:=(GUP3>GUP4)*GUP2;
GUP6:=IF(GUP5,1,0)*GUP2;
GUP7:=(G1-LLV(G2,8))/(HHV(G4,8)-LLV(G2,8))*100;
GUP8:=SMA(GUP7,3,1);
GUP9:=SMA(GUP8,3,1);
GUP10:=(GUP8>GUP9)*GUP2;
GUP11:=IF(GUP10,2,0)*GUP2;
GUP12:=REF(G1,1);
GUP13:=SMA(MAX(G1-GUP12,0),5,1)/SMA(ABS(G1-GUP12),5,1)*100;
GUP14:=SMA(MAX(G1-GUP12,0),13,1)/SMA(ABS(G1-GUP12),13,1)*100;
GUP15:=(GUP13>GUP14)*GUP2;
GUP16:=IF(GUP15,3,0);
GUP17:=(-(HHV(G4,13)-G1))/(HHV(G4,13)-LLV(G2,13))*100;
GUP18:=SMA(GUP17,3,1);
GUP19:=SMA(GUP18,3,1);
GUP20:=GUP18>GUP19;
GUP21:=IF(GUP20,4,0);
GUP22:=(MA(G1,3)+MA(G1,6)+MA(G1,12)+MA(G1,24))/4;
GUP23:=G1>GUP22;
GUP24:=IF(GUP23,5,0);
GUP25:=IF(YEAR>2023,1,0);
GUP26:=G1-REF(G1,1);
GUP27:=100*EMA(EMA(GUP26,5),3)/EMA(EMA(ABS(GUP26),5),3);
GUP28:=100*EMA(EMA(GUP26,13),8)/EMA(EMA(ABS(GUP26),13),8);
GUP29:=GUP27>GUP28;
GUP30:=IF(GUP29,7,0);
买:=IF(GUP5 AND GUP10 AND GUP15 AND GUP20 AND GUP23 AND GUP29 AND REF(GUP5 AND GUP10 AND GUP15 AND GUP20 AND GUP23 AND GUP29,1)=0,6,0),COLORYELLOW,LINETHICK2;
GUP31:=(GUP3<GUP4)+(GUP8<GUP9)+(GUP13<GUP14)+(GUP18<GUP19)+(G1<GUP22)+(GUP27<GUP28);
卖:=GUP31>=3 AND REF(GUP31<=2,1);
短卖:GUP31>=3 AND REF(GUP31<=2,1) AND BARSLAST(REF(买,1))<BARSLAST(REF(卖,1)); |