副图公式源码支持 手机/电脑
M5:MA(C,5),COLORYELLOW;
M10:MA(CLOSE,10),COLORFF00FF;
M30:MA(C,30),COLORRED,LINETHICK2;
M60:MA(CLOSE,60),COLORFFCC66;
下跌阶段:IF(MA(CLOSE,30)<=REF(MA(CLOSE,30),1),MA(CLOSE,30),DRAWNULL),COLORGREEN,LINETHICK2;
GUA1:=100*(C-LLV(L,5))/(HHV(C,5)-LLV(L,5));
GUA2:=100*(C-LLV(L,10))/(HHV(C,10)-LLV(L,10));
GUA3:=100*(C-LLV(L,20))/(HHV(C,20)-LLV(L,20));
GUA4:=100*(C-LLV(L,30))/(HHV(C,30)-LLV(L,30));
GUB1:=BARSLAST(CROSS(30,GUA1))<2 AND BARSLAST(CROSS(GUA1,50))<2;
GUB2:=BARSLAST(CROSS(GUA4,GUA1))<2 AND GUA1>GUA4;
GUB3:=GUA1>60 AND GUA4>70;
DRAWTEXT(GUB1 AND GUB2 AND GUB3,L-0.02,'↖白银买'),COLORWHITE;
GUC1:=BARSLAST(CROSS(50,GUA1))<3 AND BARSLAST(CROSS(GUA1,50))<3;
GUC2:=BARSLAST(CROSS(GUA4,GUA1))<2 AND GUA1>GUA4;
DRAWTEXT(GUC1 AND GUC2,L-0.03,'↖黄金买'),COLORYELLOW;
GUD1:=BARSLAST(CROSS(GUA4,GUA1))>3 AND BARSLAST(CROSS(GUA1,GUA4))<3;
GUD2:=BARSLAST(CROSS(GUA4,GUA2));
GUD3:=GUA3<GUA4 AND GUA2<GUA4;
GUD4:=BARSLAST(CROSS(GUA4,GUA3))>3 AND BARSLAST(CROSS(GUA1,GUA4))<3;
GUD5:=GUA2<GUA3 AND GUA2<GUA4 AND GUA2<GUA1 AND GUA1=100;
DRAWTEXT(GUD1 AND GUD2 AND GUD3 AND GUD4 AND GUD5,L-0.05,'↖震仓'),COLORCYAN;
GUE1:=GUA3=100;
GUE2:=GUA4<90;
DRAWTEXT(COUNT(GUE1,2)=2 AND GUE2,L-0.02,'↖波段买');
选股公式源码
{选股公式一:白银买}
GUA1:=100*(C-LLV(L,5))/(HHV(C,5)-LLV(L,5));
GUA2:=100*(C-LLV(L,10))/(HHV(C,10)-LLV(L,10));
GUA3:=100*(C-LLV(L,20))/(HHV(C,20)-LLV(L,20));
GUA4:=100*(C-LLV(L,30))/(HHV(C,30)-LLV(L,30));
GUB1:=BARSLAST(CROSS(30,GUA1))<2 AND BARSLAST(CROSS(GUA1,50))<2;
GUB2:=BARSLAST(CROSS(GUA4,GUA1))<2 AND GUA1>GUA4;
GUB3:=GUA1>60 AND GUA4>70;
白银买:GUB1 AND GUB2 AND GUB3;
{选股公式二:黄金买}
GUA1:=100*(C-LLV(L,5))/(HHV(C,5)-LLV(L,5));
GUA2:=100*(C-LLV(L,10))/(HHV(C,10)-LLV(L,10));
GUA3:=100*(C-LLV(L,20))/(HHV(C,20)-LLV(L,20));
GUA4:=100*(C-LLV(L,30))/(HHV(C,30)-LLV(L,30));
GUC1:=BARSLAST(CROSS(50,GUA1))<3 AND BARSLAST(CROSS(GUA1,50))<3;
GUC2:=BARSLAST(CROSS(GUA4,GUA1))<2 AND GUA1>GUA4;
黄金买:GUC1 AND GUC2;
{选股公式三:波段买}
GUA1:=100*(C-LLV(L,5))/(HHV(C,5)-LLV(L,5));
GUA2:=100*(C-LLV(L,10))/(HHV(C,10)-LLV(L,10));
GUA3:=100*(C-LLV(L,20))/(HHV(C,20)-LLV(L,20));
GUA4:=100*(C-LLV(L,30))/(HHV(C,30)-LLV(L,30));
GUE1:=GUA3=100;
GUE2:=GUA4<90;
波段买:COUNT(GUE1,2)=2 AND GUE2;
{选股公式四:震仓}
GUA1:=100*(C-LLV(L,5))/(HHV(C,5)-LLV(L,5));
GUA2:=100*(C-LLV(L,10))/(HHV(C,10)-LLV(L,10));
GUA3:=100*(C-LLV(L,20))/(HHV(C,20)-LLV(L,20));
GUA4:=100*(C-LLV(L,30))/(HHV(C,30)-LLV(L,30));
GUD1:=BARSLAST(CROSS(GUA4,GUA1))>3 AND BARSLAST(CROSS(GUA1,GUA4))<3;
GUD2:=BARSLAST(CROSS(GUA4,GUA2));
GUD3:=GUA3<GUA4 AND GUA2<GUA4;
GUD4:=BARSLAST(CROSS(GUA4,GUA3))>3 AND BARSLAST(CROSS(GUA1,GUA4))<3;
GUD5:=GUA2<GUA3 AND GUA2<GUA4 AND GUA2<GUA1 AND GUA1=100;
震仓:GUD1 AND GUD2 AND GUD3 AND GUD4 AND GUD5; |