Rss & SiteMap

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

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

标题:请教大家几个止损条件的写法

1楼
threefootcat 发表于:2015/2/12 23:02:17
  1. 目标周期在开仓后 10 周期后,无论涨跌都平仓 
  2. 目标利润:在开仓后利润率到 15% 平仓 
  3. 最大损失 :在开仓后,损失达到 6% 平仓 
  4. 横盘平仓 : 与开仓后相比在 8 周期内有利幅度小于 4% 平仓
  5. 回吐平仓:与开仓利润相比,最高价位回吐 8% 平仓 
  6. 资产平仓:浮动亏损占总资产 20% 后全部平仓
2楼
jinzhe 发表于:2015/2/13 8:55:12

1 if enterbars>10 then begin

    sell(1,0,marketr);

    sellshort(1,0,marketr);

   end

 

2 此测评功能无法用代码实现

 

3 if holding>0 and (enterprice-c)/c>0.06 then sell(1,0,marketr);

   if holding<0 and (c-enterprice)/enterprice>0.06 then sellshort(1,0,marketr);

 

4 此测评功能无法用代码实现

 

5 if holding>0 and (hhv(h,enterbars+1)-c)/c>0.08 then sell(1,0,marketr);

   if holding<0 and (c-llv(l,enterbars+1))/llv(l,enterbars+1)>0.08  then sellshort(1,0,marketr);

 

6 if openprofit<0 and abs(openprofit)/asset>0.2 then begin

      sell(1,0,marketr);

      sellshort(1,0,marketr);

  end

共2 条记录, 每页显示 10 条, 页签: [1]


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