As others have posted, there are many of us who want to know if a position is open (by another strategy, or manually)
I got a teaser from NT support suggesting that I use the following:
if( Account.Positions[X].Quantity > 0)
{
do something
}
When I use this (with whatever value of X) I get an error shown in the output window that states:
Error on calling 'OnBarUpdate' method for strategy 'aHLR/85221e0f1568470fb4c1126f00b100b6': You are accessing an index with a value that is invalid since its out of range. I.E. accessing a series [barsAgo] with a value of 5 when there are only 4 bars on the chart.
I do not have any other code related to this class. Am I missing something?

Comment