Hi @Tradehull_Imran, Is it possible to update the margin_calculator function to provide the margin required in case i’m creating a basket order…e.g. call/put spreads/short iron condor with hedge? The margin requirement of the basket will be lower than the margin requirement of the individual option legs…hence it will be very useful if this can be added in the code.
Thanks
We done need to install talib via pip install, its already managed in installl_libraries.bat
However if you want to install it, goto folder whenere talib .whl file is and on cmd
pip install tpip install TA_Lib-0.4.24-cp38-cp38-win_amd64.whl
Also the above message says TA-lib is not supported wheel on this platform,
this indicates that you may have installed another python version
use python-3.8.0-amd64
i am getting those error. @Tradehull_Imran
@Tradehull_Imran
Thanks for reply.
Can you provide me alternative reference code how to use trailing stop loss.
Installation seems to be fine, most probably there was some issues installing some libraries, that’s normal.
see if you can run files in which are in session 3
reference code link : Learn Algo Trading with Python | Codes | Youtube Series - #1667 by Tradehull_Imran
@Tradehull_Imran sir
market close hone ke bad order nhi leta hai to MCX me trade kaise hoga…
MCX CURRENT TIME 6.45
order_details {'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.'}}
If you want to test algo after market, in that case we can use AMO orders,
for NFO use below code
orderid = tsl.order_placement(tradingsymbol='NIFTY 02 JAN 24900 CALL', exchange='NFO', quantity=75, price=0, trigger_price=0,order_type='MARKET', transaction_type='BUY', trade_type='MIS',after_market_order=True)
for MCX use
orderid = tsl.order_placement(tradingsymbol='CRUDEOILM JAN FUT', exchange='MCX', quantity=10, price=0, trigger_price=0,order_type='MARKET', transaction_type='BUY', trade_type='MIS',after_market_order=True)
Yes now the installation has been dcompleted.
do use the updated codebase now : https://www.youtube.com/watch?v=HLiEpNZSD80&list=PLifIWB1V-ILPfC9OqzAPtAFhhj8e5jAms&index=5
Thank you so much for the support
@Tradehull_Imran
data wrong aa rha hai super trend ka
Thank you sir
Now I am getting OHLC data after using the new "Dhan_Tradehull_V2.py " but getting error
“exception got in ce_pe_option_df ‘<’ not supported between instances of ‘int’ and ‘str’”
for code: ce_name, pe_name, strike = tsl.ATM_Strike_Selection(‘SENSEX’,‘27-12-2024’), it was working for previous "Dhan_Tradehull_V2.py "file.
Thank you , very much, sir…
@hardik sir, Please add feature for Trailing orders though the api.
I’m also using super trend in my algos, but i’m getting correct data,
share your super trend code and what parameters do you want…
indi = ta.supertrend(index_chart_1 ['high'], index_chart_1 ['low'], index_chart_1 ['close'], 7, 3)
index_chart_1 = pd.concat([index_chart_1 , indi], axis=1, join='inner')
Ya, its fine…
Now put the condition, for example, for buy,
[‘close’] > [‘SUPERT_7_3.0’]
sc = second_candle_1['close'] < second_candle_1['SUPERT_7_3.0'] # second_candle_1 close is below Super trend