Can an EA check terminal/chart price before the order execution ?

 

Hi , I have a simple question about MT4 platform and order executions by EA’s.

Can an EA check the terminal price and the chart price prior open a trade ? Let’s say it won’t be more than “2pip” difference on price comparisons to confirm an order execution .

I think an EA can check the chart price before open an order but can confirm the current terminal price prior the order execution ? 

 
Panagiotis Vinieris: Hi , I have a simple question about MT4 platform and order executions by EA’s. Can an EA check the terminal price and the chart price prior open a trade ? Let’s say it won’t be more than “2pip” difference on price comparisons to confirm an order execution. I think an EA can check the chart price before open an order but can confirm the current terminal price prior the order execution ? 

Yes, an EA can check (and should check) the current ask/bid prices before placing an order. However, that will not prevent slippage, especially during high volatility.

For "Instant Execution" policies, you can also set a maximum deviation/slippage parameter for an order to prevent in from being filled if the quote prices deviate outside of that limit.

 
Fernando Carreiro #:

Yes, an EA can check (and should check) the current ask/bid prices before placing an order. However, that will not prevent slippage, especially during high volatility.

For "Instant Execution" policies, you can also set a maximum deviation/slippage parameter for an order to prevent in from being filled if the quote prices deviate outside of that limit.

Thanks for your answer . Actually my ea  has this parameter but looks it doesn’t help that much , the ea keep doing order executions outside the limits I have set .

So I try to find a new way with additional checks to prevent this correctly . 

 
Panagiotis Vinieris #: Actually my ea has this parameter but looks it doesn’t help that much, the ea keep doing order executions outside the limits I have set. So I try to find a new way with additional checks to prevent this correctly . 

A deviation/slippage limit has no effect on "Market Execution" policy. It only has effect on "Instant Execution" policy. You should verify which policy is being used on your account.

 
Thanks for the confirmations ;)
Reason: