How come trailingstoploss floating forth and back every second along price move?

 

I am new in MT4, probably I am asking a stupid question here, but, what I observed really worries me. what I observed is that the trailingstoploss was modified from time to time, but, it seems problematic that the modification sets the stoplevel backward when the price makes correction, for instance, when the prices moved to 1.5750, then, my trailingstoploss be modified to a level of 1.5650 in a long position, that's okey so far, however, when the price makes a correction down to 1.5640, the stoplevel was reset to 1.5540 already,given this scenario, I am wondering if the trailingstop is indeed functioning? Having no idea about this phenomena, I simply shut down MT4 to let the trailingstop sleep till being hit and order closed, that's what I am doing in my demo account; otherwise, I really could not figure out how the stoploss could be triggered as it is desired.

Can any guru help understand this and any solution to make the trailingstop stable? I thank you in advance.

 
Your EA has to remember the trailing stop points for each trade by an array. the trailing stop points can only be changed as per the trade profit. For example, trailing stop points is 30 when profit is 300. the array remembers the 30 so that when profit is down to 250, the trailing stop will not move backward.
 
You write the EA yourself? If you do, check you code for trailing stop and add the following:

for BUY order:
OrderStopLoss()<=Bid-Point*trailingstop

for SELL:
OrderStopLoss()>=Ask+Point*trailingstop

This way everytime price retraces, in BUY order for example, OrderStopLoss() is bigger than Bid-Point*trailingstop and your EA won't modify anything and vice versa.
Reason: