Problems with Scalping EA

 
Hi Guys,

I am testing a scalping EA which I had designed here on MQL5. Seems to be working fine, but it has a couple of small problems.

1) Some times when it gets within a few pips of the Buy or Sell order lines (rather than waiting until it hits) it will open the order. This is costly if the price then turns and hits my stop loss.

2) It will also on occasions (usually when price spikes) hit the TP/SL lines and fail to close, again costly when price turns.

Does anyone know what causes this and is there a solution to it ?

Regards

Mike


 

Dear Michael Mc Graal

This can happen due to a lot of things but since you didn't post any code, we can not look for improvements.

1) could have to do with variations in spread,

2) can be solved by checking the return value of the close order,

if it fails it can be coded to repeat the action for as long until it succeeds.

 

Dear Marco vd Heijden,


Thank you very much for the reply. Your response is appreciated.


Regards

Mike

 

I think you have a problem with your broker because his spread is big, from ask and bid price have 2 ,3 or more pips ....

first the order open before the bid or ask price touch it ,and later , the bid or ask prices never touch or cross the SL and TP . 

 Ask @ Bid prices

 
shtereff:

I think you have a problem with your broker because his spread is big, from ask and bid price have 2 ,3 or more pips ....

first the order open before the bid or ask price touch it ,and later , the bid or ask prices never touch or cross the SL and TP . 

 

Hi shtereff,


Thank you for response. Very logical and great graphics.


Regards

Mike

Reason: