Tâche terminée
Spécifications
Develop an Expert Advisor for trading futures with AMP Futures on Meta Trader 5. The signals, triggered when a Custom Financial Instrument (CFI) breaks out of a channel, will generate market orders for 2 or 3 different contracts.
The channel will be defined as the highest high (or lowest low) of the last length bars, where length is a predefined integer >= 1. The strategy enters long if the price of the current bar is higher than the upper channel band of the previous bar. It enters short if the price of the current bar is lower than the lower channel band of the previous bar.
- The system, once entered, is always in the market during predefined trading times (entry, and then each exit is a reversal until close of session when flat).
- All orders will be market orders.
- When reversing, close everything out first, then open positions. (e.g. if currently long 1 ABC, sell at market 1 ABC, then sell at market 1 ABC (not long 1 ABC, sell at market 2 ABC).
- After each signal, check that all orders have been executed. If not, or if any order is rejected, flatten all positions and stop.
- No pyramiding.
The above strategy will be applied to a predefined Custom Financial Instrument (CFI), and the trades will also be predefined i.e. long and short in 2 (sometimes 3) different contracts (ABC, XYZ, EFG).
I would like the ability to predefine as input before starting time of session :
- Trading day (generally Monday to Friday).
- Starting and ending times of session, ST and ET in Pacific Time e.g. 07:00 and 13:00.
- Time frame e.g. 1 minute.
- length, an integer, which is the length of the channel in the strategy.
- ABC, XYZ, and EFG (the 3 contracts I will be trading), and a, x, and e (integers representing the number of contracts of ABC, XYZ and EFG respectively, where positive = long, and negative = short, 0 = no position). So for example, if a = -1, x = 1, and e = 0, then a buy signal would result in market orders to sell 1 ABC and buy 1 XYZ; a sell signal would generate market orders to buy 1 ABC and sell 1 XYZ.
- Tick value of CFI, e.g. 0.25
- CFI will be defined as (fl1 * ABC) + (fl2 * clABC * XYZ / clXYZ) + (fl3 * EFG), where fl1, fl2 and fl3 are double, and where clABC and clXYZ are ST's previous bar's close for contracts ABC and XYZ (e.g. if starting time is 8:30am and time frame is 1 minute, close of 8:29am bar). Hopefully the close proximity of clABC and clXYZ to ST will not affect the generation and functionality of CFI. If it does, then the next to previous bar's close for ABC and XYZ can be used instead (e.g. if starting time is 8:30am and time frame is 1 minute, close of 8:28am bar).
Other pre-requisites :
- Access to source code which should have minimum documentation and comments, and which I should be able to change and compile if necessary.
- Ability to stop trading (flatten all positions) at any time.
- If relevant, possibility of the use of VPS in the future should be taken into account.
- I expect support with error debugging.
- The EA or strategy is not to be marketed or resold in the future by the developer.