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

Re: [amibroker] Bar Chart Colors


  • Date: Wed, 27 Jan 2010 09:13:12 +0100
  • From: reinsley <reinsley@xxxxxxxx>
  • Subject: Re: [amibroker] Bar Chart Colors

PureBytes Links

Trading Reference Links


Hi Joseph,


Another way following Heikin-Ashi bars


Best regards

_SECTION_BEGIN( "HeikinAshi Bar" );
//---- heikin ashi gives color to bars
HaClose = ( O + H + L + C ) / 4;
HaOpen = AMA( Ref( HaClose, -1 ), 0.5 );
HaHigh = Max( H, Max( HaClose, HaOpen ) );
HaLow = Min( L, Min( HaClose, HaOpen ) );
//Plot(HaHigh ,"HaHigh ",colorCustom12,styleLine);
barcolor = IIf( HaClose >= HaOpen, colorGreen, colorRed );
barcolorstylebar = IIf( HaClose >= HaOpen, colorWhite, colorBlack );
GfxSetBkMode( 0 ); // 1 set transparent mode
//PlotOHLC( HaOpen, HaHigh, HaLow, HaClose, "", barcolor, styleCandle + 
styleNoLabel , Null, Null, Null, 0);
//Plot( C, "C ", barcolorstylebar , styleBar + styleThick );
PlotOHLC( O, H, L, C, "", barcolor , styleBar + styleThick , Null, Null, 
Null, 1 );
PlotOHLC( O, Null, Null, C, "", colorBlack , styleBar + styleThick , 
Null, Null, Null, 2 );
_SECTION_END();


Le 27/01/2010 08:19, NW Trader a écrit :
>
>
> 
>
> Hi Joseph,
> Try the following lines and plot statement in a new formula editor:
> Barcolor = IIF(C>Ref(C,-1) , colorGreen, colorRed );
> Plot(C, "Close ", Barcolor , styleBar |styleThick ) ;
> This colors the bars based on the relation of the close to the prior
> close. If you want the bars to depict the relation from open to close or
> to show volume changes, you can edit the Barcolor statement. You might
> also want to add a Title statement and some other things (like setting
> the chart options).
> Peace and Justice --- Patrick
>
>     ----- Original Message -----
>     *From:* Joseph Occhipinti <mailto:joseph_occhipinti@xxxxxxxxx>
>     *To:* Amibroker Group <mailto:amibroker@xxxxxxxxxxxxxxx>
>     *Sent:* Tuesday, January 26, 2010 7:26 PM
>     *Subject:* [amibroker] Bar Chart Colors
>
>     Hi All --
>
>     How do I make the up days of a bar chart green and down days red?
>
>     Thanks
>
>     ------------------------------------------------------------------------
>     See what's on at the movies in your area. Find out now
>     <http://au.rd.yahoo.com/movies/mailtagline/*http://au.movies.yahoo.com/session-times/>.
>
>
> 



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

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

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

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

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

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:
    amibroker-digest@xxxxxxxxxxxxxxx 
    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/