PnF Reversal Bug
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- matplotlib, python
调研方向
使用从1到9的反转值重现 PnF 图表并比较结果。检查 utils.py 中的 _pnf_calculator,尤其是第1373行和第1395行,并追踪第1304行附近的 reverse 参数。完成的标准是更改反转阈值后会产生相应不同的 PnF 图表。
由索引模型根据 Issue 内容生成。
描述
Hi,
Firstly thanks for this awesome resource. This is my first time contributing to GitHub (I have much to learn re. push / pull / commit etc. thats for another day) so please be kind.
BUG:
I've been plotting pnf charts and experimenting with different reversal thresholds.
Regardless of variable submitted (tried 1-9) I always produce the same graph. Have tried with differenet slices of my dataframe, different box sizes etc. and the same behavior occurs.
Expected behavior:
Lower reversal thresholds should result in a noisier PnF chart. i.e more columns with less x's o's in the smallest.
Suspected Fix (I'm a noob so maybe way off):
Suspect the issue lies in -utils.py, _pnf_calculator, rows 1373 & 1395 which appear to reset the reverse threshold basd on: current_level +- 3* boxsize, where I think it should be "current_level +-'reverse' *boxsize", where reverse is passed into the function (row 1304 (default 3).
I think you may need to adjust with addition of "current reversal threshold" which calcs each time round the loop, based on retained reverse value (default 3) passed to the function as kwarg, if that makes sense?
Screenshot:
Trust this is of value to the community.
(In time I'll learn to contribute directly. One step at a time on my learning journey though...)
Best
W-Smurf
- 主要语言
- Python
- 星标
- 4.4k
- 派生
- 678
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
matplotlib/mplfinance 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 62/100
matplotlib/mplfinance#672 ·
-
难度 5/5 一周以上 新手友好度 10/100
matplotlib/mplfinance#700 ·
-
enhancement
难度 5/5 一周以上 新手友好度 30/100
matplotlib/mplfinance#695 ·
-
question
难度 3/5 1-2 天 新手友好度 25/100
matplotlib/mplfinance#691 · 1 条评论 ·
-
question
难度 4/5 3-5 天 新手友好度 52/100
matplotlib/mplfinance#690 · 5 条评论 ·
查看 matplotlib/mplfinance 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
stephrobert/dsoxlab#238 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 75/100
sublimehq/package_control#1780 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
-
难度 2/5 1-3 小时 新手友好度 70/100
nwg-piotr/nwg-displays#145 ·