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

Re: [amibroker] Conditional Color in Title



PureBytes Links

Trading Reference Links

It expects a number rather than an array - try LastValue(WeekColor) or 
SelectedValue(WeekColor). Also, I believe HHV() function includes current 
bar so you may want to change your call to HHV(ref(High, -1), 5*52) to 
exclude current bar.

Steve

----- Original Message ----- 
From: "troll" <deanhodgins@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Friday, June 02, 2006 7:40 PM
Subject: [amibroker] Conditional Color in Title


I'm attempting to use a conditional color for one of my title
elements by defining the color as follows and then using following
code:

HighLast52week = LastValue( HHV( High, 5 * 52 ) );
WeekColor = IIf( Close > HighLast52week , 5 , colorDarkBlue );

+ EncodeColor(WeekColor) +  " Close  $  "  + WriteVal(Close/1,1.2)


Everything works fine if I substitute colorwhite in place of WeekColor
so maybe there's some restriction regarding conditional colors and
titles.

Any suggestions or clarification would be appreciated as always.


Regards,


Dean H.












Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

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


Yahoo! Groups Links