problem with parabolic SAR

 

hi, im having a problem with my EA using iSAR. For example my code is - when iSAR dot is down, it will trigger ordersend() buy and if the dot is up above the candle it will open for sell.

My problem is after sometimes lets say the dot is up above the candle, it suppose to trigger sell, when suddenly in the middle of the candle it close right away so im losing -2 pips. This 'open(sell)' and 'close' keeps going on so many times like 20 times and more so can u imagine evrytime it close im losing -2 pips*(20 or more times) so i disable my EA to save my money(demo). The way i imagine whats going on is maybe the dot is not settle in whether it is up or down, like so it went up, it do the sell then go down it do buy and funny things is the tick sometimes didnt move at all but the event is still happening. It goes to iSAR with step of 0.02, 0.05, 0.06, 0.08 This happen so fast like every tick comes in. Maybe someone can clear to me whats going on and how i tackle this. Thank u :)

 
springyard: Maybe someone can clear to me whats going on and how i tackle this.
Most likely you've analyzed it correctly, alternating mid candle. So wait for the candle to complete