Doji And Double Doji Detector |
// www.aflcode.com SetChartOptions(0,chartShowArrows|chartShowDates); Plot( C, "Close", ParamColor("Color", colorBlack ), ParamStyle("Style") | GetPriceStyle() ); doji = (O == C); NearDoji1 = (abs(O-C)<= ((H-L)*0.1)); NearDoji2 =NearDoji1 AND Ref(NearDoji1,-1); NearDoji3 =NearDoji1 AND Ref(NearDoji1,-1) AND Ref(NearDoji1,-2); showDoji = ParamToggle("NearDoji ","SHOW|HIDE",1); if( showDoji ) { PlotShapes( shapeDigit0*doji , colorGreen, 0, H, 45 ); PlotShapes( shapeDigit1*NearDoji1 , colorBlue, 0, H, 30 ); PlotShapes( shapeDigit2*NearDoji2 , colorOrange, 0, H, 30 ); PlotShapes( shapeDigit3*NearDoji3, colorBrightGreen, 0, H, 30 ); } Filter = NearDoji2 OR NearDoji3 ; AddColumn (NearDoji1 ,"1Doji ",1); AddColumn (NearDoji2 ,"2Doji ",1); AddColumn (NearDoji3 ,"3Doji ",1);
Sign up here with your email
ConversionConversion EmoticonEmoticon