Rss & SiteMap

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

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

标题:求助,有些崩溃了

1楼
zm71212302 发表于:2014/5/8 10:14:25

//开仓部分
持仓:=holding;
GLOBALVARIABLE:biaoji=0;
GLOBALVARIABLE:zuigao=0;
GLOBALVARIABLE:zuidi=0;
if dynainfo(7)-tenterprice>50 and THOLDING2>0 and biaoji=0 then begin
     zuigao:=HIGH;
     biaoji:=1;
end
if HIGH>zuigao and THOLDING2>0 then zuigoa:=HIGH;
if LOW<zuigao-1 and THOLDING2>0 then begin
 tsell(1,0,mkt);
 biaoji:=0;
end
if tenterprice-dynainfo(7)>50 and THOLDING2<0 and biaoji=0 then begin
 zuidi:=LOW;
 biaoji:=1;
     end
 if LOW<zuidi and THOLDING2<0 then zhuidi:=LOW;
 if HIGH>zuidi-1 and THOLDING2<0 then begin
 tsellshort(1,0,mkt);
 biaoji=0;
 end

 

//一开仓就平单,要命了

[此贴子已经被作者于2014/5/8 10:14:42编辑过]
2楼
jinzhe 发表于:2014/5/8 10:22:10

if HIGH>zuigao and THOLDING2>0 then zuigoa:=HIGH;

加粗的这个写错了,导致全局变量没有赋值正确

持仓用holding是不对的,后台的是tholding

3楼
zm71212302 发表于:2014/5/9 9:01:17

谢谢,我这粗心的,呵呵

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


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