手数:=ss,NODRAW;
//交易系统
平空:SELLSHORT(买点,手数,MARKET),NODRAW;
平多:SELL(卖,手数,MARKET),NODRAW;
开多:BUY(买,手数,MARKET),NODRAW;
开空:BUYSHORT(卖,手数,MARKET),NODRAW;
//移动止损部分************************
//求出持仓以来的最高价或最低价,通过与当前价做比较,判断资金回落的幅度
DTYDZS:=(HHV(H,ENTERBARS)-CLOSE)/AVGENTERPRICE>=0.1;
KTYDZS:=(CLOSE-LLV(L,ENTERBARS))/AVGENTERPRICE>=0.1;
SELL(DTYDZS,0,MARKET),NODRAW;
SELLSHORT(KTYDZS,0,MARKET),NODRAW;
//*************************************
//下单
SELL(卖,0,MARKET),NODRAW;
SELLSHORT(买点,0,MARKET),NODRAW;
BUY(买点,3%,MARKET),NODRAW;
BUYSHORT(卖,3%,MARKET),NODRAW;
//其他
当前持仓:HOLDING,COLORred,LINETHICK0,NODRAW;
当前资产:ASSET,NOAXIS,COLORyellow,NODRAW;