比如现在买了手上涨,然后涨了10个点不涨了开始下跌,跌了5个点 止盈
涨多少个点不限制,但是下跌回撤5个点就立刻平仓
hh:=hhv(h,enterbars+1);//开多后的最高价
ll:=llv(l,enterbars+1);//开空后的最高价
if hh-c>5 and holding>0 then sell(1,holding,marketr);//(开仓后的最高价-最新价)>=5就平多
if c-ll>5 and holding<0 then sellshort(1,holding,marketr);//(最新价-开仓后的最低价)>=5就平仓
比如我5日均线上穿10日均线买了上涨,再把语句加进去,应该是什么样子的?
CROSS(ma(c,5),ma(c,10));//5日上穿10日
如果需要放到条件终止语句中,你可以需要用and 或者or 将各个条件连接在一起。
and 是并且,or是或者,根据自己的需求使用