temp <- aggregate(gTrades$netP,by = list(as.yearqtr(as.Date(gTrades$entryTime))),FUN = sum) temp$y <- cumsum(temp$x) temp$x <- NULL
plot(temp,type="l",xlab="Quarters",ylab="Profit") title("Equity Curve", sub = "Per Quarter", cex.main = 2, font.main= 3, col.main= "blue", cex.sub = 0.75, font.sub = 3, col.sub = "red")
if (detailedPrint == TRUE){ write.csv(gTrades,file = tradesFile) hma.plot(sample,file = tradesPrint,by = "halfyear") #All the trades are stored in the file tradesFile #All the trades are graphed in the file tradesPrint }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.