Function validateCommonSignal

Validates the common fields of ISignalDto that apply to both pending and scheduled signals.

Checks:

  • position is "long" or "short"
  • priceOpen, priceTakeProfit, priceStopLoss are finite positive numbers
  • price relationships are correct for position direction (TP/SL on correct sides of priceOpen)
  • TP/SL distance constraints from GLOBAL_CONFIG
  • minuteEstimatedTime is valid

Does NOT check:

  • currentPrice vs SL/TP (immediate close protection — handled by pending/scheduled validators)
  • ISignalRow-specific fields: id, exchangeName, strategyName, symbol, _isScheduled, scheduledAt, pendingAt

This is an internal code exported for unit tests only. Use validateSignal in Strategy::getSignal