PureBytes Links
Trading Reference Links
|
I believe it would be:
Plot(MA(LSMA, 1),"LSMA",IIF(LSMA>25,colorGreen,colorRed),styleLine);
And why are you plotting MA(LSMA,1)? That would be the same as LSMA. No harm, but unnecessary.
Terry
--
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
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Sponsor
ADVERTISEMENT
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 the Yahoo! Terms of Service.
|