Skip to content

Quantstrat help

4 messages · Noah Silverman, Joshua Ulrich

#
On Fri, Mar 14, 2014 at 10:30 AM, Noah Silverman <noahsilverman at ucla.edu> wrote:
If it needed a function and there was no way to pass data, you could
wrap your data in a function.
datafun <- function(...) mydata

But nothing *requires* that you call/use add.indicator().  Simply
merge your indicator with your market data.
That depends on the specifics of the strategy you're trying to build,
which you haven't provided.
--
Joshua Ulrich  |  about.me/joshuaulrich
FOSS Trading  |  www.fosstrading.com
#
On Fri, Mar 14, 2014 at 3:26 PM, NOAH SILVERMAN <noahsilverman at ucla.edu> wrote:
Yes, you need to convert it to xts.  ?applyStrategy says:

 mktdata: an xts object containing market data.  depending on
          indicators, may need to be in OHLCV or BBO formats, default
          NULL

The package has several demos, take a look at them to get a feel for
what you need to do.