matplotlib / matplotlib/mplfinance
add scatter points to renko plot
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 4.4k
- フォーク
- 678
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
@DanielGoldfarb ... thank you for your wonderful work.
Hello can someone help me to add scatter points to my renko chart.
All i am trying to do is add scatter chart to existing chart(ie marker) "o" where volume is > 500 in my data.
sample Data structure - csv file:
time,Open,High,Low,Close,Volume,date
2020-06-16 09:33,2439.0,2439.0,2439.0,2439.0,340.0,2020-06-16 09:33:03.872999936-04:00
2020-06-16 10:25,2450.5,2450.5,2450.5,2450.5,521.0,2020-06-16 10:25:01.012000-04:00
2020-06-16 10:30,2440.0,2440.0,1440.0,2440.0,415.0,2020-06-16 10:30:13.260999936-04:00
2020-06-16 10:30,2429.5,2429.5,2429.5,2429.5,770.0,2020-06-16 10:30:20.295000064-04:00
Basic code:
df = []
df = pd.read_csv('test.csv',index_col=0,parse_dates=True)
df = df.iloc[:20000]
bucket_size = 0.00012 * max(df['Close'])
volprofile = df['Volume'].groupby(df['Close'].apply(lambda x: bucket_size*round(x/bucket_size,0))).sum()
mc = mpf.make_marketcolors(base_mpf_style='yahoo')
s = mpf.make_mpf_style(base_mpf_style='nightclouds',marketcolors=mc)
fig, axlist = mpf.plot(df,type='renko',renko_params=dict(brick_size=3),returnfig=True,style=s,tight_layout=True)
vpax = fig.add_axes(axlist[0].get_position())
vpax.set_axis_off()
vpax.set_xlim(right=1.2*max(volprofile.values))
mpf.show()
current sample image:

コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
Start with the mpf.plot(..., type='renko', returnfig=True) call and the returned axlist in the provided example. Read how Renko plots expose their axes and how the supplied Volume values relate to the plotted data. Done means documenting or implementing a way to show marker points for rows whose volume exceeds 500 on the Renko chart.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- matplotlib, python
- 領域
- data-visualization
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100