Exemplo n.º 1
0
 void nextBar(DateTime date, Dictionary <Symbol, Bar> current, bool isLive)
 {
     trades.Clear();
     if (!isLive)    // in live mode, we have already filled orders for the bar we just went through (in the tick processing logic)
     {
         bridge.setCurrentSlippage(data.currentSlippages(date));
         LogC.info("filling orders for bar: " + ymdHuman(date));
         fillOrders(current);
     }
     LogC.info("calling onNewBar for bar: " + ymdHuman(date));
     bridge.processBar(current);
     processBarComplete();
     each(current, (symbol, bar) => { var action = newBarListeners.get(symbol); action(bar); });
     dateIndex++;
 }