 |
taiwanyang121
資深會員
註冊日期: Sep 2009
來 自: 台北市
文章數量: 221 |
[問題]為何語法錯誤
多進:=(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;
|
|
向版主報告此篇 |  |
|
2010-08-31 12:52 |
|
|
|  |
 |
cgjj
總版主

註冊日期: Oct 2003
來 自:
文章數量: 18091 |
回覆: [問題]為何語法錯誤
引用: 最初由 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;
islastbar and mod(Time, 2) 結果是數列, 不是單值
故無法直接帶入 if ... then 之中
|
|
向版主報告此篇 |  |
|
2010-08-31 12:55 |
|
|
|  |
本站所有內容未經作者授權禁止轉貼節錄, 發表言論僅供參考勿作為投資決策依據。瀏覽本站請使用 IE 5.5 以上版本, 最佳瀏覽解析度 1024 x 768 全彩。
|
Powered by: vBulletin Version 2.3.0 - Copyright©2000-, Jelsoft Enterprises Limited.
簡愛洋行 製作 Copyright 2003-. All Rights Reserved. 聯絡我們
|