Beispiel #1
0
        private void ConsoleTextbox_SelectionChanged(object sender, RoutedEventArgs e)
        {
            if (InstrumentSelect1.SelectedIndex == -1)
            {
                return;
            }
            string SelectedIstrument = InstrumentSelect1.SelectedItem.ToString();

            string ChangesPCTAsString = ValueStatistics.GetChangePCT(SelectedIstrument, TimeValues.DayToSecond, TimeValues.DayToSecond, 6, false);

            PrevDailyChangePCTRelative1.Text = ChangesPCTAsString;

            ChangesPCTAsString = ValueStatistics.GetChangePCT(SelectedIstrument, TimeValues.WeekToSecond, TimeValues.WeekToSecond, 1, false);
            PrevWeekChangePCTRelative1.Text = ChangesPCTAsString;

            ChangesPCTAsString = ValueStatistics.GetChangePCT(SelectedIstrument, TimeValues.HourToSecond, TimeValues.HourToSecond, 24, false);
            PrevHourlyChangePCTRelative1.Text = ChangesPCTAsString;

            string PrevDailyAvgStr = ValueStatistics.CalcPivot(SelectedIstrument, TimeValues.DayToSecond, TimeValues.DayToSecond, 6, false);

            PrevDailyAvg1.Text = PrevDailyAvgStr;

            RecommendedSellStart1.Text = ValueStatistics.GetAvgMinMaxBelowAvg(SelectedIstrument, TimeValues.DayToSecond, 0).ToString();
            YesterdayAvg1.Text         = ValueStatistics.CalcPivot(SelectedIstrument, TimeValues.DayToSecond, TimeValues.DayToSecond, 1, false);
            RecommendedBuyStart1.Text  = ValueStatistics.GetAvgMinMaxBelowAvg(SelectedIstrument, TimeValues.DayToSecond, 1).ToString();
        }
Beispiel #2
0
 private void ShowSomeStatistics()
 {
     ValueStatistics.CalcInversionEachInstrument(10, 10 + 2, 0.0001, 2);
     ValueStatistics.CalcTransactionsEachInstrument();
     ValueStatistics.GetTopXLastestTransactionsAllInstruments();
     ValueStatistics.GetChangePCTAllInstruments();
     Globals.Logger.Log("Daily Pivots:");
     ValueStatistics.CalcPivot("Heating Oil (HO)", TimeValues.DayToSecond, TimeValues.DayToSecond, 7);
     ValueStatistics.CalcPivot("Gasoline (RB)", TimeValues.DayToSecond, TimeValues.DayToSecond, 7);
     ValueStatistics.CalcPivot("Crude Oil (CL)", TimeValues.DayToSecond, TimeValues.DayToSecond, 7);
     ValueStatistics.CalcPivot("Natural Gas (NG)", TimeValues.DayToSecond, TimeValues.DayToSecond, 7);
 }