Go Back   DailyFX Forum > FXCM Products and Services > FXProgrammers > Discussion / Support Forum > FIX API Support

Reply
 
Thread Tools Rate Thread
  #1 (permalink)  
Old 07-15-2009, 08:11 AM
Registered User
 
Join Date: Jul 2009
Posts: 2
Trad is an unknown quantity at this point
SL / TP -New Order – Single

Hi,
I am using the FIX protocol in demo.
My goal is to open a position with 3 input parameters:
1. Highest rate that I am willing to buy at OR Lowest rate that I am willing to sell at
2. Stop loss rate
3. Take Profit rate

Is there one FIX message that I could send to achieve that?

Thanks in advance,
Assi
Reply With Quote
  #2 (permalink)  
Old 07-15-2009, 10:23 AM
Moderator
 
Join Date: Jan 2006
Posts: 1,990
FXCM Help is on a distinguished road
Yes, you can send an OTO order list.
primary range order has clordlinkid = 1, triggered orders (stop/limit) have clordlinkid = 2. BSI doc has more details.

8=FIX.4.49=62835=E34=1649=TestClient050=52=2 0090715-14:23:47.79156=FXCM57=CWSTRESS66=testlistid68= 3394=31385=273=311=FIX.4.4:TestClient0->FXCM/CWSTRESS-1247667827729-15526=fix multi session test583=11=0505273955=EUR/USD54=160=20090715-14:23:47.72938=10000040=444=1.4087699=1.40996 59=311=FIX.4.4:TestClient0->FXCM/CWSTRESS-1247667827791-16526=fix multi session test583=21=0505273955=EUR/USD54=160=20090715-14:23:47.79138=10000040=244=1.559=111=FIX.4.4 :TestClient0->FXCM/CWSTRESS-1247667827791-17526=fix multi session test583=21=0505273955=EUR/USD54=160=20090715-14:23:47.79138=10000040=399=1.159=110=213
Reply With Quote
  #3 (permalink)  
Old 07-15-2009, 10:25 AM
Moderator
 
Join Date: Jan 2006
Posts: 1,990
FXCM Help is on a distinguished road
you also need to set contingencytype to 2 OTO in the order list 1385=2
Reply With Quote
  #4 (permalink)  
Old 07-23-2009, 11:36 AM
Registered User
 
Join Date: Jul 2009
Posts: 2
Trad is an unknown quantity at this point
Adding a stop loss order

Hi,
It worked like a charm
Now I have another question: if I submit a "market" order how can I determine the stop loss (Not as a rate format but as a fixed pips away from the actual traded rate) ?
For example, if the current market rates for EUR/USD are 1.42715/1.42747 and I submit a "buy" market order and it is executed at 1/42747, how can I tell the order to submit a stop loss order of "x" pips under the traded rate (1.42747)?

Thank you for your help,
Assi
Reply With Quote
  #5 (permalink)  
Old 07-24-2009, 04:07 PM
Moderator
 
Join Date: Jan 2006
Posts: 1,990
FXCM Help is on a distinguished road
You can find the following example in the FIX BSI documentation. Under section 6.1.6.

8=FIX.4.4 9=198 35=D 34=14 49=TestClient3 52=20080108-19:41:12.859 56=FXCM 57=MINIDEMO 1=00217844 11=TestClient3FXCM-1199821272859-13 38=10000 40=3 54=1 55=EUR/USD 59=1 60=20080108-19:41:12 99=1.46909 9041=7670249 10=171

To do what you want, place a new single order, with order type(40) = 3, StopPx(99) = <price you want> and FXCMPosID(9041) = <the FXCMPosID from the position report from the order that executed).

As for specifying the distance from where the execution filled at, you cannot place the distance from pips, since the request requires the full format. I suggest you perform the calculation yourself, and submit that price. i.e. stopPrice=executed price +/- .0005. (5 pips)

Last edited by FXCM Help; 07-24-2009 at 04:13 PM..
Reply With Quote
  #6 (permalink)  
Old 07-30-2009, 10:29 AM
Member
 
Join Date: May 2009
Posts: 22
Kaboo is an unknown quantity at this point
There is a reference to "the FIX BSI documentation", what does BSI stand for?

Thanks
Reply With Quote
  #7 (permalink)  
Old 07-30-2009, 10:53 AM
Moderator
 
Join Date: Jan 2006
Posts: 1,990
FXCM Help is on a distinguished road
buy side interface
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 09:59 PM.
Copyright ©2009 Daily FX. All Rights Reserved.