|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ITesterClient
Contains methods to control testing process
| Nested Class Summary | |
|---|---|
static class |
ITesterClient.InterpolationMethod
Different technics of how to convert bars into ticks |
| Method Summary | |
|---|---|
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 |
boolean |
getEventLogEnabled()
Returns true if event log enabled |
boolean |
getGatherReportData()
Returns true if tester is set to gather report data |
double |
getInitialDeposit()
Returns initial deposit |
Currency |
getInitialDepositCurrency()
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 |
void |
setCommissions(Commissions commissions)
Sets the commissions information. |
void |
setDataInterval(Period period,
OfferSide side,
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)
Set to true to tell the tester to gather report data. |
void |
setInitialDeposit(Currency 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 |
| Methods inherited from interface com.dukascopy.api.system.IClient |
|---|
addNewsFilter, connect, connect, getCaptchaImage, getNewsFilter, getStartedStrategies, getSubscribedInstruments, isConnected, loadStrategy, reconnect, removeNewsFilter, setCacheDirectory, setErr, setOut, setSystemListener, setSubscribedInstruments, startStrategy, startStrategy, stopStrategy |
| Method Detail |
|---|
void setDataInterval(Period period,
OfferSide side,
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 endFuture<?> downloadData(LoadingProgressListener loadingProgressListener)
loadingProgressListener - listener to control downloading process
long startStrategy(IStrategy strategy,
LoadingProgressListener testerProgressListener)
throws IllegalStateException,
NullPointerException
strategy - strategy to runtesterProgressListener - provides progress information, allows to cancel strategy
IllegalStateException - if not connected
NullPointerException - if one of the parameters is null
long startStrategy(IStrategy strategy,
IStrategyExceptionHandler exceptionHandler,
LoadingProgressListener testerProgressListener)
throws IllegalStateException,
NullPointerException
strategy - strategy to runexceptionHandler - if not null then passed exception handler will be called when strategy throws exceptiontesterProgressListener - provides progress information, allows to cancel strategy
IllegalStateException - if not connected
NullPointerException - if one of the parameters is nullvoid setGatherReportData(boolean gatherReportData)
gatherReportData - true to gather report databoolean getGatherReportData()
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()
void createReport(File file)
throws IOException,
IllegalStateException
createReport(long, File) instead
IOException
IllegalStateExceptioncreateReport(long, File)
void createReport(long processId,
File file)
throws IOException,
IllegalStateException
processId - process id assigned to the strategyfile - file where to save report
IOException - if file cannot be written
IllegalStateException - when there is not report data available
void setInitialDeposit(Currency currency,
double deposit)
throws IllegalArgumentException
currency - deposit currency. Must be one of the accepted currencies for deposit. Default value USDdeposit - deposit amount. Default 50,000
IllegalArgumentException - if currency is not one of accepted currencies for depositsdouble getInitialDeposit()
Currency getInitialDepositCurrency()
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 started
commissions - 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 started
overnights - commission in usd per 1milOvernights getOvernights()
void setMarginCutLevel(int mcLevel)
mcLevel - margin cut levelint getMarginCutLevel()
void setMCEquity(double mcEquity)
mcEquity - minimum equity amountdouble getMCEquity()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||