Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

PnF Reversal Bug

Aperta
#671 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
matplotlib, python

Direzione di ricerca

Riproduci il grafico PnF con valori di inversione da 1 a 9 e confronta i risultati. Ispeziona _pnf_calculator in utils.py, in particolare le righe 1373 e 1395, e segui l’argomento reverse vicino alla riga 1304. Il lavoro è completato quando la modifica della soglia di inversione produce grafici PnF corrispondentemente diversi.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

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:
image

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

Lingua principale
Python
Stelle
4.4k
Fork
678
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di matplotlib/mplfinance

Tutte le issue di matplotlib/mplfinance

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.