Volume Ratio Reference
Systemwide volume, leverage, progression, and ratio-calculation reference.
Canonical calculation contract
Understanding the correct architecture for pseudo positions and volume calculations
// ❌ WRONG
const basePosition = {
volume: calculateVolume(
baseVolumeFactor
),
entryPrice: 50000,
quantity: volume / entryPrice
}This approach incorrectly calculates volume before reaching the Exchange level, coupling strategy logic with account balance.
// ✅ CORRECT
const basePseudoPosition = {
positionCost: 0.1, // 10%
ratio: 1.0,
entryPrice: 50000
// NO volume field
}
// Later at Exchange:
const volume = calculate(
positionCost,
accountBalance
)This approach keeps pseudo positions independent of account balance, calculating volume only when executing on the exchange.
Pseudo Positions Use Ratios
Base/Main/Real levels work with position cost ratios (0.01-1.0) representing percentages
Volume Only at Exchange
Actual volume calculation happens exclusively when executing orders on exchanges
Strategies Use Factors
Block and DCA strategies adjust ratios and factors, not volumes
Account Size Independent
Pseudo positions work the same regardless of account balance