void tl_gotPosition(Position pos) { if (RewriteSecuritySymbols) { Security sec; if (allbaskets.TryGetSecurityAnySymbol(pos.symbol, out sec)) { pos = new PositionImpl(sec.FullName, pos.AvgPrice, pos.Size, pos.ClosedPL, pos.Account); } } debug(pos.symbol + " new position: " + pos.ToString()); pt.Adjust(pos); if (actpos != null) { actpos.GotPosition(pos); } if (rpos != null) { try { rpos.GotPosition(pos); } catch (Exception ex) { debug(rname + " got position error: " + ex.Message + ex.StackTrace + " on position : " + pos.ToString()); status(rname + " position error, see debug for details."); } } }