How do I use ToTime() or other logic in my strategy to exit all open positions at session close? Using:
if ((ToTime(Time[0]) == 155500) && Position.MarketPosition == MarketPosition.Long)
{
Draw.ArrowDown(this, @"MyStratArrow down", false, 0, 0, Brushes.Red);
ExitLong(Convert.ToInt32(orderqty), @"ExitLong", @"Buy");
}
Many thanks.

Comment