Download MetaTrader 5

Problems with Scalping EA

To add comments, please log in or register
Download MetaTrader 5 mobile version and trade from anywhere in the world!
Michael Mc Greal
876
Michael Mc Greal 2015.08.27 21:25 
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


Marco vd Heijden
Moderator
4700
Marco vd Heijden 2015.08.27 22:00  

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.

Michael Mc Greal
876
Michael Mc Greal 2015.08.27 22:13  

Dear Marco vd Heijden,


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


Regards

Mike

shtereff
572
shtereff 2015.08.27 22:34  

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

Michael Mc Greal
876
Michael Mc Greal 2015.08.27 23:02  
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

To add comments, please log in or register