/// <summary> /// Initializes the strategy field /// </summary> void InitializeStrategy() { // Button Overview tsbtOverview = new ToolStripButton(); tsbtOverview.Name = "Overview"; tsbtOverview.Text = Language.T("Overview"); tsbtOverview.Click += new EventHandler(BtnTools_OnClick); tsbtOverview.ToolTipText = Language.T("See the strategy overview."); tsStrategy.Items.Add(tsbtOverview); // Button Generator tsbtGenerator = new ToolStripButton(); tsbtGenerator.Name = "Generator"; tsbtGenerator.Text = Language.T("Generator"); tsbtGenerator.Click += new EventHandler(BtnTools_OnClick); tsbtGenerator.ToolTipText = Language.T("Generate or improve a strategy."); tsStrategy.Items.Add(tsbtGenerator); // Button tsbtStrategySize1 tsbtStrategySize1 = new ToolStripButton(); tsbtStrategySize1.DisplayStyle = ToolStripItemDisplayStyle.Image; tsbtStrategySize1.Image = Properties.Resources.slot_size_max; tsbtStrategySize1.Tag = 1; tsbtStrategySize1.Click += new EventHandler(BtnSlotSize_Click); tsbtStrategySize1.ToolTipText = Language.T("Show detailed info in the slots."); tsbtStrategySize1.Alignment = ToolStripItemAlignment.Right; tsStrategy.Items.Add(tsbtStrategySize1); // Button tsbtStrategySize2 tsbtStrategySize2 = new ToolStripButton(); tsbtStrategySize2.DisplayStyle = ToolStripItemDisplayStyle.Image; tsbtStrategySize2.Image = Properties.Resources.slot_size_min; tsbtStrategySize2.Tag = 2; tsbtStrategySize2.Click += new EventHandler(BtnSlotSize_Click); tsbtStrategySize2.ToolTipText = Language.T("Show minimum info in the slots."); tsbtStrategySize2.Alignment = ToolStripItemAlignment.Right; tsStrategy.Items.Add(tsbtStrategySize2); // Button tsbtStrategyInfo tsbtStrategyInfo = new ToolStripButton(); tsbtStrategyInfo.DisplayStyle = ToolStripItemDisplayStyle.Image; tsbtStrategyInfo.Image = Properties.Resources.str_info_infook; tsbtStrategyInfo.Tag = SlotSizeMinMidMax.min; tsbtStrategyInfo.Click += new EventHandler(BtnStrategyDescription_Click); tsbtStrategyInfo.ToolTipText = Language.T("Show the strategy description."); tsbtStrategyInfo.Alignment = ToolStripItemAlignment.Right; tsStrategy.Items.Add(tsbtStrategyInfo); // Button Optimizer tsbtOptimizer = new ToolStripButton(); tsbtOptimizer.Name = "Optimizer"; tsbtOptimizer.Text = Language.T("Optimizer"); tsbtOptimizer.Click += new EventHandler(BtnTools_OnClick); tsbtOptimizer.ToolTipText = Language.T("Optimize the strategy parameters."); tsStrategy.Items.Add(tsbtOptimizer); // Creates strategyLayout strategyLayout = new Strategy_Layout(Data.Strategy.Clone()); strategyLayout.Parent = pnlStrategy; strategyLayout.btnAddOpenFilter.Click += new EventHandler(BtnAddOpenFilter_Click); strategyLayout.btnAddCloseFilter.Click += new EventHandler(BtnAddCloseFilter_Click); btnShowJournalByPos = new Button(); btnShowJournalByPos.Parent = pnlStrategy; btnShowJournalByPos.Text = Language.T("Journal by Positions"); btnShowJournalByPos.UseVisualStyleBackColor = true; btnShowJournalByPos.Click += new EventHandler(BtnShowJournalByPos_Click); btnShowJournalByBars = new Button(); btnShowJournalByBars.Parent = pnlStrategy; btnShowJournalByBars.Text = Language.T("Journal by Bars"); btnShowJournalByBars.UseVisualStyleBackColor = true; btnShowJournalByBars.Click += new EventHandler(BtnShowJournalByBars_Click); pnlStrategy.Resize += new EventHandler(PnlStrategy_Resize); return; }