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

Re: [amibroker] coloring the bars



PureBytes Links

Trading Reference Links

Hi Graham,

Sunday, July 13, 2003, 9:02:13 PM, you wrote:

G> Yuki A couple of things come to mind,  Have you tried changing the
G> order of the Iif statements to see if it is just the first 2 being
G> picked up anf the rest ignored?

Hmmm.  I should have thought about trying that.  When I do, all four
of the colors work.  The whole thing works.  Why do you suppose that
is?  All I did was reverse BuyMain to BuyNew and ShortMain to
ShortNew.  Nothing else.

After doing this, I find I can flip the color positions as well, and
by doing that I up with the exact result I wanted in the first place.

Why didn't it work until I flipped the signal positions?

Here is the code that works:

Plot( Close, Date() +"\n"+ "O: " + WriteVal( Open, 1.0 ) +"\n"+ "H: "
+WriteVal(High, 1.0 ) +"\n"+ "L: " + WriteVal( Low, 1.0 )  +"\n"+ "C:
",IIf(BuyNew, colorBrightGreen, IIf(ShortNew, colorRed, IIf(BuyMain,
colorDarkGreen, IIf(ShortMain, colorDarkRed, colorYellow)))),
styleBar);

The order of variable definition in the formula is:

1) BuyMain 2) BuyNew 3) ShortMain 4) ShortNew

So, it's not dependent on the IIf statements being in the same order
as the variables they reference.  Have no idea what it is.

Yuki


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/sOykFB/k9VGAA/ySSFAA/GHeqlB/TM
---------------------------------------------------------------------~->

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 

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