[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: Multi-Colored Chart Backgrounds



PureBytes Links

Trading Reference Links

Hello Duke, Ok got it. I changed the colors on this line of your code:

GfxGradientRect(0,0,pxwidth, pxheight, colorYellow, colorRed );

Thank you. A lot here to happily study. Thank you for your time.


--- In amibroker@xxxxxxxxxxxxxxx, "electricwally77" <soundmaker@xxx>
wrote:
>
> Hello Duke, Correction: When I opened parameters (Ctrl-R) the colors
> that I was able to play with where listed only under "Price" only. Not
> chart background. I guess If I want to experiment with chart
> background colors I need to accomplish this inside my chart formula
> using your code that I pasted in?  Thank you Duke
> 
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "electricwally77" <soundmaker@>
> wrote:
> >
> > Hello Duke, WoW !! Very amazing. I'm studying the code now. I copied
> > and pasted into my chart formula. Amazing. When I go to parameters and
> > play with the color choices as per your suggestion, and hit OK nothing
> > happens, No change in colors. My guess is that your original colors
> > are still coded into my chart formula. Do I also have to change them
> > in the chart formula before I change them in the parameters (Ctrl-R)?
> > Thanks Duke. Good work !!
> > 
> > 
> > --- In amibroker@xxxxxxxxxxxxxxx, "Duke Jones, CMT" <Duke@> wrote:
> > >
> > > Try this one and play with the colors using the parameters
(Cntrl-R).
> > > 
> > > Regards,
> > > 
> > > Duke Jones, CMT
> > > 
> > > electricwally77 wrote:
> > > >
> > > > Hello Aron, I pasted your code into my chart formula exactly as
> > > > appears below and received an error message on line 4 that said
> > > > "Variable 'bgcolor' used without having been initialized." As
> soon as
> > > > I fix line 4 I assume line 5 will give me the same type of error
> > > > message. Appreciate any advice. Thank you Aron.
> > > >
> > > > --- In amibroker@xxxxxxxxxxxxxxx
> > <mailto:amibroker%40yahoogroups.com>, 
> > > > Aron <apforex@> wrote:
> > > > >
> > > > > add this to your chart formula
> > > > > > |Color= ParamColor("Bg",ColorRGB( 251,251,252));
> > > > > > BgTop=ParamColor("BgTop",ColorRGB(251,251,251) );
> > > > > > BgBot=ParamColor("BgBot", ColorRGB(219,225,227));
> > > > > > SetChartBkColor( BgColor);
> > > > > > SetChartBkGradientFill( BgTop,BgBot);|
> > > > >
> > > >
> > > >  
> > > 
> > > _SECTION_BEGIN("Price");
> > > SetChartOptions(0,chartShowArrows|chartShowDates);
> > > _N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi
> > %g, Lo %g, Close %g Chg %g (%.1f%%) {{VALUES}}", O, H, L, C,
> > Prec(C-Ref(C,-1),3),  SelectedValue( ROC( C, 1 ) ) ));
> > > Plot( C, "Close", ParamColor("Color", colorBlack ),
> > ParamStyle("Style",styleLine|styleCandle));
> > > 
> > > Red			=Param("Red",200,0,255,1);
> > > Green		=Param("Green",200,0,255,1);
> > > Blue		=Param("Blue",200,0,255,1);
> > > Hue          	= Param("Hue",0,1,255,1);
> > > Saturation 	= Param("Saturation",0,1,255,1);
> > > Brightness 	= Param("Brightness",0,1,255,1);
> > > 
> > > 
> > > Miny = Status("axisminy"); 
> > > Maxy = Status("axismaxy"); 
> > > 
> > > lvb = Status("lastvisiblebar"); 
> > > fvb = Status("firstvisiblebar"); 
> > > 
> > > pxwidth = Status("pxwidth"); 
> > > pxheight = Status("pxheight"); 
> > > 
> > > 
> > > GfxSetBkMode( 1 ); // set transparent mode 
> > > GfxSetOverlayMode(1);
> > > GfxGradientRect(0,0,pxwidth, pxheight, colorBlue, colorLime ); 
> > > 
> > > 
> > > GfxSelectFont("Tahoma", Status("pxheight")/3 );
> > > GfxSetTextAlign( 6 );// center alignment
> > > GfxSetTextColor( ColorRGB( Red, Green, Blue ) );
> > > GfxSetBkColor(ColorHSB(Hue,Saturation,Brightness));
> > > GfxTextOut( Name(), Status("pxwidth")/2.1, Status("pxheight")/12 );
> > > //axisarea = 56; // may need adjustment if you are using non-default
> > font for axis 
> > > _SECTION_END();
> > >
> >
>



------------------------------------

**** IMPORTANT ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

*********************
TO GET TECHNICAL SUPPORT from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com
*********************

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html

*********************************
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/