Is there a way to have my strategy check for positions that are made manually?...or can it only check the status of positions originated by the strategy?
I would like to check for any positions in the account so the strategy will not enter a new trade if I have a manual trade on.
Would this code do the trick for instance?
protected override void OnPositionUpdate(IPosition position)
{
if (position.MarketPosition == MarketPosition.Flat)
{
// Do something
}
}
Thanks
Comment