[R-SIG-Finance] blotter->chart.Posn -- 'no transactions/position to chart'
Joshua Ulrich
josh.m.ulrich at gmail.com
Thu Nov 21 20:58:46 CET 2013
On Thu, Nov 21, 2013 at 1:38 PM, Mark Knecht <markknecht at gmail.com> wrote:
> On Thu, Nov 21, 2013 at 11:08 AM, Mark Knecht <markknecht at gmail.com> wrote:
> <SNIP>
>>
>> chart.Posn("Equity", Symbol = "VTI", Dates = "2001-06-15")
>
> Note that my Dates entry there is possibly meaningless, I'm not sure.
> Most examples I've seen on the web would do something like
>
Yes, setting Dates to a single observation is unlikely to ever work.
> chart.Posn("Equity", Symbol = "VTI", Dates = "2001::")
>
> which produces the same error. I also get the same error if I remove
> the Dates= option completely.
>
That's because you only have one transaction. chart.Posn currently
requires at least two transactions before it can plot anything.
Perhaps we could add a "includeOpenTrade" argument like perTradeStats
has... at bare minimum, the error could be a bit more informative.
Best,
--
Joshua Ulrich | about.me/joshuaulrich
FOSS Trading | www.fosstrading.com
More information about the R-SIG-Finance
mailing list