Quick question about finding broker position info.
I have been using this:
Code: Select all
private double LastEntryPrice()
{
if (StrategyInfo.MarketPosition == 0)
return 0;
int lastTradeIndex = Positions[0].OpenTrades.Count - 1;
return Positions[0].OpenTrades[lastTradeIndex].EntryOrder.Price;
}
to track strategy position price.
I want my signal to react to broker position in the slim chance that I open a manual trade. Currently, if I am flat with the strategy and open a position manually, the Positions[0] can not return the appropriate info, because it does not recognize the manual trades.
I was wondering if there was a way to grab information specifically from the broker position, compared to the strategy position.
Thanks