Amibroker Shade Area

#1
Hello,

Would you please help me with the Amibroker code below
The Formula plots OK
Plot the formula on a Monthly Chart

I have trouble understanding the logic of the last line of the Plot code
The values given to four Augments at the end of the last line.

Also the Grid seems to be offset one Month to the Right.

Thank you in advance

Kind regards,

Derek
...............................

Code:
 _SECTION_BEGIN("Yearly High Low Lines");

   LookBackYear= Param( "Look Back to Year", 1998, 1987,2015,1 );
   
   H1 =ValueWhen(Year()==LookBackYear,TimeFrameGetPrice("H", inYearly)-1);

   L1 =ValueWhen(Year()==LookBackYear,TimeFrameGetPrice("L", inYearly)-1);
;           
   
   HLine=ParamList("Yearly High Line?","No|Yes");
   LLine=ParamList("Yearly Low Line ?","No|Yes");
                   
   Plot(C,"C",colorBlack,styleCandle);

   if( HLine=="Yes") Plot(H1,"High Yearly",ParamColor("color Yearly High",colorRed),styleThick =4 );            
   if( LLine=="Yes") Plot(L1,"Low Yearly", ParamColor("color Yearly Low",colorBlue),styleThick =4 );


   colorPaleYellow = ColorBlend(colorWhite, colorYellow);
   style = styleArea | styleOwnScale | styleNoLabel;

   ShadedArea=IIf( Year()==LookBackYear,colorPaleYellow,colorWhite);
   Plot(95, "ShadedArea" , ShadedArea , style ,0.5,100,0,-2);

_SECTION_END();
 
Last edited:

Similar threads