Cookie Clicker

Cookie Clicker

CookiStocker 2 | Automatic Stock Trading Mod
z  [developer] Jul 29, 2023 @ 1:39am
Future Development
In this thread, I will be detailing aspects of future development that I plan on implementing for release of CookiStocker 3.0 and later versions. I will keep this list updated over time.
  1. Implement short selling, both for the trading program and for use in a standalone form by the player. Short selling would be available via a third row of action buttons in the main stock market display, right under the Buy and Sell rows with their various quantities. The third row would be entitled Short, and it would have the same buttons as the Buy and Sell rows.
  2. Implement a version of the trading algorithm that uses no nonpublic information. Currently, the only use of nonpublic information used in the trading algorithm is the stock's current and past modes. This is considered a cheat by many. A trading algorithm that did not use this information could be expected to produce most of the gains of the best trading algorithm without having the aspect that is most likely to be considered cheating. It would also allow for a manual trading strategy that uses this exact algorithm, which would be published, and which would definitely not be cheating.
  3. Add a switch to auto buy brokers, which would be on by default. Trading would not start before 80 brokers are hired, and the auto buy feature would stop at 100. More brokers could be bought manually, if desired.
  4. Add a throttling feature whereby the player can limit how much the mod spends on stocks. There will be at least several ways that the player will be able to specify a limit (e.g., a fixed bank floor that must be exceeded at all times, or a fixed percentage of the current bank, etc.).
Last edited by z; Aug 12, 2023 @ 8:09pm
< >
Showing 1-15 of 19 comments
z  [developer] Jul 29, 2023 @ 1:42am 
(This post was originally made by crimson777.)

I saw you said you don't plan on doing the Pastebins anymore. I have a Mac and don't particularly want to partition my computer or anything, so since Cookie Clicker is Windows only, there's not really a way for me to use the Steam version. Is there not some way to keep the Pastebins going?
Last edited by z; Jul 29, 2023 @ 1:45am
z  [developer] Jul 29, 2023 @ 1:46am 
It's my understanding that Cookie Clicker has not been ported to the Mac yet, at least according to Orteil's posts. When it is ported, there should be no problem in making the latest version of CookiStocker available as well. Whether this is the Steam version, the free browser version, or both, will depend on exactly what Orteil does.

In retrospect, I am not completely ruling out the Pastebins either. Another possibility is Github, which Gingerguy already uses to store versions of CookiStocker. One way or another, it is my intention to support CookiStocker everywhere that Cookie Clicker is supported. Since CookiStocker is written entirely in JavaScript, this should not be very hard to do.
Last edited by z; Mar 16, 2024 @ 1:51am
z  [developer] Jul 29, 2023 @ 1:47am 
Originally posted by crimson777:
I saw you said you don't plan on doing the Pastebins anymore. I have a Mac and don't particularly want to partition my computer or anything, so since Cookie Clicker is Windows only, there's not really a way for me to use the Steam version. Is there not some way to keep the Pastebins going?

After a brief discussion with Gingerguy, it appears that there should be no reason why pastebins shouldn't work with CookiStocker. Therefore, I will be implementing them and keeping them up to date starting with the imminent release of CookiStocker 2.0. [Edit: This has now been done.]
DJ Salad Bar Aug 4, 2023 @ 6:54am 
If you're ever interested in collaboration, hit me up. I'm not super experienced in CC modding (I've made a few simple ones) but I am a dev irl.
Lost Question Aug 11, 2023 @ 12:05am 
interesting plans, I have a question is getting this mod its own tab like the Cookie Garden Helper Reloaded in the cards?
z  [developer] Aug 11, 2023 @ 6:01am 
Right now, I don't see the necessity of that. CGHR has a lot of extra material to display on the screen in addition to the standard Garden minigame. CookiStocker doesn't. It will eventually have a number of real time options, but these belong on the Cookie Clicker Options page, along with everyone else's.
olavigaming Sep 18, 2023 @ 11:25am 
Idea: make a setting so that the player can choose at what mode the bot buys stocks.
z  [developer] Sep 20, 2023 @ 12:07am 
What do you mean by "at what mode"?
sarteck Mar 13, 2024 @ 5:12pm 
Hi, z. I don't know how active you still are, and I don't know if this is possible, but it would be sweet if I could somehow see a graphical representation of profits made over time on a chart similar to the in-game stock graph. I don't know if it would be a tab like mentioned above, or if you could have the bot write over the already-existing chart, or what.
z  [developer] Mar 14, 2024 @ 8:17pm 
sertceck - It's certainly possible to make a graph of profits over time for CookiStocker 2 (just about anything is possible), but that would take a fair amount of work, and it isn't high on my priority list. One reason it's not a priority is that CookiStocker 2 already has hidden in it a great debugging tool that make most of the features of a graph unnecessary. The debugging tool is the Console Output, which is fully described and illustrated in its thread New Changes and Additions to the Console Output.. I have made major use of this in developing the current CookiStocker trading algorithm, and I have made even greater use of it in my ongoing effort to develop the next generation of the trading algorithm. In order to make the most use of the console output, change the variable stockerActivityReportFrequency at the top of the main.js file to 1000 * 60 (60,000 ms), or one minute, or whatever time interval you'd like. Then use the very powerful filtering tool of the console to show only that data in which you're interested. An example of this is shown at the end of the post I referenced, but there are many other possibilities in using filtering to analyze your data.

I should also mention that I have recently completed an extension to CookiStocker 2 that displays the most important data from the console output in either one or four lines in the main stock market window, and this data is updated whenever it changes. The four-line version can be seen in the output that begins "Running for 9 hours, 21 minutes, and 8 seconds" and continues through the line that begins "Unprofitable trades." It also contains the information from the three lines at the bottom that begin "Profits per hour."

This part of CookiStocker 2 is all done now, but I am taking the opportunity to add a few more things, such as a couple of new achievements. When this is finished, I will announce the availability of the new version of CookiStocker 2 on the main page.
z  [developer] Mar 14, 2024 @ 8:22pm 
olavagaming - A thorough analysis of the stock market behavior shows that basing buy or sell decisions solely or even mainly on the stock's current mode is actually a very poor trading strategy, as the modes aren't absolute descriptions of a stock's behavior; they're more like hints. Any trading strategy based solely or mostly on these modes will far underperform the current trading strategy used by the mod.
z  [developer] Mar 14, 2024 @ 8:27pm 
DJ Salad Bar - Sorry for the huge delay in getting back to you! I think I may have merely missed your post when you first made it. In any case, I would definitely be interested in a collaboration, as I have far too much on my plate to handle in a prompt way. If you're still interested, please PM me on Discord; my name there is z1.
z  [developer] Oct 18 @ 1:48pm 
This post is meant to address the issue of the extra achievements recently introduced in CookiStocker.

With one person asking for an option to turn off a feature in a new release, it's hard to know if that's just one person's opinion, or if it's representative of a fair number of users. With two users, so soon after the release, it becomes clearer that there are probably a fair amount of users who feel the same way. So, in principle, I'm willing to add an option button to turn this off in the next release. However, there are implications here that people should be aware of. Please read and respond to the following if you want an option to turn off new achievements in the next release.

First, it's important to understand that the reason these new achievements were added was as a part of a larger plan to make the whole stock market more relevant. Right now, the stock market is a rather hobbled minigame; even Orteil, its author, has said that he never really liked it. And the Wiki page[cookieclicker.fandom.com] currently gives the following advice: "The Stock Market is not generally seen as a very profitable mini-game, much less so than the Garden or Grimoire, for example, due to the un-reliability and time needed to profit. Therefore, after you unlock all achievements, it is recommended to not use the Stock Market again, except for the loans." This is certainly true for the vanilla stock market. It is only the release of CookiStocker 3.0 that allows the player to make a profit from the stock market comparable to that of other minigames.

Is this cheating? Orteil, who created Cookie Clicker (and the stock market minigame), is generally considered the authority on such matters. You can find his views on cheating in the brief Readme.txt file, which is located in the mods folder, one level above the workshop folder. This file describes the format of the info.txt file, and the portion of most interest here is the paragraph discussing when Steam Achievements should be allowed for a mod (which they are for CookiStocker). Orteil says that Steam Achievements should be allowed "if this is a good honest mod that does not incredibly unbalance the game". As I am simply trying to bring the stock market up to the level of the other minigames, no more and no less, and as three of these minigames (including the basic stock market) already have more achievements than CookiStocker adds, I think that CookiStocker is well within the bounds of Orteil's guidelines. I truly sympathize with those who want a game with no cheats, and I am doing my best to ensure that CookiStocker fits within that definition.

What about the new achievements themselves? First of all, note that they are very hard to get; whereas Gaseous Assets, which is often considered the most difficult achievement to get in the game, requires profits of $31,536,000, the new Plasmic Assets requires profits of $100 million, and Bose-Einstein Condensed Assets require a profit level of $500 million. To reach these levels in a reasonable amount of time, it is really necessary to level up all your buildings to level 10, with Cursors leveled up to Level 20. You should also have well over a thousand of each building type; exceeding two thousand building per type is very helpful. As experienced players know, this takes a while.

With the default CookiStocker configuration, even with these achievements added, the returns from the stock market fail miserably to keep up with the earning from the rest of the game. Each of these achievements doubles the number of the player's warehouses, but that still isn't enough to keep up with the rest of the game. That's why I felt it necessary to add in Exponential Warehouses (default: off), which kicks in only when turned on and after the Gaseous Assets achievement has been attained. Yet even that was not enough to bring market returns up to parity with the rest of the games earnings. That's why I added the Warehouse Exponent slider to allow the player to adjust the rate of exponential growth of warehouse numbers. This last feature will finally allow the Stock Market to produce returns comparable to the other minigames, and its use and setting is completely up to the player. Its default setting of '1' means that it has no effect; settings below '1' actually reduce the effect of the Exponential Warehouses option. It will take me some time to find the optimal value of this setting. In the meantime, players can experiment.

Back to the achievements. Note that the Bose-Einstein Condensed Assets is a shadow achievement. Shadow achievements don't earn any milk, nor do they count as Steam Achievements. They're basically just little badges that show up at the bottom of your Stats page, with no effect on the game itself. However, CookiStocker currently changes Gaseous Assets into a standard achievement (or at least it will, once I install the bug fix), as it didn't make any sense to have that as a shadow achievement while the higher Plasmic Assets achievement was a standard achievement.

From all the above, I think you can see that I view the new achievements as an integral part of CookiStocker, and one that helps balance the whole mod. However, if players disagree with me, I am open to modifications. Here are what I consider to be the most reasonable ways forward:
  1. Keep the current arrangement, which I think is well balanced, and which I think employs a very conservative user of achievements.
  2. Have an option to have both new achievements be shadow achievements, and retain the shadow achievement status of Gaseous Assets.
What about the doubling of warehouses that comes with the current new achievements? I would leave these in, as they are integral to balancing the profits of the stock market with those of other minigames, and with the game as a whole. The whole purpose of CookiStocker is to make useful as a stock market mod that can generate profits on parity with the rest of the game, and not be just a hobbled mod that's good only for getting the basic achievements and loans.

Thanks for reading this far, and please let me know how you'd like to see this issue handled in the next release of CoockiStocker.
Last edited by z; Oct 18 @ 3:09pm
β-H Oct 19 @ 5:53pm 
So... what's a good setting for the "Warehouse Exponent" for a decent Stock Market experience?

I'm not trying to make huge profits from the Stock Market; in fact, I prefer playing the "original Cookies system" (the core building/upgrading gameplay).
However, the original Cookies system requires auto-buying buildings/upgrades, which makes it difficult for me to maintain the previously required cookie bank of [CPS]E+6.

So I chose (at least for this Ascension) to turn off auto-buy after reaching 900+ Cursors and 500+ "You"s. I then started managing the Garden and let CookiStocker handle my Stock Market.

Since installing CookiStocker, I haven't yet tried an Ascension where I completely ignore the Stock Market—focusing purely on the original Cookies system—to compare the difference in Heavenly Chips gains between the two strategies.

For reference, my current progress is in the novemdecillion range (E+60), with 900+ Cursors, 500+ "You"s, a Level 5 Garden, Level 1 Stock Market, Level 1 Pantheon, Level 1 Grimoire, and Level 0 for everything else.
z  [developer] Oct 20 @ 7:01pm 
To answer your first question: It depends. Specifically, it depends on how you play the game and what your goal is.

This feature was implemented because even with the Exponential Warehouses (which are required to enable this feature), the stock market was still not keeping up with the returns of the other features in the game.

While experimenting with the Warehouse Exponent, I discovered a couple of bugs that prevented it from doing anything. I have now fixed them, and for me at least, the feature is working as intended. The fix will be in the next release, which is coming soon. In the meantime, I am experimenting with it in order to try and answer the broader question: Which setting is best for which kind of play? It's going to take a while to get a definitive answer to that question, but in the meantime, you will be able to experiment with this feature.

The nice thing is that merely by moving this slider, you can adjust the overall returns of the market to whatever level you desire. You can also change it as often as you like, and the stock market will respond to the new level. The actual functioning of the stock market doesn't change; the only thing the slider does is to adjust the number of warehouses for each stock. It adjusts all the warehouse numbers by the same factor, which is why the market dynamics don't change.

Here are the details of how it works: When you make your very first stock market trade of the game, the mod stores the value of the highest raw CPS per session in the variable stockList.origCookiesPsRawHighest. Then, for all succeeding trades, if the option Exponential Warehouses is turned on (it's off by default) and the Gaseous Assets achievement has been won in any session, the number of warehouses for each stock is multiplied by the following ratio

Game.cookiesPsRawHighest / stockList.origCookiesPsRawHighest

which in plain English is the current value of the highest raw CPS per session divided by the original value of the highest raw CPS per session. This makes the warehouse numbers track the growth of the highest raw CPS, which does not include buffs or clicks.

I had hoped that this modification would allow the stock market profits to track other profits in the game. But although it helped, it wasn't enough. That's why I introduced the Warehouse Exponent. If the Exponential Warehouses option is turned on, then the actual formula for determining the number of warehouses becomes:

(Game.cookiesPsRawHighest / stockList.origCookiesPsRawHighest) ** stockerExponentialPower

In plain English, this is the same ratio we calculated above (which is guaranteed to be at least 1), but raised to the power of stockerExponentialPower, which is the current value of the Warehouse Exponent slider.

Here's and example: Suppose that you have Exponential Warehouses turned on, and the current highest raw CPS is ten times what it was when you first started trading. Then the number of warehouses available is automatically multiplied by ten. The default setting for the Warehouse Exponent slider is one, so if you raise ten to the power of one, you still get ten. But if you set the slider to 2 (you can increase it in increments of 0.1), the the ratio is raised to the power 2, which gives you 10 squared, or 100 times your original warehouses. If you set the slider to three, you get ten cubed, or 1000 times your original warehouses.

Technical note: I'm actual using the term "exponential" in a very loose way here, as the slider is actually implementing polynomial functions – a quadratic function in the first example, and a cubic function in the second. But I think the term "Polynomial Warehouses" would be more confusing than helpful, and the sense of rapidly increasing growth given by "Exponential Warehouses" is close enough.

The necessity for all of this comes down to the fact that different parts of Cookie Clicker exhibit different types of growth. The stock market's growth depends on the number of warehouses, which fundamentally depends on the number of buildings. Since the cost of buildings grows (truly) exponentially with the numbers of each building, and the average CPS is pretty much linear, with the exception of various buffs and the effects of heavenly chips, the growth in the number of buildings is more or less logarithmic, which means it's less than linear. That's why the more you have of a given building, the harder it is to increase its numbers. When the various upgrades run out and all the achievements are won, this problem becomes severe, and partially as a result of this, it is extremely difficult to reach a level much greater than about a duovigintillion cookies without using any cheats. The options I have added to CookiStocker allow the stock market to at least keep up with this rate of growth; for those who like to use cheats on a moderate level, the Warehouse Exponent slider allows them to adjust the market returns to their style of play.

β-H, you say that you prefer playing the "original Cookies system". I would certainly recommend these CookiStocker options for you, so that the stock market can contribute to your game play in a way similar to that of the other minigames. But you also say, "However, the original Cookies system requires auto-buying buildings/upgrades..." This is not a part of the core game; you're clearly using mods for this function. I have tried such mods, and I don't use them for the very reason you mention: They take control of your bank, and spend whatever is available on buildings and/or upgrades. I found that this type of action limits the player's options too much, and doesn't really provide any real advantages. It reduce the amount of clicking required, but in return for that, you can't do things like play the stock market effectively. I would recommend against using these mods; they are incompatible with stock market growth, with or without CookiStocker. There are plenty of mods that will tell you which buildings and upgrades are a good buy, if that's what you're looking for. For my own play, I limit any single purchase of a building or an upgrade to 1% of my current bank, which works out very well for me.

On the other hand, if using these mods and turning them off at a given level works for you, then that's fine.

I should also mention that with or without CookiStocker, probably the best way to increase your basic stock market returns is to level up all your buildings to Level 10, with your Cursors leveled up to Level 20. The most important of these actions is raising your Bank level to Level 10, which changes the dynamics of the entire market by allowing higher stock prices and therefore larger gains. This applies to every level increase of your Bank, and not just Level 10. Increasing the levels on your other buildings increases their resting point by 10; see the Ultimate Stock Market Guide for more details on how this works and what the effects are.
< >
Showing 1-15 of 19 comments
Per page: 1530 50