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

Re: [amibroker] AB gurus .... need help please



PureBytes Links

Trading Reference Links

Try this:
Addcolumn(IIf(Green,1,IIf(Yellow,2,IIf(Red,3,0))),"SM");

or to get text

Addcolumn(writeif(Green,"GR",writeif(Yellow,"Y",writeif(Red,"Red"))),"SM");

----- Original Message ----- 
From: "mroman59" <mroman59@xxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Sunday, December 28, 2003 4:38 PM
Subject: [amibroker] AB gurus .... need help please


> I am currently using the following code to report the resuts of the
> variables I created (Green, Yellow and Red). As of now, if the
> result is true for Green a "1" is posted in the colunm "GRN" and "0"
> if not true and similar postings for Yellow and Red.
>
> AddColumn(result = IIf(Green,1,0),"GRN");
> AddColumn(result = IIf(Yellow,2,0),"YEL");
> AddColumn(result = IIf(Red,3,0),"RED");
>
> However, what I would like to do is create one formula that will
> allow me to have one column called "Strength Meter" and report the
> values 1,2 or 3 for the results. An even better result would have be
> one column called "Strength Meter" and post the results in words
> such as GRN, YEL or RED instead of numbers.
>
> Can anyone help me to get AB to do this?
> Thank You
> MR
>
>
> Send BUG REPORTS to bugs@xxxxxxxxxxxxx
> Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
> -----------------------------------------
> Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
> (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> --------------------------------------------
> Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html
>
>
> Yahoo! Groups Links
>
> To visit your group on the web, go to:
>  http://groups.yahoo.com/group/amibroker/
>
> 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/
>
>
>



Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Yahoo! Groups Links

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

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/