I am trying to verify my strategy is executing all requests. It is also not following my set trading time, it is trading all hours. Can someone please verify the below code looks correct. It is running and generating results, just not running at set time periods. I want to check that the MaxConsecLoser and profit targets are working correctly. I know you use a print command but I'm a little unsure on how to code it & interpret results. Thanks

protected override void OnBarUpdate()
{
if ((ToTime(Time[0]) >= ToTime(8, 30, 0))||(ToTime(Time[0]) < ToTime(14, 45, 0))
&& (Performance.AllTrades.TradesPerformance.Currency. CumProfit - priorTradesCumProfit >= PrftGoal)
&& (Position.MarketPosition != MarketPosition.Flat)
&& (Performance.AllTrades.TradesPerformance.MaxConsec Loser < MaxLosers)
)
{
priorTradesCumProfit = Performance.AllTrades.TradesPerformance.Currency.C umProfit - priorTradesCumProfit;
}
// At the start of a new session
if (Bars.FirstBarOfSession)
{
// Store the strategy's prior cumulated realized profit and number of trades
priorTradesCount = Performance.AllTrades.Count;
priorTradesCumProfit = Performance.AllTrades.TradesPerformance.Currency.C umProfit;