I want to separate strategies for entering the market from the one that manages positions created by the former. So I write below as a test for the position manager. Initially it runs well, correctly printing my position and quantity manually entered. However somehow it's disabled automatically after a few minutes. Why is that?
Regards,
Steven
protected override void OnBarUpdate()
{
Print("PositionMgmt: Position: " + PositionAccount.MarketPosition.ToString() + " Total Quantity: " + PositionAccount.Quantity.ToString());
Print("PositionMgmt: Instrumebt: " + PositionAccount.Instrument.MasterInstrument.Name);
Print("PositionMgmt: Averate Price: " + PositionAccount.AveragePrice.ToString());
//ExitLong(1);//Add your custom strategy logic here.
}

Comment