I require an EA written that would work as follows:
When X moves up by 5 pips, within 2 seconds
And Y has not moved in the same direction by 2 pips within 5 seconds,
Buy 5 Y immediately, with a take profit of 20, and with a trailing stop of 3 pips, or when X starts to move down by 2 pips within 6 seconds.
The opposite would happen if X moves down, a sell would take place for Y.
Note that all the variables, including time, take profits and stops should be variable. To be used in metatrader, especially but not limited to forex and indexes.