Rss & SiteMap

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

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

标题:反手条件不同怎么改

1楼
LCY 发表于:2015/3/23 12:47:01

我的意思是:不是反手的开多条件是h>hi,平空条件h>hi,平空后反多条件h>hi+2;不是反手的开空条件

是 l<lo,平多条件l<lo,平多后反空条件l<lo-2;这样上面那模型1请问老师如何修改

 

 下载信息  [文件大小:   下载次数: ]
点击浏览该文件:反手条件不同怎么改.doc

2楼
jinzhe 发表于:2015/3/23 13:04:29

if h>hi then buy(holding=0,1,market);

if h>hi then sellshort(1,0,market);

if H>hi+2 then begin

    sellshort(1,0,market);

    buy(holding=0,1,market);

end

 

开空的写法一样

3楼
LCY 发表于:2015/3/25 21:18:01
对不起 ,可能我没讲清楚。老师完全没有理解我的意思!
(1楼附图之公式,其平开的反手条件是一样的)。
我的意思是对1楼附图之公式用反手条件不一样进行改写,老师连1楼图都没有打开过!
4楼
jinzhe 发表于:2015/3/26 9:03:23

那不就是我上面写的意思?你要反手就写一起,不要反手就拆开写

你代码里面一共4段都是反手语句,你按照我上面罗列出来的改改就行

5楼
LCY 发表于:2015/3/26 12:15:03
我是来求具体答案的。老师理解了我的意思了,请老师给出具体修改后的公式,谢谢。
6楼
jinzhe 发表于:2015/3/26 13:35:03
 

if cc1>0 and l<lo then begin

 pc:=min(max(holding,0),cang1);

  if pc>0 then sell(1,pc,limitr,min(o,lo-0.2)-0.6);

 end

 

if cc1>0 and l<lo then begin

  kc:=cang1-pc;

 if pc>0 then sell(1,pc,limitr,min(o,lo-0.2)-0.6);

 if kc>0 then buyshort(1,kc,limitr,min(o,lo-0.2)-0.6);

 cc1:=0;

goto skip@;

end

 

 

if cc1>0 and l<lo-2 then begin

 pc:=min(max(holding,0),cang1);

 kc:=cang1-pc;

 if pc>0 then sell(1,pc,limitr,min(o,lo-0.2)-0.6);

 if kc>0 then buyshort(1,kc,limitr,min(o,lo-0.2)-0.6);

 cc1:=0;

goto skip@;

end

 

第一段的反手,就是这样改,你照着改下面的3段反手即可

7楼
LCY 发表于:2015/3/26 21:03:19
谢谢。
8楼
LCY 发表于:2015/3/29 20:55:30
客服老师你好,按照你的意思,结果达不到。(反手的条件与平仓的条件还是一样!)
9楼
jinzhe 发表于:2015/3/30 9:22:00

if cc1>0 and l<lo then begin

  kc:=cang1-pc;

  if kc>0 then buyshort(1,kc,limitr,min(o,lo-0.2)-0.6);

 cc1:=0;

goto skip@;

end


 

if cc1>0 and l<lo then begin

 pc:=min(max(holding,0),cang1);

  if pc>0 then sell(1,pc,limitr,min(o,lo-0.2)-0.6);

 end


 

if cc1>0 and l<lo-2 then begin

 pc:=min(max(holding,0),cang1);

 kc:=cang1-pc;

 if pc>0 then sell(1,pc,limitr,min(o,lo-0.2)-0.6);

 if kc>0 then buyshort(1,kc,limitr,min(o,lo-0.2)-0.6);

 cc1:=0;

goto skip@;

end

10楼
LCY 发表于:2015/3/31 20:20:51
客服老师你好,
好像仍然不行。你试了吗?
共11 条记录, 每页显示 10 条, 页签: [1] [2]


Powered By Dvbbs Version 8.3.0
Processed in 0.04102 s, 4 queries.