Skip to content
This repository has been archived by the owner on Jun 13, 2021. It is now read-only.

WIP: added rough poc for absorbance indicator #48

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

WIP: added rough poc for absorbance indicator #48

wants to merge 3 commits into from

Conversation

kuegi
Copy link

@kuegi kuegi commented Jul 9, 2019

it shows how to calc the move-per-direction for an indication of how the buy-trades moved the market compared to the sell trades. combined with the aggr. volume of the trades it shows how well the market absorbs the according volumes.
my vue and js mojo is low so the UI is really just a rough POC.

fixes #44

Just saw that you started refactoring the arrays into objects. gotta look into that once you are done.
Pullrequest is definitly WIP until someone fixes my dirty UI hacks...

it shows how to calc the move-per-direction for an indication of how the buy-trades moved the market compared to the sell trades. combined with the aggr. volume of the trades it shows how well the market absorbs the according volumes.
my vue and js mojo is low so the UI is really just a rough POC.
@Tucsky
Copy link
Owner

Tucsky commented Jul 9, 2019

Hey man thanks for the PR! I checked it out and let it run for a few minutes, buy move vs sell is pretty much all the time 50/50 so its kind of hard to determine anything from it at this point but I get the idea :)
image
Anyway, how do you read that? is counters the best way to display that info? (tbh I never used counters, I like charts more)

Just saw that you started refactoring the arrays into objects

I first designed the data structure with array because I read somewhere that "Arrays are mostly faster than objects" and trades is a lot of data.
Now I figured out a way to compress the data, by stacking small trades into one see if that works... If it does array trade can be object I think, better readability, extensibility etc. Thats was the first goal of this debt/2.5 branch but now it is more like a 3.0 haha. Kinda stuck with it now, and its summer also so harder to get things done im afraid.
The big feature of that 3.0 is implementation of that trading view chart (overall performance will get a huge boost) and dynamic series ("plugins" is what I want to achieve)
With that done, we could make a absorbance indicator in the chart directly, CVD and all the good stuff
Im also making more files (trying to divide things, less functions per files etc) to make it easier for contributors like you because today it is kind of a mess!

@kuegi
Copy link
Author

kuegi commented Jul 10, 2019

No worries. I just realised that the numbers are only correct for the first row in the counter, the others are just the same. Honestly i am not yet fully in the stackedSums vs. strictSums vs. queue arrays... The PR is definitly a WIP :/

Arrays instead of objects for performance reasons makes sense. Not sure how much impact there really is thou.

Regarding the number. It shows how far the buy orders pushed the price compared to the sells. With the numbers from your screenshot:
11.83 M in buy orders pushed the price 14.92k up,
vs
3.34 M in sell orders pushed the price 14.76k down.
Thats also why i put it directly to the counters cause this way you easily see the difference between the volume-relation to the move-relation.
Which in this case would mean that the market reacts far stronger to sell orders than to buy orders -> buy orders get absorbed easier.

Gotta analyse a bit more if the numbers really are correct thou. seems off to be so equally distributed.

somehow thought that there is a socket for every exchange... now the lastPrice is on the exchange and not one shared lastPrice for all of them.
@kuegi
Copy link
Author

kuegi commented Jul 10, 2019

Found it :D messed up the socket and exchanges, so i had one lastPrice shared over all exchanges... fixed that. now the move makes more sense. (still pretty 50:50 thou, seems the market is usually pretty balanced)

that fixed the problem with multiple counters etc.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: show move per volume
3 participants