Learn Algo Trading with Python | Codes | Youtube Series

@Tradehull_Imran,
Respected Sir,

Please provide an advanced algorithm code file. I do not have a programming background, so having the file would help me practice. If it is available, kindly share it.

Thank you.

I am also getting the same issue. Whenever I am trying to fetch LTP of NIFTY ATM strikeprice or 1st ITM strike price along with its LTP I am Getting the data for FIN NIFTY. If you get the solution plese tell

i think is temporary for today , because ltp commodity is wrking at thar time , because it was live , i think it will from th dhan side, hope tommorow it will resolve automatically

Hopefully. But I am facing the issue from last 5-6 days. But LTP of Commodities are working accurately. @Tradehull_Imran please guide and help how to solve this issue as while fetching LTP for NIFTY it fetches LTP for FIN NIFTY due to which not able to execute trades

Then it may be be something else, @Tradehull_Imran please guide

@Tradehull_Imran

Good morning Imran Ali,

Can we Have desired time frame in Historical Data please?

As Dhan had limits user for some of the time frames only like 1, 5, 15 etc…

If we need to work on 3 Min, 10 minutes then ?

@The_Rexx Same with me too, while fetching ATM for Nifty, output shows FINNIFTY with ATM Nifty strike.

Hi @Tradehull_Imran,
I am getting the below error while placing the order. could you please guide me in this regard

Processing: ULTRACEMCO 27 FEB 10400 PUT, Qty: 48
'Got exception in place_order as {‘status’: ‘failure’, ‘remarks’: {‘error_code’: ‘DH-905’, ‘error_type’: ‘Input_Exception’, ‘error_message’: ‘Missing required fields, bad values for parameters etc.’}, ‘data’: {‘errorType’: ‘Input_Exception’, ‘errorCode’: ‘DH-905’, ‘errorMessage’: ‘Missing required fields, bad values for parameters etc.’}}

and order placement statement is:

buy_orderid = tsl.order_placement(tradingsymbol = trade_name, exchange = ‘NFO’, quantity = qty, price = 0, trigger_price = 0, order_type = ‘MARKET’, transaction_type = ‘BUY’, trade_type = ‘MIS’)

Hello @Tradehull_Imran,

Please help.

Today i have updated Dhan-Tradehull using below command
pip install Dhan-Tradehull

After updating, my current algo stopped working and throwing error. please note that still i am using codebase version 2.1 .

Thanks,
Rahul

facing the same issue today also… @Dhan @Tradehull_Imran

@Tradehull_Imran please guide and help how to rectify the issue. We all are getting the FIN NIFTY LTP and STRIKE PRICE while fetching the same for NIFTY. @Dhan @Tradehull

hello sir ,

i am starting algo from today downloading install libraries but its not working and error code showing is givwn below

The system cannot find the path specified.
The system cannot find the path specified.

ERROR: Twisted-20.3.0-cp38-cp38-win_amd64.whl not found in the script directory.
Please ensure the file is in the same directory as this script.

also i have downloaded manually this error code is shows for

pip install tapy

C:\Users\MGC>pip install tapy
Collecting tapy
Using cached tapy-1.10.0-py3-none-any.whl.metadata (2.5 kB)
Collecting numpy<2 (from tapy)
Using cached numpy-1.26.4.tar.gz (15.8 MB)
Installing build dependencies … done
Getting requirements to build wheel … done
Installing backend dependencies … done
Preparing metadata (pyproject.toml) … error
error: subprocess-exited-with-error

× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [21 lines of output]
+ C:\Users\MGC\AppData\Local\Programs\Python\Python313\python.exe C:\Users\MGC\AppData\Local\Temp\pip-install-hkw9ndk9\numpy_a07b7224d12642c9a3cf64da5cc3f4eb\vendored-meson\meson\meson.py setup C:\Users\MGC\AppData\Local\Temp\pip-install-hkw9ndk9\numpy_a07b7224d12642c9a3cf64da5cc3f4eb C:\Users\MGC\AppData\Local\Temp\pip-install-hkw9ndk9\numpy_a07b7224d12642c9a3cf64da5cc3f4eb.mesonpy-0dzmm5sp -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=C:\Users\MGC\AppData\Local\Temp\pip-install-hkw9ndk9\numpy_a07b7224d12642c9a3cf64da5cc3f4eb.mesonpy-0dzmm5sp\meson-python-native-file.ini
The Meson build system
Version: 1.2.99
Source dir: C:\Users\MGC\AppData\Local\Temp\pip-install-hkw9ndk9\numpy_a07b7224d12642c9a3cf64da5cc3f4eb
Build dir: C:\Users\MGC\AppData\Local\Temp\pip-install-hkw9ndk9\numpy_a07b7224d12642c9a3cf64da5cc3f4eb.mesonpy-0dzmm5sp
Build type: native build
Project name: NumPy
Project version: 1.26.4
WARNING: Failed to activate VS environment: Could not find C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe

  ..\meson.build:1:0: ERROR: Unknown compiler(s): [['icl'], ['cl'], ['cc'], ['gcc'], ['clang'], ['clang-cl'], ['pgcc']]
  The following exception(s) were encountered:
  Running `icl ""` gave "[WinError 2] The system cannot find the file specified"
  Running `cl /?` gave "[WinError 2] The system cannot find the file specified"
  Running `cc --version` gave "[WinError 2] The system cannot find the file specified"
  Running `gcc --version` gave "[WinError 2] The system cannot find the file specified"
  Running `clang --version` gave "[WinError 2] The system cannot find the file specified"
  Running `clang-cl /?` gave "[WinError 2] The system cannot find the file specified"
  Running `pgcc --version` gave "[WinError 2] The system cannot find the file specified"

  A full log can be found at C:\Users\MGC\AppData\Local\Temp\pip-install-hkw9ndk9\numpy_a07b7224d12642c9a3cf64da5cc3f4eb\.mesonpy-0dzmm5sp\meson-logs\meson-log.txt
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

Hi @Jana_HS ,

Refer the below code:

option_chain = tsl.get_option_chain(Underlying="NIFTY", exchange="INDEX", expiry=0)

The parameter Underlying , U must be in capital letter.

Hi @SUKANTA_MONDAL1 ,

Refer the below code :
Session 3.zip - Google Drive

For video reference:

Hi @Delta_Trading ,

We are looking into this issue.

Hi @The_Rexx ,

We are looking into this issue, will update you regarding this asap.

Hi @Manish_Kumar ,

We are looking into this issue, will release the updated codebase soon.

Hi @Hemal_Chhatrala ,

You can use 1 minute data and resample the data for different timeframes using pandas.

1 Like

Hi @sreetd14 ,

It seems the contract is blocked, and the lot size is 50.

Hi @rahulcse56 ,

Verify the installation by executing pip show Dhan-Tradehull. If it is installed correctly, remove codebase version 2.1 from the folder.

Next, attempt to run the code. If you still encounter issues, share a screenshot of your file structure along with a screenshot of the output after running:
pip show Dhan-Tradehull.