Пример #1
0
 void killIfNeeded(Process process)
 {
     LogC.info("killing " + O.the(O.accept(processes, entry => entry.Value.Equals(process))).Key);
     if (!process.HasExited)
     {
         process.Kill();
     }
 }
Пример #2
0
        public void testNoTrades()
        {
            var c = collector();

            addBar(c, 0, 1);
            addBar(c, 0, 1);
            var metrics = c.metrics();

            isDefaulted(metrics, "QOmegaRatio", 1);
            isDefaulted(metrics, "QUpsidePotentialRatio", Double.NaN);
            isDefaulted(metrics, "QExpectancy", Double.NaN);
            isDefaulted(metrics, "QExpectancyScore", Double.NaN);
            isDefaulted(metrics, "QDownsideDeviation", Double.NaN);
            isDefaulted(metrics, "QAverageSlippagePerWinningTrade", Double.NaN);
            isDefaulted(metrics, "QAverageSlippagePerLosingTrade", Double.NaN);
            IsEmpty(O.accept(metrics, (name, value) => value != 0.0));
        }
Пример #3
0
        public IEnumerable <ROW> selectedRows()
        {
            var selectedEntries = O.accept(rows, (model, ui) => ui.IsSelected);

            return(O.convert(selectedEntries, e => e.Key));
        }