欢迎使用金字塔普通技术服务论坛,您可以在相关区域发表技术支持贴。
我司技术服务人员将优先处理 VIP客服论坛 服务贴,普通区问题处理速度慢,请耐心等待。谢谢您对我们的支持与理解。


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → 关于enterprice

   

欢迎使用金字塔普通技术服务论坛,您可以在相关区域发表技术支持贴。
我司技术服务人员将优先处理 VIP客服论坛 服务贴,普通区问题处理速度慢,请耐心等待。谢谢您对我们的支持与理解。    


  共有3255人关注过本帖树形打印复制链接

主题:关于enterprice

帅哥哟,离线,有人找我吗?
leonxu
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:黑侠 帖子:791 积分:856 威望:0 精华:0 注册:2011/11/16 23:34:34
DBVALUE引用错误的问题~  发帖心情 Post By:2012/11/15 10:44:40    Post IP:221.179.30.111[只看该作者]

variable:pp=0;
持仓价:pp,LINETHICK0;
交易。。。。
pp:=enterprice;
结果老是显示持仓价为0?
为什么会这样?
改成 if islastbar then pp:=enterprice;
也不行

 回到顶部
帅哥哟,离线,有人找我吗?
jinzhe
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2012/11/15 11:23:10    Post IP:58.246.57.26[只看该作者]

没有开仓语句?


金字塔—专业程序化交易量化投资平台

客户服务部

----------------------------------------------------------- 欢迎您参加我公司的技术培训,具体培训需求请发邮件到service@weistock.com

您的宝贵建议或者投诉,请发往邮箱:weiwei@weistock.com

 回到顶部
帅哥哟,离线,有人找我吗?
leonxu
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:黑侠 帖子:791 积分:856 威望:0 精华:0 注册:2011/11/16 23:34:34
  发帖心情 Post By:2012/11/15 11:28:55    Post IP:221.179.30.111[只看该作者]

开仓语句不都是正常的吗


 回到顶部
帅哥哟,离线,有人找我吗?
leonxu
  4楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:黑侠 帖子:791 积分:856 威望:0 精华:0 注册:2011/11/16 23:34:34
  发帖心情 Post By:2012/11/15 11:30:52    Post IP:221.179.30.111[只看该作者]

if holding>0 and (sellcond or exittime) then begin
 sell(1,0,market);
 cc:=0;
end
 
if holding<0 and (sellshortcond or exittime) then begin
 sellshort(1,0,market);
 cc:=0;
end

if holding=0 and entertime and buyshortcond then begin
 buyshort(acc or tsellholding(1)>0,1,market);
 if islastbar then extgbdataset('isbook',0);
 cc:=-1;
 maxprofit:=0;
end

if holding=0 and entertime and buycond then begin
 buy(acc or tbuyholding(1)>0,1,market);
 if islastbar then extgbdataset('isbook',0);
 cc:=1;
 maxprofit:=0;
end

if not(islastbar and workmode=3) then exit;

if tholding2=0 and cc>0 and extgbdata('isbook')=0 then begin
 buy(1,1,market);
 if islastbar then pp:=enterprice;
 extgbdataset('isbook',1);
end

if tholding2=0 and cc<0 and extgbdata('isbook')=0 then begin
 buyshort(1,1,market);
 if islastbar then pp:=enterprice;
 extgbdataset('isbook',1);
end


 回到顶部
帅哥哟,离线,有人找我吗?
leonxu
  5楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:黑侠 帖子:791 积分:856 威望:0 精华:0 注册:2011/11/16 23:34:34
  发帖心情 Post By:2012/11/15 12:04:38    Post IP:221.179.30.111[只看该作者]

持仓:holding,LINETHICK0;
variable:cc=0;
runmode:0;
entertime:=time<closetime(0) and time>opentime(1)+100;
exittime:=time>=closetime(0);
buycond:=ref(count(c>o,2)=2,1);
sellcond:=ref(count(c<o,2)=2,1);
acc:=not(islastbar);
if holding>0 and (sellcond or exittime) then begin
 sell(1,5,limitr,o);
 cc:=0;
end

if holding<0 and (buycond or exittime) then begin
 sellshort(1,5,limitr,o);
 cc:=0;
end

if holding=0 and entertime and buycond then begin
 buy(acc or tbuyholding(1)>0,5,limitr,o);
 if islastbar then extgbdataset('isbook',0);
 cc:=5;
end

if holding=0 and entertime and sellcond then begin
 buyshort(acc or tsellholding(1)>0,5,limitr,o);
 if islastbar then extgbdataset('isbook',0);
 cc:=-5;
end

if not(islastbar and workmode=3) then exit;

if tholding2=0 and cc>0 and extgbdata('isbook')=0 then begin
 buy(1,5,limitr,o);
  if islastbar then pp:=enterprice;
 extgbdataset('isbook',1);
end

if tholding2=0 and cc<0 and extgbdata('isbook')=0 then begin
 buyshort(1,5,limitr,o);
  if islastbar then pp:=enterprice;
 extgbdataset('isbook',1);
end


 回到顶部
帅哥哟,离线,有人找我吗?
leonxu
  6楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:黑侠 帖子:791 积分:856 威望:0 精华:0 注册:2011/11/16 23:34:34
  发帖心情 Post By:2012/11/15 12:04:52    Post IP:221.179.30.111[只看该作者]

直接用阿火的程序加了这几句

 回到顶部