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

Re: [amibroker] How can i append the NotePad using NoteSet



PureBytes Links

Trading Reference Links

Hi Herbert

Nearly missed your reply (about to go to bed).

I understand the code and it looks like it should work fine but for me
 it produces the color change on the above 0 side OK but on the below
0 side the bars are all red. ??

Thanks
Johno

--- In amibroker@xxxxxxxxxxxxxxx, "Herbert Elstein" <herty@xxxx>
wrote:
> Here is what I use:
> B=Cross(CCI(14),0);
> 
> COL=IIf(BarsSince(B)>5 AND CCI(14)>0,colorBlue,colorRed);
> 
> Plot(CCI(14)," ",COL,styleHistogram);
> 
> Just the part about the colors.
> 
> Regards
> 
> Herbert
> 
> Ju
> 
> 
> ----- Original Message ----- 
> From: "Jo" <amibroker@xxxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Saturday, July 10, 2004 1:55 PM
> Subject: [amibroker] Changing histogram bar color
> 
> 
> > I'm trying to refine a CCI indicator by changing the bar color
after
> > the 5th bar above or below the 0 line. The indicator is almost
> > complete but I'm stuck on changing the histogram bar color.
> >
> > Basics are;
> > if barcount since cross above 0 line < 6, barcolor = palegreen
else
> > barcolor = green
> >
> > if barcount since cross below 0 line < 6, barcolor = pink else
> > barcolor = red
> >
> >
> > AFL code so far is:
> > /* Woodie's CCI V3*/
> >
> > //Standard CCI
> > ST = 21;
> > //Turbo CCI
> > T = 8;
> >
> > MaxGraph = 5;
> > LSMA25 = LinearReg( Close, 25 );
> > LSMA45 = LinearReg( Close, 45 );
> >
> > //Plot Standard CCI
> > Graph2 = CCI (ST);
> >
> > Uptrend = 1;  Downtrend =  -1;
> >
> > //Color bars Green > 0, Red < 0
> > Graph2BarColor = IIf (Graph2 > uptrend, colorGreen, IIf (Graph2 <
> > downtrend,4,6));
> >
> > Graph4 = Graph2;
> > Graph4Style = 4;
> >
> > //Plots Turbo CCI
> > Plot(CCI (T),"Turbo",colorYellow,styleLine);
> > Plot(2,"ribbon", IIf (C>LSMA25,
> > colorGreen,colorRed),styleArea|styleNoLabel,  1, 1000 );
> >
> > // Plot range lines
> > Plot(200,"",colorRed);
> > Plot(-200,"",colorRed);
> > Plot(100,"",colorBlue);
> > Plot(-100,"",colorBlue);
> > PlotGrid(50,colorBlack);
> > PlotGrid(-50,colorBlack);
> > PlotGrid(150,colorBlack);
> > PlotGrid(-150,colorBlack);
> >
> > Title = "  " + Name () + "   "  + FullName() + "  " + "CCI
period" + "
> > =" + WriteVal(ST);
> >
> >
> >
> >
> > Check AmiBroker web page at:
> > http://www.amibroker.com/
> >
> > Check group FAQ at:
> http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

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/