allow send order o not

 
Hi, I'm trying to create a function to allow orders to be sent and no, but it doesn't work. Could someone help me?

that is to say

if you order it is allowed to send orders

if orders is deactivated do not send

I would need the function, and the handles before the ordersend
 

You need to better specify what you mean exactly and also to share your code attempt.

I don't see any complexity in making a function that make additional checks before sending a trade to market and doing that only if some conditions are verified...

 
Fabio Cavalloni #:

You need to better specify what you mean exactly and also to share your code attempt.

I don't see any complexity in making a function that make additional checks before sending a trade to market and doing that only if some conditions are verified...

I guess what he's trying to do is that if he has opened 10 trades and 7 of those trades are not winners, then when he tries to open a new order, the script/ea will not allow him to execute it. Or, at least, that's what I understood.

 

@ brilliantez1 more information, or code, or example, 

For example, you could just use a bool variable in your purchasing conditions

Reason: