GetRealTimeValue

獲取指定商品的即時最佳買賣價、成交價與成交量等價量資訊

語法

GetRealTimeValue(Symbol_Name,Quote_Field);

範例

列印商品 CME.GC HOT 的報價資訊

once cleardebug;
array:aGetRealTimeValue[100,1](0);
var:indexQ(0);

for indexQ = 2 to 60 begin
	aGetRealTimeValue[indexQ,0] = indexQ;
	aGetRealTimeValue[indexQ,1] = GetRealTimeValue("CME.GC HOT",indexQ);
end;

for indexQ = 2 to 60 begin
switch(indexQ)
begin
case 2:
	print(d," ",t,",Index=",indexQ,", QTime   = ",aGetRealTimeValue[indexQ,1]+8*10000);
case 4,6,16,40,60:
	print(d," ",t,",Index=",indexQ,", Qvolume = ",aGetRealTimeValue[indexQ,1]);
case 3,5,8,9,10,12,15,16,30,50:
	print(d," ",t,",Index=",indexQ,", Qprice  = ",aGetRealTimeValue[indexQ,1]);
end;
end;

輸出結果

1200214.00 1800.00,Index=   2.00, QTime   = 170433.00
1200214.00 1800.00,Index=   3.00, Qprice  = 1578.60
1200214.00 1800.00,Index=   4.00, Qvolume =    3.00
1200214.00 1800.00,Index=   5.00, Qprice  =   -0.20
1200214.00 1800.00,Index=   6.00, Qvolume = 55362.00
1200214.00 1800.00,Index=   8.00, Qprice  = 1579.00
1200214.00 1800.00,Index=   9.00, Qprice  = 1581.20
1200214.00 1800.00,Index=  10.00, Qprice  = 1576.00
1200214.00 1800.00,Index=  12.00, Qprice  = 1578.80
1200214.00 1800.00,Index=  15.00, Qprice  = 1578.80
1200214.00 1800.00,Index=  16.00, Qvolume = 264293.00
1200214.00 1800.00,Index=  30.00, Qprice  = 1578.50
1200214.00 1800.00,Index=  40.00, Qvolume =   32.00
1200214.00 1800.00,Index=  50.00, Qprice  = 1578.60
1200214.00 1800.00,Index=  60.00, Qvolume =    5.00

參數

欄位代碼表

僅限即時報價獲取,無歷史資料。

Last updated