PINE64

Full Version: Stock Screener + SMS Alert
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I have very little experience with these kinds of machines, so I am not sure what is/isn't possible. I do think it would be cool if it's possible to leave a pine running from market hours (9:30-4), and have it running a program that either runs through all stocks, or a list, and screens them for certain preferences. Once it finds one that matches your criteria, it would be cool to have it send you a text or maybe add to a list that you could view from your phone. I know there are applications and websites out there to do this, but I think this would be a fun project to do and also utilize my Pine! Any thoughts? Thanks!
(05-23-2016, 02:36 PM)joshdude58 Wrote: [ -> ]I have very little experience with these kinds of machines, so I am not sure what is/isn't possible. I do think it would be cool if it's possible to leave a pine running from market hours (9:30-4), and have it running a program that either runs through all stocks, or a list, and screens them for certain preferences. Once it finds one that matches your criteria, it would be cool to have it send you a text or maybe add to a list that you could view from your phone. I know there are applications and websites out there to do this, but I think this would be a fun project to do and also utilize my Pine! Any thoughts? Thanks!

Hi,

Simple answer yes, but to do it for free is a little more difficult, and the complexity of the "screens them for certain preferences", would need to be constrained to the power of the Pine64 and the amount of storage.

The markets sell the price data to the financial services industry, so depending on how close to market you would like to be you may have to pay for the privilege. You can use site's like The London Stock Exchange but they are a little while behind the market. For the SMS again there are free sites, but you'll need to read the T's & C's many don't allow free programmatic access.

As for the coding, if it's simple "if price moved by X", I'd personally pick one of the Linux OS's and you could even write the processing in shell, but a lot of Data Science coding is done in Python now days. If you want to get more complex than that then I would suggest another platform...
Hi,

This is very doable and have created something related.  I wrote a program in Python and used the Selenium library to login to a website and scrape certain key data.  If that data met a specific criteria, it would text me.  You could do something similar here by scripting Selenium to go to something like finance.yahoo.com and pull quotes from the various stocks.  

Actually, Yahoo seems to use a consistent URL structure for quotes that should simplify this.  Here is the URL that I see when I try to quote GM:

http://finance.yahoo.com/q?s=gm&fr=uh3_f...b&uhb=uhb2

It appears that you can simply replace the symbol after the first "=" and get a different quote.

BTW, I found that the easiest way to text was to use an email to text gateway.  Here is a list of them.
Thank you both for your responses! I have found some sample code online that I am going to try to reformat, but this seems possible!
(05-24-2016, 08:36 PM)joshdude58 Wrote: [ -> ]Thank you both for your responses! I have found some sample code online that I am going to try to reformat, but this seems possible!

let us know how you get on, and how you go about developing it....
I don't know you need a pine to do this. There are a few sites and most trading account sites that will give you email alerts based on different stock. Not only email most will give you sms alerts as well. But if you must roll your own most carriers will give you a email to sms gateway eg phonenumber@carrier.  If you wanted to route the email alert through the pine you could format it better for sms. If for some reason your carrier didn't have a email to sms gateway you could even hang a cell modem (usb) off the pine and have it send sms, of course that would require a cell service (contract) for the modem.
Hey guys,

So I have gotten the program and Pine working as I wanted it. I wrote the program on my Surface tablet, ensured everything worked, and then copied it onto my Pine. It runs during market hours and retrieves the price every minute to compute a 9, 12, and 26 minute EMA, and then it tracks the MACD and sends me texts using the Twilio client if there is a crossover or crossunder. I added the ability to choose whether I wanted to input my own stocks, or pull from a stock screener with set parameters (minimum volume, max price, how many stocks to retrieve). I believe I have finessed it to where I envisioned it with my original post; however, my values are slightly off (when comparing on a stock tracking application, like thinkorswim). Also, I have found it gets annoying if I am following a stock with little movement, as it tends to send me a text every minute. I am going to try to find other indicators/expand my time periods to see if that helps. Have had some positive, and some neutral results from the program!
Very cool. Will you be making it available to others at some point ?
(06-04-2016, 06:36 PM)Luke Wrote: [ -> ]Very cool. Will you be making it available to others at some point ?

Thanks and definitely considering it! Might try and use it for a senior project with school next semester, so likely after the semester is over, I will!
(06-04-2016, 01:19 PM)joshdude58 Wrote: [ -> ]Hey guys,

So I have gotten the program and Pine working as I wanted it. I wrote the program on my Surface tablet, ensured everything worked, and then copied it onto my Pine. It runs during market hours and retrieves the price every minute to compute a 9, 12, and 26 minute EMA, and then it tracks the MACD and sends me texts using the Twilio client if there is a crossover or crossunder. I added the ability to choose whether I wanted to input my own stocks, or pull from a stock screener with set parameters (minimum volume, max price, how many stocks to retrieve). I believe I have finessed it to where I envisioned it with my original post; however, my values are slightly off (when comparing on a stock tracking application, like thinkorswim). Also, I have found it gets annoying if I am following a stock with little movement, as it tends to send me a text every minute. I am going to try to find other indicators/expand my time periods to see if that helps. Have had some positive, and some neutral results from the program!

To prevent the minute notifications, you need to store the last value and set a % change margin before you get another notification.
Pages: 1 2