Esempio n. 1
0
        private void SetOutputStatistic(string pair, double max, double avg, double min)
        {
            int decimals = Manager.ForexConfiguration.GetDecimals(pair);

            TTbxMin.Decimals     = decimals;
            TTbxAverage.Decimals = decimals;
            TTbxMax.Decimals     = decimals;

            TTbxMax.SetValue(this, max);
            TTbxAverage.SetValue(this, avg);
            TTbxMin.SetValue(this, min);
        }
Esempio n. 2
0
        public AnalysisControl()
        {
            InitializeComponent();

            TTbxSpan.SetIntegerMode(1, 10000, 1);
            TTbxMin.SetDoubleMode(double.MinValue, double.MaxValue, 0, 5, "");
            TTbxAverage.SetDoubleMode(double.MinValue, double.MaxValue, 0, 5, "");
            TTbxMax.SetDoubleMode(double.MinValue, double.MaxValue, 0, 5, "");

            TTbxBacktests.SetIntegerMode(0, 10000, 25);
            TTbxBacktestSamples.SetIntegerMode(int.MinValue, int.MaxValue, 0);
            TTbxBacktestConfidence.SetDoubleMode(double.MinValue, double.MaxValue, 0, 2, "%");


            //double[] dat = new double[10000000];
            //double[] dat1 = new double[10000000];
            //double[] dat2 = new double[10000000];

            //for (int i = 0; i < dat.Length; i++)
            //    dat[i] = AMath.Random();
            //Watch.Run("1");

            //for (int i = 0; i < dat.Length; i++)
            //    dat1[i] = AMath.Ln(dat[i]);

            //double v1 = AMath.Average(dat1);
            //double sp1 = Watch.ms("1");

            //Watch.Run("2");
            //for (int i = 0; i < dat.Length; i++)
            //    dat2[i] = Math.Log(dat[i]);

            //double v2 = AMath.Average(dat2);
            //double sp2 = Watch.ms("2");

            //if (sp2 > sp1 || v2 != v1)
            //    return;
        }