Description:
This task consists of creating a simple application which will serve as an example to individual developers. Although limited & exemplary, the application must be fully functional. I will be available freely in the AppStore mentioned above, along with its source code on an open BSD-like license.
All thanks to the independent Application Programming Interface platform allowing a secure connectivity to new FX platform called xStation (http://www.xfsol.com/broker-solutions/front-end-solutions/xstation) which gets more and more popularity among brokers, including XTB, xDirect etc. What is more, the released API enables to create autonomous software improving & extending functionalities already accessible through existing Desktop, Web & Mobile clients.
The application will be connecting to the Broker’s transaction server through TCP/IP API using two bidirectional sockets. Socket 1, called RR-Socket will serve as a channel for request-reply communication for simple functions and Socket 2, called Streaming-Socket will serve as a channel for streaming subscription & streaming receival in case of frequently changing data such as market prices & order updates.
The API packets are encoded in simple JSON, and are really straightforward to use. You will find the necessary specification attached. For development & testing purposes you will connect to a demo transaction server.
Your goal is to create a simple desktop application listening to market prices through the Streaming-Socket, computing indicator values chosen by the user & evaluating the rules defined by the user & generating BUY/SELL/CLOSE signals.
Necessary indicators (you may use an open-source Technical Analysis library of your choice, e.g. one of those: http://www.elitetrader.com/vb/showthread.php?threadid=85659):
• SMA
• EMA
• Momentum
• MACD
• RSI
• OBV
• ADX
• Acc/Dist
• Stochastic Oscillator
Necessary functions:
• Defining rules with: >, <, =, BETWEEN, CROSSES (was less, is greater & the other way round)
on both sides of a rule, there may be an INDICATOR or a CONSTANT
e.g. RULE_1 = MACD(“EURUSD”) BETWEEN (50, MOMENTUM(“EURUSD”)*7,35)
• DURATION wrapper for a RULE (e.g. trigger BUY “EURUSD” FOR 50% EQUITY WHEN RULE_1 FOR 5MIN)
• JOINING rules with AND, OR, NOT (e.g. trigger CLOSE 100% “EURUSD” WHEN ( (RULE_1 AND RULE_2) OR (NOT RULE_3)) FOR 2 days
• Assigning actions (buy %, sell%, close%) where % is % of equity or open position to definable events (examples above – trigger close 80% (of open position), trigger buy eurusd for 50% equity)
PRO FUNCTIONS:
• charting prices & indicators
• user-defined indicators
• backtesting a strategy on historical data
• live mode (executing trades through RR-Socket) with manual confirmation (popup)
• live mode without confirmations (executing trades through RR-Socket)
Object structure:
• Symbol (has current market data (Open, Close, High, Low, Volume)
• Constant
• Indicator (simple OPEN, CLOSE, HIGH, LOW, VOLUME values are also indicators in this meaning)
• Logical relations (> < = Between, Crosses, AND, OR, NOT)
• Rule (logical expression of indicators & relations), may be wrapped in DURATION or INSTANT
• ACTION – BUY/SELL/CLOSE, and how much, when a rule is met.
• Strategy – a set of defined actions
A GUI for easy strategy creation is required.
The application must be platform-independent, so best technology recommendation is Java. Python is also acceptable. The application must contain an easy to use GUI.
Please give your pricing.
Feel free to make any suggestions, improvements or change requests – I am opened to negotiations.
Detailed API documentation: http://xstore-forum.xsocial.eu/api.pdf