Function validatePendingSignal

Validates a pending (immediately active) signal before it is opened.

Checks:

  • ISignalRow-specific fields: id, exchangeName, strategyName, symbol, _isScheduled
  • currentPrice is a finite positive number
  • Common signal fields via validateCommonSignal (position, prices, TP/SL relationships, minuteEstimatedTime)
  • currentPrice is between SL and TP — position would not be immediately closed on open
  • scheduledAt and pendingAt are positive numbers

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

If any validation check fails

  • Parameters

    • signal: ISignalRow

      Pending signal row to validate

    • currentPrice: number

      Current market price at the moment of signal creation

    Returns void