I'd like to disable an strategy at a certain time (p.e 14:00), but I guess if there is an open position this position is going to be close.
How I have to say if there is an open position do not disable. could be this:
if (ToTime(Time[0]) = ToTime(14, 0, 0) && Position.MarketPosition == MarketPosition.Flat)
Disable()
Comment