Learn Algo Trading with Python | Codes | Youtube Series

@Tradehull_Imran :rose: :rose: :rose: :rose:

" рдЧреБрд░реБ рдЪрд░рдг рдореЗрдВ рдкреНрд░рдгрд╛рдо :folded_hands: :rose: :rose: :rose: :rose: "

рд▓рдВрдмреЗ рд╕рдордп рдХреЗ рдЕрдВрддрд░рд╛рд▓ рдХреЗ рдмрд╛рдж рдЖрдЬ рдкреБрдирдГ рдЧреБрд░реБрдЬрдиреЛрдВ рдХреЗ рд╕рд╛рдиреНрдирд┐рдзреНрдп рдореЗрдВ рдЖрдирд╛ рдФрд░ рд╕рд╛рдерд┐рдпреЛрдВ рд╕реЗ рдорд┐рд▓рдирд╛ рдРрд╕рд╛ рдЕрдиреБрднрд╡ рд░рд╣рд╛, рдорд╛рдиреЛ рд╕реВрдЦреЗ рдорди рдХреЛ рдмрд░рд╕рд╛рдд рдХреА рдкрд╣рд▓реА рдлреБрд╣рд╛рд░ рдорд┐рд▓ рдЧрдИ рд╣реЛред

рдЧреБрд░реБтАФрдЬрд┐рдирдХреА рджреГрд╖реНрдЯрд┐ рдореЗрдВ рдХреЗрд╡рд▓ рдЬреНрдЮрд╛рди рд╣реА рдирд╣реАрдВ, рдХрд░реБрдгрд╛ рдФрд░ рджрд┐рд╢рд╛ рднреА рд╣реЛрддреА рд╣реИред рдЙрдирдХрд╛ рдЖрд╢реАрд░реНрд╡рд╛рдж рдФрд░ рд╕рд╛рдиреНрдирд┐рдзреНрдп рдкрд╛рдХрд░ рдЖрддреНрдорд╛ рддрдХ рддреГрдкреНрдд рд╣реЛ рдЧрдИред рдЙрдирдХреЗ рдПрдХ-рдПрдХ рд╡рдЪрди рдореЗрдВ рд╡рд╣реА рдКрд░реНрдЬрд╛, рд╡рд╣реА рдкреНрд░реЗрд░рдгрд╛ рдЖрдЬ рднреА рдЬреАрд╡рдВрдд рд╣реИред

рдФрд░ рд╕рд╛рдерд┐рдпреЛрдВ рдХреА рдмрд╛рдд рдХрд░реЗрдВ, рддреЛ рдЬреИрд╕реЗ рд╕рдордп рдард╣рд░ рдЧрдпрд╛ рдерд╛ тАФ рдореБрд╕реНрдХреБрд░рд╛рд╣рдЯреЗрдВ рд╡рд╣реА, рдЕрдкрдирд╛рдкрди рд╡рд╣реА, рдФрд░ рд╡рд╣ рдмрд┐рди рдХрд╣реЗ рд╕рдордЭрдиреЗ рд╡рд╛рд▓реА рднрд╛рд╡рдирд╛ рдЖрдЬ рднреА рдЬрд╕ рдХреА рддрд╕ред

рдпреЗ рдкреБрдирд░реНрдорд┐рд▓рди рд╕рд┐рд░реНрдл рдорд┐рд▓рдирд╛ рдирд╣реАрдВ рд╣реИред тАФ рдпрд╣ рдЖрддреНрдорд╛ рдХрд╛ рдкреБрдирдГ рдЬреБрдбрд╝рдирд╛ рд╣реИредред
рд╢рдмреНрдж рдХрдо рд╣реИрдВ, рдкрд░ рд╣реГрджрдп рдХреГрддрдЬреНрдЮрддрд╛ рд╕реЗ рднрд░рд╛ рд╣реИред

рдЧреБрд░реБрджреЗрд╡ рдХреЛ рдХреЛрдЯрд┐-рдХреЛрдЯрд┐ рдкреНрд░рдгрд╛рдоред :rose: :rose: :rose: :rose:
рд╕рд╛рдерд┐рдпреЛрдВ рдХреЛ рд╕реНрдиреЗрд╣ рдФрд░ рдЖрднрд╛рд░ред :rose: :rose: :rose: :rose:

i must appreciate your work no doubt dhan is doing extraordinary services listening to their customer customisation . i think this feature is absolutely great where we can know what mutual fund are buying i hope if this can be available on daily closing basis.
BUT SIR EK REQUEST EK SAAL SE PENDING HAI OVERLAPPING INDICATOR OF MOVING AVERAGE ON SO MANY INDICATOR .

@Tradehull_Imran Hi Imran I had a small query.
I want to download intraday historical data for banknifty futures. I understand that Dhan now allows data for upto 5 years. But how to get the security id for the expired contracts.
Doing it for index is straight forward as the security id doesnтАЩt change.
{
тАЬsecurityIdтАЭ: тАЬ25тАЭ,
тАЬexchangeSegmentтАЭ: тАЬNSE_FNOтАЭ,
тАЬinstrumentтАЭ: тАЬINDEXтАЭ,
тАЬintervalтАЭ: тАЬ1тАЭ,
тАЬoiтАЭ: false,
тАЬfromDateтАЭ: тАЬ2024-09-11 09:30:00тАЭ,
тАЬtoDateтАЭ: тАЬ2024-09-15 13:00:00тАЭ
}

Help appreciated. :slight_smile:

Right now, API returns only 2 days of candle data when timeframe is less than DAY, while on DAY tf, it returns a year of data,

How to fetch more data while working on lower timeframes.?

@Tradehull_Imran

I have repeatedly requested this too to Imran sir, Hardik sir and other members, I cannot understand why no one is replying yet. Its a big issue because if you want to apply indicator you cannot apply because to apply indicator you need data . 14period is way too low because all algo for that period will not work now thats too old.

Hi team i also facing this similar kind of error
Disconnected from WebSocket feed.
WebSocket connection error: server rejected WebSocket connection: HTTP 400
Reconnecting AgainтАж
Watchlist changed. Reconnecting the feedтАж

Can anybody help please - I have tried my best but still not working..
@Tradehull_Imran - PLease please help

Hi, I am getting absurd data from the function tsl.get_historical_data(tradingsymbol=тАЬNIFTYтАЭ, exchange=тАЬINDEXтАЭ, timeframe=тАЬ5тАЭ).
Screenshot is attached here. Is there any update in fetching historical data ??

@Siyanka @Hardik @Tradehull_Imran .. plz helpтАж!!!

Hi Dhan Tradehull Team,

I Am getting data from Dhan Data API, Tradehull

When I receive data for M&MFIN it is showing LTP is 2191.11 but actual LTP is 262 around

attaching screenshot below ( Screenshot from python & Dhan TV)

Please help me to solve this issue.
@Tradehull_Imran

Hey @kanhaji @Sahil_Malhotra

We do have data upto last 5 years available on 1 min or higher timeframes. @Tradehull_Imran do let me know if there is any help required to add it as part of the library.

you ask any algo trader they must be facing this issue because let say i want to apply crossover of 50 avg crossing 200 mavg if you donot have enough candle on multitple timeframe in 5,15,25,60 how the algo will be created the value of crossover will be shown zero , moreover when i am starting at 9:15, why donot the chart consider previous days data candle inbuilt in the system, it shows as mavg value NAn. this is the place i am helpless and stuck, cannot go ahead unless this issue resolve. i have shown in this example please have a look

please take this matter on urgent basis sir. please see the chart i have highlighted it.

Hardik sir , please do let me know why is it so that what i can see on chart but not while coding or fetching data and i have checked , the root cause is we donot have enough candle backward and therefore the system is unable to calculate it.

Hi @Hardik ,

We are trying to fetch data for ACC stock but it says we can fetch upto 90 days only at time. Attached the screenshot for your reference:

Do check and let me know.

Hi @Chandrapal_Singh ,

Do update to our latest codebase version 3.0.6:

  • Open Command Prompt: Press Win, type cmd, and press Enter.
  • Install Dhan-Tradehull: Run pip install Dhan-Tradehull
  • Confirm the installation by running pip show Dhan-Tradehull

Guide to use the updated codebase:
Refer the below pypi link for more details:

Video reference :

Hey @Tradehull_Imran

Yes, in a single API call, it is only available for 90 days. You can make parallel API calls to fetch for upto 5 years of data.

chart = tsl.get_historical_data(ce_strike, тАШNFOтАЩ, тАШ25тАЩ) sir is function se pehle data aa raha tha kuch changes aya hai kya sir yeh date dalne bol raha hai

1 Like

tsl.get_historical_data()

This code stopped functioning for some reason for intraday timeframe (5 min, 15 min) but still working for тАЬDAYтАЭ timeframe

1 Like

Yes i also observed the same around yesterday 5pm i guess imran sir might be updating tsl module file or its library not sure though

1 Like

dhan api itself have the issue of intraday historic data since yesterday its not working properly giving errors especially with intraday data irrespective of time frame i tried all time frames even for 1 day also not worked. Resolve this issue as early as possible. @Hardik @Dhan
image

how to upgrade the library I am using latest version of python but library installation telling me that you do not have python 3.0.08 version like this. what to do.