Specification
Desired outcome
- Functional EA for MT4
- Source code for the EA for MT4
- Indicators that are used in EA being drawn on the chart for MT4
Other add-ons expected from you as developer:
- Handling of simple errors
- Handling of reconnections
- Your suggestions
Description of the EA
The EA will trade long/short positions for US Gold CFDs. It works on closed bid bars and only one trade can be open at a time. It works on the platform's stochastic indicator and support/resistance levels. I should be able to modify parameters for Stochastic. The support/resistance levels are pre-determined. The stochastic and support/resistance level should be drawn on the chart.
Entry:
When the price reaches a support level and the stochastic confirms the buy signal, a limit order is entered at the support level when the level is tested a second time.
When the price reaches a resistance level and the stochastic confirms the sell signal, a limit order is entered at the support level when the level is tested a second time.
If, however, the price closes below the support level or above the resistance level (the first time), no order is placed. I would like to be able to control how sensitive the EA is in regards to when to enter. ie: $0.20 below/above resistance&support, $0.10...
Exit:
If EA enters a long position, the Take Profit (TP) should be the nearest resistance level.
If EA enters a short position, the TP should be the nearest support level.
Risk management:
A stop loss will be placed for each order. It will be equal to half of the potential gain up to $1 of the long/short position
I should be to control how many contracts can be entered into each trade
Open orders need to be cancelled if not fulfilled after 6hours. I should also be able to modify this
Executed orders need to be closed after 2 hours. I should also be able to modify this
An example of a trade is included
Let me know if something is not clear or if you have any questions