Script to Reverse Buy or Sell order

 

I don't know if this is possible so I want to reach out and see if anyone can confirm. I bought an Expert Advisor from a company, and it is obviously a .ex4, so I can't edit it; therefore, (this may seem like a strange question) but I want to create a script to change a buy order to a sell order and a sell order to a buy order. So for example, when my EA sends a buy order, it is immediately switched to a sell order. and When my EA sends a sell order it is immediately switched to a sell order.

I am posting this because I have searched many forums and Google and I don't even know how to ask the correct question to start to see if this is possible. If anyone can help me start my journey that would be helpful.

Thanks

 

Can't be done, the EA places the order, too late to change it broker already opened it.

Even if you could reverse it, that will NOT normally make it profitable.