public class OrderPLComputer extends java.lang.Object implements OrderComputer
Modifier and Type | Field and Description |
---|---|
static org.slf4j.Logger |
Log
The Constant Log.
|
Constructor and Description |
---|
OrderPLComputer() |
Modifier and Type | Method and Description |
---|---|
void |
compute(SQOrderList ordersList,
SQSettings settings,
com.strategyquant.futurelib.backtester.SymbolsTable symbolsTable)
Compute.
|
static double |
computeOrderPLInMoney(SQOrder order,
double tickSize,
double pointValue)
Compute order pl in money.
|
static double |
computeOrderPLInTicks(SQOrder order,
double tickSize)
Compute order pl in ticks.
|
void |
endCompute(SQOrderList ordersList,
SQSettings settings,
com.strategyquant.futurelib.backtester.SymbolsTable symbolsTable)
End compute.
|
void |
initCompute(SQOrderList ordersList,
SQSettings settings,
com.strategyquant.futurelib.backtester.SymbolsTable symbolsTable)
Inits the compute.
|
public void initCompute(SQOrderList ordersList, SQSettings settings, com.strategyquant.futurelib.backtester.SymbolsTable symbolsTable) throws java.lang.Exception
OrderComputer
initCompute
in interface OrderComputer
ordersList
- the orders listsettings
- the settingssymbolsTable
- the symbols tablejava.lang.Exception
- the exceptionpublic void compute(SQOrderList ordersList, SQSettings settings, com.strategyquant.futurelib.backtester.SymbolsTable symbolsTable) throws java.lang.Exception
OrderComputer
compute
in interface OrderComputer
ordersList
- the orders listsettings
- the settingssymbolsTable
- the symbols tablejava.lang.Exception
- the exceptionpublic static double computeOrderPLInMoney(SQOrder order, double tickSize, double pointValue)
order
- the ordertickSize
- the tick sizepointValue
- the point valuepublic static double computeOrderPLInTicks(SQOrder order, double tickSize)
order
- the ordertickSize
- the tick sizepublic void endCompute(SQOrderList ordersList, SQSettings settings, com.strategyquant.futurelib.backtester.SymbolsTable symbolsTable) throws java.lang.Exception
OrderComputer
endCompute
in interface OrderComputer
ordersList
- the orders listsettings
- the settingssymbolsTable
- the symbols tablejava.lang.Exception
- the exception