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

Re: [amibroker] 25 Least Square MA



PureBytes Links

Trading Reference Links

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 --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/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/