I have built a couple of indicators that track the profit/loss of my strategies by market position on whether they are long or short using the following in the indicator
"if (account.Positions != null)
{
NinjaTrader.Cbi.PositionCollection positions = account.Positions;
//Print("positions " + positions);
foreach(NinjaTrader.Cbi.Position position in positions)
{
if (position.MarketPosition == MarketPosition.Long)
{........"
I am trying to fork over similar code to track my positions in an indicator based on the entry name. How can I call the strategy position by its signalName in an indicator?
Comment