Ejemplo n.º 1
0
        public static CSite newSite_backtest(string sSiteName)
        {
            CSite site = null;

            site = new CSiteBackTest();
            site.setName(sSiteName);
            g_allSites.Add(sSiteName, site);
            return(site);
        }
Ejemplo n.º 2
0
        public static CSite newSite(string sSiteName, string sPipeSerName = "", string sPipeSerOrderName = "", string sPipe_rate = "", string sPipe_order = "")
        {
            CSite site = null;

            if (!CFATManager.isOnlineMode())
            {
                return(CSiteMng.newSite_backtest(sSiteName));
            }
            // modified by cmh
            //if (sSiteName == "TRADE_VIEW" || sSiteName == "FXCM" || sSiteName == "GP_MT4")
            //             {
            //                 site = new CSiteMT4();
            //                 site.setName(sSiteName);
            //                 site.setPipeServerName(sPipeSerName);
            //                 g_allSites.Add(sSiteName, site);
            //             }

            if (sSiteName == "TRADE_VIEW_MT4" || sSiteName == "GP_MT4" || sSiteName == "AAFX_MT4" || sSiteName == "EAGLEFX_MT4" || sSiteName == "IC_MT4" || sSiteName == "XTREAM_MT4")
            {
                site = new CSiteMT5();
                site.setName(sSiteName);
                site.setPipeServerName_MT5(sPipeSerName, sPipeSerOrderName);
                g_allSites.Add(sSiteName, site);
            }

            if (sSiteName == "TRADE_VIEW_MT5" || sSiteName == "GP_MT5" || sSiteName == "AAFX_MT5" || sSiteName == "EAGLEFX_MT5" || sSiteName == "IC_MT5" || sSiteName == "XTREAM_MT5")
            {
                site = new CSiteMT5();
                site.setName(sSiteName);
                site.setPipeServerName_MT5(sPipe_rate, sPipe_order);
                g_allSites.Add(sSiteName, site);
            }
            // ---

            if (sSiteName == "TRADE_VIEW")
            {
                site = new CSiteFixMt4V2();
                site.setName(sSiteName);
                site.setPipeServerName(sPipeSerName);
                g_allSites.Add(sSiteName, site);
            }

            if (sSiteName == "GP")
            {
                site = new CSiteFixMt4();
                //site = new CSiteMT4();
                site.setName(sSiteName);
                site.setPipeServerName(sPipeSerName);
                g_allSites.Add(sSiteName, site);
            }

            if (sSiteName == "SHGOLD")
            {
                site = new CSiteSHGold();
                site.setName(sSiteName);
                site.setPipeServerName(sPipeSerName);
                g_allSites.Add(sSiteName, site);
            }

            if (sSiteName == "IB")
            {
                site = new CSiteIB();
                site.setName(sSiteName);
                g_allSites.Add(sSiteName, site);
            }

            if (sSiteName == "BITMEX")
            {
                site = new CSiteBitMex();
                site.setName(sSiteName);
                g_allSites.Add(sSiteName, site);
            }

            if (sSiteName == "OKEX")
            {
                site = new CSiteOkex();
                site.setName(sSiteName);
                g_allSites.Add(sSiteName, site);
            }

            if (sSiteName == "DERIBIT")
            {
                site = new CSiteDeribit();
                site.setName(sSiteName);
                g_allSites.Add(sSiteName, site);
            }

            if (sSiteName == "BITFLY")
            {
                site = new CSiteBitFlyer();
                site.setName(sSiteName);
                g_allSites.Add(sSiteName, site);
            }
            if (sSiteName == "CNFUTURE")
            {
                site = new CSiteCNFT();
                site.setName(sSiteName);
                g_allSites.Add(sSiteName, site);
            }
            return(site);
        }