Rss & SiteMap

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

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

标题:关于止盈止损触发价的问题

1楼
he3617 发表于:2013/7/17 15:50:40

论坛高手们,我想知道我下面写的止盈止损的交易价格是当周的收盘价还是触发价格?测试的时候是按照哪个价格?

 

VARIABLE:maxprofit=0;
win:=0;
win2:=0;

if holding>0 and enterbars>0 then begin
    win:=c-enterprice;
    if win>maxprofit then
     maxprofit:=win;
     win2:=(maxprofit-win)/maxprofit*100;
   end
     if holding>0 and enterbars>0 then begin
   多止损:sell(win<=-10,0);
   多止盈:sell(maxprofit>20 and win2>=60 and openprofit>0,0);
  end

  if holding<0 and enterbars>0 then begin
    win:=enterprice-c;
    if win>maxprofit then
    maxprofit:=win;
    win2:=(maxprofit-win)/maxprofit*100;
  end
  if holding<0 and enterbars>0 then begin
    空止损:sellshort(win<=-10,0);
    空止盈:sellshort(maxprofit>20 and win2>=60 and openprofit>0,0);
   end  

2楼
jinzhe 发表于:2013/7/17 15:51:44

这个写法是偷懒不推荐使用的写法,

这样的写法是按照市价下单,测评时是当周期收盘价

 

3楼
he3617 发表于:2013/7/17 15:56:18
您推荐用怎么写?请指点,谢谢!
4楼
he3617 发表于:2013/7/17 16:01:32
还有有什么办法可以让止盈止损的测试也采用触发价格,这样是不是会更真实一点?
共4 条记录, 每页显示 10 条, 页签: [1]


Powered By Dvbbs Version 8.3.0
Processed in 0.01514 s, 2 queries.