コード例 #1
0
        /// <summary>
        ///   Export menu
        /// </summary>
        private void ExportOnClick(object sender, EventArgs e)
        {
            var mi = (ToolStripMenuItem) sender;
            string name = mi.Name;

            var exporter = new Exporter();

            switch (name)
            {
                case "dataOnly":
                    exporter.ExportDataOnly();
                    break;
                case "CSVData":
                    exporter.ExportCSVData();
                    break;
                case "indicators":
                    exporter.ExportIndicators();
                    break;
                case "summary":
                    exporter.ExportBarSummary();
                    break;
                case "positions":
                    exporter.ExportPositions(true);
                    break;
                case "positionsNoTransfer":
                    exporter.ExportPositions(false);
                    break;
                case "positionInMoney":
                    exporter.ExportPositionsInMoney(true);
                    break;
                case "positionInMoneyNoTransfer":
                    exporter.ExportPositionsInMoney(false);
                    break;
            }
        }
コード例 #2
0
 /// <summary>
 ///  Handler to write histogram data CSV file
 /// </summary>
 private void BtnExportClick(object sender, EventArgs e)
 {
     // protect against null if no trades in strategy
     if (_tradeResults.Length > 0)
     {
         var exporter = new Exporter();
         exporter.ExportHistogramData(GetHistogramDataString());
     }
     else
     {
         string info = Language.T("No trades in Strategy to Export to CSV.");
         string caption = Language.T("No Trades");
         MessageBox.Show(info, caption, MessageBoxButtons.OK);
     }
 }
コード例 #3
0
        /// <summary>
        /// Export menu
        /// </summary>
        void Export_OnClick(object sender, EventArgs e)
        {
            ToolStripMenuItem mi = (ToolStripMenuItem)sender;
            string strMIName = mi.Name;

            Exporter exporter = new Exporter();

            switch (strMIName)
            {
                case "dataOnly":
                    exporter.ExportDataOnly();
                    break;
                case "CSVData":
                    exporter.ExportCSVData();
                    break;
                case "indicators":
                    exporter.ExportIndicators();
                    break;
                case "summary":
                    exporter.ExportBarSummary();
                    break;
                case "positions":
                    exporter.ExportPositions(true);
                    break;
                case "positionsNoTransfer":
                    exporter.ExportPositions(false);
                    break;
                case "positionInMoney":
                    exporter.ExportPositionsInMoney(true);
                    break;
                case "positionInMoneyNoTransfer":
                    exporter.ExportPositionsInMoney(false);
                    break;
                default:
                    break;
            }

            return;
        }