Skip to main content

AmiBrocker Background Color Switcher for Amibroker (AFL)

rmth2 over 15 years ago Amibroker (AFL)

  • Rating:
    3 / 5 (Votes 2)
  • Tags:
    background, amibroker

AmiStock Background Color Switcher ver.0.95
You can set your own background color as you wish with stockname or not – as you wish.
Just drag & drop this AFL on your favourite charts and see changes to your chart.
This formula works only with Amibroker version 5 or newest.

Screenshots

Indicator / Formula

Copy & Paste Friendly
_SECTION_BEGIN("Background Color Switcher");
if (NOT ParamToggle("Background switch","On,Off"))
{
bckg1=ParamColor("Background level 1",colorBlack);
bckg2=ParamColor("Background level 2",colorBlack);
bckg3=ParamColor("Background level 3",ColorRGB(25,0,0));
bckg4=ParamColor("Background level 4",ColorRGB(40,0,0));
stockname=ParamColor("Stock name color",ColorRGB(44,44,37));


GfxGradientRect(0,0,Status("pxwidth"),Status("pxheight")*2/5,bckg1,bckg2);
GfxGradientRect(0,Status("pxheight")*2/5,Status("pxwidth"),Status("pxheight")*4/5,bckg2,bckg3);
GfxGradientRect(0,Status("pxheight")*4/5,Status("pxwidth"),Status("pxheight"),bckg3,bckg4);

if (NOT ParamToggle("StockName Switch","On,Off"))
{
GfxSelectFont("Time news roman", Status("pxheight")/7 );
GfxSetTextAlign(6 );
GfxSetOverlayMode(1);
GfxSetTextColor(stockname);

GfxSetBkMode(0);
GfxTextOut(Name(),Status("pxwidth")/2, Status("pxheight")/18 );

GfxSelectFont("Time news roman", Status("pxheight")/26 );
GfxTextOut(FullName(), Status("pxwidth")/2, Status("pxheight")/3.9 );

GfxSelectFont("Time news roman", Status("pxheight")/25 );
GfxTextOut("Market: " + MarketID(1), Status("pxwidth")/2, Status("pxheight")/3 );
}
}
_SECTION_END();

2 comments

Leave Comment

Please login here to leave a comment.