Skip to content
TORNLIFE More

[Userscript+ Spreadsheet] Stonks

Started by Father [2131687] on in Tools & Userscripts.

54 replies · 4.7k views · thread synced · 3 days ago · View on torn.com
About this thread

Posts archived: 55 / 55 posts (100%) · the total is Torn's reply count + the opening post at the last fetch

Counted by TornLife from the archived posts.

Archived posts
55
Discussion span
→
Authority score
54 / 100
Historical score
41 / 100
Story score
57 / 100
Engagement score
81 / 100

People posting, likes and official posts are not counted for this thread yet: on threads longer than one page they come from a periodic pass over the archive, which has not covered it.

Father [2131687]
Hi.

What does the Userscript does?

1) Creates Portfolio page. You will find it through icon that script creates. It is not much refined so might see some improvements in future.

2) Shows current profit/loss of a particular stock.
[image: cdn.discordapp.com]


3) Adds a box on top of stocks page like this:

[image: cdn.discordapp.com]

4) The box shows current total loss/profit. It also shows if payout is available for a stock.

5) Allows you to set lower and higher range for prices of a stock. If the stock is in the selected price range it will highlight the stock as green as shown below and write a scrolling text in the box.


[image: cdn.discordapp.com]


6) Adds ways to filter stock list.


[image: i.gyazo.com]




7) Last but not least allows you to record your stock transactions. For this feature to work you need to connect it to a spreadsheet. Instructions for doing so can be found by going to this link.

8) Script is supposed to be dark mode friendly. But it is my first time working with dark mode so lemme know if there changes to be made in that regard.

9) Adds stock acronyms in mobile display.

[image: i.gyazo.com]

10) Allows manual entry of data to spreadsheet if you did a transaction from your mobile and want to add it later on.

Open activity log:[image: cdn.discordapp.com]

Click on "Copy Log" button corresponding to the desired transaction, as along with log it will also copy the time of transaction.
Click on "Manual Logging" option. It will open an input box paste the transaction there and click on Send. Please only send one transaction at a time.

[image: cdn.discordapp.com]


11) Allows you to hide Irrelevant Stocks. Click on Settings icon > Irrelevant List. Click on stocks you want to hide, the selected irrelevant stocks are marked in red. Click on Save. Then choose the option from Drop-down menu to hide those stocks.


[image: i.gyazo.com]



[image: i.gyazo.com]



12) Can buy stocks by entering amount of money.
[image: i.gyazo.com]

K, m and b shortcuts are allowed. Enter amount and click on Fill. It will enter corresponding number of shares. Always double check the amount while confirming the sale.

13) If you have any stock expanded and you keep the tab opened in background while you work in other tab, script will change page title every tick with the new price of that stock. Kindly wait for the tick to see the change.

For the script to work you need Tampermonkey.

Script: https://raw.githubusercontent.com/sid-the-sloth1/torn-qol-scripts/main/stonks.user.js






Please let me know if you encounter any issues.
cookdandbombd [2450557] Reporter
This is absolutely superb, thanks a lot! Looks great on dark mode; gives so much more info, and makes stonks a hell of a lot easier to navigate on mobile.

If anyone can't find [background color=var(--bbc-body-bg-color)]"Tools > Script Editor" - then this changed - on my browser at least - to "Extensions > App Script." Seemingly that's not the case for everyone though, but thought I should mention it just in case. [/background]
Father [2131687]
The collapsible version will be done in like an hour.

And about saving preference, while developing I didn't feel the need. But if it is something that is needed I can surely add it.
Father [2131687]
Done.

Click on Header to hide/unhide.

And I have added caching for input for Drop-downs.

Kindly update to new version by clicking on link
cookdandbombd [2450557] Reporter
Any plans to add the stock acronyms to the script, e.g. under the company logos? It's not a big deal, and the drop-down menu already goes a long way to making the whole thing more usable and user-friendly on mobile in particular, but I thought I would ask for the sake of convenience :-)
Father [2131687]
No. And I doubt it will work properly on it. As it uses Fetch intercept and monkey patching websockets. I am not sure these methods will work properly on Torn PDA.
Proxima [1879587] Wiki Editor
Hi Father,

For the "choose an option" dropdown, can we get a "not ready for payout" option? Would be a nice simple way to display things we own, that we've only just invested (for profits rather than dividends).
Father [2131687]
I ended up making an "Recently Bought" Filter. Using it shows the stocks that have been bought in last < =7 days. But the issue is that when someone merges 2 or more blocks the date resets. So it will also show the stocks that have been merged in last 7 days.

If you think it is what you are looking for lemme know, I will push the update.