Indicators: AFStar

 

AFStar:

Indicator AFStar

Author: John Smith

 

Hi Sir,

AFStar looks perfect for my strategy in history.

I have limited screen time everyday so I can't observe all of the signals. Those that I managed to observe begin at the start of a new bar and don't repaint/disappear once the bar is completed. This is perfectly how I would like it to behave all the time because I would like to take the trade on the start of the next new bar once current bar closes with the arrow confirmed.

However, the problem i noticed today is that it sometimes plots its arrow on previous bar when current bar is completed instead. So, all those arrows in history may not be true at all. Is there any magic that you can help me with the indicator to make it the way I hope it to be?
 

Well I haven't looked at the code completely but this looks strange:

            iMaSlowPrevious=iMA(NULL,0,SlowCnt,0,MODE_EMA, PRICE_CLOSE, shift-1); //Previous should be shift+1?
            iMaSlowCurrent=iMA(NULL,0,SlowCnt,0,MODE_EMA, PRICE_CLOSE, shift);
            iMaFastPrevious=iMA(NULL,0,FastCnt,0, MODE_EMA, PRICE_CLOSE, shift-1); //Previous should be shift+1?
            iMaFastCurrent=iMA(NULL,0,FastCnt,0, MODE_EMA, PRICE_CLOSE, shift);

What if you change this?

 
calli:

Well I haven't looked at the code completely but this looks strange:

What if you change this?

Thanks for the suggestion Calli, I'll give it a go and see how it behaves.
 

 

Well i have backtested the AFStar and it was pretty good......but it will be Perfect if you guys can add Alert Tab with sound.