Description for” Counter-Order EA”. (I call the “Counter-Order EA” in this explanation “EA”) The need and idea for this EA was turning up as I was trying to find a good solution to reduce my drawdown when the market went against my trade. I always have only max 1 Master-trade open at any time So, I have done some manual testing, trying to act like a EA. (not so easy) 😊 I can see this is not so easy to explain with text only, so I will include some screen shots as well in this project explanation. I will also try to make my EA functionality explanation in steps. During the job, I will be ready to try to clarify any question from the programmer. Step 1: I set a manual trade, or 1 trade comes in from my copier. No new order will be entered in to the MT4 if there is active order(s) working. (My copier act as control for “max 1 trade active”. I will monitor and manually respect this “max 1 trade open”, and so will the copier. 😊 The new order will be detected by the “EA”, and the “EA” will open “counter-orders” up to 9 “counter orders”. These counter orders will stay there as waiting orders, waiting for the market to hit them. Please calculate that you enter my server and check also that ID numbers functionality and other functionality OK for this EA. Step 2: As I have tried to make this EA before, I will here add a screenshot of the “property page” for this “EA” like it is now. It probably will help you to understand the settings I need in this EA. The reason that I need this EA construction is: I set 1 order – the order goes to take profit, and the only thing this “EA” will do is to open “Counter-Orders” according to its property settings, and in this case there will be no activity from the “EA” except that the “EA” will close all counter orders when this actual master order is closing when it hits the TP. Step 3: Now we have 1 new order received by the MT4, and the “EA” activate its counter orders according to the settings in the “Counter Orders” properties. This time, the trade was a buy trade, but the market turns to sell direction. Step 4: The market hit the first “Counter-Order 1”, and the first “Counter-Order” is activated. Then, the “Trailing Trigger” for this order is activated according to settings in the “EA” property settings. I need to be able to set “Trailing Distance” to max 99 pips (We use here 10 pips as example of setting for this trading case). Then after market has travelled 7 pips in the Sell direction, the order connected to these trailing settings is activated, and this order will after this be erased in the moment the market reaches the point where this “following” red dotted line trailing order sensor have moved to. (Like normal Trailing order settings behaviour). The “Trailing Step” is to set how many “steps” or pips the red dotted moving trailing line will step when it is following the market that still is in “Sell” direction. We set “Trailing Step” setting to 1 pip. Step 5: We can in this example use 2 orders as “Number. of “Counter-Orders”. Then, we can imagine that the market is still moving in the sell direction, and the second “Counter-Order” is activated with same setting as the first “Counter-Order”. Step 6): You have now made a “EA” that starts up to 9 “Counter-Orders”, and I can set values for each “Counter order” on the “EA” properties. I can also now in this “EA” (at this point in programming) reduce the “Counter-Orders” between 1 and 9 orders. I can also now set all vital values for the trailing for each “Counter-Order”. Probably you are “getting around” with this programming at this stage. I am here ready to explain more as good as I can with my limits, but also with my knowledge to what I am after. Regarding the Stopp Loss SL1 (pips) and SL2 (pips) and so on… in the EA properties, we do not really need that SL function, as the way I use the trailing takes care of the SL part for the “Counter-Orders”. Step 7: Here comes the “Special Edition” of this EA. The market normally is for sure often travelling up and down, and this makes the “Counter-Orders”, if in trailing, often to be eliminated when the market hits the particular “Trailing Orders”. These Trailing-Orders now, when trailing is activated, have “red dotted line” like SL (and that will now as usual act as SL. Then this particular “Counter-Order” is gone forever. The result from this is that if the BUY “Master-Order” for example travels more in the Sell direction, we will soon have an open Counter-Order 2, so the same will happen most often with “Counter Order 2” that also then is in Trailing. This is the problem with trailing orders. They are good if that stay open but can be dangerous if they, as they often do, get closed in positions that nobody can choose. Depending as usual of the market. Step 8: My idea for this problem is simple. We make the counter order that just was wiped out, alive again with the new activating of the same order under certain conditions: Step 9: We can choose not to use these “Counter-Orders” replacement option, or we can use it and set a pip distance to where this “counter-order” again will be allowed to be re-placed (In this case, this will be on the Buy side of the Market). But there is 1 more factor that decides if the “Counter order” will be re installed, and that is a minimum time in minutes must be gone after this same “Counter-Order” was eliminated by the market. I can set this time and distance in the “EA” properties. So, to be clear: The Counter-Order to be replaced will be inserted at same place as the old Counter-Order was, but this re inserting can only take place if there has gone certain time and certain pips… than a similar waiting-Trailing order type will be set at same place as the old one that just minutes ago was wiped out. Step 10: You must find a way, so the use of trading order ID numbers is taken care of. 1 of the EAs that generate new orders have EA ID: 1337 and another EA generating orders has also EA magic numbers depending on which currency pair. This EA used EA Magic numbers: 9812 – 9813 – 9814 – 9815 – 9816 – 9817 – 9818 – 9819 I can always change all these number if needed. If I set a manual order, you must also arrange for me a way to identify that order if needed.