Job Description
Forex economic data release algorithm
What this algo is not
This is not a straddle strategy which ignores any consideration of a fair market price.
Whilst this algo does rely on speed (for part of its profits) it is not wholly dependent on fast entry and it does not close a trade within milliseconds. Trades will often stay open up to 1 hour if the market takes time to reach the profit target.
What this algo is
The profit source is two-fold. Firstly, faster is better as it will allow entry at a better price. Secondly, and more importantly, profit is generated by me through researching economic data releases and interpreting the actual release numbers better than other market participants.
An additional benefit in using an algo as opposed to manual trade is the reduction of potential errors from trading in highly volatile/exciting markets.
Prior to a selected economic release, I will research the release and create a table (within the algo interface) of expected pip movements (the pip profit target) for a currency pair based on the range of possible values for the actual release number.
I am not trying to predict the number, but I am trying to predict the market's reaction to the number.
Economic calendar Feed
The algo needs to retrieve the data release number from the internet by the fastest possible method; e.g. dailyfx calendar, investing.com/economic-calendar, fxstreet.com/economic-calendar.
There could be a number of ways to receive the data whether through an API, RSS, XML feed or a webscrape. I do not know which is quickest. I expect the developer to advise in this area based on a list of economic calendar providers I will make availalbe. It is likely all will be in table format but some may have an API available.
Using a number of sources concurrently will be of benefit since no one vendor will always be the fastest and there will often be more than one number to collect.
Using a combination of many sources will ensure the fastest possible data. It is not required to cross-check the data between sources and only the algo only needs one number for each economic data release required.
Depending on the release type and time there may be 1 or more numbers to collect on each event; e.g. actual and prior revised number. If another data point is released at the same time this also may need to be considered; e.g. a range of values for NFPs may only be valid as a trade opportunity if the wage growth is not >+/-0.1% from expected value.
Economic calendar interface
There must be an interface created whereby I can select which data events to trade and for which numbers I need to enter a range of values and associated pip targets.
For the release number, I should be able to enter a step value together with min and max range values in order to then be requested to enter pip targets at each value into the interface.
If I were only concerned with 1 number at a time I would simply have a range of values for the release and an associated profit target for each one. However, at a minimum, the prior release value will be released as a revision and hence I will consider in my research. There may also be other numbers for other events released at the same time.
Therefore additional logic needs to be written for other numbers selected through the interface to state "Only trade if [other selected numbers] are within the range [x] to [y]".
So there are 2 selection criteria:
- the release being traded (1 number) for which a range of values are entered; and
- other numbers being released at the same time (0 or more numbers) for which a min and max value will be entered. The algo can only trade if actual release numbers are within the values specified.
Parameter inputs
⦁ Economic event(s)
⦁ Range of economic values
⦁ Pip targets
⦁ Currency pair
⦁ Max Lot size and step value for limit order size
Economic event
The algo will retreive the calendar and present this within the interface. There will be a selection method whereby I select the event which I wish to trade. This will be one event and one number but there will be other numbers associated with the trade (see below).
Range of economic values and pip targets
For each specific event I chose to trade, I will enter parameter values for the range of expected data release values and an associated pip profit target for each prior to the release.
For the parameter inputs, I should be able to select the low and high of the range and the step value; e.g. 95 to 105 and 1 gives 11 value inputs plus 11 pip targets.
For example, a number may be expected to be 100 and I may enter a range of 11 values between 95 and 105 together with a pip target for each one. Pips may be positive above the number and negative below indicating a buy or sell order.
Currency pair
A single currency pair to trade on the release will be selected within the interface.
Max Lot size and step value for limit order size
The max lot size will also be a parameter input and will be associated with the pip profit target. For example, a pip target of 10 may only trade max 0.2 lots whereas a pip target of 100 may trade max 1 lot. I will enter a max lot size for each pip target/economic value.
The algo will have to compare the actual release number with the prepared range of expected values and will use the associated pip profit target and market price just prior to the release to enter limit orders at calculated prices (prior market price +/- specified pip target).
The market price prior to the release is the average trade price in the minute preceding the scheduled release time. This is considered to be a fair price prior to the release and hence the profit target is set by number of pips from the prior market price.
Limit orders will be placed at a number of price levels between the market price and target price. Once any limit order is filled, all remaining limit orders at a worse price are cancelled.
Limit order size will be calculated from the max lot size (derived from the number release and inputs) and a percentage input into the interface.
For example, input 25% as step value and algo will place a limit order at prior market price for 100% of max lot size, 75% of max lot size at 75% from profit target (to prior market price), 50% at 50% and 25% at 25% away from profit target.
Once the orders are placed the algo will not interact any further with the market until the next identified release.
Limit order types
If it is possible to enter orders which take the market price if better than limit order price then this is preferred. I do not know what order types are available with each broker.
However, if limit orders can only be set at a better price (e.g. below market for buy limit orders) then limit orders at a worse price must be cancelled immediately and not rest as stop orders.
For example using limit orders which do not allow execution at market price if better, if the data is USD negative, the algo may enter limit orders to buy EURUSD as follows:
Buy 1 lot at 1.1200 limit, Buy 0.5 lot at 1.1250 limit, Buy 0.2 lot at 1.1275 limit with a target price for close at 1.13.
If the 1.1250 limit order is taken, the 0.2 lot limit order at 1.1275 is cancelled (being at a worse price).
For example using limit price or better orders, if the limit orders above are sent to market and ask price is 1.1210 then 0.5 lots should be bought at 1.1210 since it is below the limit price of 1.1250 and all remaining limit orders cancelled.
The risk of not getting filled in a fast moving market must be considered.
If the market price is above all my limit buy orders then no trades will be triggered unless the market price moves down to the higher limit buy order.
The profit target (1.13 in the example) will be calculated based on my expectation for 'fair value' based on the release number, pip target (100) and the prior market price (1.12).
For example, if I believe the fair market price post release is 1.13 then that will be the profit target regardless of the entry price.
Remote server hosting
The algo would be hosted on Beeks and use FIX API (or alternative protocol/ technology) to give the fastest possible result.
Risk management
The risk of 2 or more orders getting filled must be considered. Lot sizes are determined by me prior to the release.
Platform/ technology
I am agnostic as to the technology used other than to say faster is better and order type is important.
Broker
The selected broker will provide a real NDD/STP service and must provide the technology required to handle trades. An internal book of liquidity (as well as external) is preferred.
Spotware ctrader/calgo uses c# and provides a FIX API free of charge but they do not have limit or better orders.
If other brokers allow access via FIX then these will be considered. Speed and order types are the most importance consideration.
Other comments:
I appreciate other traders use Bloomberg and will therefore have faster read access to the release than me. I understand Bloomberg Tradebook has such an algo.
However, I am currently trading manually and able to make profits. Profits are however mostly due to the understanding of where price should trade post-release.
I believe the benefit of the algo to be adding additional profit by being quicker and therefore getting a better price and also reducing the likelihood of an error made under pressure.
Comments
Credentials?
interested, >300
Dear Sir,
I have gone through the project description and understand the requirements.
I have developed several cBots and indicators for cTrader/CAlgo platform.
My skype id is: satyam_hpcs
My email id is: hellosatyam.in@gmail.com
My contact no is: +91 7428538589
My whatsapp no is: +91 7428538589
I am sure I can deliver the project on time and ensure the quality of the deliverable at the same time because Customer satisfaction is our motto and meeting deadlines is our passion.
Looking forward for this project very much.
Regards,
Satyam