Trabalho concluído
Termos de Referência
I need ea, that manage open pending orders from another ea in a simple way. EA should check, do we have a pending of min. age in minutes (when was it opened, e.g. setting for min. 4 minutes before) and only with a specific lotsize (setting "check orders with lotsize of" xxx.xx) and magic no. (given by setting) open. If the ea does found a pending based on this conditions, he should check further, is there another opposite pending with same lotsize, magic no. at the same pair still running.
IF NOT ea should DELETE and CLOSE ALL actual running pendings AND already triggered/running trades immediately, no matter which lotsize and both directions (only condition: same pair / same magic).
IF he founds two opposite pendings with above condition, ea should check the TP and SL levels of both pendings and adjust the levels in the follow way:
Check the distance between the entry levels of the two opposite pendings found (e.g. distance between the buy order level and the sell order level is 20 pips) and set the TP target of the BUY and SELL to eg. +20pip and the SL of both to -40pips (2*20pips).
At least, not a must have, but would be fine, ea should highlight the calculated distance/zone between the two opposite pendings as a box (color given by setting) from the starttime where they where opened/placed until to the end if they are closed.
I hope, somebody can help me and give me a quick solution today, so i can do some tests.