Counter Direction Orders

 

I want to track my open orders, and when one gets close to it's stop loss, I want to place an order in the opposite direction, and when either of them get to stop loss or take profit, they both close at the same time.

Does anyone already have some code for this that I can have and play with?

Thanks. Chuck... still a newbie and wet behind the ears.!

Reason: