Thank You, good example.
But I want calculate amount before create order.
Amount depends on my equity and risk. For example risk = 3%.
I want create order with stopLoss = 10 pips and I want to calculate the amount on this basis.
Let (???) - how much money in my currency is one pips.
private double countAmount(int risk, int stopLoss){
double equity = this.context.getAccount().getEquity();
double moneyToRisk = (equity*risk)/100; //risk is in % (For example risk = 3)
double amount = moneyToRisk/(stopLoss*(???)); // (becouse: amount * (???) * stopLoss = moneyToRisk )
return amount;
}
How can I calculate (???).
(Of course I know that it depends on instrument.)