This script will look at an item's graph on the grand exchange and basically try to guess what will happen next and draw it out.
It is also useful for some other things if you like merchanting.
This is one of those projects that was supposed to be quick, and then a few days later I'm still stuck and have gotten no where, but here it finally is.
How to use it-
Open up the grand exchange on your web browser and have a graph up and visible (with SCAR not blocking the graph).
Drag the corsshair to the window!
You can have 30, 90, or 180 day up, any will work.
I prefer 90 day graphs.
Run the script and there you go.
What the features do-
Show Circles-
This toggles the yellow and blue circles on and off.
Yellow represents a point where you need to sell your item.
Blue represents a point where you need to buy your item.
Green rise/ Red fall-
These 2 can be switched on and off to emphasize what part of the graph you are wanting to look at.
Turning both off will leave just a white line.
Generate prediction-
This button creates the prediction of what will happen next and displays it.
Highlight prediction-
Checking this will turn the newly added segment of the graph blue to show exactly what part has been generated.
Connect highs-
This makes a line connecting all the high points together, giving you a good idea of the item's max range.
Connect lows-
This makes a line connecting all the low points together, giving you a good idea of the item's low range.
Guide line-
This is my recreation of the "30 day average" line that jagex uses.
The box underneath it that says "curve" is how closely it follows the actual graph.
A curve of 50 can be used to show when prices are above/ below their average.
You can obviously view the source, but it's a bit hard to follow
So here is how it comes up with a "prediction"frmDesign.Canvas.Ellipse(Fall[i][High(Fall[i])].x - 4, Fall[i][High(Fall[i])].y - 4, Fall[i][High(Fall[i])].x + 4, Fall[i][High(Fall[i])].y + 4);
IncEx(R, FindAngle(Rise[i][0].x, Rise[i][0].y, Rise[i][high(rise[i])].x, Rise[i][high(rise[i])].y));
IncEx(RR, Distance(Rise[i][0].x, Rise[i][0].y, Rise[i][high(rise[i])].x, Rise[i][high(rise[i])].y));
Points[1]:= Point(Round(Sin(R * Pi / 180) * Radius) + Points[0].x, Round(Cos(R * Pi / 180) * -Radius) + Points[0].y);
Points[2]:= Point(Round(Sin(F * Pi / 180) * FR) + Points[1].x, Round(Cos(F * Pi / 180) * -FR) + Points[1].y);
It sorts all the points into the graph into 2 array of TPointArray's, one for rising lines and one for falling lines.
It measures how high each rise/ fall is and how long each lasts.
Then an "average" can be calculated based on that, which is drawn in on the end.
Note:
This only shows what is LIKELY to happen based on past events.
DO NOT invest money into something you see happening with this script if you don't know much about merching.
Also this script only works well on items with a lot of rising and falling.
It doesn't work as good with strange graphs like rares or items that have been merched by clans a lot.



Reply With Quote



















