Loy Bukid avatar

Checking Coins State with a 14-Day Weighted Average

oniemaniego

Published: 14 Jul 2020 › Updated: 14 Jul 2020Checking Coins State with a 14-Day Weighted Average

Checking Coins State with a 14-Day Weighted Average

Coin Alerts

Disclaimer: This post is just an opinion and is for information purposes only. It is not intended to be investment advice. Seek a duly licensed professional for investment advice.

Note: I'm not an Accounting, Economics, or Financial expert, terminologies and formula stated in this post may be incorrect and/or inaccurate.

Refresher

Earlier this week, I started Tracking Hive using Python-Flask Deployed in Heroku with default HIVE to USD conversion feature.

Updates

Now that I can know the performance of HIVE by comparing the current rate versus the 7-day average (excluding the current date), I also need to check the state of other coins too with regard to the selected conversion currency.

Primarily, I use ETH to buy HIVE via blocktrades and previously, I only check my loss afterwards. It was a lesson learned after seeing that the conversion was lesser that expected because I was converting when the rates are higher.

I created a logic to measure the 14-day weighted average (excluding the current date), by counting how many were below the average, equals to the average, and above the average. Each historical rate is multiplied to its corresponding weight and is added to the total, then the total is divided with the sum of all weights.

If the current rate is above the weighted average, then it's expensive to buy, but good to sell. If it's below the weighted average, it's cheaper to buy, but not good to sell. Reminder, there's a lot to factor in here and this is just an oversimplification of my decision making.

The was the goal of making the site is automating the task that would normally require me a ton of effort if done manually.

This was all done using Python as the backend, with Flask as the web framework. For the frontend, it's just DIY JQuery and CSS, no add ons.

With near completion, I'm happy of how it turned out—simple with just the right amount of information I need.

Note, if you use this, you can always change the default currency to any of the supported currencies in CoinGecko by clicking on the currency symbol on the blue box.

Finally, I was able to add the credits popup, thanks CoinGecko and Flaticon!

This was all a product of consuming high doses caffienated drinks and a handful of faith—that I can and I will.

#CodeRunDebug


Curious about Crypto?
Buy and Sell on Coinbase
Get Started


About Me

oniemaniego@oniemaniego is a test engineer, but outside work, he experiments in the kitchen, writes poetry and fiction, paints his heart out, or toils under the hot sun.

Onie Maniego was born in Leyte, PH. He grew up in a rural area with a close-knit community and a simple lifestyle, he is often visiting his father's orchards during summer and weekends, which has a great impact on his works.

Don't forget to vote, comment, and follow me.


Not yet on Hive? Earn while blogging.
Sign Up

Leave Checking Coins State with a 14-Day Weighted Average to:

Written by

Abundant Life and Sustainability

Read more #gitplait posts


Best Posts From Loy Bukid

We have not curated any of oniemaniego's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From Loy Bukid