要求1.最重要的止损,是否能实现。
2.是否是按95%的资金量来开仓。
3.是否全部平仓。
4.是否是按信号发出后的市场价开单。
5.同一K线不反复开仓,但不影响平仓(即止损单不影响)
SELLSHORT((PK=1 ) ,holding,thisclose); //平空信号
SELL((PD=1) ,holding,thisclose; //平多信号
BUY(KD=1 AND HOLDING=0 and exitbars=-1,%95,thisclose);
BUY(KD=1 and exitbars>0 AND HOLDING=0,595,thisclose);
//开多信号
BUYSHORT(KK=1 AND HOLDING=0 and exitbars=-1,%95, thisclose); //开空信号
BUYSHORT(KK=1 and exitbars>0 AND HOLDING=0,%95,thisclose);
要求1.最重要的止损,是否能实现。
2.是否是按95%的资金量来开仓。
3.是否全部平仓。
4.是否是按信号发出后的市场价开单。
5.同一K线不反复开仓,但不影响平仓(即止损单不影响)
sellshort((close-enterprice>3.2 and holding<>0) ,holding,thisclose);
SELLSHORT((PK=1 ) ,holding,thisclose); //平空信号
SELL((enterprice-close>3.2 and holding<>0) ,holding,thisclose);
SELL((PD=1) ,holding,thisclose; //平多信号
BUY(KD=1 AND HOLDING=0 and exitbars=-1,%95,thisclose);
BUY(KD=1 and exitbars>0 AND HOLDING=0,%95,thisclose);
//开多信号
BUYSHORT(KK=1 AND HOLDING=0 and exitbars=-1,%95, thisclose); //开空信号
BUYSHORT(KK=1 and exitbars>0 AND HOLDING=0,%95,thisclose);
[此贴子已经被作者于2013-5-22 16:36:01编辑过]
恩,那个是作比较吗?我的原意是做多时,进入价-市场价只要超过3.2点就平仓。难道我写的那个是比较?不对,那个其实也是你们QQ上的客服给我写的。。。
目前是标准版用户了,模拟应该可以执行止损命令了吧。
先跑一下模拟,代码的正确并不一定能保证交易一定没有问题