Rss & SiteMap

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

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

标题:求助:引用的括号不完整

1楼
wood3559 发表于:2012/10/11 9:48:34
你好,我在编写一下公式时通不过编译,还请帮忙看看。

ratio:=....

If Position=0 and BARPOS>N Then Begin

//建立多头进场条件
Long := ratio>0;
if long then begin
myEntryPrice:=close;
buy( 1,PosNum,limitr,myEntryPrice);
Position:= 1 ;
int_stoploss:=close-p*atr*MULTIPLIER;
barNum:=BARPOS;
end 

//建立空头进场条件
Short := ratio < 0 ;
if short and Position=0 then begin
myEntryPrice:=close;
buyshort(1,PosNum,limitr,myEntryPrice);
Position := -1 ;
int_stoploss:=close+p*atr*MULTIPLIER;
barNum:=BARPOS;
end
End  //If

显示的问题是“引用的括号不完整”。我仔细看了下,也就buy和buyshort中引用了括号,但也是按照公式引用的。
实在找不到问题所在,还请帮助。多谢
2楼
董小球 发表于:2012/10/11 10:04:37
你的END 后面要加分号啊
3楼
wood3559 发表于:2012/10/11 10:11:28
多谢,果然是这个问题。。。
共3 条记录, 每页显示 10 条, 页签: [1]


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