public GapTraderMainViewModel(IGapTraderRunner runner) { StrategyTesterViewModel = new GapFillStrategyTesterViewModel(_market, runner); MarketDetailsViewModel = new MarketDetailsViewModel(runner, _market); MarketDetailsViewModel.MarketDataChanged += (s, e) => { StrategyTesterViewModel = new GapFillStrategyTesterViewModel(_market, runner); RaisePropertyChanged(nameof(StrategyTesterViewModel)); StrategyTesterViewModel.StrategyFinderViewModel.DataInUseToggle += (x, y) => MarketDetailsViewModel.ToggleDataInUse(); }; }
public MainViewModel(IRunner runner, List <SavedData> savedData) { StrategyTesterViewModel = new GapFillStrategyTesterViewModel(_market, runner); MarketDetailsViewModel = new MarketDetailsViewModel(savedData, runner, _market); TradeJournalViewModel = new TradeJournalViewModel(runner); }