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

Re: [amibroker] Coding



PureBytes Links

Trading Reference Links

Oops! - meant to mention this and forgot.
 
When you see 4 colored yellow, it may be because the number is actually 4.1 or something, but you are truncating the decimal part in your column. If this is the case, and you dont want to show the decimal in your columns, you can use the int() function to convert it to an int before printing it out.
 
Steve
----- Original Message -----
Sent: Thursday, July 14, 2005 11:54 PM
Subject: Re: [amibroker] Coding

I should think this ought to do it.
 
Steve
 
AddColumn( IIf( Cond1 == 1, Reward1, Reward2 ), "Reward", 1.2, colorDefault, IIf( Reward1 > 4 OR Reward2 > 4, colorYellow, colorDefault ) );
 
 
----- Original Message -----
From: Tony Lei
Sent: Thursday, July 14, 2005 10:33 AM
Subject: [amibroker] Coding

Hi,

AddColumn (IIf(Cond1==1 or , reward1, reward2), "Reward", 1, colorDefault, IIf (Reward1 > 4.0 OR Reward2 > 4.0, colorYellow, Null));

I am trying to make the box turn yellow when either Reward1 > 4 or Reward2 >4, otherwise no change.  My problem is that I still get 4 as colored in yellow.  Any fix to this?

Maybe I should try:

if (Cond1==1) {reward1} else (Cond2==2) {reward2}

thanks

tony


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





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





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