I want to create an EA for MT4 in Mql4 laguage that have to work with all brokers with 5 digits and with different name used for crosses (eurusd, eurusd. , eurusd.. etc):
- put two different orders in the same time (buy limit and sell limit) with the same distance from the la last price. this distance should be definited by volatility ATR indicator. When one of that is executed the other one have to be deleted immediatelly. In case of high volatiliy so, both are executed, the system have to delete one of that randomly.
- this order executed have to have stop loss and take profit that I can select in the settings of the EA, so i can modify when i want. Some platform cannot have the order with SL and TP when executed so this SL and TP have to be inser after one second the order is executed.
- if this order reach TP the EA have to restart from the two pendig orders, if reach the SL it have to invert the position ( so if buy go sell, if sell go buy) and the lot size should be definited by the system that have to consider that if reach the TP the profit should cover the loss of the previous order + a profit that we could have from the first order.
- if this order reach TP restart the system from the two pending orders, if reach SL repeat with new lot size that cover the loss + the same profit.
- the number of round should be definited by from EA settings
- SL and TP have to be variable they have to depends from volatility with ATR (more is the volatility more should be distance from SL and TP) but I have to select by EA settings the max and min distance (in pips) for SL e TP
- EA have to be multi-currency, so it should not be connected with the symbol of the cross, the ea have to work in the same time on more than one crosses
- some brokers have the max lot size, so in this case the ea have to separate the order in 2/3 orders, in the EA settings I have to select max lot size
- the EA during friday evening have to stop all cycles. So have to block all new cycle at 18:00 so it have time to close by the 23:00
the variables that I have to select from the EA`s settigns have to have:
- start lots size
- max lots size
- max lots size of Broker
- min and max SL and TP
- number of rounds (so how many times the system have to invert the order whit new lots
Attached there is an EA that do part of this stuffs so the job it`s easy, you have just to check if evertings is working in the good way and implement with the other things that I already told to you:
- sl and Tp based on volatility
- multi currency
- sometimes it jump some turn so it doesn`t complete the number of turn that i told to him (if I put in settings 5 turn, and it after the 2 pendigs orders start for ex from turn 3 so it does only 2 round)
- sometimes start to send more trades
- it doen`t delete the second order if execute both pendings orders
So please check if everything is working well.