MultiCharts資料整理

程式/文件下載: http://www.multicharts.com.tw/MCDownLoad.aspx

Sample Code

[intrabarordergeneration = true];
Inputs: pStrategyName("Rex_01");
Vars: intrabarpersist vnowPosition(0), vprePosition(0);
Vars: intrabarpersist vStr("");

if currentbar = 1 then FileDelete("D:\" + pStrategyName);
vprePosition = vnowPosition;
vnowPosition = i_MarketPosition*i_CurrentContracts;
print(numtostr(vprePosition,0) + ", " + numtostr(vnowPosition,0));
if vnowPosition <> vprePosition then 
begin
	vStr = numtostr(year(date)+1900,0) +"/" + numtostr(month(date),0) + "/" + numtostr(dayofmonth(date),0) + " " + numtostr(time_s,0)
		  + " " + numtostr(vnowPosition,0) + " " + numtostr(Close,0)
		  + NewLine;
//		FileDelete("r:\" + StrategyName);
//		FileAppend("r:\" + pStrategyName, vStr);
	print(vStr);
end;