pub fn calculate_fixed_risk_position_size(
instrument: &InstrumentAny,
entry: Price,
stop_loss: Price,
equity: Money,
risk: Decimal,
commission_rate: Decimal,
exchange_rate: Decimal,
hard_limit: Option<Decimal>,
unit_batch_size: Decimal,
units: usize,
) -> CorrectnessResult<Quantity>Expand description
Calculates the position size based on fixed risk parameters.
ยงErrors
Returns an error if an input is invalid, decimal arithmetic overflows, or
the final size cannot be represented as a [Quantity].