matplotlib / matplotlib/mplfinance
More easily Plot Trades or Trade Signals
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Python
- Estrellas
- 4.4k
- Forks
- 678
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
**Is your feature request related to a problem? Please describe.**
Your addplot.ipynb page is phenomenal and I was able to figure out that I can add scatter points by;
1) Making a numpy array empty/zero
trs = np.zeros((length_to_add, 1))
2) Filling it with Nans
trs.fill(np.nan)
3) Setting my 2 scatter points as I know the index (x) and y values
trs[x] = y
4) Adding this to a dataframe
toplot.insert(6, "trades", trs, True)
5) Then using your well documented addplot:
apdict = mpf.make_addplot(toplot['trades'],scatter=True,secondary_y=False)
mpf.plot(toplot,type='candle',volume=True,addplot=apdict)
**Describe the solution you'd like**
While this is great it took a lot of energy - I'm moving from the plotpy (for the candles!) and there I simply wrote:
plt.scatter(trade_list_idx,trade_list_price,c='b')
Which was simpler than messing around with a dataframe and so on.
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Start with addplot.ipynb and the documented make_addplot call shown in the issue, then review the existing plotting entry point for how addplot data is accepted. Done would provide a simpler way to plot trade or signal coordinates directly, without requiring the described NumPy array and dataframe preparation.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- matplotlib, numpy, pandas, python
- Área
- data-visualization
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 25/100