Beispiel #1
0
 private void ApplyGlobalProfitCommandExecute(object obj)
 {
     if (GlobalProfitLossSetting != null)
     {
         GlobalProfitLossSetting.IsMaxProfitEditMode = false;
         GlobalProfitLossSetting.IsMaxLossEditMode   = false;
         GlobalProfitLossSetting.MaxLoss             = GlobalProfitLossSetting.MaxLossEdit;
         GlobalProfitLossSetting.MaxProfit           = GlobalProfitLossSetting.MaxProfitEdit;
         GlobalProfitLossSetting.UpdateMinMax(true);
         BuySellSignalOrderManager.Instance.SetDayProfitLoss(GlobalProfitLossSetting.MaxProfit, GlobalProfitLossSetting.MaxLoss);
     }
 }
Beispiel #2
0
 private void SetGlobalProfitLossCommandExecute(object obj)
 {
     if (GlobalProfitLossSetting == null)
     {
         GlobalProfitLossSetting = new GlobalProfitLossSetting()
         {
             IsMaxLossEditMode = true, IsMaxProfitEditMode = true
         };
         GlobalProfitLossSetting.PropertyChanged += (s, e) =>
         {
             ApplyGlobalProfitCommand.RaiseCanExecuteChanged();
         };
     }
 }