Esempio n. 1
0
        private static SimAccount doMultiSim(int from, int to, int max_amount, List <int> best_chrom_log_id, bool display_chart, List <double> nn_threshold)
        {
            Console.WriteLine("Started Multi SIM");
            var chromos = new Gene2[best_chrom_log_id.Count];
            var ga      = new GA(0);

            for (int i = 0; i < best_chrom_log_id.Count; i++)
            {
                chromos[i] = ga.readWeights(best_chrom_log_id[i], true);
            }
            var title = "Combined PL Ratio - " + from.ToString() + " - " + to.ToString() + ", dt:" + MarketData.Dt[from].ToString() + " - " + MarketData.Dt[to - 1];

            return(ga.sim_ga_multi_chromo(from, to, max_amount, chromos.ToList(), title, display_chart, nn_threshold));
        }
Esempio n. 2
0
        private static SimAccount doSim(int from, int to, int max_amount, int sim_type, int best_island_id, bool display_chart, double nn_threshold)
        {
            Console.WriteLine("Started Read Weight SIM");
            var ga     = new GA(0);
            var chromo = ga.readWeights(best_island_id, false);

            if (sim_type == 0)
            {
                return(ga.sim_ga_limit(from, to, max_amount, chromo, from.ToString() + " - " + to.ToString() + ", dt:" + MarketData.Dt[from].ToString() + " - " + MarketData.Dt[to - 1] + ", Best Island=" + best_island_id.ToString(), display_chart));
            }
            else
            {
                return(ga.sim_ga_market_limit(from, to, max_amount, chromo, from.ToString() + " - " + to.ToString() + ", dt:" + MarketData.Dt[from].ToString() + " - " + MarketData.Dt[to - 1] + ", Best Island=" + best_island_id.ToString(), display_chart, nn_threshold));
            }
        }