예제 #1
0
 public void clear()
 {
     LogC.note("refactor SDC to be a lazydictionary of symbol=> CacheData");
     activePeriods_.clear();
     sessions.clear();
     slippageCalculators.clear();
     currencies.clear();
     bloombergTickers.clear();
     types.clear();
     tickListeners.clear();
     observationListeners.clear();
 }
예제 #2
0
 void setExits(DateTime barDate)
 {
     if ((int)barDate.DayOfWeek == exitDay)
     {
         placeOrder(position().exit("ExitDayReached", market(), oneBar()));
         return;
     }
     LogC.note("this should be ObjectiveExit");
     if (position().pnlWithSlippage(bars.close, slippage(), arguments().runInNativeCurrency, bridge.fxRate(position().symbol)) > (multiple * atr * bigPointValue() * position().size))
     {
         placeOrder(position().exit("TargetReturnReached", market(), oneBar()));
     }
 }