COCO研究院

 找回密碼
 註冊
搜索
查看: 2407|回復: 6

編譯時這是哪裡出錯

[複製鏈接]
發表於 17-7-17 07:52 | 顯示全部樓層 |閱讀模式
syntax error, 'If' condition must be followed by a logical expression
line 7, column 0

----------------------------------------------------------------------------------

input:len1(40),len2(3);
vars:VH(0);
value1=BollingerBand(close,len1,len2);
value2=Average(close,len1);
value3=BollingerBand(close,len1,-len2);

if data[0]<>data[1] then begin VH=99999;
end;

If time>0900 and time<1300 and EntriesToday(data)<=0 then begin;
If L<value2 then VH=H;
IF value2-value3>10 and value2-value3<50 and value2-value2[1]<0 then buy next bar next bar at VH+1 stop;
end;





發表於 17-7-17 09:20 | 顯示全部樓層
這行

If time>0900 and time<1300 and EntriesToday(data)<=0 then begin;

begin 後面不應該有分號
 樓主| 發表於 17-7-17 12:02 | 顯示全部樓層
flashbibby 發表於 17-7-17 09:20
這行

If time>0900 and time

感謝大大>"<                                                                              
 樓主| 發表於 17-7-17 21:37 | 顯示全部樓層
flashbibby 發表於 17-7-17 09:20
這行

If time>0900 and time

刪了還是依樣ORZ.............
發表於 17-7-17 22:32 | 顯示全部樓層
是不是 "date"  ?
日期<>前一天日期  嗎?
發表於 17-7-19 18:05 | 顯示全部樓層
你要的是Date吧~打成Data了~
這樣不知道是不是你要的~
錯的地方不少~多多練習吧~加油~

==========

inputs:
        len1(40),
        len2(3);
vars:
        VH(0);

value1 = BollingerBand(close,len1,len2);
value2 = Average(close,len1);
value3 = BollingerBand(close,len1,-len2);

if (date[0]<>date[1]) then begin
        VH=99999;
end;

If (time > 0900 and time < 1300 and EntriesToday(date) <= 0) then begin
        If (L < value2) then VH=H;
        IF (value2 - value3 > 10 and value2 - value3 < 50 and value2 - value2[1] < 0) then buy next bar at (VH+1) stop;
end;
 樓主| 發表於 17-7-19 20:10 | 顯示全部樓層
apollochung 發表於 17-7-19 18:05
你要的是Date吧~打成Data了~
這樣不知道是不是你要的~
錯的地方不少~多多練習吧~加油~

感謝大大>"<                                                               
您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則

手機版|Archiver|站長信箱|廣告洽詢|COCO研究院

GMT+8, 24-4-24 13:55

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回復 返回頂部 返回列表
理財討論網站 | AI繪圖AI超擬真美女AI beauty AI Stable DiffusionAI正妹AI Lookbook