Go Back   DailyFX Forum > FXCM Products and Services > FXProgrammers > Discussion / Support Forum > Order2Go COM Trading API Support

Reply
 
Thread Tools Rate Thread
  #1 (permalink)  
Old 10-12-2009, 10:45 PM
Registered User
 
Join Date: Oct 2009
Posts: 1
mineral is an unknown quantity at this point
Can i login more than one account int the same application?

I want to login more than one account for different strategy.then i tried as following c++ codes:
m_pTradeDesk->Login("username1","pwd1",URL,"Demo");
m_pTradeDesk->Login("username2","pwd2",URL,"Demo");
then i checked the "Accounts" table ,there was only one row,only the second account was there.
then i thinked abount create two TradeDesk in my application,but i see the Notes in the <<Order2Go help>> "You may not create two instances neither of the core nor of the trade desk in one application. " which killed my hope.

is there any way to login more than one account in one applicaton(demo and real)?
Reply With Quote
  #2 (permalink)  
Old 10-13-2009, 11:25 AM
Member
 
Join Date: Oct 2008
Posts: 474
Nikolay.Gekht is on a distinguished road
Unfortunately, Order2Go does not allow to establish two connections in the same process. You have to use lower level API such as Java API to carry multiple connections.
Reply With Quote
  #3 (permalink)  
Old 10-27-2009, 09:07 PM
Member
 
Join Date: Jul 2009
Posts: 41
Kalzenith is an unknown quantity at this point
actually it can be done, you just need to create two cores and two trading desks like so (sorry its in C#, its the only language i know apart from VB6, but i assume the same principal will apply to C++)
PHP Code:
static string connection "Demo";
static 
string url "www.fxcorporate.com";

static 
FXCore.CoreAut fxCore1;
static 
FXCore.TradeDeskAut tradeDesk1;
static 
string username1;
static 
string password1;

static 
FXCore.CoreAut fxCore2;
static 
FXCore.TradeDeskAut tradeDesk2;
static 
string username2;
static 
string password2;

private 
void button1_Click(object senderEventArgs e) {
    
username1 "[username]";
    
password1 "[password]";
    
fxCore1 = new FXCore.CoreAut();
    
tradeDesk1 = (FXCore.TradeDeskAut)fxCore1.CreateTradeDesk("trader");
    
tradeDesk1.Login(FXCMusername1FXCMpassword1urlconnection);

    
username2 "[username]";
    
password2 "[password]";
    
fxCore2 = new FXCore.CoreAut();
    
tradeDesk2 = (FXCore.TradeDeskAut)fxCore2.CreateTradeDesk("trader");
    
tradeDesk2.Login(FXCMusername2FXCMpassword2urlconnection);


Last edited by Kalzenith; 10-28-2009 at 09:28 AM..
Reply With Quote
  #4 (permalink)  
Old 10-29-2009, 12:56 PM
Member
 
Join Date: Apr 2009
Posts: 53
fexxxer is an unknown quantity at this point
Hello Kalzenith,

Nikolay.Gekht, posted on this forum replying to numerous posts regarding this very same question, asking Order2Go users not to create multiple instances of FXCore as well as not to stress Order2Go in multi-threaded environment.

Here is one of his messages, that he wrote in the past replying to this very topic:

Nikolay.Gekht ****** 08-11-2009, 06:26 PM
---------------
"Hm... sorry. I strongly do not recommend to go this way. Order2Go is intended to support one connection per the process and has never be tested or intended to create more than one connections per process.

Moreover, support of the "always actual" table data is very resource and memory eating process, and optimized for 1-connection per process execution. If you need to execute more than one connection you must choose plain C++ or Java API which only delivers messages and do not any additional processing and data storing, and implement your own way to keep the data, optimized for your purposes."
---------------

And though you CAN create 2 FXCore/TradingDesk objects, and login with them, and even as much as perform operations - this will not guarantee that very soon down the line Order2Go's behavior will not become erratic and unstable at the very least. It was never designed for that, and was never properly tested in such ways.

However, there is a way to trade using multiple accounts using Order2Go without actually having to create multiple Order2Go cores. As i understand, FXCM offers something called PAMM/LAMM accounts, which can allow you to trade with multiple accounts from 1 login.

I'm sorry to answer your post in such manner, but its extremely important that people use Order2Go properly, to minimize the risk of application crashes.
Reply With Quote
  #5 (permalink)  
Old 10-30-2009, 10:59 AM
Member
 
Join Date: Jul 2009
Posts: 41
Kalzenith is an unknown quantity at this point
i understand, actually i only just came across the entry in the help file stating that they would prefer we do not create two connections after i replied to this post. im sure you know, after answering all the questions ive asked, that i would prefer to save the server some grief if at all possible as well.
Reply With Quote
  #6 (permalink)  
Old 11-02-2009, 08:47 AM
Member
 
Join Date: Jun 2009
Posts: 16
hotdogz919 is an unknown quantity at this point
Is it alright to have completely separate processes running on the same computer each with an order2go instance logging into the same account? Say, one data receive application running as transparent background windows service continually receiving order2go table row update events populating a SQL database, and one "trading" windows form application polling the SQL database and using its own order2go instance to execute trades? I want separation of data receiving and trading environments, so I can always have a data receive process running but can bring up and down trading applications as I do my testing.
Reply With Quote
  #7 (permalink)  
Old 11-02-2009, 11:01 AM
Member
 
Join Date: Oct 2008
Posts: 474
Nikolay.Gekht is on a distinguished road
Quote:
Is it alright to have completely separate processes running on the same computer each with an order2go instance logging into the same account?
Yes, it is possible. You can start as much separate process which use order2go as much your computer and network can carry.

Put, please, note that some accounts do not support multiple connections, so, the next instance which connects to the same account will break connection of the previous instance. However, you can call to the support to have multiple login support on your account. Technically you can connect multiple instances of the application to any existing account.

Quote:
Say, one data receive application running as transparent background windows service continually receiving order2go table row update events populating a SQL database, and one "trading" windows form application polling the SQL database and using its own order2go instance to execute trades? I want separation of data receiving and trading environments, so I can always have a data receive process running but can bring up and down trading applications as I do my testing.
Probably, it is better to have the following architecture to avoid heavy-weight SQL databases:
- Develop lightweight out-of-process COM facade which carries connection and provides the required data.
or
- Use lightweight in-memory hash database such as Berkley DB
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




Disclaimer: Trading foreign exchange on margin carries a high level of risk, and may not be suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to trade foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with foreign exchange trading, and seek advice from an independent financial advisor if you have any doubts. Any opinions, news, research, analyses, prices, or other information contained on this website is provided as general market commentary and does not constitute investment advice. Forex Capital Markets LLC. will not accept liability for any loss or damage, including without limitation to, any loss of profit, which may arise directly or indirectly from use of or reliance on such information.

All times are GMT -5. The time now is 11:39 AM.
Copyright ©2009 Daily FX. All Rights Reserved.