波段操作,红色箭头是进入点,绿色箭头是抛出点,标出了买入卖出价格
M5:MA(C,5);
MB1:=EMA(WINNER(C)*100,5);
MB2:=EMA(MB1,2);
MB3:=EMA(MB2,2);
MB4:=EMA(MB3,2);
VAR2:=MB1;
VAR3:=DRAWLINE(VAR2>=HHV(VAR2,5)=1,VAR2,VAR2<=LLV(VAR2,5)=1,VAR2,0);
顶G:=IF(VAR2=VAR3,VAR2,DRAWNULL);
XDG:=REF(VAR2,1)=REF(VAR3,1) AND VAR2>REF(VAR2,1);
买入条件:=TFILTER(XDG,顶G,1);
卖出条件:=TFILTER(顶G,XDG,0);
买入价:=IF(买入条件,C,DRAWNULL);
卖出价:=IF(卖出条件,C,DRAWNULL);
DRAWICON(买入条件,L,1);
DRAWICON(卖出条件,H*1.02,2);
DRAWNUMBER(买入条件,L,买入价),COLORRED;
DRAWNUMBER(买入条件,L*0.97,REF((H+L)/2,1)),COLORLIRED;
DRAWNUMBER(卖出条件,H,卖出价),COLORGREEN;
DRAWNUMBER(卖出条件,H*1.02,REF((H+L)/2,1)),COLORLIGREEN;
Z1:=STRCAT(HYBLOCK,’ ‘);
Z2:=STRCAT(Z1,FGBLOCK);
Z3:=STRCAT(Z2,DYBLOCK);
Z4:=STRCAT(Z3,’ ‘);
DRAWTEXT_FIX(ISLASTBAR,0.00,0.99,0,STRCAT(Z4,GNBLOCK)),COLORYELLOW;
评论(0)