Modifier and Type | Interface and Description |
---|---|
static class |
ITesterClient.DataLoadingMethod
Different ticks loading methods
Depending on selected method different amount of ticks will be passed to the IStrategy.onTick() method
|
static class |
ITesterClient.InterpolationMethod
Different techniques of how to convert bars into ticks
|
Modifier and Type | Method and Description |
---|---|
void |
createReport(File file)
Deprecated.
use
createReport(long, File) instead |
void |
createReport(long processId,
File file)
Will create and write report into the given file.
|
Future<?> |
downloadData(LoadingProgressListener loadingProgressListener)
Downloads data into the local cache.
|
Commissions |
getCommissions()
Returns Commissions object filled with limits and corresponding commissions for deposit, equity and turnover amounts
|
ITesterDataInterval |
getDataInterval()
returns ITesterDataInterval that is used in the testing process
|
boolean |
getEventLogEnabled()
Returns true if event log enabled
|
boolean |
getGatherReportData()
Deprecated.
use
createReport(long, File) instead |
double |
getInitialDeposit()
Returns initial deposit
|
Currency |
getInitialDepositCurrency()
Deprecated.
Use
getInitialDepositJFCurrency() instead |
ICurrency |
getInitialDepositJFCurrency()
Return deposit currency
|
int |
getLeverage()
Returns leverage
|
int |
getMarginCutLevel()
Returns margin cut level in percents
|
double |
getMCEquity()
Returns minimum equity amount
|
Overnights |
getOvernights()
Returns Overnights object
|
boolean |
getProcessingStats()
Returns true if processing stats enabled
|
ITesterReportData |
getReportData(long processId)
Returns object containing results of the execution of a strategy.
|
void |
setCommissions(Commissions commissions)
Sets the commissions information.
|
void |
setDataInterval(ITesterClient.DataLoadingMethod dataLoadingMethod,
long from,
long to)
Sets the DataLoadingMethod to use for ticks generation and time interval when to start and end testing process.
|
void |
setDataInterval(Period period,
OfferSide offerSide,
ITesterClient.InterpolationMethod interpolationMethod,
long from,
long to)
Sets the period to use for ticks generation and time interval when to start and end testing process.
|
void |
setEventLogEnabled(boolean eventLogEnabled)
If true then event log information will be collected when strategy is run.
|
void |
setGatherReportData(boolean gatherReportData)
Deprecated.
use
createReport(long, File) instead |
void |
setInitialDeposit(Currency currency,
double deposit)
Deprecated.
Use
setInitialDeposit(ICurrency, double) instead |
void |
setInitialDeposit(ICurrency currency,
double deposit)
Sets initial deposit amount and currency.
|
void |
setLeverage(int leverage)
Sets leverage.
|
void |
setMarginCutLevel(int mcLevel)
Sets level in percents, exceeding which the system will start margin cut procedure reducing use of leverage.
|
void |
setMCEquity(double mcEquity)
Sets minimum equity amount.
|
void |
setOvernights(Overnights overnights)
Sets the overnight vales.
|
void |
setProcessingStatsEnabled(boolean processingStats)
If true then the tester will collect statistics about processing time in different subsystems.
|
long |
startStrategy(IStrategy strategy,
IStrategyExceptionHandler exceptionHandler,
LoadingProgressListener testerProgressListener)
Starts the strategy
|
long |
startStrategy(IStrategy strategy,
LoadingProgressListener testerProgressListener)
Starts the strategy
|
long |
startStrategy(IStrategy strategy,
LoadingProgressListener testerProgressListener,
ITesterExecution testerExecution,
ITesterUserInterface testerUserInterface)
Starts the strategy
|
long |
startStrategy(IStrategy strategy,
LoadingProgressListener testerProgressListener,
ITesterVisualModeParameters testerVisualModeParameters,
ITesterExecution testerExecution,
ITesterUserInterface testerUserInterface)
Starts the strategy
|
long |
startStrategy(IStrategy strategy,
LoadingProgressListener testerProgressListener,
ITesterVisualModeParameters testerVisualModeParameters,
ITesterExecution testerExecution,
ITesterUserInterface testerUserInterface,
boolean writeHTDataToFiles)
Starts the strategy.
|
addClientGUIListener, addNewsFilter, closeChart, compileStrategy, connect, connect, disconnect, getAvailableInstruments, getCaptchaImage, getClientGUI, getNewsFilter, getPreferences, getRemoteStrategyManager, getRunningPlugins, getStartedStrategies, getSubscribedInstruments, isConnected, loadStrategy, openChart, packPluginToJfx, packToJfx, reconnect, removeClientGUIListener, removeNewsFilter, runPlugin, runPlugin, setCacheDirectory, setErr, setOut, setPreferences, setSubscribedInstruments, setSystemListener, startStrategy, startStrategy, stopPlugin, stopStrategy
void setDataInterval(Period period, OfferSide offerSide, ITesterClient.InterpolationMethod interpolationMethod, long from, long to)
period
- defines period that will be used for ticks generation. Default value Period.TICK will be used if this parameter is nullfrom
- when to start testing process. Default value will be previous day startto
- when to stop testing process. Default value will be previous day endvoid setDataInterval(ITesterClient.DataLoadingMethod dataLoadingMethod, long from, long to)
from
- when to start testing process. Default value will be previous day startto
- when to stop testing process. Default value will be previous day endITesterDataInterval getDataInterval()
Future<?> downloadData(LoadingProgressListener loadingProgressListener)
loadingProgressListener
- listener to control downloading processlong startStrategy(IStrategy strategy, LoadingProgressListener testerProgressListener) throws IllegalStateException, IllegalArgumentException
strategy
- strategy to runtesterProgressListener
- provides progress information, allows to cancel strategyIllegalStateException
- if not connectedIllegalArgumentException
- if one of the parameters is nulllong startStrategy(IStrategy strategy, IStrategyExceptionHandler exceptionHandler, LoadingProgressListener testerProgressListener) throws IllegalStateException, IllegalArgumentException
strategy
- strategy to runexceptionHandler
- if not null then passed exception handler will be called when strategy throws exceptiontesterProgressListener
- provides progress information, allows to cancel strategyIllegalStateException
- if not connectedIllegalArgumentException
- if one of the parameters is nulllong startStrategy(IStrategy strategy, LoadingProgressListener testerProgressListener, ITesterExecution testerExecution, ITesterUserInterface testerUserInterface) throws IllegalStateException, IllegalArgumentException
strategy
- strategy to runtesterProgressListener
- provides progress information, allows to cancel strategytesterExecution
- allows to control strategy execution process(stop, continue, cancel)testerUserInterface
- provides access to various strategy testing GUI partsIllegalStateException
- if not connectedIllegalArgumentException
- if one of the parameters is nulllong startStrategy(IStrategy strategy, LoadingProgressListener testerProgressListener, ITesterVisualModeParameters testerVisualModeParameters, ITesterExecution testerExecution, ITesterUserInterface testerUserInterface) throws IllegalStateException, IllegalArgumentException
strategy
- strategy to runtesterProgressListener
- provides progress information, allows to cancel strategytesterVisualModeParameters
- visual mode optional parameterstesterExecution
- allows to control strategy execution process(stop, continue, cancel)testerUserInterface
- provides access to various strategy testing GUI partsIllegalStateException
- if not connectedIllegalArgumentException
- if one of the parameters is nulllong startStrategy(IStrategy strategy, LoadingProgressListener testerProgressListener, ITesterVisualModeParameters testerVisualModeParameters, ITesterExecution testerExecution, ITesterUserInterface testerUserInterface, boolean writeHTDataToFiles) throws IllegalStateException, IllegalArgumentException
strategy
- strategy to runtesterProgressListener
- provides progress information, allows to cancel strategytesterVisualModeParameters
- visual mode optional parameterstesterExecution
- allows to control strategy execution process(stop, continue, cancel)testerUserInterface
- provides access to various strategy testing GUI partswriteHTDataToFiles
- if the flag is false, then history loading and indicator calculation with big look back will be based not on interpolated data which was fed to strategy but with real data from real cacheIllegalStateException
- if not connectedIllegalArgumentException
- if one of the parameters is null@Deprecated void setGatherReportData(boolean gatherReportData)
createReport(long, File)
insteadcreateReport(long, File)
@Deprecated boolean getGatherReportData()
createReport(long, File)
insteadcreateReport(long, File)
void setEventLogEnabled(boolean eventLogEnabled)
eventLogEnabled
- true to enable event logboolean getEventLogEnabled()
void setProcessingStatsEnabled(boolean processingStats)
processingStats
- if true then processing statistics will be collected by the testerboolean getProcessingStats()
@Deprecated void createReport(File file) throws IOException, IllegalStateException
createReport(long, File)
insteadIOException
IllegalStateException
createReport(long, File)
void createReport(long processId, File file) throws IOException, IllegalStateException
processId
- process id assigned to the strategyfile
- file where to save reportIOException
- if file cannot be writtenIllegalStateException
- when there is not report data availableITesterReportData getReportData(long processId) throws IllegalStateException
processId
- process id assigned to the strategyIllegalStateException
- when there is not report data available@Deprecated void setInitialDeposit(Currency currency, double deposit) throws IllegalArgumentException
setInitialDeposit(ICurrency, double)
insteadIllegalArgumentException
@Deprecated Currency getInitialDepositCurrency()
getInitialDepositJFCurrency()
insteadvoid setInitialDeposit(ICurrency currency, double deposit) throws IllegalArgumentException
currency
- deposit currency. Must be one of the accepted currencies for deposit. Default value USDdeposit
- deposit amount. Default 50,000IllegalArgumentException
- if currency is not one of accepted currencies for depositsdouble getInitialDeposit()
ICurrency getInitialDepositJFCurrency()
void setLeverage(int leverage)
leverage
- leverageint getLeverage()
void setCommissions(Commissions commissions)
new Commissions(false)
object is passed,
the commission will be calculated as described in
Commission Policy
document using "Deposit with Dukascopy" column values.
Changing this value will take effect only if called before testing process is startedcommissions
- commission in usd per 1milCommissions getCommissions()
void setOvernights(Overnights overnights)
new Overnights(false)
object is passed,
the default overnights will be used
Changing this value will take effect only if called before testing process is startedovernights
- commission in usd per 1milOvernights getOvernights()
void setMarginCutLevel(int mcLevel)
mcLevel
- margin cut levelint getMarginCutLevel()
void setMCEquity(double mcEquity)
mcEquity
- minimum equity amountdouble getMCEquity()
Copyright © 2016. All rights reserved.