Class ATM

java.lang.Object
com.strategyquant.tradinglib.ATM
All Implemented Interfaces:
Serializable

public class ATM extends Object implements Serializable
See Also:
Serialized Form
  • Constructor Details

    • ATM

      public ATM(org.jdom2.Element elATMs) throws Exception
      Throws:
      Exception
    • ATM

      public ATM(org.jdom2.Element elATMs, boolean createFromStrategy) throws Exception
      Throws:
      Exception
  • Method Details

    • getClone

      public ATM getClone()
    • setForOrder

      public static void setForOrder(ILiveOrder order, StrategyBase strategy)
    • isApplicable

      public boolean isApplicable(StrategyBase strategy, double size, double sl, byte orderType)
      returns true if ATM is enabled and applicable to this order
      Parameters:
      strategy -
      size -
      sl -
      orderType -
      Returns:
    • getExitsCount

      public int getExitsCount()
      returns number of configured ATM exist
      Returns:
    • getExit

      public ATMExit getExit(int index)
      returns ATM exit at given index (zero based)
      Parameters:
      index -
      Returns:
    • getType

      public int getType()
    • getSizeDecimals

      public int getSizeDecimals()
    • getMinimalSize

      public double getMinimalSize()
    • createFromStrategy

      public static ATM createFromStrategy(org.jdom2.Element strategyXml) throws Exception
      Throws:
      Exception
    • setConfigATMToStrategy

      public static org.jdom2.Element setConfigATMToStrategy(ATM atm, org.jdom2.Element strategyXml, boolean enabled)
    • setSourceAndEnable

      public static org.jdom2.Element setSourceAndEnable(org.jdom2.Element strategyXml, String source, boolean enabled)
    • isUsed

      public boolean isUsed()
    • getGenerateConfig

      public com.strategyquant.tradinglib.atm.ATMGenerateConfig getGenerateConfig()
    • changeToStrategy

      public void changeToStrategy()