Author Topic: Afl error. pls help  (Read 1934 times)


  • Newbie
  • *
  • Posts: 1
    • View Profile
Afl error. pls help
« on: January 22, 2016, 06:23:54 am »
I m stuck  with the below code.  the highs should be plotted with Green square boxes, but after the first box in green, other boxes color becomes Red. mysteriously if we click on the chart then red boxes at highs becomes green each with one click. what I want is with higher high all the boxes in green . Lows are correctly plotted with all red boxes. pls help.
 TOP1=(Ref(MA5,-1)>Ref(MA5,0) //RIGHT SIDE
   AND Ref(MA5,-1)>Ref(MA5,-2));//LEFT SIDE
 MA5_HValue =  ValueWhen(TOP1,MA5,1);
       IIf(Ref(MA5_HValue,0)==Ref(MA5_HValue,-1), Ref(UpTrend,-1),False)   );
PlotShapes(shapeSmallCircle,Vcolor1,0,MA5_HValue,0,0);//Red OR Green