Exemple #1
0
        void CreateRow(HA_GridView uc_gw, Result result)
        {
            DataGridViewRow row = new DataGridViewRow();


            row.CreateCells(uc_gw.Gw);


            row.Cells[0].Value = result.Instrument.DisplayName;
            if (result.D_RealColor == MyTrade.Core.Constants.CandleColor.GREEN)
            {
                row.Cells[1].Value = Resources.green;
            }
            else
            {
                row.Cells[1].Value = Resources.red;
            }
            if (result.D_HA_Color == MyTrade.Core.Constants.CandleColor.GREEN)
            {
                row.Cells[2].Value = Resources.green;
            }
            else
            {
                row.Cells[2].Value = Resources.red;
            }
            if (result.H4_HA_Color == CandleColor.GREEN)
            {
                row.Cells[3].Value = Resources.green;
            }
            else
            {
                row.Cells[3].Value = Resources.red;
            }
            if (result.H1_HA_Color == CandleColor.GREEN)
            {
                row.Cells[4].Value = Resources.green;
            }
            else
            {
                row.Cells[4].Value = Resources.red;
            }
            if (result.M15_HA_Color == CandleColor.GREEN)
            {
                row.Cells[5].Value = Resources.green;
            }
            else
            {
                row.Cells[5].Value = Resources.red;
            }

            row.Cells[6].Value = result.NumberHaCandles.ToString();
            if (result.PivotPointsPosition != null)
            {
                row.Cells[7].Value = result.PivotPointsPosition.ToString();
            }
            uc_gw.Gw.Rows.Add(row);
            uc_gw.Gw.Refresh();
        }
Exemple #2
0
 void ChangeNameColumns(HA_GridView uc_gw, string type)
 {
     if (type == "W")
     {
         uc_gw.Gw.Columns[2].HeaderText = "W";
         uc_gw.Gw.Columns[3].HeaderText = "D";
         uc_gw.Gw.Columns[4].HeaderText = "H4";
         uc_gw.Gw.Columns[5].HeaderText = "H1";
     }
     else if (type == "D")
     {
         uc_gw.Gw.Columns[2].HeaderText = "D";
         uc_gw.Gw.Columns[3].HeaderText = "H4";
         uc_gw.Gw.Columns[4].HeaderText = "H1";
         uc_gw.Gw.Columns[5].HeaderText = "M15";
     }
     else if (type == "M")
     {
         uc_gw.Gw.Columns[2].HeaderText = "M";
         uc_gw.Gw.Columns[3].HeaderText = "W";
         uc_gw.Gw.Columns[4].HeaderText = "D";
         uc_gw.Gw.Columns[5].HeaderText = "H4";
     }
 }