February 9, 2020

Magnified close AFL

Edit: this code was first posted in 03/2015 and is now modified to change color depending on whether the bar close is in positive or negative.

Green vertical line is currently selected bar.

Modified code is highlighted.

Close in positive:

Close in negative:

Code is pretty simple - use low level graphics functions. The AFL is:

_SECTION_BEGIN("Magnified close");
//Copyright: Kamalesh Langote http://www.vfmdirect.com Email: kpl@vfmdirect.com
Param_Color=ParamColor( "Color", colorCycle );
toggle_mclose = ParamToggle("Magnified Close","Show|Hide",1);
if( toggle_mclose )  {
x = Status( "pxchartwidth");
y = Status( "pxchartheight" ) ;
GfxSelectFont( "arial",0.1*y,800);
GfxTextOut(""+WriteVal(C,1.2)+"",0.8*x,0.05*y);} else {}

No comments:

Post a Comment

Share this...