P/L Currency Conversion to account base currency

Created at 08 Apr 2016, 13:58
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
DE

DELETED_USER

Joined 08.04.2016 Blocked

P/L Currency Conversion to account base currency
08 Apr 2016, 13:58


Hello everyone, 

Did anyone had a look at currency conversion to the account base currency? 

Lets say my account is 100k £ and I am risking 1% of my equity (1000£) per trade and a stop loss of 100 pips is used to calculate the correct position size. 

If I trade EUR/GBP this is a simple calculation. (100,000) * 0.01 / 0.01 = 100,000 trade size. 

Now If I trade GBP/USD the calculation would be ((100,000) *0.01) * GBPUSD Rate (1.4060) / 0.01 = 140,600. 

Is there a built in feature to convert to the base account currency? 

I am just making sure something similar already exists before I hard code the actual logic. 

Thanks,

Marc

 


Replies

kricka
08 Apr 2016, 17:56

Lots and Volume to trade

The Lots and Volume to trade 1.0 cbot does the conversation you are after. There is no ready set method or function that does it all. In the API reference you can find ways to program what you are after. Give a link here where you can get some information needed. /api/reference/internals/iaccount

Download and information link: Lots and Volume to Trade 1.0

 

 


@kricka

DELETED_USER
08 Apr 2016, 18:02

Thanks for your reply!

The Lots and Volume to trade 1.0 would just apply for manual trading though or can this be added to a Cbot?

 


kricka
09 Apr 2016, 20:17

marc_sischka,

No it can't be added to another cBot as it is run externally. The main question was, is it possible to program within cAlgo to achieve what you are after, the answer to that question is yes.

By reading up on the API documentation and learning how the cAlgo language works it will not be that hard for you to include the right code into your cBot. Also there are many excellent programmers on this forum giving snippet codes on different threads on the subject.

 


@kricka