예제 #1
0
        private void ProcessAndFill(string name, Pixel2 pixel)
        {
            int tp    = CalcTp(pixel.Y);
            int shift = CalcShift(pixel.X);
            StrategyParameter parameter = new StrategyParameter();

            parameter[cFirstName]  = tp;
            parameter[cSecondName] = shift;

            Tuple <StrategyParameter, double[], double[]> entry =
                new Tuple <StrategyParameter, double[], double[]>(parameter, m_param2equity[pixel].ToArray(), m_param2margin[pixel].ToArray());

            dictEquityAndMargin[name] = entry;
        }
예제 #2
0
 private void Construct(OnePeriodResult input)
 {
     foreach (var element in input.ISResult)
     {
         Pixel2        pixel      = PixelFromParameter(element.Key);
         List <double> listEquity = null;
         List <double> listMargin = null;
         if (!m_param2equity.TryGetValue(pixel, out listEquity))
         {
             listEquity            = new List <double>();
             m_param2equity[pixel] = listEquity;
         }
         if (!m_param2margin.TryGetValue(pixel, out listMargin))
         {
             listMargin            = new List <double>();
             m_param2margin[pixel] = listMargin;
         }
         Construct(element.Value, listEquity, listMargin);
     }
 }