Dukascopy
 
 
Wiki JStore Search Login

Lot size by risk
 Post subject: Lot size by risk Post rating: 0   New post Posted: Thu 14 Mar, 2019, 13:28 
User avatar

User rating: 0
Joined: Fri 03 Aug, 2018, 18:50
Posts: 1
Location: BrazilBrazil
How to calculate lot size by risk, checking min and max lot available to symbol?


 
 Post subject: Re: Lot size by risk Post rating: 0   New post Posted: Thu 02 May, 2019, 08:06 
User avatar

User rating: 1
Joined: Fri 14 Sep, 2012, 02:25
Posts: 55
Location: New Zealand, Christchurch
I use this to calculate amount to trade, where EPC_lever = percentage Equity to leverage, & with a Fixed_Amount override

double amount = 0.001;
if (Fixed_Amount > 0) {amount = Fixed_Amount;}
else
if (EPC_lever > 0) {amount = (account.getEquity() / oneMill) * EPC_lever;}
if (amount < minAmt) amount = minAmt;
if (amount > maxAmt) amount = maxAmt;
// millions to trade in Base (Primary) currency
amount = new BigDecimal(amount).setScale(3, BigDecimal.ROUND_HALF_UP).doubleValue();

But if you want to calculate the % of your Equity to Risk then that's a different story ... what would you base that on?


 
 Post subject: Re: Lot size by risk Post rating: 0   New post Posted: Wed 08 May, 2019, 09:30 
JForex Master
User avatar

User rating:
Joined: Wed 16 Sep, 2009, 18:23
Posts: 1049
Location: Geneva, Switzerland
BTW, there is a user interface added since the version 3.5.9 for this. We call it Amount calculator and it is available next to the amount spinner.


 

Jump to:  

cron
  © 1998-2024 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com