[R] Moving averages shading / two colours / polygon

olo alex at fafula.com
Thu Oct 31 17:02:32 CET 2013


I am stuck at the following problem.

I have two moving averages. One is faster than another. After plotting them
I need to shade area between them in green when the faster is above slower
and red where faster is below slower.

Something like this:
http://charts.stocktwits.com/production/original_9205513.png?1345576091

I tried with polygon but I can't do it. Any hints?

Regards
olo



--
View this message in context: http://r.789695.n4.nabble.com/Moving-averages-shading-two-colours-polygon-tp4679460.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list