public MaCrossRsiTradingStrategy(List <HighLowItem> candles, Rsi rsi, MovingAverage shortMa, MovingAverage longMa) : base(candles) { this.rsi = rsi; this.shortMa = shortMa; this.longMa = longMa; }
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); }
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); }
public RsiTradingStrategy(List <HighLowItem> candles, Rsi rsi) : base(candles) { this.rsi = rsi; }