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