I already have a bunch of PHP scripts checking some technical indicators for various stocks I´m observing. Using a cronjob three indicators for these stocks are checked/calculated once a day. If all of these indicators generate a "buy" signal I receive an email containing a "buy message". If all of these indicators generate a "sell" signal some days later I also receive a notification by email. This already works fine.
I now thought it would be great to have a system (database) logging the prices of the specific stocks when a buy or sell signal is generated. That should be pretty easy, we just have to add a mysql query for this info the "send email" loop.
The second part should be a script to calculate the profit or loss of each trade and a total percentage for a defined period.
[url removed, login to view]
for example should generate a table listing all the trades between [url removed, login to view] and [url removed, login to view] (see attached pic, please note that the last sell signal in this table was generated on [url removed, login to view], which implies that there was no following buy signal between [url removed, login to view] and [url removed, login to view])
One thing you should know is, that if the existing script detects a buy or sell signal on three consecutive days, I receive three eMail (one on each day). So we have to consider that while generating our table (buy date should be the first buy signal after a sell signal, sell date needs to be the first sell signal before the next buy signal).
I´m looking forward to receive your bids on this project.