Work in Progress: Charting LEO prices and SMA in JavaScript

avatar

One of the pain points about acquiring Hive's second-layer tokens is the lack of price information. Yes, the various DEXes featuring the Hive-Engine tokens have the price info, but they rarely give you more crucial info for managing your entries and exits.

To cut the story short: Of course, there are ways to access these prices, and so why not make an app to feature more details about the price actions?

I believe that making available such info more openly could help to engage more would-be adopters.

A good starting point would be to plot SMA or Simple Moving Average.

I spent some time yesterday working on this LEO SMA app, as I declared on a new todo community post. I took it as a challenge to practice my JavaScript, which I started some time ago. See old post for back story.

The app is still in progress, but I am happy to share it here: https://cryptothesis.github.io/SMA_JS/LEO_SMA_v1.html.

Screenshot 20220625 at 10.11.29 AM.png

You probably can see that the SMA charting is off. I have not found a way to solve it, but I will do it today. I list it as one of my todo task here.

The ugly WIP source code can be found here: https://github.com/cryptothesis/SMA_JS/blob/main/LEO_SMA_v1.html.

Basically, I used the SMA function from this site to alleviate my heavy lifting of calculating SMA by hand: https://blog.oliverjumpertz.dev/the-moving-average-simple-and-exponential-theory-math-and-implementation-in-javascript

Screenshot 20220625 at 10.28.35 AM.png

The raw data is from Hive Engine's API: https://accounts.hive-engine.com/marketHistory?symbol=LEO.

It will return the data in JSON.

Then all the messy work is needed to chart it using Chartjs.

I must reiterate that this is work in progress, and terribly far from what I wanted as an end product. So definitely do not use this as an information source for investing!

I will be happy to hear if you have ideas to improve this.

Recent Posts:

P/S: This is not financial advice, and please do your own due diligence before investing.

If you read this far... and if you are a like-minded Hiver who is on the path to learning more about Hive and crypto investing, and if you like to be tagged when I write such posts, I welcome you to leave a comment below and let me know. We can form an alliance to support each other's growth.

You might be interested in this post, @jacoalberts and @youngkedar98!

Posted Using LeoFinance Beta



0
0
0.000
0 comments