I have the following code for calculating lot size based on entry and exit price:
Code: Select all
private int CalculateLotSize(double entryPrice, double lossPrice)
{
var priceDifference = Math.Abs(entryPrice - lossPrice);
var ticks = priceDifference * (Bars.Info.MinMove * Bars.Info.PriceScale);
var valuePerTick =
(ticks * Bars.Info.MinMove / Bars.Info.PriceScale) * Bars.Info.BigPointValue;
return (int)(GetRiskAmount() / valuePerTick);
}
I have the following values for the currencies provided by the broker LMAX:
EUR/USD: MinMove 1, PriceScale 100,000, BigPointValue 1,000
AUD/JPY: MinMove 1, PriceScale 1,000, BigPointValue 1,000
Any ideas what is wrong?
Best,
A