79363617

Date: 2025-01-17 04:44:52
Score: 0.5
Natty:
Report link

Try using the package I created. It will be easier to use than mplfinance.

import numpy as np
import seolpyo_mplchart as mc

dates = pd.date_range(end=datetime.now(), periods=50, freq='D')
data = {
    'date': dates,
    'open': np.random.uniform(100, 200, len(dates)),
    'high': np.random.uniform(110, 210, len(dates)),
    'low': np.random.uniform(90, 190, len(dates)),
    'close': np.random.uniform(95, 205, len(dates)),
    'volume': np.random.randint(1000, 5000, len(dates))
}
df = pd.DataFrame(data)


class Chart(mc.OnlyChart):
    def generate_data(self):
        x = (self.df.loc[200 < self.df['high']].index + 0.5).to_numpy()
        y = self.df.loc[200 < self.df['high'], 'high'].to_numpy()
        self.ax_price.scatter(x, y)

chart = Chart()
chart.set_data(df)

mc.show(Close=True)

dot sample

Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: white.seolpyo.com