九毛八公式指标
要求:当涨停板时,按照收盘价买入一只股票,卖出条件;买入5日后强制平仓或者亏损达到3%止损平仓或者利润达到5%止赢平仓。万分感谢。通达性软件。
公式模块:
ZT:=(C-REF(C,1))/REF(C,1)*100>9.645 AND C=H;
TS:=BArslAST(ZT); TJ1:=crOSS((C-REF(C,TS))/REF(C,TS)*100>=5,0.5) AND BETWEEN(TS,1,5); TJ2:=CROSS((C-REF(C,TS))/REF(C,TS)*100<=-3,0.5) AND BETWEEN(TS,1,5); TJ3:=COUNT(TJ1 OR TJ2,5)=0 AND TS=5; 买入:IF(ZT,C,DRAWNULL),COLORRED; 止盈:IF(TJ1,C,DRAWNULL),COLORYELLOW; 止损:IF(TJ2,C,DRAWNULL),COLORGREEN; 平仓:IF(COUNT(TJ1 OR TJ2,5)=0 AND TS=5,C,DRAWNULL),COLORWHITE; DRAWKLINE(HIGH,OPEN,LOW,CLOSE); STICKLINE(ZT,O,C,1,0),COLORRED; STICKLINE(TJ1,O,C,1,0),COLORYELLOW; STICKLINE(TJ2,O,C,1,1),COLORGREEN; STICKLINE(TJ3,O,C,1,0),COLORWHITE;