I have this in my code in OnStartUp():
if (GetAccountValue(AccountItem.CashValue) < 5000)
{
Log("ERROR: Strategy myStrat on " + Instrument.FullName+ " Account balance insufficient to trade this strategy.", LogLevel.Error);
Print(Time[0] + " ERROR: Strategy myStrat on Instrument " + Instrument.FullName+ " Account balance insufficient to trade this strategy. Current cash balance is: " +
GetAccountValue(AccountItem.CashValue) );
return;
}
Thanks!

.
Comment