Ejemplo n.º 1
0
 private void Contract2CB1_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (OpMarketControl.contract2.SelectedValue != null)
     {
         VolCurvLV.TempCurveReset();
     }
 }
Ejemplo n.º 2
0
 private void Adjustment2_ValueChanged(object sender, RoutedPropertyChangedEventArgs <object> e)
 {
     if (e.OldValue != null && e.NewValue != null)
     {
         VolCurvLV.TempCurveReset();
     }
 }
Ejemplo n.º 3
0
        private async void VolModelCB1_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (WMSettingsLV.DataContext != null)
            {
                WMSettingsLV.RevertCurrent();
                VolCurvLV.TempCurveReset();
            }
            var volModel = OpMarketControl.volModelCB1.SelectedItem as ModelParamsVM;

            if (volModel != null)
            {
                await _otcHandler.QueryModelParamsAsync(volModel.ToString());

                WMSettingsLV.DataContext = null;
                WMSettingsLV.DataContext = volModel;
            }

            //var exchange = OpMarketControl.underlyingEX1.SelectedValue;
            //var uc = OpMarketControl.underlyingContractCB1.SelectedValue;
            //var ed = OpMarketControl.expireDateCB1.SelectedValue;

            //if (exchange != null && uc != null && ed != null)
            //{
            //    VolCurvLV.SelectOption(exchange.ToString(), uc.ToString(), ed.ToString());
            //    WMSettingsLV.SelectOption(exchange.ToString(), uc.ToString(), ed.ToString());
            //}
        }
Ejemplo n.º 4
0
        private void ExpireDateCB_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            var exchange = OpMarketControl.underlyingEX.SelectedValue;
            var uc       = OpMarketControl.underlyingContractCB.SelectedValue;
            var ed       = OpMarketControl.expireDateCB.SelectedValue;

            if (exchange != null && uc != null && ed != null)
            {
                VolCurvLV.SelectOptionImpl(exchange.ToString(), uc.ToString(), ed.ToString());
            }
        }
Ejemplo n.º 5
0
        private async void RevertCurrentBtn_Click(object sender, RoutedEventArgs e)
        {
            VolCurvLV.TempCurveReset();
            var volModel = OpMarketControl.volModelCB1.SelectedItem as ModelParamsVM;

            if (volModel != null)
            {
                WMSettingsLV.DataContext = null;
                var modelparamsVM = await _otcHandler.QueryModelParamsAsync(volModel.ToString());

                WMSettingsLV.DataContext = modelparamsVM;
            }
        }
Ejemplo n.º 6
0
 private void SetCurrentBtn_Click(object sender, RoutedEventArgs e)
 {
     //Task.Run(() => { Task.Delay(5000); Dispatcher.Invoke(() => VolCurvLV.TempCurveReset()); });
     VolCurvLV.TempCurveReset();
 }