Rss & SiteMap

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

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

标题:语句未尾缺少分号

1楼
wiffrey 发表于:2012/5/10 17:01:43

 

加入到教程提示  

 

“语句未尾缺少分号”

       

variable:a=0;

 

if con1 and holding=0 then beign

buy(1,1,market);

a:=h;

end

if h>a then sell(holding>0,0,market);


 

例三:30分钟翻转系统

//《日内30分钟翻转系统》

//适用于1分钟周期

//编写日期:20100812-JYL


 

//准备需要的中间变量

h30 := ref(hhv(h,30),1);

l30 := ref(llv(l,30),1);


 

//建立多头的进场条件

long := h>h30 and time>093000 and time<145000;


 

if long then

begin

sellshort(holding < 0, 0, limitr, h30);

buy(holding = 0, 1, limitr, h30);

end


 

//画出多头的止损线

partline(holding>0, l30,colorred);


 

//开空条件

short := l < l30 and time > 093000 and time < 145000;


 

if short then

begin

sell(holding > 0, 0, limitr, l30);

buyshort(holding = 0, 1, limitr, l30);

end


 

//画出空头的止损线

partline(holding<0, h30, colorgreen);


 

//收盘前5分钟平仓

if time > 145500 then

begin

sell(holding > 0, 0, thisclose);

sellshort(holding < 0, 0, thisclose);

end

 

2楼
just 发表于:2012/5/10 17:08:49

if con1 and holding=0 then beign

这里的begin重新用英文状态下输入一次
3楼
Leon 发表于:2012/5/10 17:08:52

con1楼主没定义,我假定con1:=1;

variable:a=0;
con1:=1;
if con1 and holding=0 then

begin
buy(1,1,market);

a:=h;

end

if h>a then sell(holding>0,0,market);

//《日内30分钟翻转系统》

//适用于1分钟周期

//编写日期:20100812-JYL


 

//准备需要的中间变量

h30 := ref(hhv(h,30),1);

l30 := ref(llv(l,30),1);


 

//建立多头的进场条件

long := h>h30 and time>093000 and time<145000;


 

if long then

begin

sellshort(holding < 0, 0, limitr, h30);

buy(holding = 0, 1, limitr, h30);

end


 

//画出多头的止损线

partline(holding>0, l30,colorred);


 

//开空条件

short := l < l30 and time > 093000 and time < 145000;


 

if short then

begin

sell(holding > 0, 0, limitr, l30);

buyshort(holding = 0, 1, limitr, l30);

end


 

//画出空头的止损线

partline(holding<0, h30, colorgreen);


 

//收盘前5分钟平仓

if time > 145500 then

begin

sell(holding > 0, 0, thisclose);

sellshort(holding < 0, 0, thisclose);

end

 

4楼
wiffrey 发表于:2012/5/10 17:36:29

谢谢

 

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


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