Skip to main content

Pin Bar Marker for Amibroker (AFL)

gms almost 11 years ago Amibroker (AFL)

  • Rating:
    5 / 5 (Votes 3)
  • Tags:
    amibroker, ribbon

Small code to mark Bullish & Bearish Pin bar as Ribbon

This is small piece of code to identify bullish & bearish pin bars. This code will not mark bars nor plot price, instead it will create small ribbon on any price chart ( Assuming you are not using any ribbons in your plot)
Pin bars are marked considering following points
1) Length of BAR – Used ATR
2) Volume
3) Body size

Indicator / Formula

Copy & Paste Friendly
Plot( 1, "Ribbon",IIf( O > (L + 0.6 * (H-L)) AND  C > (L + 0.6 * (H-L))AND (ATR(1) > ATR(10)) AND V > 1.2 * (MA(V,10)),colorGreen,IIf(O < (L + 0.4 * (H-L)) AND C < (L + 0.4 * (H-L)) AND (ATR(1) > ATR(10))AND V > 1.2 * (MA(V,10)),colorRed,colorBlack)),styleOwnScale|styleArea|styleNoLabel, -0.5, 100 );

0 comments

Leave Comment

Please login here to leave a comment.