Download MetaTrader 5
To add comments, please log in or register
Do you need private account monitoring? The Signals will provide you one!
MetaQuotes Software Corp.
Moderator
178137
MetaQuotes Software Corp. 2008.02.20 09:12 

AFStar:

Indicator AFStar

Author: John Smith

dylanlau
6
dylanlau 2015.11.26 05:31  

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?
Carl Schreiber
6125
Carl Schreiber 2015.11.26 12:06  

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?

dylanlau
6
dylanlau 2015.11.27 11:55  
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.
/
To add comments, please log in or register