I've just tried to quickly code a PSAR change for a custom indicator and it seems to work fine for the most part but I seem to get random spots where it doesn't match up to my chart visual and sometimes I get one mark after another.
sar=iSAR(NULL,0,0.03,0.2,i);
sar2=iSAR(NULL,0,0.03,0.2,i+1);
sar2!=sar
Those are the relevant bits out of the code and I would have assumed it to be a decent enough solution. i.e. only give a signal if the previous bar is not the same as the current one indicating a change. If it was just random signals I could troubleshoot it a little easier but I get randoms AND 2 consecutive signals which shouldn't happen because the previous sar value is the same as this one.
Suggestions anyone?
I profess to being very lacking in knowing the programming in MQL4, practically everything I know comes from DaveL and his custom indicator from me and I have rather self-taught myself as much as I can and in the end I am just trying to use some logical progression in my brain and it has worked so far in terms of altering things.
Oh, DaveL deserves a medal for being awesome too
sar=iSAR(NULL,0,0.03,0.2,i);
sar2=iSAR(NULL,0,0.03,0.2,i+1);
sar2!=sar
Those are the relevant bits out of the code and I would have assumed it to be a decent enough solution. i.e. only give a signal if the previous bar is not the same as the current one indicating a change. If it was just random signals I could troubleshoot it a little easier but I get randoms AND 2 consecutive signals which shouldn't happen because the previous sar value is the same as this one.
Suggestions anyone?
I profess to being very lacking in knowing the programming in MQL4, practically everything I know comes from DaveL and his custom indicator from me and I have rather self-taught myself as much as I can and in the end I am just trying to use some logical progression in my brain and it has worked so far in terms of altering things.
Oh, DaveL deserves a medal for being awesome too