r - Quantstrat logical error while running applySignals - missing value where TRUE/FALSE needed -
i having error while running strategy back-testing in r, using quantstrat package. whenever, try use applysignals function test signals, shows logical error. tried remove nas na.omit(fb) command, when calculate simple moving average, have nas in beginning. can suggest me solution? thanks, require(performanceanalytics) require(quantstrat) require(quantmod) require(blotter) initdate="2015-01-01" from="2015-01-02" to="2015-06-30" options(width=100) currency('usd') sys.setenv(tz="utc") symbols = c("spy", "fb", "twtr") getsymbols(symbols, from=from, to=to, src="yahoo", adjust=true) stock(symbols, currency="usd", multiplier=1) suppresswarnings(rm("account.mac","portfolio.mac",pos=.blotter)) suppresswarnings(rm("order_book.mac",pos=.strategy)) tradesize <- 1000 initeq <- tradesize strategy.st <- portfolio.st <- account.st <- "m...