protected MarketPosition currentMarketPosition;
Then it looks like I have several options:
1. in OnBarUpdate I can use
this.currentMarketPosition = Position.MarketPosition;
2. Or, i can implement OnPositionUpdate. I think (but I'm not sure) that OnPositionUpdate passes the current market position in:
protected override void OnPositionUpdate(Cbi.Position position, double averagePrice, int quantity, MarketPosition marketPosition)
{
this.currentMarketPosition = marketPosition;
}
Is there any advantage or disadvantage of using either of these? Is my understanding correct that both will work?
Comment