Hello...thought I would fix the addPosLimit function--notice the two \\ in
the last line of the function.

*******

addPosLimit <- function (portfolio, symbol, timestamp, maxpos, longlevels =
1,
          minpos = -maxpos, shortlevels = longlevels)
{
  portf <- getPortfolio(portfolio)
  if (length(maxpos) > 1)
    maxpos <- maxpos[, 1]
  if (length(minpos) > 1)
    minpos <- minpos[, 1]
  newrow <- xts(cbind(maxpos, longlevels, minpos, shortlevels),
                order.by = as.POSIXct(timestamp))
  tc <- try(colnames(newrow) <- c("MaxPos", "LongLevels", "MinPos",
                                  "ShortLevels"))
  if (is.null(portf$symbols[[symbol]]$PosLimit)) {
    portf$symbols[[symbol]]$PosLimit <- newrow
  }
  else {
    if (is.null(portf$symbols[[symbol]]$PosLimit[timestamp])) {
      portf$symbols[[symbol]]$PosLimit[timestamp] <- newrow
    }
    else {
      portf$symbols[[symbol]]$PosLimit <-
rbind(portf$symbols[[symbol]]$PosLimit,
                                                newrow)
    }
  }
  assign(paste("portfolio", portfolio, sep = "\\."), portf, envir =
.blotter)
}

	[[alternative HTML version deleted]]

