Hi @Kishore007
See below code
# Conditions that are on 5 minute timeframe
chart_5 = tsl.get_intraday_data(stock_name, 'NSE', 5) # 5 minute chart
chart_5 = tsl.get_historical_data(tradingsymbol = stock_name,exchange = 'NSE',timeframe="5") # this call has been updated to get_historical_data call,
indi = ta.supertrend(chart_5['high'], chart_5['low'], chart_5['close'], 7, 3)
chart_5 = pd.concat([chart_5, indi], axis=1, join='inner')
cc_5 = chart_5.iloc[-1]
ub_breakout = cc_5['close'] > cc_5['SUPERTd_7_3.0']
lb_breakout = cc_5['close'] < cc_5['SUPERTd_7_3.0']
--------------- Logical reference --------------------------
import pandas_ta as ta
indi = ta.supertrend(df['high'], df['low'], df['close'], 7, 3)
df = pd.concat([df, indi], axis=1, join='inner')
print(df)
'Column1 = this will give full supertrend line values' trend
'Column2 = this will show if st is red or green' direction
'Column3 = show values only for green nan for red' long
'Column4 = show values only for red nan for green' short