private void logicProcessorThread() { while (true) { lock (currentTick) { if (!currentTick.Equals(Tick.Empty)) { //execute all strategies in this logic logicContext.tsvrLogic.ProcessStrategies(currentTick); logicContext.account.OnTick(currentTick); logicContext.positionLogic.OnTick(currentTick); logicContext.performanceLogic.CheckWeakStrategies(); currentTick = Tick.Empty; } } Thread.Sleep(5); } }