static void Main(string[] args) { var bittrex = new BittrexAgent(); bittrex.SetApiKey(ConfigurationManager.AppSettings["BittrexApiKey"], ConfigurationManager.AppSettings["BittrexApiSecret"]); var markets = bittrex.GetMarkets().Result.Where(m => m.MarketName.Contains("ETH-") || m.MarketName.Contains("BTC-")); foreach (var market in markets) { var result = bittrex.GetMarketSummary(market.MarketName); if (result == null) { continue; } var volume = result.Result[0].BaseVolume; if (volume < 250) { continue; } var ticks = bittrex.GetTicks(market.MarketName, "thirtyMin"); var rsi = new RsiIndicator().Calculate(ticks); if (rsi >= 70 || rsi < 30) { Console.WriteLine(market.MarketName + " - " + rsi); } } }
public void RsiHundredIfNoLoss() { var rsi = new RsiIndicator(new ClosePriceIndicator(_data), 3); Assert.AreEqual(Decimal.Hundred, rsi.GetValue(14)); Assert.AreEqual(Decimal.Hundred, rsi.GetValue(15)); }
public override bool Start() { bool res = base.Start(); if (!res) { return(false); } RsiSlowIndicator = new RsiIndicator() { Ticker = Ticker, Length = RsiLengthSlow }; RsiMiddleIndicator = new RsiIndicator() { Ticker = Ticker, Length = RsiLengthMiddle }; RsiFastIndicator = new RsiIndicator() { Ticker = Ticker, Length = RsiLengthFast }; RsiSlowIndicator.Calculate(); RsiMiddleIndicator.Calculate(); RsiFastIndicator.Calculate(); TelegramBot.Default.SendNotification(Name + "[" + GetType().Name + "]" + ": started at " + DateTime.Now.ToString("g"), ChatId); return(true); }
public override bool Start() { bool res = base.Start(); if (!res) { return(false); } RsiIndicator = new RsiIndicator() { Ticker = Ticker, Length = Length }; MacdIndicator = new MacdIndicator() { Ticker = Ticker, Length = Length }; StochIndicator = new StochasticIndicator() { Ticker = Ticker, Length = Length }; RsiIndicator.Calculate(); MacdIndicator.Calculate(); StochIndicator.Calculate(); TelegramBot.Default.SendNotification("SingleNotificationStrategy: " + Name + ": started at " + DateTime.Now.ToString("g"), ChatId); return(true); }
public AnalyzingData(MainWindow mainWindow) { _mainWindow = mainWindow; _loadAppData = new LoadAppData(this); _MACD = new MovingAverageConvergenceDivergence(this); _RSI = new RsiIndicator(this); _OSH = new OshIndicaror(this); }
public AppFullDataAnalaizer(MainWindow mainWindow) { _mainWindow = mainWindow; _loadAppData = new LoadAppData(this); _MACD = new MovingAverageConvergenceDivergence(this); _RSI = new RsiIndicator(this); _OSH = new OshIndicaror(this); _EMA = new EmaIndicaror(this); _AppLogic = new AppLogic(_mainWindow, this); }
public void RsiUsingTimeFrame14UsingClosePrice() { var rsi = new RsiIndicator(new ClosePriceIndicator(_data), 14); TaTestsUtils.AssertDecimalEquals(rsi.GetValue(15), 62.7451); TaTestsUtils.AssertDecimalEquals(rsi.GetValue(16), 66.6667); TaTestsUtils.AssertDecimalEquals(rsi.GetValue(17), 75.2294); TaTestsUtils.AssertDecimalEquals(rsi.GetValue(18), 71.9298); TaTestsUtils.AssertDecimalEquals(rsi.GetValue(19), 73.3333); TaTestsUtils.AssertDecimalEquals(rsi.GetValue(20), 77.7778); TaTestsUtils.AssertDecimalEquals(rsi.GetValue(21), 74.6667); TaTestsUtils.AssertDecimalEquals(rsi.GetValue(22), 77.8523); TaTestsUtils.AssertDecimalEquals(rsi.GetValue(23), 81.5642); TaTestsUtils.AssertDecimalEquals(rsi.GetValue(24), 85.2459); }
public void RsiFirstValueShouldBeZero() { var rsi = new RsiIndicator(new ClosePriceIndicator(_data), 14); Assert.AreEqual(Decimal.Zero, rsi.GetValue(0)); }