Session 8 codefiles: 8. Session8- 2nd Live Algo.zip - Google Drive
Thank you so much sir , for your support and patience
Sir, the video for session 8 hasn’t been uploaded to YouTube yet… but you’ve already given us the code… Sir, will the video for session 8 not be uploaded?
Hi @Md_Naquibuddin
yes, it would be uploaded , you may try the code till then
Here’s the translation:
“When we are running your 8th session’s dhan_websocket, only this is coming up… data is not updating… and we are doing this during market hours… please tell us the solution, sir.”
Hye @Tradehull_Imran
This code is running well but only buys 1 stock, but we have already defined qty conditions, what is the issue?
And I get this message in cmd : single positional indexer is out-of-bounds
Hi @Md_Naquibuddin
Do send me complete zip of your folder, and share on the google drive link
share it with: tradehull_mentorship@tradehull.com
On my end code seems to be running fine
Hi @Zee2Zahid
I am bit unclear about your question
-
If the code only buys 1 scripts
maybe entry conditions on remaining scripts are not fulfilled -
Not clear on this : “but we have already defined qty conditions”
-
“single positional indexer is out-of-bounds”
if this error does not breaks the program then its still okey
if it breaks the program and makes exit, then its a issue
in that case do send me screenshot
Hi Everyone,
We are updating Dhan_Tradehull codebase to Dhan_Tradehull_2.0.0
Below are the updates we will be releasing
-
Updates in Historical data
a. Support for pervious day intraday data, example previous day 5 mins candles
b. Single Historical Api call for “1 day” and “Intraday timeframes” -
REST api call for LTP
a. For “easier access to LTP” without the use of webscokets
b. This will be bulk api call, so we can get data for multiple scripts at 1 call onloy, no need to multiple calls -
Api calls to fetch orderStatus
-
Api calls to fetch averageTradedPrice
-
Codebase Support for commodity
-
Installation fix for SSL issue
Let me know your views.
@Tradehull_Imran ,
Thanks, it would be nice, we would get latest API.
Soon
Hi Sir, In session 8, you have provided, tradehull.py, websocket.py, multi time frame algo.py - Shall we have to use this websocket.py in place of the old one to overcome the problems. Righ sir.
What about the DhanHQ V2 sir. Nothing is to be changed?
I changed this
tsl.order_placement(stock_name,‘NSE’, 1, 0, 0, ‘MARKET’, ‘SELL’, ‘MIS’)
With
tsl.order_placement(stock_name,‘NSE’, qty, 0, 0, ‘MARKET’, ‘SELL’, ‘MIS’)
Then it took more then one quantity.
Code is working fine,but live PnL is not updating until websocket code is also kept running.
And I want to know how can we use SL orders, instead of market orders
Hi @Vasili_Prasad
Yes, these are the latest files, you can use them
Also using Dhanhq v2.0.0 below are the updates
-
Api calls to fetch averageTradedPrice
-
Updates in Historical data
a. Support for pervious day intraday data, example previous day 5 mins candles
b. Single Historical Api call for “1 day” and “Intraday timeframes”
Hi @Zee2Zahid
- yes for pnl calculations WebSocket code needs to be kept on running
- for SL use this code
# reference
order_placement(tradingsymbol, exchange,quantity, price, trigger_price, order_type, transaction_type, trade_type)
sl_orderid = tsl.order_placement(stock_name,'NSE', 1, 0, sl_price, 'STOPMARKET', 'SELL', 'MIS')
how to update Dhanhq v2.0.0
Hi @Md_Naquibuddin
use below command on CMD
pip install --upgrade dhanhq==2.0.0
I m waiting for your reply