Found the GitHub repository code https://github.com/AzazHassankhan/Machine-Learning-based-Tra...
Made some changes from line 9 to 70 . Usee yfinance instead of alpaca Replace all code with code below until line# 70
import plotly.offline as pox
import plotly.graph_objs as go
import numpy as np
import talib as tl
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
import talib as ta
from sklearn.model_selection import train_test_split
from sklearn.metrics import
accuracy_score,classification_report
#import alpaca_trade_api as tradeapi
#from alpaca_trade_api import TimeFrame, TimeFrameUnit
from sklearn.ensemble import RandomForestClassifier
from sklearn.preprocessing import StandardScaler
import seaborn as sns
from matplotlib.pyplot import figure
from statsmodels.tsa.stattools import adfuller
from sklearn.svm import SVC
from sklearn.neighbors import KNeighborsClassifier
from sklearn.linear_model import LogisticRegression
from sklearn.ensemble import AdaBoostClassifier
import yfinance as yf
from datetime import datetime
symb = "TSLA"
start = datetime(2021, 10, 18, 9, 30, 0)
end = datetime(2021, 10, 18, 10, 30, 0)
df =yf.download("TSLA", period="1mo",interval ="15m")
next=df.copy()
next.tail()
df['close']=df['Close']
df['high']=df['High']
df['low']=df['Low']
df['open']=df['Open']
df['volume']=df['Volume']