Hello Everyone,
After going through hell and back I have finally gotten R to install with Quantstrat and all the neccesities. However, when I try to run ANY strategy, they all fail in some way or another, but the errors that are thrown back to me are 95% code related. Can someone fix the below code or send me a strategy I can test that they know is working? My specs are below. Also, I have tried setting my working directory to "demo" and "DSTrading" but neither works. Thanks in advance.
MAC OSX 10.9.4 Mavericks
R Studio
R 3.1.1
Gfortran 4.8
#trade sizing and initial equity settings
tradeSize
> #rules
> #rules
> add.rule(strategy.st, name="ruleSignal",
+ arguments=list(sigcol="longEntry", sigval=TRUE,
+ ordertype="market",
+ orderside="long", replace=FALSE,
+ prefer="Open", osFUN=osDollarATR,
+ tradeSize=tradeSize, pctATR=pctATR,
+ atrMod="X"),
+ type="enter", path.dep=TRUE)
Error in get(as.character(x), pos = envir, inherits = TRUE) :
object '.strategy' not found
Error in add.rule(strategy.st, name = "ruleSignal", arguments = list(sigcol = "longEntry", :
You must supply an object or the name of an object of type 'strategy'.
>
> add.rule(strategy.st, name="ruleSignal",
+ arguments=list(sigcol="longExit", sigval=TRUE,
+ orderqty="all", ordertype="market",
+ orderside="long", replace=FALSE,
+ prefer="Open"),
+ type="exit", path.dep=TRUE)
Error in get(as.character(x), pos = envir, inherits = TRUE) :
object '.strategy' not found
Error in add.rule(strategy.st, name = "ruleSignal", arguments = list(sigcol = "longExit", :
You must supply an object or the name of an object of type 'strategy'.
>
> add.rule(strategy.st, name="ruleSignal",
+ arguments=list(sigcol="exitSMA", sigval=TRUE,
+ orderqty="all", ordertype="market",
+ orderside="long", replace=FALSE,
+ prefer="Open"),
+ type="exit", path.dep=TRUE)
Error in get(as.character(x), pos = envir, inherits = TRUE) :
object '.strategy' not found
Error in add.rule(strategy.st, name = "ruleSignal", arguments = list(sigcol = "exitSMA", :
You must supply an object or the name of an object of type 'strategy'.
>