matplotlib / matplotlib/mplfinance

Feature Request: Combination of Candle Stick Chart With Option Chain Pyramid

Open
#595 3 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
4.4k
Forks
678
PR merge metrics
No merged PRs in 30d

Description

Many Traders Looking For This Feature Where Option Chain Pyramid Need To Plot On Candle Stick Chart
![download](https://user-images.githubusercontent.com/127198654/223609053-2b7d92e1-2e57-4870-ab4b-ee7e12bd847c.png)

I Attempted This With Small Piece of Code. Please Take a Look.

```
Call = vb['call']
Put = vb['put']
width = 0.4
fig, axlist = mpf.plot(df,type='candle', returnfig=True, tight_layout=True, volume=True, style="yahoo",)
size = 0.0012 * max(df['Close'])
pyramid = fig.add_axes(axlist[0].get_position())
pyramid.set_axis_off()
pyramid.set_xlim(right=1.2*max(Call.values))

pyramid.barh( Call.keys().values, Call.values,height=0.02*size, color='red', alpha=0.20)
pyramid.barh( Put.keys().values+width, Put.values,height=0.02*size, color='green', alpha=0.20)
pyramid.invert_xaxis()
mpl.show()
````

Contributor guide

Open the contributing guide

Research direction

No repository file or test is named; start by reviewing the current mplfinance candle-chart plotting entry points and the provided Matplotlib overlay example. Define the supported option-chain data and the expected combined chart behavior before identifying what tests would demonstrate that the feature is complete.

Written by the indexing model from the issue text.

Assessment

Tech stack
matplotlib, python
Domain
data-visualization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.