Service for validating GLOBAL_CONFIG parameters to ensure mathematical correctness
and prevent unprofitable trading configurations.
Performs comprehensive validation on:
Percentage parameters: Slippage, fees, and profit margins must be non-negative
Economic viability: Ensures CC_MIN_TAKEPROFIT_DISTANCE_PERCENT covers all trading costs
(slippage + fees) to guarantee profitable trades when TakeProfit is hit
Range constraints: Validates MIN < MAX relationships (e.g., StopLoss distances)
Time-based parameters: Ensures positive integer values for timeouts and lifetimes
Candle parameters: Validates retry counts, delays, anomaly detection thresholds, and max candles per request
Constructor
constructor();
Properties
loggerService
loggerService: any
validate
validate: () =>void
Validates GLOBAL_CONFIG parameters for mathematical correctness.
Checks:
CC_MIN_TAKEPROFIT_DISTANCE_PERCENT must cover slippage + fees