Dukascopy Support Board http://www.dukascopy.com/swiss/english/forex/jforex/forum/ |
|
ITesterClient run strategy from command line http://www.dukascopy.com/swiss/english/forex/jforex/forum/viewtopic.php?f=65&t=48587 |
Page 1 of 1 |
Author: | Isak [ Sat 29 Dec, 2012, 15:22 ] |
Post subject: | ITesterClient run strategy from command line |
As part of the documentation on ITesterClient and associated API, it would be *very* useful to have a sample application such as the following: A command-line tool for invoking a single back-test from the shell, where the following are specified by command-line arguments:
|
Author: | API Support [ Mon 07 Jan, 2013, 09:27 ] |
Post subject: | Re: ITesterClient sample application |
Isak wrote: strategy file path You can't run in JForex-SDK a strategy from a .jfx file, nor you can pass parameter xml file to it. Please use the JForex platform for such purposes.
strategy parameter xml file path |
Author: | Isak [ Mon 07 Jan, 2013, 12:05 ] |
Post subject: | Re: ITesterClient sample application |
Ok thanks, I see. Suppose I have a given strategy, StrategyX implementing IStrategy. Now I want to invoke (from the OS command line e.g. batch file / bash script) an application that runs (without any user input) a backtest of this strategy. For example, I could invoke the strategy from the OS like this: BacktestStrategyX 120101 130101 EURUSD AllTicks (In my case I don't really care about the report or results or anything, since my strategies document themselves by writing to custom log files etc... but this may be different for others) Now, in order to develop BacktestStrategyX, I would need: 1. StrategyX.java 2. The JForex API Can you help me on how to go about developing BacktestStrategyX.java ? What I was trying to suggest in my original post is that such a sample application should be included in the wiki, as part of documentation on ITesterClient. |
Author: | API Support [ Tue 08 Jan, 2013, 18:04 ] | ||
Post subject: | Re: ITesterClient sample application | ||
Add the following program to you JForex-SDK project: package jforex.sdk;Then export the program to a runnable jar file and run it in the following manner: java -jar JarFileName.jar username password ./YourStrategy.java "05/01/2012 00:00:00" "05/01/2012 00:10:00"If you don't want the strategy to get recompiled every time you run the program, consider passing the strategy's .class file to the program and remove the compilation logic. Isak wrote: What I was trying to suggest in my original post is that such a sample application should be included in the wiki, as part of documentation on ITesterClient. We don't plan to post this example in our wiki, since this is a Java SE problem, not a JForex-API problem. In general wiki's purpose is to show users how to use the JForex-API functionality, not Java SE in whole (which itself has countless online tutorials and forums).
|
Author: | tcsabina [ Wed 09 Jan, 2013, 10:58 ] |
Post subject: | Re: ITesterClient sample application |
This is awesome!!! |
Author: | Isak [ Thu 10 Jan, 2013, 14:24 ] |
Post subject: | Re: ITesterClient sample application |
Thank you very much! Exactly what I needed! |
Author: | mcquak [ Fri 15 Jun, 2018, 21:40 ] |
Post subject: | Re: ITesterClient run strategy from command line |
It's actually quite easy. Try to read this Building Custom Strategy Trader on Jforex Api, hopefully it makes sense. I tried to describe how to do exactly what you need. Hopefully it helps. |
Page 1 of 1 |