Abort Order

 

Hello friends,

I am writing an indicator which has set of rules to prevent my bad trades. I have been guilty of violating my own rules due my day job  distractions.

How do I trap an order before it is sent to server and analyse it, say, for spread and current session for pair etc and then abort it or show message like "are you sure" with some info and yes/no buttons?

thanks

Sach

 
An indicator can't open or close or modify any order.
only ea or script
for what you want it's an ea
i was looking for something like that lately to stop orders from going to the server or canceling their execution before they are executed.
 
HANY SAAD SHEHATA ABDELHALIM ABOUBAKR:
An indicator can't open or close or modify any order.
only ea or script
for what you want it's an ea
i was looking for something like that lately to stop orders from going to the server or canceling their execution before they are executed.

I can write EA too. how to trap order before it's sent to server?

 
sachnyc: how to trap order before it's sent to server?

Your EA has one line: if(condition) OrderSend() Add more conditions.

 
William Roeder:

Your EA has one line: if(condition) OrderSend() Add more conditions.

thanks. I was writing that EA but I found a better way to get whole UI thing. It's .net integration with mql5.