calculating lot size
Created at 05 Jan 2025, 08:38
calculating lot size
05 Jan 2025, 08:38
Hello,
I need help please. I want to calculate lot size. What is wrong whith the following code?
double risk = ( riskAmount / stopLossDistance ) / 10;
Print("Risk amount: {0}, Stop Loss Distance: {1}, Lot: {2}", riskAmount, stopLossDistance, risk);
Print("Pip Value: {0}", Symbol.PipValue);
// var lotSize = risk / Symbol.PipValue;
// var lotSize = Math.Round(risk);
//Print("Lot Size: {0}", Symbol.QuantityToVolumeInUnits(lotSize));
return Symbol.QuantityToVolumeInUnits(risk);
Thanks