FX order sizing in MC for IB and Oanda?

Questions about MultiCharts and user contributed studies.
thutch
Posts: 52
Joined: 16 Sep 2011
Has thanked: 16 times
Been thanked: 10 times

FX order sizing in MC for IB and Oanda?

Postby thutch » 07 Oct 2016

Hi all,

I have been using Oanda to trial FX strategies (outside of MC) as Oanda have no minimum commission. The idea being that strategies graduate to IB once proven. I just realised that MC can connect to both, which is great!

Both brokers calculate position sizes differently. For IB, FX sizing depends on the quote currency, whereas Oanda uses 'units'. I myself think in risk i.e. % of account. So I have a translation problem (whichever broker I go with) and which would be great to resolve through some nifty software.

1) Does anyone know if / how there is some way in MC to rapidly convert % of account such that the correct order size could be transmitted to either broker?

2) Failing that, can anyone think of a good approach to tackle this?

Thank you for ideas

User avatar
TJ
Posts: 7742
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: FX order sizing in MC for IB and Oanda?

Postby TJ » 07 Oct 2016

Hi all,

I have been using Oanda to trial FX strategies (outside of MC) as Oanda have no minimum commission. The idea being that strategies graduate to IB once proven. I just realised that MC can connect to both, which is great!

Both brokers calculate position sizes differently. For IB, FX sizing depends on the quote currency, whereas Oanda uses 'units'. I myself think in risk i.e. % of account. So I have a translation problem (whichever broker I go with) and which would be great to resolve through some nifty software.

1) Does anyone know if / how there is some way in MC to rapidly convert % of account such that the correct order size could be transmitted to either broker?

2) Failing that, can anyone think of a good approach to tackle this?

Thank you for ideas
What do you mean by %?

Please give code example.

thutch
Posts: 52
Joined: 16 Sep 2011
Has thanked: 16 times
Been thanked: 10 times

Re: FX order sizing in MC for IB and Oanda?

Postby thutch » 07 Oct 2016

Hi - I mean the % of account equity at risk on the trade.

I.e. a tool to determine the FX position sizing (in $ exposure for IB, or # Units for Oanda) that equates to a [1%] risk from entry price to stop.

User avatar
TJ
Posts: 7742
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: FX order sizing in MC for IB and Oanda?

Postby TJ » 07 Oct 2016

Hi - I mean the % of account equity at risk on the trade.

I.e. a tool to determine the FX position sizing (in $ exposure for IB, or # Units for Oanda) that equates to a [1%] risk from entry price to stop.

If you can figure out the %, you can figure out the units.

thutch
Posts: 52
Joined: 16 Sep 2011
Has thanked: 16 times
Been thanked: 10 times

Re: FX order sizing in MC for IB and Oanda?

Postby thutch » 07 Oct 2016

The % will be standard e.g. 1% of account.

The issue is e.g.

1) Buying Usd.Sek on IB. This is priced in Sek. Order amount needs to be provided in Sek not Usd. So I'm looking to effectively calculate # pips from current price to stop, use this difference to assign 1% of account to a $ per pip value, and then convert that total to Sek for the Order

2) Same on Oanda. Similar but the output is a number of units to buy.

In both cases, the objective would be to have a helper tool to quickly (based on current market price and a user-provided stop level) determine the equivalent order size (for a 1% risk).

Right now, I need to start calculating on the side, which is an irritation and potentially error prone. As you will have gathered, I'm not talking about automating the system, rather finding/creating/using an automated tool to assist the human.

thutch
Posts: 52
Joined: 16 Sep 2011
Has thanked: 16 times
Been thanked: 10 times

Re: FX order sizing in MC for IB and Oanda?

Postby thutch » 11 Oct 2016

I imagine that these sort of order-to-broker conversions must be a common problem.

Anyone else have ideas here?

given81
Posts: 4
Joined: 06 Mar 2017

Re: FX order sizing in MC for IB and Oanda?

Postby given81 » 13 Mar 2017

Hi thutch

did you solve your issue?

I have a similar problem, but I would automate the calculation in the MC script in order to have, for each trades, a "standard" output in terms of $ loss: so, for example, if I have 50 pips stop, I'll buy x units, while if I have 100 pips stop I'll buy x/2 units.

if you want just a support, consider that the OANDA's app, allow you to view in real time how cost the trade in terms of stop loss, depending of the number of units purchased

someone could help please
thanks

thutch
Posts: 52
Joined: 16 Sep 2011
Has thanked: 16 times
Been thanked: 10 times

Re: FX order sizing in MC for IB and Oanda?

Postby thutch » 13 Mar 2017

No I have not coded anything yet, and enter all orders via the Oanda app for that specific sizing reason.

If and when I move all trading to IB, then a solution in MC will need to be coded somehow.

One irritation of the MC / Oanda API is that the stop & target values (orders) entered in the Oanda app when opening positions do not show in MC. I know that integration with IB is far tighter.


Return to “MultiCharts”