你好,我在编写一下公式时通不过编译,还请帮忙看看。
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中引用了括号,但也是按照公式引用的。
实在找不到问题所在,还请帮助。多谢