Hi,
Quote:
When I attempt to start multiple strategies, after the first one is started an exception is thrown that says a strategy is already running. The IClient interface has a function getStartedStrategies(), so I assume it's intended we can start multiple strategies.
Running multiple strategies simultaneously from a single jar will be available with a next release, which is coming in a near future.
Quote:
How do we start another strategy without waiting for all strategies to complete?
Use a method
startStrategy on the same client instance. The startSrategy method returns an id. This is the same id, that is used as a key in the map which is returned by the getStartedStrategies method.
long strAID = client.startStrategy(new ClassA());
long strBID = client.startStrategy(new ClassB());
Quote:
Do they execute serially or in parallel?
They are executed in a parallel threads.
Quote:
Do they run in their own 'sandbox', so to speak, or are they running on the same virtual account? Or to put it another way, does each one have its own bankroll.
Each strategy is using it's own virtual account.
Quote:
When you opt to close a filled order, in a live test it takes some time for the close operation to complete, however I may wish to get an immediate estimate of the account equity that is as accurate as possible. With this in mind:
** In live testing I could just call IOrder.waitForUpdate ( milliseconds ), but in the strategy backtester this seems like a bad idea. I don't know how long the other thread(s) involved in that estimation will take to respond, and even a 1ms delay can significantly increase the time a test takes if the test is large enough. Is there a better way?
It's reasonable to test the same strategy, that you will use in a live. It's just to be sure that it will behave like it supposed to. It's better to use the same IOrder.waitForUpdate
Quote:
If, after I'm finished retrieving my cache, I know I won't need any data on the server anymore: is it possible to disconnect and have the tester just assume the disk cache is up to date? This would, for example, be very handy in skipping the logon process altogether if the local cache is known to be good.
Due to our implementation it's not possible
Quote:
How do you detect a margin call within a strategy? I haven't seen any messages that come through onMessage() that make it obvious, and I'm not sure where or if an exception is being thrown in order to catch/handle it.
Use an IAccount.getUseOfLeverage() to determin it. When the value returned by this method is close to IAccount.getMarginCutLevel() (by default it's 200%), it means that margin cut will happen.