Rss & SiteMap

金字塔客服中心 - 专业程序化交易软件提供商 http://www.weistock.com/bbs/

专业程序化软件提供商
共2 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:K线走完模式,止损单没有触发

1楼
clivelong 发表于:2012/3/8 10:30:37
帮忙看看这个  K线走完模式,但我想盘中及时的触发止损,但止损但单没有盘中触发,而是等待K线走完了才下单,看看怎么改才能及时触发止损
 
stoploss:=15;

ma1:ma(c,5);
ma2:ma(c,10);

longcond:=cross(ma1,ma2) ;
shortcond:=cross(ma2,ma1);

 sell(holding>0 and L<enterprice-stopLoss,0,limitr,enterprice-stopLoss),orderqueue;

 sellshort(holding<0 and h>enterprice+stopLoss,0,limitr,enterprice+stopLoss),orderqueue;

if shortcond then begin
  sell(1,1,thisclose);
  buyshort(1,1,thisclose);
end

if longcond then begin
  sellshort(1,1,thisclose);
  buy(1,1, thisclose);
end

hold:holding,noaxis ,linethick0 ;

 
[此贴子已经被作者于2012-3-8 10:31:36编辑过]
2楼
阿火 发表于:2012/3/8 10:37:47
方法见 交易策略发布区 阿火秘笈
共2 条记录, 每页显示 10 条, 页签: [1]


Powered By Dvbbs Version 8.3.0
Processed in 0.03906 s, 3 queries.