Remote Run

Although remote strategy environment strives to have the same execution conditions as the local one, there are multiple differences that one should be aware of when writing a strategy that can be ran remotely. Most of them are consequences of the fact that there is no access neither to the local machine's resources, nor the local platform settings and appearance. Those differences are:

  1. The strategy on its start needs to subscribe to all instruments it is going to work with.
  2. There are no charts available, hence, IContext.getChart will always return null.
  3. There is no work with files (i.e., java.io.File).
  4. The previous point implies that all custom indicators need to be defined within the strategy itself.
  5. One may not use @RequiresFullAccess annotation, hence, in order to use external libraries, during the compilation he has to place them in the IContext.getFilesDir directory.
  6. In strategy parameters self-defined constants are not permitted.
  7. Strategy logs don't get written in the platform, rather they can be accessed by selecting in the plaform Portfolio -> Strategy Log.
  8. IConsole.get*().println() should be called no more often than once per 1ms. Otherwise only the last statement will get logged.
  9. Each strategy slot is allocated 48MB of RAM. Note, that not all of this memory could be used by the strategy itself, part of it is used by the Dukascopy strategy engine, which runs the strategy, performs feed operations, etc. Thus, one should be aware of this if the strategy does a significant amount of data persistance, e.g., keeping historical data in data structures like java.util.Map, java.util.Set.
  10. Processor load restrictions apply, therefore the strategy should get tested on DEMO for CPU usage. One should be aware of this when writing multi-threading strategies.

Remote strategies can not only be managed from the platform, but also from JForex-SDK and Plugins by using the IRemoteStrategyManager interface. For the former approach one can find examples in the IRemoteStrategyManager javadocs. For the latter - see the StratTablePlugin example in the latest JForex-SDK project (for plugin build assembly see the project's pom.xml file).

The information on this web site is provided only as general information, which may be incomplete or outdated. Click here for full disclaimer.