Class TradingException

java.lang.Object
java.lang.Throwable
java.lang.Exception
com.strategyquant.datalib.TradingException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
BadStrategyException

public class TradingException extends Exception
Special trading exception - usually thrown when there is an exception during trading
See Also:
Serialized Form
  • Field Details

    • IndicatorCalculationFailed

      public static final int IndicatorCalculationFailed
      See Also:
      Constant Field Values
  • Constructor Details

    • TradingException

      public TradingException()
      Instantiates a new trading exception.
    • TradingException

      public TradingException(String message)
      Instantiates a new trading exception.
      Parameters:
      message - the message
    • TradingException

      public TradingException(String message, int code)
      Instantiates a new trading exception.
      Parameters:
      message - the message
    • TradingException

      public TradingException(Exception e)
      Instantiates a new trading exception.
      Parameters:
      e - the e
    • TradingException

      public TradingException(String message, Exception e)
      Instantiates a new trading exception.
      Parameters:
      message - the message
      e - the e
  • Method Details

    • getErrorCode

      public int getErrorCode()
      Returns error code
    • addCall

      public TradingException addCall(String indicatorName)
      Adds the call.
      Parameters:
      indicatorName - the indicator name
      Returns:
      the trading exception