public COIN(string symbol, int precision, EXCHANGE exchange, bool Autobuysell, string auth)
        {
            scl = new Scorpion_LOG();
            ex  = exchange;
            Scorpion_Write.write_success("Starting coin " + symbol + " with precision " + precision);
            cs.buy_sell_type = Autobuysell;
            Scorpion_Write.write_success("Automatic buy/sells: " + cs.buy_sell_type);

            if (!Autobuysell)
            {
                Scorpion_Write.write_input("Please enter your buy price preference: ");
                cs.buy_sell_type_buy_at = Convert.ToDouble(Console.ReadLine());
                Scorpion_Write.write_input("Please enter your sell price preference: ");
                cs.buy_sell_type_sell_at = Convert.ToDouble(Console.ReadLine());
            }

            cs.precision       = precision;
            cs.symbol          = symbol;
            cs.period          = "1";
            cs.unit            = "HOURS";
            cs.signal          = 0;
            cs.key             = auth;
            cs.current_balance = 0;
            cs.EUR_balance     = 0;

            //start_ticker();
            return;
        }
Beispiel #2
0
        public void start(ref string[] commands)
        {
            //old
            //::*typeofexchangeint, *name
            //new
            //::*typeofexchangeint, *name, *autotrade, *coin, *coin, *coin
            int this_instance = 0;

            try
            {
                if (instance_count == max_instances)
                {
                    return;
                }

                this_instance = instance_count++;
                exchange_instance[this_instance] = new EXCHANGE(ref commands[1]);
                exchange_instance[this_instance].__start();
                exchange_ref[this_instance] = commands[2];
            }
            catch (Exception e) { Console.WriteLine(e.Message); }
            return;
        }