Auftrag beendet
Spezifikation
I would like to develop MT5 Expert Advisor to trade currency basket based on streamed economic calendar data. This will involve collating economic calendar data from MT5 Terminal and executing trades on selected pairs for a given currency.
So objective is to implement a basket trading strategy based on MT5 economic calendar.
Requirements are as follows / Design concepts
1. Design a neat dashboard displaying a well rendered forex economic calendar
a. Template rendered as per mql5 website, or better. I expect a weekly calendar is downloaded at the turn of the week - Sunday
b. Must use the native MT5 terminal economic calendar as a source
c. Must refresh for actual data at shortest time possible after release. The source of this data must be MT5 terminal.
d. Must include a countdown to each event and sound alert at pre-set intervals
e. Must be customizable or filtered by the following
i. By a news impact
ii. By currency
iii. By time horizon e.g., today, this week, next year
2. The dashboard should facilitate strategy development aimed at defining how economic calendar data is expected to affect a currency. Provide a buy, sell or no signal depending on how the economic calendar actual data compare to expectations.
a. Select events we plan to trade (simple tick box would do) or a yes/no selection on the calendar dashboard
b. Select direction depending on expected impact on currency. E.g., increase in unemployment is negative for USD, while increase in employment is positive
c. Ability to set threshold – such as variance of 5% as a minimum to trigger trade
d. Ability to save selection for event
e. Ability to compare actual with consensus, event for the numbers that come with additional letters like K or M
3. Function to execute market orders for currency selected pairs (basket), with direction of executed trade depending on currency signal. Actual news generate signal based on above definitions
a. Market orders
i. With stop loss as a multiplier of ATR
ii. Lot size – manual and money management options
b. Currency directional - for example – if signal is to buy USD, the traded pairs should be Buy USDJPY, and sell EURUSD.
c. Ability / input >> nominate traded pairs for each currency (USD, JPY, CHF, GBP, AUD, NZD, CAD)
d. must be marked with a magic number
4. Trailing stop function to modify existing orders
a. Stop loss set as a multiplier of ATR (set ATR period, chart, and multiplier)
b. ATR stop loss is adjusted to adapt to market conditions as follows
i. For buy position and RSI adaptability trigger level is set as >= 50, ATR Trailing loss is adjusted by a buy adaptability factor calculated as (RSi/100)*50 (threshold). So, if we are trailing a buy position by 100pips and RSI=70
1. Adaptability factor = 70/100* 50 = 35pips
2. Adjusted trailing loss is 100pips-35pips =65pips
ii. For sell open position and RSI is <= 50 ATR Trailing loss is adjusted by a sell adaptability factor calculated as (100-RSi)/100) *50 (threshold). So, if we are trailing a buy position by 100pips and RSI=40
1. Adaptability factor = (100-40)/100* 50 = 30pips
2. Adjusted trailing loss is 100pips-30pips =70pips
c. Trailing loss is adjusted only when it offers more protection (shrinking ATR, or RSI spike)