1. File is (was) saved. 2. The added code is t(tradeStats("macross")) with 2 )'s.
I'd appreciate if someone with QuantStrat installed, to try this and see if they get a different result. My R and RStudio and QuantStrat libraries are all current. I get the chart and this much output. > source('~/CodingData/RCode/Quantstrat1/maCross.R') [1] "2001-06-27 00:00:00 AAPL 100 @ 1.526312" [1] "2001-09-07 00:00:00 AAPL -100 @ 1.13002" [1] "2002-01-07 00:00:00 AAPL 100 @ 1.497538" [1] "2002-07-10 00:00:00 AAPL -100 @ 1.132636" [1] "2003-05-16 00:00:00 AAPL 100 @ 1.22942" [1] "2006-06-22 00:00:00 AAPL -100 @ 7.792429" [1] "2006-09-26 00:00:00 AAPL 100 @ 10.150561" [1] "2008-03-07 00:00:00 AAPL -100 @ 15.988996" [1] "2008-05-19 00:00:00 AAPL 100 @ 24.012922" [1] "2008-09-24 00:00:00 AAPL -100 @ 16.833895" [1] "2009-05-14 00:00:00 AAPL 100 @ 16.080549" [1] "2012-12-11 00:00:00 AAPL -100 @ 71.436852" [1] "2013-09-11 00:00:00 AAPL 100 @ 62.897826" [1] "2015-08-31 00:00:00 AAPL -100 @ 110.399553" Time difference of 0.3014359 secs [1] "trade blotter portfolio update:" Time difference of 0.1732061 secs > ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.