Forum

How to remove a trade request before it comes to execution

Dear programmers, I want to remove a trade before it comes to execution, following it at a trade_transaction level and somewhen sending a request for annihilating it. Imagine I want to send a request and I can wait for it to be filled. I set a threshold of 200 milliseconds. I start counting.... If

What is the most stable way to code a function to retrieve the last trades closed @ tp ONE BY ONE from history pool?

Hello dear coders, This way can work only if there only one trade at a time and the tp can be hit only by one trade at a time: if (OrdersHistoryTotal() > prevhistorytotal) { for ( int i=OrdersHistoryTotal()- 1 ; i>= 0 ; i--) { OrderSelect (i, SELECT_BY_POS, MODE_HISTORY);