Rss & SiteMap

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

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

标题:老师,看一下

1楼
么么 发表于:2015/11/2 9:10:36
time>tt1+15
这个是一天的周期吗,老师??
2楼
jinzhe 发表于:2015/11/2 9:14:24

请结合一下实际情况说明问题,

这样的问题细节太少无法回答

3楼
么么 发表于:2015/11/2 9:17:25
if c<oo-80*DYNAINFO(208) and n3=0 and time>tt3+15 then begin
tbuy(1,44,mkt);
n3:=1;
tt3>time;
end
源码就是这样的
4楼
jinzhe 发表于:2015/11/2 9:20:05
那么就请咨询下写这代码的人,实在是看不出time>tt3+15 和 一天周期之间有什么相关性
5楼
么么 发表于:2015/11/2 9:22:25
低于开盘价80跳,买入44手,并且这一天内只成交这一次
6楼
jinzhe 发表于:2015/11/2 9:40:31

这个需要全局变量来控制,一天一次

GLOBALVARIABLE:n=0,tt=0;

if l<open-80*mindiff and n=0 and time<>tt  then begin

   tbuy(1,1,mkt);

   n:=1;

   tt:=time;

end

 

然后代码最后要写上这个,重置变量

if time=closetime(0) then begin

    n:=0;

    tt:=0;

end

[此贴子已经被作者于2015/11/2 9:40:39编辑过]
7楼
么么 发表于:2015/11/2 9:56:03
GLOBALVARIABLE:n1=0,n2=0,n3=0;
GLOBALVARIABLE:tt1=0,tt2=0,tt3=0;
oo:=VALUEWHEN(todaybar=1,o);

if l<open-20*mindiff and n1=0 and time<>tt1  then begin
   tbuy(1,11,mkt);
   n1:=1;
   tt1:=time;
end
 
if c<oo-60*mindiff and n2=0 and time<>tt2 then begin
 tbuy(1,22,mkt);
 n2:=1;
 tt2:=TIME;
END
 
if c<oo-80*mindiff and n3=0 and time<>tt3 then begin
tbuy(1,44,mkt);
n3:=1;
tt3:=time;
end
if time=closetime(0) then begin
n:=0;
tt:=0;
end
是这样的是吗,老师?、
8楼
jinzhe 发表于:2015/11/2 10:12:52
if time=closetime(0) then begin
n1:=0;
n2:=0;
n3:=0;
tt1:=0;
tt2:=0;
tt3:=0;
end
9楼
么么 发表于:2015/11/2 10:57:09
老师,比如一个策略上面有三个平多条件,第一个写成PD,第二个写成PD2,滴三个写成PD3,可以吗??
10楼
jinzhe 发表于:2015/11/2 10:58:13
可以,这个没有强制性的写法,自己理解就行
共10 条记录, 每页显示 10 条, 页签: [1]


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