March 24, 2015

Magnified close AFL

Many people have asked how to display the current price in large font as in the following chart.




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" ) ;
GfxSetOverlayMode(1);
GfxSelectFont( "arial",0.1*y,800);
GfxSetTextColor(Param_color);
GfxTextOut(""+WriteVal(C,1.2)+"",0.8*x,0.05*y);
} else {}
_SECTION_END();


No comments:

Post a Comment