Sizing
Make quantity explicit and keep instrument units separate from simplified simulator capital checks.
Quantity needs a defined unit. One share, one futures contract, and one unit of another instrument do not imply equal exposure or equal price sensitivity.
Identify the source of quantity
The SJS crossover sets quantity: 1 through its own example settings. An app's default shares/contracts setting is not automatically substituted for an explicit literal in strategy source.
Record where the order quantity comes from: a source constant, app configuration, a calculation, or a position snapshot. Validate it before submission and keep that choice in the revision you are testing.
Validate the instrument contract
Use finite, positive quantities and verify the selected adapter's allowed increments and minimum size. Use the configured instrument's price and contract conventions rather than assuming all symbols use the same tick size or multiplier.
Do not introduce fractional contracts or round prices by an arbitrary decimal count solely because JavaScript accepts those numbers.
Understand the shared capital check
The generic simulator uses quote close multiplied by order quantity for its basic capital eligibility check. That is a simplified amount calculation, not a full futures margin, leverage, short-borrow, or broker buying-power model.
Consequently, a simulated capital rejection does not prove that the equivalent live broker request would be rejected, and simulated acceptance does not establish live eligibility.
Size exits from current state
A full-close request uses position quantity. If state changed after you read it, a stale snapshot can request the wrong amount. Reconcile pending orders and updated positions before another close or replacement.
The shared automation classifier identifies an opposite-side request as an exit based on side and existing position. It is not a comprehensive check that the requested quantity is a safe reduction; keep sizing validation separate.
Compare size consistently
When comparing strategy revisions, hold quantity, capital, instrument, and fill assumptions constant unless sizing is the explicit variable under test. Inspect individual changed orders as well as summary P&L.
Continue with execution controls.