Forex_Strategy_Builder.Dialogs.Generator.Top10Slot.InitSlot C# (CSharp) Метод

InitSlot() публичный метод

Sets the chart parameters
public InitSlot ( ) : void
Результат void
        public void InitSlot()
        {
            int chartHeight = ClientSize.Height - 2 * (border + space) + 1;
            int cahartWidth = (int)(1.5 * chartHeight);
            Micro_Balance_Chart_Image microChart = new Micro_Balance_Chart_Image(cahartWidth, chartHeight);

            chart        = microChart.Chart;
            balance      = Configs.AccountInMoney ? (int)Math.Round(Backtester.NetMoneyBalance) : Backtester.NetBalance;
            profitPerDay = Configs.AccountInMoney ? Backtester.MoneyProfitPerDay : Backtester.ProfitPerDay;
            drawdown     = Configs.AccountInMoney ? (int)Math.Round(Backtester.MaxMoneyDrawdown) : Backtester.MaxDrawdown;
            winLoss      = Backtester.WinLossRatio;
        }

Usage Example

 /// <summary>
 /// Adds a strategy to Top 10 list.
 /// </summary>
 void Top10AddStrategy()
 {
     if (top10Layout.InvokeRequired)
     {
         Invoke(new DelegateTop10AddStrategy(Top10AddStrategy), new object[] { });
     }
     else
     {
         Top10Slot top10Slot = new Top10Slot();
         top10Slot.Width  = 290;
         top10Slot.Height = 65;
         top10Slot.InitSlot();
         top10Slot.Click       += new EventHandler(Top10Slot_Click);
         top10Slot.DoubleClick += new EventHandler(Top10Slot_Click);
         Top10StrategyInfo top10StrategyInfo = new Top10StrategyInfo();
         top10StrategyInfo.Balance     = Configs.AccountInMoney ? (int)Math.Round(Backtester.NetMoneyBalance) : Backtester.NetBalance;
         top10StrategyInfo.Top10Slot   = top10Slot;
         top10StrategyInfo.TheStrategy = Data.Strategy.Clone();
         top10Layout.AddStrategyInfo(top10StrategyInfo);
     }
 }
All Usage Examples Of Forex_Strategy_Builder.Dialogs.Generator.Top10Slot::InitSlot