create account

Programming My Own Trading Chart - Part 32 - MACD Technical Indicator by leoplaw

View this thread on: hive.blogpeakd.comecency.com
· @leoplaw ·
$1.85
Programming My Own Trading Chart - Part 32 - MACD Technical Indicator
![Screenshot_20240701_005318.png](https://files.peakd.com/file/peakd-hive/leoplaw/23t74pFyNu6Px7dYoEG27Gyrp9AM9687SEi8zLtyTUXs7MoHD4KzLgsQPvoSkLRdCW4ek.png)

It's been a while since I posted an update on TradeX chart. There's been plenty of development, and as with many programming projects, much of the work often goes unnoticed, because it is not immediately apparent, as it is not some outstanding new feature and may in fact be many tedious bug fixes that lead to better stability.

But on this occasion, I have something visual to show off, a [Moving Average Convergence/Divergence (MACD) indicator](https://www.investopedia.com/terms/m/macd.asp). 

It is one of the more complex indicators from the [talib-web](https://github.com/ancheGT/talib-web) to implement, and hence I avoided it, and focused on the easy ones such as RSI.

Some of the tasks to complete the MACD are:
- connect indicator colours to the theme
- make the histogram bar widths dynamic like candles and volume
- put the legend back in

I can then test out all of the work on making the parent indicator class generic enough that all it needs is a config object to draw new indicators. This should speed up implementing new ones, and make building user defined custom indicators much simpler.

As mentioned at the start of this post, there are many things behind the scenes that had to be done to get this indicator to work. It will open up many more possibilities, such as complex indicators.

Complex indicators would allow grouping any of the existing indicators into one chart pane, thereby creating a new custom indicator.

I'm still really itching to crack on with drawing tools. There's still so many things to do, but the chart is commit by commit maturing into a usable, reliable and powerful charting component.

The chart is available via NPM

```
npm install tradex-chart
```

and GitHub

https://github.com/tradex-app/TradeX-chart

👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
properties (23)
authorleoplaw
permlinkprogramming-my-own-trading-chart-part-32-macd-technical-indicator
categoryhive-169321
json_metadata{"app":"peakd/2024.6.10","format":"markdown","tags":["programming","development","javascript","trade","crypto"],"users":[],"image":["https://files.peakd.com/file/peakd-hive/leoplaw/23t74pFyNu6Px7dYoEG27Gyrp9AM9687SEi8zLtyTUXs7MoHD4KzLgsQPvoSkLRdCW4ek.png"]}
created2024-06-30 23:37:39
last_update2024-06-30 23:37:39
depth0
children1
last_payout2024-07-07 23:37:39
cashout_time1969-12-31 23:59:59
total_payout_value0.916 HBD
curator_payout_value0.930 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,921
author_reputation189,628,210,789,149
root_title"Programming My Own Trading Chart - Part 32 - MACD Technical Indicator"
beneficiaries
0.
accounthive-169321
weight200
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id134,986,460
net_rshares6,639,134,616,074
author_curate_reward""
vote details (64)
@douglas.life ·
# Keep up the good work. 👏🎵

Dear beloved Hive creator,

Coding poet [Gudasol](https://open.spotify.com/playlist/2WEKrYq0mht0kyFguEcYzi) here to support you sharing your art + life on Hive. 

As a fellow creator, I know how hard it is to get the word out there.

I built [cXc.world](https://linktr.ee/cXc.world) to help creators like us get more support from the blockchain community + beyond. 

Share your music on [cXc.world](https://linktr.ee/cXc.world), and copy the Markdown for a easy post includes embedded players for Spotify, Youtube, Soundcloud.

That way, you can earn HIVE + **stack streams** on centralized platforms, as they do still matter.

Not a music creator? No problem. You can still use [cXc.world](https://linktr.ee/cXc.world) to find + share music you love. 

# What's next?

Preview the next evolution of cXc, [Tetra.earth](https://know.tetra.earth).

# Expose local music from your area! 

We're helping grassroots musicians, and you can too by adding their music (no sign up or WAX account required).

![how to add music on cXc.world](https://media.giphy.com/media/PmdDeASIZc3xBL5AXQ/giphy.gif)

# Join our community 🐬


Find fellow music lovers in cXc's [Discord](https://discord.gg/u3kpj7xEWZ)


# Bad news: Saying see you later to Hive! 👋 

We didn't get the needed support to continue cXc.world on Hive, as [our DHF proposal](https://peakd.com/me/proposals/314) lacked votes, but [Good News Everyone] cXc.world will add a Markdown copy button, allowing you to easily share your music + music you find on Hive. 

For now, we're on WAX, with [tools you can use to mint your own Music/Media NFT collection](https://tools.cxc.world).

# Curious about the future of Earth + ET relations? New economic systems?
Find more apps + art from [Gudasol](https://linktr.ee/gudasol)

# Want to build tools like I used to share this? 

I'd love to show you some [tips on AI Code generation](https://ai.douglas.life)
👎  
properties (23)
authordouglas.life
permlinkre-programming-my-own-trading-chart-part-32-macd-technical-indicator-20241201t121751z
categoryhive-169321
json_metadata"{"app": "beem/0.24.26"}"
created2024-12-01 12:17:51
last_update2024-12-01 12:17:51
depth1
children0
last_payout2024-12-08 12:17:51
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,929
author_reputation-4,071,363,772,197
root_title"Programming My Own Trading Chart - Part 32 - MACD Technical Indicator"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id138,845,314
net_rshares-5,199,239,023
author_curate_reward""
vote details (1)