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

[amibroker] Coding help



PureBytes Links

Trading Reference Links

Thanks Ed

--- In amibroker@xxxxxxxxxxxxxxx, "ed2000nl" <ed2000nl@xxxx> wrote:
> 
> // OHLC Candles with 25 LSMA
> Plot(C, "c", colorGreen,styleCandle);
> 
> LSMA = LinearReg( Close, 25 );
> Plot(LSMA,"LSMA", IIf(C > LSMA,colorBrightGreen,colorRed),styleLine);
> // End Code
> 
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "Jo" <amibroker@xxxx> wrote:
> > Hi 
> > 
> > I'm trying to code a 25 LSMA with color change depending on closing
> > price relative to MA. So far I have;
> > 
> > // OHLC Candles with 25 LSMA
> > PlotOHLC( Open, High, Low, Close, "c", colorGreen,styleCandle);
> > 
> > LSMA = LinearReg( Close, 25 ); 
> > Plot(MA(LSMA, 1),"LSMA", colorGreen,styleLine);
> > // End Code
> > 
> > which seems to work fine but i'm stuck on the line color change. 
> > 
> > I would like to have the line color change 
> > - green if the close is above 25 LSMA 
> > - red if the close is below 25 LSMA. 
> > 
> > Any help appreciated.
> > Johno



------------------------ 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/