Cookie Clicker

Cookie Clicker

CookiStocker 2 | Automatic Stock Trading Mod
203 kommentarer
z  [ophavsmand] 28. aug. kl. 3:22 
Overspark - It is indeed! I just implemented this feature on my version of the mod a few days ago, and I was surprised to see how nice it was just to have the mod buy the brokers automatically and not have to worry about them at all.

This feature will be in the next release, which is coming very soon.
Overspark 26. aug. kl. 5:11 
Automatic buying of brokers would be an awesome feature.
z  [ophavsmand] 25. aug. kl. 18:32 
No problem, sarath_dilrow. The new requirements are currently mentioned only in this conversation. I need to add them to the main documentation, and more importantly (since few people read the documentation), I have to fix the new display to notify the player when and why automatic buying is not running.

It also occurred to me that I should add automatic buying of brokers up to the minimum limit, doing this in a way that doesn't have a significant impact on the bank.

Also, you'll get slightly better results the more brokers you have. I personally recommend 100; after 162, adding brokers essentially has no effect.
sarath_dilrow 24. aug. kl. 9:48 
Thank you for the answer and sorry for the question. Yes, the problem was that I was at 50 brokers instead of 58, bought 10 more and it started auto buying inmediately. Sorry again for the question.
z  [ophavsmand] 24. aug. kl. 5:54 
sarath_dilrow - If the mod is auto-selling properly but not buying anything, by far the most likely explanation is that you have not met the recently introduced requirements for the mod to purchase stocks. These consist of having a minimum of 58 brokers as well as enough cookies in your bank so that a purchase of all the available shares of a single stock will not consume more than 5% of your bank. The number of cookies in your bank required to fulfill this requirement is given by the following formula:

Cookies required = (number of shares) * (highest raw CPS this session) * (price per share) * 20

Since neither the existence nor the value of this formula is obvious, it seems, I'll need to add another line to the new display indicating what's going on here. In the meantime, a rough guide is that when you have 150,000 seconds or more worth of cookies in your bank (more or less), the mod should be able to purchase stocks. (That's a little less than two days' worth of cookies.)
sarath_dilrow 22. aug. kl. 21:39 
Hello, sorry if this question is dumb but does the mod wait for some special requirement to buy stocks? The mod auto-sells everything just fine but I have left it running for around 6 hours and it hasn't buy any stock. I tried doing what yaboi did and even reinstalled the mod but no luck.
yaboi skweezy jibbs1 22. aug. kl. 15:00 
Added CCSE and everything works now, thanks for figuring it out :crystaldragon:
dyl4n010 21. aug. kl. 16:35 
Doing gods work Z. Insane how quickly and active you're working on improving the mod. Plenty of other mod developers would have taken their sweet time or completely dropped the mod when having so many people report in broken features. Thank you :leyhappy:
z  [ophavsmand] 21. aug. kl. 12:29 
Fascinating! The mod even includes the standard line that checks for the existence of CCSE and loads it if it isn't present, but obviously that wasn't sufficient. Therefore, I've added CCSE to the list of Required Items on this page. Thanks, lil' orange for finding this, and thanks, mxrc, for verifying that this fixes your problem as well.
mxrc 21. aug. kl. 12:11 
Installing CCSE/Enabling CCSE and putting it on top of the mod list has actually solved my issue. Thanks for helping :)
lil' orange 21. aug. kl. 6:36 
Ah yes, my bad I had a typo with my comment. It was supposed to be 615. (Which was wrong anyway I had meant the line you mentioned 610, it’s just that both of those functions gave errors as I was commenting out that function) I commented out the whole replacegamemenu function and its call later on and the mod and the mod worked again. Then I restored it back to the latest, added CCSE and then the mod worked again. I imagine if you remove CCSE or disable it you’ll reproduce the same issues that others have been getting. Prior to this update CCSE I imagine must have been loading fine so not sure why this is happening now for us.
If you want to continue chatting about it I don’t mind but perhaps another place would be better?
z  [ophavsmand] 21. aug. kl. 5:16 
lil' orange - The function customOptionsMenu.push is just a placeholder for the eventual option buttons code. It's been there for a long time without causing any problems.

BTW, the function ReplaceGameMenu is at line 620 in my code, so if it's at line 516 in yours, you don't have the latest version of CookiStocker.
lil' orange 21. aug. kl. 4:30 
Hey Z, I checked out what the issue was as I saw you were having issues figuring it out. So essentially around line 516 there’s this new function Replace Game menu that when it calls customOptionsMenu.push it can’t. Presumably because it’s a CCSE thing? Not sure what might cause CCSE not be loaded on starting any more but installing CCSE from the workshop and placing it at the top of my mods seems to have fixed it. I imagine anyone else also experiencing the trading not working for the last while will be able to fix it by adding CCSE and doing the same.

Anyway there’s my fix for now. Good luck and keep up the good work
z  [ophavsmand] 21. aug. kl. 0:13 
I must say that the problems being reported here are a bit mysterious to me, as I've been running the mod 24/7 for quite a while now, and my daily profits in the stock market are identical to what they were before I made the latest update. The only difference is that I don't have to disable the mod before ascending and re-enable it once my bank and brokers reach a sufficient level.

Nevertheless, a number of people are clearly having very different experiences here, so there's definitely something going on that needs to be addressed. You can rest assured that I will get this to the point where the mod works as well for everyone as it does for me.
z  [ophavsmand] 20. aug. kl. 22:47 
For bug reports, please post in the Bug Reports discussion group. Doing so will allow you to post screenshots if I need them, as well as allow more complex formatting than is permitted in these comments. It will also keep these comments from turning into long discussions that may make it harder for other people to get the information that they need. Furthermore, posts in the discussion groups don't have the short length limits that the comments do.

I'll address the comments by yaboi skweezy jibbs1 , mxrc , and Tap W in the Bug Reports discussion group shortly. If you subscribe to this group, you'll be notified whenever new entries are posted.
Tap W 20. aug. kl. 22:31 
Can attest to the two comments below me. Ever since the update, I've had the game on for days and it hasn't traded at all. I have 90 brokers, and my bank is large enough that even the most expensive purchases should be possible.
Reinstalled the mod and tweaked any settings that vaguely looked like they could help, but nothing changed.
mxrc 20. aug. kl. 16:06 
For demonstration I bought every stock manually now and it isn't selling them (Additionally I reinstalled the mod as well)
yaboi skweezy jibbs1 20. aug. kl. 15:05 
Been using the new update since it came out, have 109 brokers, buying maximum of any stocks costs a fraction of my total bank, and still it hasnt sold or bought a single stock in almost 4 days...
Overspark 19. aug. kl. 5:20 
Unsubscribing in the workshop seems to have worked! Thanks for the tip, very happy I can keep using this wonderful mod the way I want.
z  [ophavsmand] 19. aug. kl. 3:13 
dyl4n010 - I have fixed the problem of the overlaying of the statistics lines when the display pane is narrow. Currently, this fix is only in my version of the mod; I want to fix a few other bugs before releasing yet another version. This shouldn't take long.
z  [ophavsmand] 19. aug. kl. 3:10 
Overspark - The problem with option changes being overwritten has been present since before I took over this mod more than two years ago. For unknown reasons, it just manifests more or less frequently for different people at different times.

One workaround I have found that always works is to unsubscribe from the mod in the workshop, but not in the game. That's what I'm currently doing.

Option buttons are clearly needed here, and I will get them in as soon as possible.
z  [ophavsmand] 19. aug. kl. 3:05 
mxrc - You need to give the mod more time. To make sure that trading begins as soon as possible, build up a big bank, and be sure to have at least 58 brokers. To complete a purchase, your bank must be at least 20 times the maximum number of shares available for the stock the mod wants to buy, times the stock price as expressed in cookies, where the cookies are the highest number of raw cookies per second for this session.

As this is not a trivial calculation to do in your head, I'll put in an option in the statistics line when the mod fails to make a purchase that will show if there's a deficit in the number of brokers owned, or what the requirement number of cookies in your bank was if that was too low for a trade.

Note that as you progress in the game, this problem quickly disappears after your first automated stock purchase.
z  [ophavsmand] 19. aug. kl. 2:49 
Ivoravoid - In a situation like yours, where you have 750/775 of a stock, and the mod just doesn't buy the last 25 shares, that simply means that the stock has shifted from a "buy" mode to a "neutral" mode (which is why it's not selling the 750 shares). Given time, the situation will change so that the mod will either buy the remaining 25 shares or sell the original 750.

The reason your Chocolate is not being sold even though it's falling is that the mod's central algorithm isn't convinced that this is going to be a long term fall. This algorithm was built empirically with a huge amount of testing, during which I discovered that although the four central modes provide good information about where a stock is heading, there is additional emergent information in the movement of stocks that can help get much better returns than if only the four modes (or the stock's current direction) were followed. Give the mod time, and watch the stats in the new info lines.
Overspark 18. aug. kl. 5:20 
Version change doesn't work for me, file still gets overwritten. Even making the file read-only doesn't work, it still gets overwritten and the read-only attribute is gone.
I would love to have options buttons, this version is challenging to use like this! (Changing settings did stick for me with previous versions of the script).
mxrc 17. aug. kl. 15:16 
Isn't buying / selling for me neither
Ivoravoid 17. aug. kl. 13:33 
By "$44M in overhead" I mean that I have 44 million seconds of CPS in my bank.

Vanilla is currently at $1.61 each and I have 750/775 stock, and it's not buying the last 25. Chocolate is at $100 and falling, I have 850, and it's not selling.

I have 89 brokers, a Tiny Bank (level 2 offices), and level 1 banks.
z  [ophavsmand] 17. aug. kl. 9:16 
As for making changing to the options that don't get reverted, some experimentation shows that the following simple procedure always works for me:

1. On line 45 of main.js, change the version number to one greater than the current version. Since the current version is 2.4, that would mean changing it to 2.5.

2. Do not make any other changes to the file. Save it, and reload the game.

3. Check the source code; if the version number is still 2.5, you should be able to change any options you want from now on, and they will stick.
z  [ophavsmand] 17. aug. kl. 9:10 
Ivoravoid - The recent fix means that the mod will no longer use more than 5% of your cookies to make a single purchase. This provides better returns over the long run. However, as a result, it may take a bit more than an hour to start trading.

When you say you have $44M in overhead, what exactly do you mean here?

With the size of your bank and your CPS, it sounds like you should be getting trades, or at least on the verge of getting them. The mod takes an "all or nothing" approach to purchases. What are some of the typical amounts of stocks that you have, and what are their prices?

Also, note that the mod will now not buy stocks unless you have at least 58 brokers, which represents a commission rate of 1%. A level of 100 or more brokers is recommended if you can afford it; the maximum effective number of brokers is 162.
Ivoravoid 17. aug. kl. 7:14 
Mod not buying or selling anymore. I have $44M in overhead (2.187 novemdecillion cookies over 49.6 sexdecillion CPS) and the game has been open for over an hour. Is there a fix for this out yet?
Callen 16. aug. kl. 22:09 
Making the main.js read only ended up doing the trick as well.
z  [ophavsmand] 16. aug. kl. 20:58 
I discovered that the recent upgrade that prevented excessive buying at the beginning of a run did not work in all circumstances. I have fixed this, and this is now CookiStocker 2.4.

dyl4n010 - Your problem with the display is that your middle pane is too narrow. Widening your window will fix this. However, CookiStocker should fail gracefully here and simply split the lines that are too long. (There are actually two of them, and they are not the ones you think!) I should be able to fix this shortly.

As for having variable changes being reverted to their defaults, once you have upgraded your copy of CookiStocker to version 2.4, you should be able to to change the version number in line 45 of main.js to '2.5'. It may take a couple of tries to get this to work. There are various other alternatives, such as unsubscribing from CookiStocker in the Workshop, but not in the game. As mentioned earlier, a more permanent solution is coming with the implementation of option buttons.
Callen 16. aug. kl. 15:18 
Idk why but trying to turn off Transaction Notifications after this most recent update is not working. I make the changes and save the js and it just resets to one from the 14th.
dyl4n010 15. aug. kl. 16:46 
Sadly i can't post images within the comments, if you accept the friend request I've send, i'll show you a screenshot of the overlapping stats. This MIGHT just be an issue on my part in some way but i don't know. It's in full screen mode :PuroAmazed:
z  [ophavsmand] 15. aug. kl. 15:58 
As has been noted, occasionally, options that you set are overwritten the next time you load the game. Fortunately, there is an easy fix for this. On line 45 of main.js, change the version number from '2.3' to 2.4'. Your changes will now be preserved. When CookiStocker 2 is next upgraded, you will still get the new upgrade automatically, though you will have to reset your preferences.

This will all be completely fixed when standard option buttons are added; they are next on the list. This requires more than just adding the buttons, though, so it may take a little while until I get to it.
z  [ophavsmand] 15. aug. kl. 15:51 
dyl4n010 - While the mod may indeed make its initial buys more slowly, this is merely to assure that it does not gobble up all your cookies at once. The more cookies you have, the faster the initial purchases will proceed.

Note that this applies only to the initial purchases; once your bank contains enough cookies, purchase rates will proceed at the same rate they did in the previous version. You can verify this by looking at the new statistics feature.

Speaking of which, what do you mean when you say that "some of the stats overlap in the middle"?
dyl4n010 14. aug. kl. 10:02 
This new update makes it buy REALLY slow and feels like a significant downgrade.

Also some of the stats overlap in the middle.
dyl4n010 14. aug. kl. 9:41 
Pretty sure that the mod still works, except those options you are supposed to be able to change in the main.js file don't save anymore.

I change the stockerActivityReportFrequency from 1 hour to 1 minute, save it and restart my game. And then the code is back to 1 hour again.
z  [ophavsmand] 14. aug. kl. 8:52 
No, the 2.3 update did not break anything; I've ben using it for quite a while with no problems.. However, the improvements in its behavior may mean that it waits a little longer before starting to buy stocks. This is beneficial in the long run. Just give it a little more time, and make sure you have at least 58 brokers.
Klein 14. aug. kl. 3:28 
Did the 2.3 Update broke anything? It worked just yesterday and now its not doing anything for me.
z  [ophavsmand] 14. aug. kl. 1:06 
I have released CookiStocker 2.3. As promised recently (see two posts below), this version behaves reasonably if you leave it on all the time. Specifically, in order to make a stock purchase, the follow two new conditions must be satisfied:

1. The total amount of the stock purchase must be less than 5% of your current bank.
2. You must have at least 58 brokers, which corresponds to a commission rate of about 1%.

You can change the number of brokers required by modifying the variable stockerMinBrokers at the top of the source file. (Yes, option buttons are still being worked on.)

This version of CookiStocker also has 2 to 4 lines (selectable) of additional stock market statistics near the top of the stock market display. These essentially duplicate the summary statistics that were previously available only in the Console Announcements, and they are updated in real time.

More details on these changes will be coming soon. Subscribers to this mod will be updated automatically.
z  [ophavsmand] 29. juli kl. 12:25 
If you think this mod is losing money for you, please click on the "Steam Guide" link in the description above, go to the "Troubleshooting & FAQ" section and read the third item, entitled "Q: Why does this mod keep losing money for me?" This will solve your problem.
z  [ophavsmand] 27. juli kl. 7:05 
Intyale - Most of what you list are known problems, and they are on my "to do" list to fix. Unfortunately, I have had a brutal schedule for quite a while, and I just haven't had time to work on this mod.

However, I realized that there's a simple way to prevent the mod from eating all your cookies right after a reincarnation just to buy stocks. I just have to put in a limit whereby a stock purchase is not made if it would consume more than 5% of the cookies in your bank. I'll try to get this done in the next week. However, this is not a replacement for an on/off switch, which will take more work.

As for your last point, there should be no way that the mod can trade stocks when the market is inaccessible. If it's inaccessible to you, it's inaccessible to the mod as well.
z  [ophavsmand] 26. juli kl. 18:33 
Deminox - It is virtually impossible for this mod to cause you to lose 1/5 of your profits in ten minutes. If you are looking at the field marked "Profits:" at the top of the stock market data (which is unfortunately misnamed), it may very well decrease by 1/5 in ten minutes. But the reason for this is that whenever a stock is bought (by the mod or by you), the purchase price is deducted from the "Profits:" figure. This money is not lost; it is merely invested in stocks in the only way possible. As the game progresses, the mod buys more stocks, which temporarily reduces the "Profits:" figure even more.

But this gradually changes with time, and within a few hours, even the "Profits:" figure should be in the green. Within a day, it definitely will be, and your profits will continue to increase day after day - guaranteed. It will make more profits over time than any other mod, and more than you can make yourself.
z  [ophavsmand] 26. juli kl. 18:33 
[Continued]
Please don't condemn a mod that has a 5-star rating from hundreds of users just because you don't understand what it's doing. And please read the documentation that is boldfaced in the Description above. The mod doesn't work the way you think it does; it is not "speculating". It uses an algorithmic approach tailored to the way this particular stock market works, and it never loses many over the long term (i.e., a day or more). For players in the advanced stages of the game, it is easy to win the Gaseous Assets achievement in less than two days by using this mod.
Deminox 20. juli kl. 12:55 
This thing made me lose 1/5 of my profits in ten minutes. As soon as I enabled it, bough the more expensive stocks until depleating my bank and sold them in a downward trend, What is this!? This isn't a hard minigame, you just by whe low, sell when high. This mod shouldn't be speculating with the stocks, it just need options to set a threshold: autobuy when stock are this low, sell when this high. That's all. It shouldn't be making decitions it's clearly not well equipped to make.
Intyalle 3. juli kl. 18:03 
This mod could really use an option to turn the automation off :( Sometimes the circumstances aren't great (like early after an ascension) or I just wanna trade manually for a bit or I'm buying a lot and am going to have a low cookie balance for a while. It would be nice to turn it off temporarily without having to disable the whole mod and restart.

Also; is the mod supposed to be trading when the stock market is inaccessible? After ascension, it started trading as soon as I bought any farms.
Romario Robinson 17. maj kl. 3:08 
can someone help me? For some reason better autoclicker doesn't work when autostocker is enabled. Mod manager says they're both enabled, but autoclicker menu just doesn't appear. I've changed priority of mods and enabled/disabled them one by one but still nothing. Both mods have their latest versions
z  [ophavsmand] 15. maj kl. 19:19 
Falmingkitter - I did not delete your post, nor have I ever deleted a post here.

The stock market's actions are inherently probabilistic, and the mod does the best it can with the information it has. From what I've seen, this appears to be much better than any other stock market mod for the game. It uses some nonintuitive strategies to achieve those results. It may lose occasionally, but thousands of hours of testing by me personally have shown that it wins several times more often than it loses, and the average win is at least several times as big as the average loss. The Gaseous Assets achievement, which many consider the hardest in the game to obtain, can be reached in less than two days with this mod in a fully upgraded, non-cheating game.

If you can do better on your own, or with another mod, especially over a period of days, please let me know.
Falmingkitter 12. maj kl. 18:17 
Did you.. actually delete my comment? Cringe if true. This script is ignoring 15$ stocks to buy 100$ stocks, then selling those overpriced stocks at a loss a few ticks later when they dip. I understand what the "profits" metric means and I have no doubt the script will eventually turn a net profit, but I'm watching net-losses in real time from simple mistakes. I would rather hold on to those stocks until it recovers in 4 hours than panic sell at a loss.
zzzzzzzzzzzzzzzzzzzz 12. maj kl. 8:06 
Thanks for the reply, I totally missed that part in the mod description my bad, I'm used to settings being in-game