ngmParticipant
New
Hi, I would like to know if there is a function to get the equity available for trading.
Let’s say I want to put a X LOTS depending on my available equity (more wins more LOTS, less wins less LOTS).
Also if it’s possible to set the equity for start trading in the code itself. For instance: When I change to EURUSD to USDJPY in the graph itself the currency I wrote in the box it doesn’t change. I would like to fix always 10.000 € (my local currency) and not use the trading currency (sometimes 10.000 $, 10.000 JPY, etc.)
Thanks.
The calculation are made with the currency of the current instrument.
There is no way to get the available equity for the whole account, but you can calculate it for the current code:
capital = 10000 //capital at start of the strategy
floatingprofit = (((close-positionprice)*pointvalue)*countofposition)/pipsize //actual trade gains
equity = capital+strategyprofit+floatingprofit
ngmParticipant
New
Thanks Nicolas. This solves to get equity without considering spread and broker fees (I found another topic about this and I will test it).
Then, how I manage to test my system in different currencies? Do I have to manually change the capital for each one?
That’s a basic feature to build strategies on. It should be implemented as a simple function to query. Am I missing something ?
This is indeed something that would be very helpful for money management when running multiple strats.
@PRT please consider this request to add total account equity as a function in ProBuilder
Use the suggestion box at https://trading.prorealtime.com/en/contact, to make sure PRT know what you wrote.