Пример #1
0
 public MaCrossRsiTradingStrategy(List <HighLowItem> candles, Rsi rsi, MovingAverage shortMa, MovingAverage longMa)
     : base(candles)
 {
     this.rsi     = rsi;
     this.shortMa = shortMa;
     this.longMa  = longMa;
 }
Пример #2
0
        private void RSI_OnSelected(object sender, RoutedEventArgs e)
        {
            TradingChart.RemoveIndicators();

            var rsi = new Rsi(TradingChart.Candles, 14, 70, 30);

            TradingChart.AddIndicator(rsi);
            var strategy = new RsiTradingStrategy(TradingChart.Candles, rsi);

            TradingChart.SetStrategy(strategy);
        }
Пример #3
0
        private void MACrossRSI_OnSelected(object sender, RoutedEventArgs e)
        {
            TradingChart.RemoveIndicators();

            var rsi = new Rsi(TradingChart.Candles, 14, 66, 33);

            TradingChart.AddIndicator(rsi);
            var ma = new MovingAverage(13, new ExponentialMaCalculation(), TradingChart.Candles);

            TradingChart.AddIndicator(ma);
            var ma2 = new MovingAverage(4, new ExponentialMaCalculation(), TradingChart.Candles);

            TradingChart.AddIndicator(ma2);
            var strategy = new MaCrossRsiTradingStrategy(TradingChart.Candles, rsi, ma2, ma);

            TradingChart.SetStrategy(strategy);
        }
Пример #4
0
 public RsiTradingStrategy(List <HighLowItem> candles, Rsi rsi)
     : base(candles)
 {
     this.rsi = rsi;
 }