Contribute

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
2) MACD 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…!
Mangesh

Here is a screenshot of how the indicator looks:
False_signal

Similar Formulas

Formula

17 Comments

error ln4 col 39

@kokofibo pls use this AFL


_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_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 );

_SECTION_END();

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

res=HHV(H,no);
sup=LLV(L,no);
tsl=IIf(ValueWhen(IIf(C>Ref(res,-1),1,IIf(C<Ref(sup,-1),-1,0))!=0,IIf(C>Ref(res,-1),1,IIf(C<Ref(sup,-1),-1,0)),1)==1,sup,res);

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

a=C;
g=(EMA(Close,3) * (2 / 4 - 1)-EMA(Close,5) * (2 / 6 - 1)) / (2 /4- 2 /6);
e=Ref(tsl,-1);
Buy = Cross(C,tsl) ;
Sell = Cross(tsl,C)  ;
SellPrice=ValueWhen(Sell,e,1);
BuyPrice=ValueWhen(Buy,e,1);
Long=Flip(Buy,Sell);
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 ) );
a1=Ref(tsl,-1);
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) https://dl.dropboxusercontent.com/u/62731433/15min%20Swing%20GOOD1.txt
AFL 2) https://dl.dropboxusercontent.com/u/62731433/MACD%20GOOD.afl

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

Replace
SetChartOptions(0,ShowArrows|ShowDates);

on
SetChartOptions(0,chartShowArrows|chartShowDates);

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?

15. MANGESHSP

@ 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?

17. MANGESHSP

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

Indicators

Sponsors