Interface IBlock

All Known Implementing Classes:
ExitMethod

public interface IBlock
Block Interface - has methods to call actions over block.
  • Field Details

  • Method Details

    • evaluateBlock

      double evaluateBlock() throws TradingException
      Evaluate block.
      Returns:
      the double
      Throws:
      TradingException - the trading exception
    • evaluateBlock

      double evaluateBlock(int relativeShift) throws TradingException
      Evaluate block.
      Parameters:
      relativeShift - the relative shift
      Returns:
      the double
      Throws:
      TradingException - the trading exception
    • newInstance

      IBlock newInstance(StrategyBase strategy, org.jdom2.Element elBlock) throws BlockDefinitionException
      New instance.
      Parameters:
      strategy - the strategy
      elBlock - the el block
      Returns:
      the i block
      Throws:
      BlockDefinitionException - the block definition exception
    • getStrategy

      StrategyBase getStrategy()
      Gets the strategy.
      Returns:
      the strategy
    • clone

      IBlock clone(boolean includingParameters, StrategyBase strategy) throws BlockDefinitionException
      Clone.
      Parameters:
      includingParameters - the including parameters
      strategy - the strategy
      Returns:
      the i block
      Throws:
      BlockDefinitionException - the block definition exception
    • setCustomData

      void setCustomData(String key, int value)
      Sets the custom data.
      Parameters:
      key - the key
      value - the value
    • getCustomData

      int getCustomData(String key)
      Gets the custom data.
      Parameters:
      key - the key
      Returns:
      the custom data
    • copyCustomData

      void copyCustomData(IBlock block)
      Copy custom data.
      Parameters:
      block - the block
    • getReturnType

      int getReturnType()
      Gets the return type.
      Returns:
      the return type
    • setReturnType

      void setReturnType(int returnType)
      Sets the return type.
      Parameters:
      returnType - the new return type
    • getCustomBlockXml

      org.jdom2.Element getCustomBlockXml(int type) throws BlockDefinitionException
      Gets the custom block xml.
      Parameters:
      type - the type
      Returns:
      the custom block xml
      Throws:
      BlockDefinitionException - the block definition exception