Hello! I am writing application on C#. To get real time data for one currency I writing this:
AdxRtList.Source = "IDN"; AdxRtList.RegisterItems("GPB=", "BID"); AdxRtList.StartUpdates(RT_RunMode.RT_MODE_ONUPDATE);
and this
void adxRtList_OnUpdate(string a_itemName, object a_userTag, RT_ItemStatus a_itemStatus) { //use item name to get the data object temp = AdxRtList.get_ListFields(a_itemName, RT_FieldRowView.RT_FRV_ALL, RT_FieldColumnView.RT_FCV_VALUE); object[,] l_fields = (object[,])Convert.ChangeType(temp, typeof(object[,])); label5.Text = a_itemName + ": " + l_fields[0, 1]; AdxRtList.StopUpdates(); }
But I need to get data for 30 currencies, how can I do it? I tried to write
AdxRtList.RegisterItems("GPB=, AUD=, RUB=", "BID");
but it doesn't work.
I found solution - simple array =)
Hi @aidynchik_84, you are correct! We would support a variant or a param array both for the list of instruments or the list of fields.
Hi @zhenyakovalyov
Tell me please when I can stop AdxRtList updates? I need to launch AdxRtList only once, and then I need to stop it. But I can't do that on adxRtList_OnUpdate, because I don't know how many currencies did I get
I wrote as you said
AdxRtList.StartUpdates(RT_RunMode.RT_MODE_IMAGE); .... void adxRtList_OnImage(RT_DataStatus a_itemStatus) { //use item name to get the data string a_itemName = ""; object temp = AdxRtList.get_ListFields(a_itemName, RT_FieldRowView.RT_FRV_ALL, RT_FieldColumnView.RT_FCV_VALUE);
now I'm getting an error {"ERROR #360f - AdxRtList : invalid item "} on
object temp = AdxRtList.get_ListFields(a_itemName, RT_FieldRowView.RT_FRV_ALL, RT_FieldColumnView.RT_FCV_VALUE);
according to your code, a_itemName is an empty string, it should be a RIC, for instance:
object temp = AdxRtList.get_ListFields("RUB=", RT_FieldRowView.RT_FRV_ALL, RT_FieldColumnView.RT_FCV_VALUE);