Esempio n. 1
0
        static void Main()
        {
            XTraderModeTTAPIOptions envOptions = new XTraderModeTTAPIOptions();
            // Enable or Disable the TT API Implied Engine
            envOptions.EnableImplieds = false;

            // Create and attach a UI Dispatcher to the main Form
            // When the form exits, this scoping block will auto-dispose of the Dispatcher
            using (var disp = Dispatcher.AttachUIDispatcher())
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);

                // Create an instance of TTAPI.
                frmProfitLoss profitLoss = new frmProfitLoss();
                TTAPI.XTraderModeDelegate xtDelegate = new TTAPI.XTraderModeDelegate(profitLoss.initTTAPI);
                TTAPI.CreateXTraderModeTTAPI(disp, xtDelegate);

                Application.Run(profitLoss);
            }
        }
Esempio n. 2
0
        static void Main()
        {
            XTraderModeTTAPIOptions envOptions = new XTraderModeTTAPIOptions();

            // Enable or Disable the TT API Implied Engine
            envOptions.EnableImplieds = false;

            // Create and attach a UI Dispatcher to the main Form
            // When the form exits, this scoping block will auto-dispose of the Dispatcher
            using (var disp = Dispatcher.AttachUIDispatcher())
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);

                // Create an instance of TTAPI.
                frmProfitLoss        profitLoss = new frmProfitLoss();
                ApiInitializeHandler handler    = new ApiInitializeHandler(profitLoss.ttApiInitHandler);
                TTAPI.CreateXTraderModeTTAPI(disp, handler);

                Application.Run(profitLoss);
            }
        }