quantstrat icon indicating copy to clipboard operation
quantstrat copied to clipboard

bug chart.forward(): missing units

Open N0talent opened this issue 7 years ago • 2 comments

When i create my own Symbol data in minutes, my periodicity(R)$units is 'mins'. as a result the function throws follwing Error:

Error in if (units == "months" && nrow(R) > 500) units <- "years" : 
  missing value where TRUE/FALSE needed

I would propose to add "mins" to the units (starting row 111 in chart.forward.R):

units <- switch(units,
                 mins="hours",
                 seconds = 'hours',
                 minutes = 'hours',
                 hours = 'days',
                 days = 'months',
                 weeks = 'years',
                 months = 'years',
                 quarters = 'years',
                 years = 'years')

I dont know if this counts as a Bug.

N0talent avatar Jun 29 '18 19:06 N0talent

you should be able to add mins to the same row that already has minutes, or at least put them next to each other with the same style.

braverock avatar Jun 29 '18 19:06 braverock

hi @N0talent is this still an issue if you upgrade to latest version 0.16.1?

jaymon0703 avatar Jun 08 '19 11:06 jaymon0703