@Tradehull_Imran
am able to fetch nifty50
benchmark_df = tsl.get_historical_data(tradingsymbol=“NIFTY”, exchange=‘INDEX’, timeframe=“DAY”)
but not able to fetch niftymidsmll400
- i use cnc orders
if qty > 0:
order_id = tsl.order_placement(stock_name, 'NSE', qty, 0, 0, 'MARKET', 'BUY', 'CNC')
sl_price = round(ltp_data * 0.98, 1)
sl_order_id = tsl.order_placement(stock_name, 'NSE', qty, 0, sl_price, 'STOPMARKET', 'SELL', 'CNC')
watchlist.remove(stock_name)
traded_watchlist.add(stock_name)
message = f"✅ Traded {stock_name}\nOrder ID: {order_id}\nSL Order ID: {sl_order_id}"
pprint(message)
send_telegram_message(message)
now i want to use OCO or order for ever how can i do say with tgt of 20% and oco sl