同花顺怎么加自选股 同花顺短线金股主图指标公式
MA5:MA(C,5),colorwhite,;
MA20:MA(C,20);
涨幅:=(C-REF(C,1))/REF(C,1)*100;
开:=(O-REF(C,1))/REF(C,1)*100;
上:MA20+2*STD(CLOSE,20);
下:MA20-2*STD(CLOSE,20);
角5:=ATAN((MA5/REF(MA5,1)-1)*100)*180/3.1416;
角20:=ATAN((MA20/REF(MA20,1)-1)*100)*180/3.1416;
DRAWTEXT_FIX(C>0,0.57,0,0,'<当前攻击角度> -->'),colorred;
DRAWNUMBER_FIX(ISLASTBAR,0.69,0,0,TOSTRING(角5,1));
DRAWTEXT_FIX(C>0,0.57,0.05,0,'<开盘幅度> -->'),colorred;
DRAWNUMBER_FIX(ISLASTBAR,0.69,0.05,0,TOSTRING(开,2));
拐点:=(角5>0 AND REF(角5,1)<0) OR (角5-REF(角5,1)>30);
B1:=角5>=45;
B2:=角5>REF(角5,1);
B3:=(H-LLV(L,3))/LLV(L,3)*100<25;
B4:=(角5>70 AND REF(角5,1)>70)=0;
B5:=角20>20;
B6:=涨幅>=3;
B7:=拐点;
B8:=MA5*1.01>MA20;
备选股池0:=B1 AND B2 AND B3 AND B4 AND B5 AND B6 AND B7 AND B8;
备选股池:=备选股池0 AND REF(备选股池0,1)=0;
B:=REF(备选股池,1) AND 角5>=45 AND MA5>MA20;
DRAWTEXT(备选股池,L,"备"),coloryellow;
DRAWICON(B,L,1);
//配合选股公示显示回踩价格
L1:=IF(开>=-10 AND 开<2,O,0);
L2:=IF(开>=2 AND 开<4,O*(1-0.01),0);
L3:=IF(开>=4 AND 开<6,O*(1-0.02),0);
L4:=IF(开>=6 AND 开<8,O*(1-0.03),0);
L5:=IF(开>=8 AND 开<10.5,O*(1-0.04),0);
回踩价:=L1+L2+L3+L4+L5;
回踩进场价格:IF(REF(备选股池,1) AND 角5>=45 AND MA5>MA20,回踩价,0);
次日最大获利:=IF(REF(L,1)<=REF(回踩进场价格,1),TOSTRING((H-REF(回踩进场价格,1))/REF(回踩进场价格,1)*100,1),TOSTRING((H-REF(回踩进场价格,1))/REF(回踩进场价格,1)*100,1));
AA:=BARSLAST(回踩进场价格>0)+1;
浮动盈亏百分比:=(C-REF(回踩进场价格,BARSLAST(回踩进场价格>0)))/REF(回踩进场价格,BARSLAST(回踩进场价格>0))*100;
DRAWNUMBER_FIX(AA<=5 AND ISLASTBAR AND REF(回踩进场价格,BARSLAST(回踩进场价格>0))>0,0.69,0.10,0,TOSTRING(REF(回踩进场价格,BARSLAST(回踩进场价格>0)),2)),colorcyan;
DRAWTEXT_FIX(AA<=5 AND ISLASTBAR AND REF(回踩进场价格,BARSLAST(回踩进场价格>0))>0,0.57,0.10,0,"成本价 -->"),colorred;
DRAWNUMBER_FIX(AA<=5 AND ISLASTBAR AND REF(回踩进场价格,BARSLAST(回踩进场价格>0)),0.69,0.15,0,TOSTRING(C,2)),colorcyan;
DRAWTEXT_FIX(AA<=5 AND ISLASTBAR AND REF(回踩进场价格,BARSLAST(回踩进场价格>0)),0.57,0.15,0,"最新价 -->"),colorred;
DRAWNUMBER_FIX(AA<=5 AND ISLASTBAR,0.69,0.20,0,TOSTRING(浮动盈亏百分比,2)),colorcyan;
DRAWTEXT_FIX(AA<=5 AND ISLASTBAR,0.57,0.20,0,"当前浮动盈亏百分比 -->"),colorred;
STICKLINE(回踩进场价格>0,回踩进场价格,回踩进场价格*1.003,12,0);
DRAWNUMBER(REF(L,1)<=REF(回踩进场价格,1),H*1.08,次日最大获利);