Buy/Sell method handles any broker

 
does anyone have a buy and sell method that can handle any issue that any broker may throw at you? I ask this because I have found that there are so many ways a broker can kill a trade by requiring that you do things like take a trade then modify it afterwards. then comes the freeze d uration. All these factors come up and I am never short on surprises when it comes to what a broker can do. So, I figured this is a place of experienced traders, there has to be someone out there that has written a solution that will work regardless of the broker. Are you that person? Do you have code you woul d share that will make this solution possible?
Reason: