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-22-2009, 03:48 PM
parnoldson's Avatar
Member
 
Join Date: Nov 2006
Posts: 30
parnoldson is on a distinguished road
CreateFixOrder locking up

I am calling CreateFixOrder and it is never returning. This will lock up my prgram if this function never returns. this needs to be looked into please.

My code example of what I am doing:
Code:
m_pTradeDesk->CreateFixOrder(m_pTradeDesk->FIX_OPENMARKET, "", 0,
				0, "", bAccount, bInstrument, bBuySell,
				nQty, "", &ordID, &psd);
__________________
There are 10 kinds of people in the world; those who understand binary and those who don't.
Reply With Quote
  #2 (permalink)  
Old 10-22-2009, 03:52 PM
parnoldson's Avatar
Member
 
Join Date: Nov 2006
Posts: 30
parnoldson is on a distinguished road
To clarify this doesn't happen every time, I can be placing many orders before this happens, but when it does my whole program locks up.
__________________
There are 10 kinds of people in the world; those who understand binary and those who don't.
Reply With Quote
  #3 (permalink)  
Old 10-23-2009, 11:53 AM
Member
 
Join Date: Oct 2008
Posts: 474
Nikolay.Gekht is on a distinguished road
Could you please confirm that the method hangs for the infinite period, or, probably, the method throws "time out exception" after approximately 10 minutes of waiting?

If the second is right, this is the known problem when the server seldom does not send back the confirmation of the order execution. Unfortunately, there is no workaround for this problem in the current version.

The next version will have asynchronous version of these methods, which will work extremely fast, but you have to monitor the tables to check whether the order is executed.

You can also try the latest development release which allows to reduce and, as a result, avoid for long-time locking of your application in case the response does not come.

Sorry for the inconvenience, we all working on this problem.
Reply With Quote
  #4 (permalink)  
Old 10-23-2009, 02:33 PM
Member
 
Join Date: Apr 2009
Posts: 53
fexxxer is an unknown quantity at this point
Hello, parnoldson

I hope i understood the problem correctly.

There is a method in TradeDesk called .SetTimeout(), try lowering timeout maybe it will help with application hanging up.

oTradeDesk.SetTimeout( TradeDeskAut.TIMEOUT_COMMON, <long> );

It's a timeout for server responses not actual execution, try it out see how it will workout. You can code a work around and see if response doesen't come in after your timeout look in Trades table and most likely the trade will already be there.


I hope this helps you some.

Cheers
Reply With Quote
  #5 (permalink)  
Old 10-27-2009, 11:38 AM
parnoldson's Avatar
Member
 
Join Date: Nov 2006
Posts: 30
parnoldson is on a distinguished road
I am confirming that it is a hang for infinte period of time. I haven't tried the setting of the timeout as suggested by fexxxer, because of this infinte wait. (it isn't timing out). I am now seeing this on not just the CreateFixOrder function, but also on the CloseTrade() function as well. The account that I am using is a standard size(100K) account if that helps. I haven't seen this on a mini account (yet).
__________________
There are 10 kinds of people in the world; those who understand binary and those who don't.
Reply With Quote
  #6 (permalink)  
Old 10-27-2009, 02:36 PM
Member
 
Join Date: Oct 2008
Posts: 474
Nikolay.Gekht is on a distinguished road
I'll try to reproduce the infinite waiting problem.
Reply With Quote
  #7 (permalink)  
Old 10-29-2009, 01:31 PM
Member
 
Join Date: Oct 2008
Posts: 474
Nikolay.Gekht is on a distinguished road
It looks like we found one situation when the lock-up is possible. When the account has many trades and the market is fluent, the recalculation procedure could hang. The new version which is about to be released has solution for this situation. I expect the first releases in a couple of weeks.

Sorry for the inconvenience.
Reply With Quote
  #8 (permalink)  
Old 10-29-2009, 04:21 PM
Luke Quinn's Avatar
FXCM Programmer
 
Join Date: Aug 2008
Posts: 37
Luke Quinn is an unknown quantity at this point
PArnoldson,

Did you try the dev release? Did you replicate the problem using this as well?
__________________
FXCM Programming Services is able to leverage its experience and expertise to help clients implement their automated strategy designs on platforms such as TradeStation, MetaTrader, among others, upon request.
Reply With Quote
  #9 (permalink)  
Old 11-02-2009, 11:20 AM
Member
 
Join Date: Oct 2008
Posts: 474
Nikolay.Gekht is on a distinguished road
Quote:
Originally Posted by Luke Quinn View Post
Did you try the dev release? Did you replicate the problem using this as well?
It looks like they will be able. At least, I can. So, parnoldson is right, there is no reason to decrease timeout since even existing the long time-out does not break the hung. As far as I can see it happens when there is not enough time to process frequent new price messages and recalculate all positions and orders before new price comes. The current version (including the development release) just hungs in case the new price queue overflows.
Reply With Quote
  #10 (permalink)  
Old 11-16-2009, 04:50 PM
parnoldson's Avatar
Member
 
Join Date: Nov 2006
Posts: 30
parnoldson is on a distinguished road
We just had this happen again on a real money account, and when this happens the order does get placed. So when this happens I can't attach my stop and limit parts because It never returns back (locks up) there for I have a naked order without any protection.
__________________
There are 10 kinds of people in the world; those who understand binary and those who don't.
Reply With Quote
  #11 (permalink)  
Old 11-17-2009, 03:00 PM
Member
 
Join Date: Oct 2008
Posts: 474
Nikolay.Gekht is on a distinguished road
Please wait for a new version we planned to release for developers the next Monday. Hopefully, almost all deal-lock cases will be eliminated in the new version due to a new event processing core.
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:59 AM.
Copyright ©2009 Daily FX. All Rights Reserved.