# In main file
# import script1
# print(script1.sum(1, 3))

# Online Python compiler (interpreter) to run Python online.
# Write Python 3 code in this online editor and run it.
print("Hello, World!")
!!pip install mplfinance

import pandas as pd
import mplfinance as mpf

# Sample data (replace this with your actual data)
data = {
    'Date': ['2023-01-01', '2023-01-02', '2023-01-03', '2023-01-04', '2023-01-05'],
    'Open': [100, 105, 110, 102, 98],
    'High': [120, 108, 115, 110, 105],
    'Low': [95, 100, 105, 100, 96],
    'Close': [110, 102, 108, 100, 103],
    'Volume': [1000, 1200, 800, 1500, 900]
}

# Create a DataFrame from the data
df = pd.DataFrame(data)
df['Date'] = pd.to_datetime(df['Date'])
df.set_index('Date', inplace=True)

# Plot the candlestick chart
mpf.plot(df, type='candle', volume=True, style='yahoo', title='Candlestick Chart')