to my understanding writeif, and all strings, return only the last value being scalar values
You can use Asc function to have single character in the explore column -- Cheers Graham Kav AFL Writing Service http://www.aflwriting.com On 21/01/2008, paulradge <[EMAIL PROTECTED]> wrote: > > actually i changed style to bar and have most of what i want,,,, > sorry for the band width > Paul > > > ----- Original Message ----- > *From:* paulradge <[EMAIL PROTECTED]> > *To:* [email protected] > *Sent:* Monday, January 21, 2008 10:29 PM > *Subject:* [amibroker] please advise on these two issues ??? > > Hi all,,, > > here's part of something i'm playing with,,,, > > cond_color = IIf( cond0, colorGreen, IIf( cond3, colorOrange, IIf( cond1, > colorBlue,colorRed))); > > WriteIf(cond0,"cond0",""); > > WriteIf(cond1,"cond1",""); > > WriteIf(cond2,"cond2",""); > > WriteIf(cond3,"cond3",""); > > Filter=1; > > cond_status = WriteIf( cond0, "cond0", WriteIf( cond1, "cond1", WriteIf > (cond2, "cond2", "cond3"))); > > AddTextColumn(cond_status, "daily conditions", 1, colorBlack, cond_color); > > Plot(C,"close",Cond_color,styleCandle); > > i'm running this over one stock for the last 12 months and my exploration > result does give me all 4 colors and i've checked the conditions to be > correct,,,, > > however ,,,,if today is "cond1" my results column writes "cond1" on all > returns,,,,,and if today is "cond2" my results write "cond2" on all > results,,,, > > Q1),,,,is it possible for me to change the code so that what ever > condition > on the day is written in the result,,,,,,ie > 21/1/08 cond0 (green background) > 20/1/08 cond3 (orange background) > 19/1/08 cond1 (blue background) > > the background colors are filling the result box ok over the exploration > period no problems there > the only problem is that what ever todays condition number is ,,,,,is > filled > in all boxes regardless of color and i'd like to have buy/sell/hold/buy2 > or > what ever my conditions are for that color > > Q2) when plotting the chart the candles only have the outside border of > the > candles as the "cond_color" ,,,,i'd like to have the candles filled with > the > "cond_color" and black borders ,,, > > please help,,,,, > regards > Paul > > >
