pending orders + spread

 

hi forum, i have a situation here.

lets suppose i open a pending order, a buy stop order for instance. this order became a market buy order when the price is reached. it is possible in mql4 to know what is the spread at the moment the pending became market order and take actions like don't execute if the spread is too big ?

i appreciate any comment.

 

Cant be done - the pending order is registered on the brokers system and you are asking to modify that order the same time the price says change the order from pending to active. Can only be done as checking the spread before sending an active trading order to the broker.

 
oxarbitrage:

hi forum, i have a situation here.

lets suppose i open a pending order, a buy stop order for instance. this order became a market buy order when the price is reached. it is possible in mql4 to know what is the spread at the moment the pending became market order and take actions like don't execute if the spread is too big ?

i appreciate any comment.



Dont send your pending order to broker. Keep monitoring the price in EA instead and as soon as it reaches your execution price, check the spread and take action....
 
But if you send it as pending order, then you cant change it...
 

nope.

Also unnecessary. a pending order is for human's use. They can't watch the screen continuously. A EA can and not open.

 
got it, thank you for the answers ;)
 

Isnt this for what was slippage made from?

Greetings

BeLikewater

Reason: