The formula
Risk budget equals account equity multiplied by the selected risk fraction. Per-unit loss equals absolute entry minus stop distance, plus an entry-price-based cost buffer. Quantity is risk budget divided by per-unit loss, capped by available cash.
The limit
This model does not represent futures contract multipliers, options exposure, gaps or broker liquidation. A stop does not guarantee a fill price. Use a contract-specific model before placing a real order.