Example #1
0
        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();
            };
        }
Example #2
0
 public MainViewModel(IRunner runner, List <SavedData> savedData)
 {
     StrategyTesterViewModel = new GapFillStrategyTesterViewModel(_market, runner);
     MarketDetailsViewModel  = new MarketDetailsViewModel(savedData, runner, _market);
     TradeJournalViewModel   = new TradeJournalViewModel(runner);
 }