假如 “BK” 为买入开仓信号,“SP”为卖出平仓信号。
如果BK后,价格跌下去了,我想在买入开仓点位向下跌N个点止损。
请问如何写该语句?我是菜鸟,请详细点表示,谢谢。
tt0:=time<145000;
tt2:=time>145700;//收盘时间
Price:=AVGENTERPRICE;
SELLSHORT(tt0 and BK and 持仓<0,持仓,market);
SELLSHORT(tt0 and 持仓<0,持仓,Stopr,Price+N);
BUY(tt0 and BK and NOT(TYPE(1)=1),20%,market);
SELL(tt0 and SK and 持仓>0,持仓,market);
SELL(tt0 and 持仓>0,持仓,Stopr,Price-N);
BUYSHORT(tt0 and SK and NOT(TYPE(1)=3),20%,market);