API Support Forum
OEC API > API Support > remoting for dummies
Author Topic: remoting for dummies
(16 messages, Page 1 of 1)
Moderators: VPfau
estrader
Posts: 55
Joined: May 04, 2007


Posted: Jun 20, 2010 @ 09:59 AM             Msg. 1 of 16
I am not very experienced with C# so before I invest too much time and effort into it I would like to be sure I understand the concept of 'remoting'.

Let's say I want to be able to write my own trade entry system in C#, will remoting allow me to connect to the api to send orders through OEC trader while it is running?

Basically, does remoting allow me to create my own applications in C# and use them with OEC trader?

Thanks
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Jun 21, 2010 @ 08:24 AM             Msg. 2 of 16
You can suppose that OECAPI and its connections to OEC servers are shared between OEC Trader and your application. Your application can use OECAPI the same way as it would be a standalone application with direct connection to OEC servers. So, yes, remoting will allow you to send orders.

Victor Vins
Software Developer
estrader
Posts: 55
Joined: May 04, 2007


Posted: Jun 27, 2010 @ 04:47 AM             Msg. 3 of 16
I can't make it work. In the Basic example I change

new OEC.API.OECClient(); to OEC.API.OECClient.CreateInstance(true);

Yet every time I log in it disconnects OEC trader.

Form1.Designer.cs is the only place I can find 'new OEC.API.OECClient();' so I assume that is where the change is to be made?

this.oecClient1 = OEC.API.OECClient.CreateInstance(true);
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Jun 29, 2010 @ 10:38 AM             Msg. 4 of 16
Please make sure that Trader allows remoting ("File" top menu, "Allow Remoting" option)

Victor Vins
Software Developer
estrader
Posts: 55
Joined: May 04, 2007


Posted: Jun 30, 2010 @ 04:01 AM             Msg. 5 of 16
Hi Victor, Thanks for replying. I have definitely selected 'Allow Remoting' but it still disconnects. Have I made the change correctly and in the correct place? I am using the BASIC example your site provides.
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Jun 30, 2010 @ 08:30 AM             Msg. 6 of 16
Good morning,

yes, you made changes correctly. But in the past we saw a trouble wth Excel that didn't allow to use remoting technology inside. Probably, this is the case.

Victor Vins
Software Developer
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Jun 30, 2010 @ 08:33 AM             Msg. 7 of 16
Oops, I'm sorry. I thought you talked about Visual Basic :)

So, please check that versions of API.dll are identical in sample and OEC Trader folders

Victor Vins
Software Developer
CChen15
Posts: 121
Joined: Jul 23, 2009


Posted: Jun 30, 2010 @ 10:26 AM             Msg. 8 of 16
Quote: ... But in the past we saw a trouble wth Excel that didn't allow to use remoting technology inside.


In the past? How long is "in the past" you mean?
I'm not able get remoting working not under Excel, not under Access at all.
Long time ago I asked you about it and only now it turns out that it does not work "in the past".
You promised a sample of working VBA code in the next release of API.
New API was realeased, but the cart is still there now (voz i nine tam).
Tell please clear - whether remoting is working under VBA or not?
.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Chen Hua, Russia
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Jun 30, 2010 @ 11:00 AM             Msg. 9 of 16
"In the past" - I meant your issue with Excel.

Victor Vins
Software Developer
CChen15
Posts: 121
Joined: Jul 23, 2009


Posted: Jun 30, 2010 @ 02:22 PM             Msg. 10 of 16
My issue? You, in response to estrader,
Quote: But in the past we saw a trouble wth Excel that didn't allow to use remoting technology inside. Probably, this is the case.

were due to my case? Assume that this is so. Unfortunately you did not answer my question:

Tell please clear - whether remoting is working under VBA or not?
.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Chen Hua, Russia
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Jun 30, 2010 @ 02:55 PM             Msg. 11 of 16
It doesn't depend on VBA. It depends on host application (Excel in your case).

Victor Vins
Software Developer
CChen15
Posts: 121
Joined: Jul 23, 2009


Posted: Jun 30, 2010 @ 03:14 PM             Msg. 12 of 16
OK. Let it's Excel blame. Not VBA.
What about Access?

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Chen Hua, Russia
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Jun 30, 2010 @ 03:24 PM             Msg. 13 of 16
I didn't see Access 13 years. So, I cannot tell anything about it.

Victor Vins
Software Developer
CChen15
Posts: 121
Joined: Jul 23, 2009


Posted: Jun 30, 2010 @ 03:50 PM             Msg. 14 of 16
Access has the same VBA - same core, same libraries.
http://img576.imageshack.us/img576/9684/0630194251.png
http://img231.imageshack.us/img231/2996/0630194526.png
.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Chen Hua, Russia
estrader
Posts: 55
Joined: May 04, 2007


Posted: Jul 03, 2010 @ 03:13 PM             Msg. 15 of 16
I can't get remoting to work. If anyone here has managed to get the Basic example to work I would appreciate some pointers.

Do I still need to enter my U/N and P/W even with a remoted application? If so, I am still getting disconnected by OEC trader.
estrader
Posts: 55
Joined: May 04, 2007


Posted: Jul 04, 2010 @ 01:10 PM             Msg. 16 of 16
Quote: I can't get remoting to work. If anyone here has managed to get the Basic example to work I would appreciate some pointers.

Do I still need to enter my U/N and P/W even with a remoted application? If so, I am still getting disconnected by OEC trader.
--- Original message by estrader on Jul 3, 2010 03:13 PM
It's OK, I discovered what I was doing wrong.