Contribute an indicator to the library by clicking here. Note you must be logged in.

New! Stock Portfolio Organizer is now available:
  • Shares, Margin, Futures and Forex
  • EOD and Realtime data
  • And Much More...
GoTo Stock Portfolio Organizer
New! WiseTrader Toolbox for Amibroker is now available with:
  • Advanced Adaptive Indicators
  • Advanced Pattern Exploration
  • Neural Networks
  • And Much More...
GoTo WiseTrader Toolbox

Popular Indicators

Avoid False signal use this 2 AFLS for Amibroker (AFL)

3 / 5 (Votes 3)

Most of Signal given by AFLs give false signal. due to this day traders endup with losses. To avoid false signal
I am submitting 2 AFL combination for detection of False signal.
1) Swing tread with BUY & Sell signal AFL
I have not written this 2 AFL’s. (this afl’s are already available on net)
Just arrange this 2 AFLs on single screen and

1) check FOR false BUY Signal :- if MACD is below signal line & MACD Histogram is below zero (i.e red colour bar), then BUY signal is false.
2)Check for FALSE SELL Signal :- If MACD is above signal line(red line) & MACD Histogram is above zero, then Sell signal is false.
3) Check for MACD histogram divergence. Check : if MACD Divergence is positive – then be ready for buy signal, if MACD divergence is negative – sell signal is near.
4) take bar testing in 15Min & 5min, and use .
Above interpretations are not new, all are available in the theory of MACD, I hav back tested, it works reasonably well.
Happy & Profitable treading…!

Here is a screenshot of how the indicator looks:

Similar Formulas



error ln4 col 39

@kokofibo pls use this AFL

_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));

SD = StochD(8, 3, 3);
MH = MACD(8, 21) - Signal(8, 21, 5);

trendup = IIf(MH > 0 OR (MH > 0 AND MH > Ref(MH, -1)) AND RSI(3) >50 AND SD < 80 AND SD > Ref(SD, -1) AND ValueWhen(C,O<C), colorGreen, colorWhite);
trendcolor = IIf(MH < 0 OR (MH < 0 AND MH < Ref(MH, -1)) AND RSI(3) <50 AND SD > 20 AND SD < Ref(SD, -1) AND ValueWhen(C,O>C), colorRed, trendup);
Plot( C, "Close", trendcolor, styleCandle | styleThick );


no=Param( "Swing", 8, 1, 55 );


Plot(tsl, _DEFAULT_NAME(), colorWhite, styleStaircase);
Buy = Cross(C,res) ;
Sell = Cross(sup,C)  ;

g=(EMA(Close,3) * (2 / 4 - 1)-EMA(Close,5) * (2 / 6 - 1)) / (2 /4- 2 /6);
Buy = Cross(C,tsl) ;
Sell = Cross(tsl,C)  ;
Shrt=Flip(Sell,Buy );
Filter=Buy OR Sell;
Buy = Cross(C,tsl) ;
Sell = Cross(tsl,C)  ;
shape = Buy * shapeUpArrow + Sell * shapeDownArrow;

PlotShapes( shape, IIf( Buy, colorGold, colorBlue ),0, IIf( Buy, Low, High ) );
GraphXSpace = 5;
dist = 1.8*ATR(6); 
for( i = 0; i < BarCount; i++ ) 
{if( Buy[i] ) PlotText( "Buy @" + a1[ i ], i, L[ i ]-dist[i], colorYellow ); 
if( Sell[i] ) PlotText( "Sell @" + a1[ i ], i, H[ i ]+dist[i], colorPink); 

GraphXSpace = 5;
dist = 2.5*ATR(7); 
for( i = 0; i < BarCount; i++ ) 
{if( Buy[i] ) PlotText( "Stop @" + tsl[ i ], i, L[ i ]-dist[i], colorPink ); 
if( Sell[i] ) PlotText( "Stop @" + tsl[ i ], i, H[ i ]+dist[i], colorGreen); 

error 57

Ln: 7, Col: 22

@ kokofibo
I dont know how it shows error, ok u can download afl in below link

AFL 1)
AFL 2)

afl is work but no signal arrow sir

thank you sir

Thank you for the code.Excellent .One may also use ADX to avoid Sidewards and Trendless phases in PRICE.When ADX is falling from high values say above 40-60 avoid trades or Ignore signals to BUY or Sell.Take Signals only when ADX rises from below 20-30,Indicating STRENGTH in the TREND ,with PRICE DIRECTION as shown by MACD.Thanks.

Hi Venkatgr
Thanks for feedback.
ADX indicator is really useful to avoid false signal.

Thank you



I used 2ndd afl but no target or exit price or symbol to book profit….

12. topcat275

how do i load the 2 indicators ?

13. distagon

I have a question about 1st AFL.
Why there are two sets of buy/sell statements?
In such scenario, which buy/sell signal are fired?
Thank you for the code.

14. ken20111

thx so much for your code, it is very useful, can it also use in short trade?


@ Ken20111
It will be useful for 15Min timeframe

16. ken20111

It seems very profitable to me, i want to backtest it, and if it’s really profitable, i will do auto trading by this. Thus, do you mind add the 2nd AFL criteria into the 1st AFL for backtesting/autotrading?


Yes, Ken20111 it is a profitable One, but I m negative on Auto treading. Pls avoid auto trading. As theoretically auto trading seems very profitable but ground reality is far away. Take wise decision. Good luck

Please login here to leave a comment.

Main Menu