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 05-24-2009, 11:53 PM
Member
 
Join Date: Dec 2007
Posts: 85
cmctrader is on a distinguished road
OpenTradeEx

I want to use TradeDeskAut.OpenTradeEx to open a market trade and set the stop loss as distance in pips.

wcsInstrument is GBP/JPY
dStopPips = 50

m_oTrDesk.OpenTradeEx(wcsAccountID, wcsInstrument, true, iLotsNo, 0, wcsQuoteID, 0, m_oTrDesk.SL_PEGGEDSTOP, -1 * dStopPips, 0, 0, out psOrderId, out psDI);

dStopPips is the distance in pips.

An trade was created, but the stop loss was not be set.

To FXCM:Would you please tell us how to use OpenTradeEx method? Thanks.

Last edited by cmctrader; 05-25-2009 at 12:22 AM..
Reply With Quote
  #2 (permalink)  
Old 05-25-2009, 12:40 PM
Member
 
Join Date: Oct 2008
Posts: 465
Nikolay.Gekht is on a distinguished road
The method is documented in the help file.

Please, see the iSLType parameter specification:
TradeDeskAut.SL_STOP
Use this value in case the stop order must be added.

TradeDeskAut.SL_PEGGEDSTOP
Use this value in case the stop order must be the pegged stop order.

Example:
tradeDesk.SL_LIMIT + tradeDesk.SL_PEGGEDLIMIT Set the pegged limit.

so, to set up pegged stop order you must specify
tradeDesk.SL_STOP + tradeDesk.SL_PEGGEDSTOP
Reply With Quote
  #3 (permalink)  
Old 05-25-2009, 07:53 PM
Member
 
Join Date: Dec 2007
Posts: 85
cmctrader is on a distinguished road
Great, It works, thank you very much!
Reply With Quote
  #4 (permalink)  
Old 07-02-2009, 08:51 PM
Member
 
Join Date: Dec 2007
Posts: 85
cmctrader is on a distinguished road
Under the Rule 2-43(b).
Will OpenTradeExe method still work?
Reply With Quote
  #5 (permalink)  
Old 07-03-2009, 11:41 AM
Member
 
Join Date: Oct 2008
Posts: 465
Nikolay.Gekht is on a distinguished road
You can not use stop and limit orders under the rule 2-43(b). You must create appropriate entry orders instead.
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:17 AM.
Copyright ©2009 Daily FX. All Rights Reserved.