<p class="p1">Hi</p><p class="p1">Please check if the functions attached do what you wish. </p>
<p class="p2">functions currently set to work with xts ohlc with time frames m1, m5, m15, h1,d1, w1, mo1 </p><p class="p2"><br></p><p class="p2">regards. </p><p class="p2">SZ</p><p class="p2"><br></p>
<p class="p1">> source('addVoep.R') ; source('addEp.R')</p>
<p class="p1">>loadSymbols('IBM')</p>
<p class="p1">>mg <- to.monthly(IBM)</p>
<p class="p1">barChart(mg, TA='addEp();addVoep()' )</p><br><div class="gmail_quote">On Sat, Apr 7, 2012 at 10:10 PM, Worik Stanton <span dir="ltr"><<a href="mailto:worik.stanton@gmail.com">worik.stanton@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Friends<br>
<br>
I would like to be able to draw vertical lines on a chart resulting from chartSeries.<br>
<br>
I can draw horrizontal lines but they do not apear in the correct place.<br>
<br>
In the following example I draw a dotted white horizontal line, but not where I asked for it, and I get no vertical line using either of the two methods. I cannot find an answer via Google. I am stumped<br>
<br>
library(quantstrat)<br>
getSymbols("IBM")<br>
IBM.m <- to.monthly(IBM)<br>
chartSeries(IBM.m)<br>
abline(h=140, lty=2, col="white")<br>
QQ <- index(IBM.m[24,])<br>
abline(v=QQ, col="white", lty=2)<br>
abline(v=.index(IBM.m[24,]), col="white", lty=2)<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
<br>
-- <br>
Foo!<br>
<br>
______________________________<u></u>_________________<br>
<a href="mailto:R-SIG-Finance@r-project.org" target="_blank">R-SIG-Finance@r-project.org</a> mailing list<br>
<a href="https://stat.ethz.ch/mailman/listinfo/r-sig-finance" target="_blank">https://stat.ethz.ch/mailman/<u></u>listinfo/r-sig-finance</a><br>
-- Subscriber-posting only. If you want to post, subscribe first.<br>
-- Also note that this is not the r-help list where general R questions should go.<br>
</font></span></blockquote></div><br>