![]() |
在這個頁面顯示本主題全部的 3 個文章 |
奇狐社區論壇 (http://www.chiefox.com.tw/bbs/index.php)
- 問題交流 (http://www.chiefox.com.tw/bbs/forumdisplay.php?forumid=28)
-- [問題]為何語法錯誤 (http://www.chiefox.com.tw/bbs/showthread.php?threadid=14219)
[問題]為何語法錯誤
多進:=(CK03 AND DATE>=STDATE OR BARPOS=0),COLORRED;
空進:=(CK04 AND DATE>=STDATE OR BARPOS=0),COLORGREEN;
進出:=C*0,COLORWHITE;
多空:=0; //1.多 -1.空 0.無
進價:=0; CC1:=C;
進向:=多進-空進;
盈虧:C*0,LINETHICK COLORYELLOW;
for i= 1 to datacount do begin
if 多空=0 then begin
多空:=進向[i]; 進出[i]:=多空;
if 多空<>0 then 進價:=CC1[i];
end else if 多空<>0 then begin
if 多空<>進向[i] and 進向[i]<>0 then begin
盈虧[i]:=(CC1[i]-進價)*多空;
進出[i]:=-多空*2; 多空:=-多空; 進價:=CC1[i];
end;
end;
end;
If islastbar and mod(Time, 2) <> 0 then begin
cur_cmd:=Numtostr(YEAR,0)+ '/'+Numtostr(MONTH,0)+'/'+Numtostr(DAY,0) + ' ' +Numtostr(HOUR,0)+':'+Numtostr(MINUTE,0)+':00'+' 1 F TXF 0 '+Numtostr(進向,0)+' '+ Numtostr(C,0);
<%
on error resume next
Dim fso, MyFile
cur_cmd= FFL.VarData("cur_cmd")
Set fso = CreateObject("Scripting.FileSystemObject")
Set MyFile = fso.CreateTextFile("C:\cur_cmd.txt", True)
MyFile.WriteLine(cur_cmd)
MyFile.Close
err.clear
%>
end;
回覆: [問題]為何語法錯誤
引用:
最初由 taiwanyang121 發表
多進:=(CK03 AND DATE>=STDATE OR BARPOS=0),COLORRED;
空進:=(CK04 AND DATE>=STDATE OR BARPOS=0),COLORGREEN;
進出:=C*0,COLORWHITE;
多空:=0; //1.多 -1.空 0.無
進價:=0; CC1:=C;
進向:=多進-空進;
盈虧:C*0,LINETHICK COLORYELLOW;
for i= 1 to datacount do begin
if 多空=0 then begin
多空:=進向[i]; 進出[i]:=多空;
if 多空<>0 then 進價:=CC1[i];
end else if 多空<>0 then begin
if 多空<>進向[i] and 進向[i]<>0 then begin
盈虧[i]:=(CC1[i]-進價)*多空;
進出[i]:=-多空*2; 多空:=-多空; 進價:=CC1[i];
end;
end;
end;
If islastbar and mod(Time, 2) <> 0 then begin
cur_cmd:=Numtostr(YEAR,0)+ '/'+Numtostr(MONTH,0)+'/'+Numtostr(DAY,0) + ' ' +Numtostr(HOUR,0)+':'+Numtostr(MINUTE,0)+':00'+' 1 F TXF 0 '+Numtostr(進向,0)+' '+ Numtostr(C,0);
<%
on error resume next
Dim fso, MyFile
cur_cmd= FFL.VarData("cur_cmd")
Set fso = CreateObject("Scripting.FileSystemObject")
Set MyFile = fso.CreateTextFile("C:\cur_cmd.txt", True)
MyFile.WriteLine(cur_cmd)
MyFile.Close
err.clear
%>
end;
試試這樣看是否為您要的結果
TT:=time; TT:=TT[datacount];
PP:=barpos; PP:=PP[datacount];
If PP=datacount and mod(TT, 2) <> 0 then begin
全部時間均為台灣時間, 現在時間為05:39 | 在這個頁面顯示本主題全部的 3 個文章 |
Powered by: vBulletin Version 2.3.0 - Copyright©2000-, Jelsoft Enterprises Limited.
簡愛洋行 製作 Copyright 2003-. All Rights Reserved.