Author |
Topic: Remoting events (5 messages, Page 1 of 1) |
||||
---|---|---|---|---|---|
Moderators: VPfau | |||||
DBrubaker673 Posts: 55 Joined: Jul 18, 2007 |
When my remote application uses remoting into another main application of mine, OnBarsReceived and OnTicksReceived events in the remote application can receive both bars and ticks subscribed to in the main application.
But when I try to remote into the OEC Trader software (with Remoting Enabled), I receive bars in the OnBarsReceived event but I've been unable to receive ticks into the OnTicksReceived event. This is true even when I'm showing a tick chart in OEC Trader. It is true even if my remote application does a SubscribeTicks() on the contract. Any help you can provide will be GREATLY appreciated. Thanks, Dale Dale |
||||
SergeK -Developer- Posts: 475 Joined: Jan 26, 2007 |
We will research that problem and get back to you as soon as possible.
|
||||
SergeK -Developer- Posts: 475 Joined: Jan 26, 2007 |
Our developer did not find any problem with OnTicksReceived event in remoting - please check your code.
our code sample: void __stdcall CCppCOMSampleDlg::OnTicksReceived(LPDISPATCH /* ISubscription*/ Subscription, LPDISPATCH /* ITicks*/ Ticks) { OECAPICOM::ITicksPtr ticks = Ticks; CComSafeArray<float> prices(ticks->Prices); log << "Ticks received: " << std::endl; for(int i=0; i<prices.GetCount(); ++i) { double price = prices.GetAt(i); log << " " << price << std::endl; } } |
||||
DBrubaker673 Posts: 55 Joined: Jul 18, 2007 |
That's helpful, but I'm working in C# not C++. Will that make a difference? Could I see a code sample in C#?
Thanks, Dale Dale |
||||
SergeK -Developer- Posts: 475 Joined: Jan 26, 2007 |
the code is simple:
private void client_OnTicksReceived( OEC.API.Subscription Subscription, OEC.API.Ticks Ticks ) { Console.WriteLine( String.Format( "{0} : {1} ticks", Subscription.Contract, Ticks.Prices.Length ) ); } private void client_OnBarsReceived( OEC.API.Subscription Subscription, OEC.API.Bar[] Bars ) { Console.WriteLine( String.Format( "{0} : {1} Bars", Subscription.Contract, Bars.Length ) ); } both of the events are called fine in my sample with remoting. Please check your code. |
||||