Archive for the 'Uncategorized' Category

26
Aug
09

How open strategy in Dukascopy JForex platform

First of all you need login into JForex platform using your username and password.
Strategies management tree located in ‘Workspace‘ panel which usually placed in left lower corner.
You should see leafs ‘Currencies‘, ‘Strategies‘ and ‘Charts‘. ‘Strategies‘ – this is what we looking for.

Lets say, you have code of your strategy opened somewhere in text editor from where you can simple copy and paste him.

Do right click on ‘Strategies‘ leaf and select ‘New Strategy‘ item.
JForex platform will open new editor window with some initial strategy template.
This template is useful when you need start development but as long we already have code we can dont heed him.
Clear edit area by deleting template.
Copy all code of your strategy into buffer(hint: to select all use hot key Ctrl+A) and paste him into JForex Platform editing area.

Once you did this save the strategy pressing ‘Save‘ button or using hot key ‘Ctrl+S’.
Name of your file should be the same as name of main class of your strategy.
You can get this name looking in the beginning for the code where you should find something like this:

 public class MyGreatStrategy implements IStrategy {
 ....

In this example you need save file under name MyGreatStrategy.java.

Another way add your strategy in platform is open saved file from hard drive.
To to this select ‘Open Strategy‘ from menu and find file with code.

Now lets check is our code bug free and at least can be compiled.
To do this right click on ‘MyGreatStrategy‘ and select ‘Compile‘.
Doing that you will transform your strategy in binary form acceptable for execution of JForex Platform and in same time do code verification for syntax errors.
Depends on size of strategy compilation may take some time.
Results(good or bad) you able to monitor in ‘Messages‘ tab which will change color of title once process is finished.

Imagine that we are leaving in ideal world and everything was ok this time.
From that point we have 2 directions – do historical testing(‘Test‘) to verify logic or go trading(‘Run‘).
In most of the cases we suggest test what you have before trading.
Yes, historical tester not cover full picture and sometimes his results far from the real market situation but he can show is behaviour of your strategy is meet your expectations.

Sometimes you need external libraries which was supplied with strategy code.
In our example additionally to standard Java classes we use extra libraries: axonsoftware-jforex-utils.jar and spread.jar

To include this files in compilation you need provide full path to them in special tag @Library separated by ‘;’ e.g.

 @Library("c:\\extra_libs\\axonsoftware-jforex-utils.jar;c:\\extra_libs\\spread.jar")

Hint: use simple paths like c:\\extra_libs(or /home/user/extra_libs on Unix/MaxOS) this will reduce quantity of errors

Another important thing is adding symbols which is using in your strategy.
Dukascopy JForex platform allow you manage subscriptions for symbols what mean that market updates will be send to you only if you subscribed.
If you strategy working with EUR/USD, USD/JPY and EUR/GBP – dont forget to include them in subscriptions.

Original source

20
May
09

Axon FIX LogViewer is Out

Axon FIX LogViewer

AxonSoftware company announces about release of Axon FIX LogViewer, utility used for the analysis of log files in the FIX-notation.

Axon FIX LogViewer can be useful:

  • to programmers developing applications which using FIX protocol
  • to support engineers who are responsible for maintenance of FIX-compatible solutions
  • to people studying FIX protocol as gives the chance to display all exchange of messages visually

Main features:

  • support of all versions of FIX protocol
  • ability to read custom fields specific to the brokers
  • work with several logs windows in same time
  • message filtering on load stage. You can load messages from file inside specified time frame or/and message type(e.g. exclude MarketDataSnapshotFullRefresh)
  • correct analysis of repeating groups any level of enclosure
  • filters based on message types
  • flexible log view table configuration. You able to select which fields of messages should be mapped into table. Your selection will be remembered and available after restart.
  • export of selected data
  • list of recently opened files
  • saving of customisations of tables and layouts of windows after reboot
  • cross-platform(will work on Linux, Win and Mac)

Original source is here

26
Dec
08

Indicators framework

Indicators is the one of widely used instruments for financial analysis. Almost each trading(manual or automated) platform has support of indicators. This article is our point of view on task how indicators should work inside application.

Preconditions for creation of separate component for indicators calculation:

  • different trading rules may use the same indicators.
    There situations even applying the same parameters. There is no point perform calculation of the same data from different places of application, if it can be done centrally.
  • calculating the value of the indicator is a painstaking task, in which involved mathematical operations and interaction with the repository(s) of historical information.
    Unavoidable time delays that may adversely affect the productivity applications, when the same indicator used from different places of application

Possible architecture

Indicators service can be a separate thread(s) responsible for interaction with subscribers (registration of new requests for indicator calculation, issuance of the latest targeted data on demand, removal of the subscriber), working with repositories of historical data and the direct calculation.

Steps:

  1. Client sends a query, which indicates that it should expect an indicator H with parameters A, B, C. These actions can be performed, for example, the section Init of trading rules.
  2. Service adds a request and increases the count of subscribers. If it can not be register (for some reason) than throws the exception. Upon receipt of the exception system should block all accounts signed by given trading rule.
  3. With the arrival of market prices indicator service should calculate values according to subscription.
  4. To get latest calculated values of indicators, application should use interface, offered bu service. If request contains indicator or settings that were previously not register, service must return an exception. In handling this exceptional situation can be, depending on location, to register / subscribe to the indicator. As a result, following successful.
  5. Upon completion of work (for example, the account given by trading rule, was blocked) must submit a request to make a come-off.

Exceptions

  • Error while registering a new request for calculation indicator
  • Error treatment without subscription
  • Error calculation indicator. Incorrect data

Original article locate here