It's basically just a service that runs on my server and it acts if Trump tweets, written in Java.
TweetListener sub = new TweetListener("realDonaldTrump"); sub.listen(); listener.on("newTweet", tweet -> { if(tweet.message.contains("I'm very smart person")) { sellAll(); } if(tweet.message.contains("great again")) { sellAll(); Ticker ticker = TickerService.find("DOW"); ticker.sellShort(); } if(tweet.message.contains("putin")) { Ticker ticker = TickerService.find("gazprom"); if(ticker != null) { ticker.buy(); } } // obligatory daily NFLX short no matter what Trump tweets Ticker ticker = TickerService.find("NFLX"); if(ticker != null) { ticker.sellShort(); } }); public void sellAll() { Portfolio.stocks.forEach(stock -> { stock.sell(); }); }
Opinions ?
( I'm sorry but wsb won't let me post )
Submitted March 31, 2018 at 09:26AM by AlwaysNFLXShort https://ift.tt/2Gr39mH
No comments:
Post a Comment