private void PlaceStopOrder() { var context = new NewStopOrderViewModel { Board = Board, Seccode = Seccode, StopLossByMarket = true, StopLossActivationPrice = CurrentPrice.ToString("F2") }; var window = new NewStopOrder { DataContext = context, StopLossExpander = { IsExpanded = true }, //StopLossActivationPrice = { Text = CurrentPrice.ToString("F2") }, BuySell = { SelectedIndex = CurrentPrice < _lastCandle.Close ? 1 : 0 } }; window.Show(); }
private void PlaceStopOrder(object obj) { if (SelectedData == null) { return; } var context = new NewStopOrderViewModel { BuySell = SelectedData.BuySell == "buy" ? "S" : "B", Seccode = Seccode, Board = Board, StopLossByMarket = true, StopLossActivationPrice = SelectedData.Price.ToString() }; var window = new NewStopOrder { DataContext = context, StopLossExpander = { IsExpanded = true }, BuySell = { SelectedIndex = SelectedData.BuySell == "buy" ? 1 : 0 } }; window.Show(); }
/// <summary> /// To call the event <see cref="NewStopOrders"/>. /// </summary> /// <param name="stopOrder">Stop order that should be passed to the event.</param> private void RaiseNewStopOrder(Order stopOrder) { NewStopOrder?.Invoke(stopOrder); NewStopOrders?.Invoke(new[] { stopOrder }); }
internal void RaiseNewStopOrderEvent(StopOrder stopOrder) { NewStopOrder?.Invoke(stopOrder); }