Package com.strategyquant.tradinglib
Interface IFormula
public interface IFormula
Formula Interface - has methods to call actions over formula.
-
Method Summary
Modifier and TypeMethodDescriptiondoubleevaluateFormula(StrategyBase strategy, String symbol, double price, int direction)Evaluate formula.booleanChecks if is boolean value.booleanChecks if is none value.newFormulaInstance(StrategyBase strategy, org.jdom2.Element elFormulaBlock)New formula instance.
-
Method Details
-
evaluateFormula
double evaluateFormula(StrategyBase strategy, String symbol, double price, int direction) throws TradingExceptionEvaluate formula.- Parameters:
strategy- the strategysymbol- the symbolprice- the pricedirection- the direction- Returns:
- the double
- Throws:
TradingException- the trading exception
-
newFormulaInstance
IFormula newFormulaInstance(StrategyBase strategy, org.jdom2.Element elFormulaBlock) throws BlockDefinitionExceptionNew formula instance.- Parameters:
strategy- the strategyelFormulaBlock- the el formula block- Returns:
- the i formula
- Throws:
BlockDefinitionException- the block definition exception
-
isNoneValue
boolean isNoneValue()Checks if is none value.- Returns:
- true, if is none value
-
isBooleanValue
boolean isBooleanValue()Checks if is boolean value.- Returns:
- true, if is boolean value
-