giving a tuple in a good visual format
import MetaTrader5 as mt5 # connect to MT5 if not mt5.initialize(): print("initialize() failed") mt5.shutdown() symbol = "EURUSD" #Getting Symbol info symbol_info=mt5.symbol_info(symbol)._asdict() # print the result for key, value in symbol_info.items(): print(key + ": " + str(value)) # shut down MT5 mt5.shutdown()
@Ismail Sufian Komesha #: giving a turple in a good visual format
I have edited your post. Next time, please use the CODE button when you insert code.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi,
When I run this method at Python shell, I get a tuple with all symbol info for all symbols.
Example of one symbol:
SymbolInfo(custom=False, chart_mode=0, select=False, visible=False, session_deals=0, session_buy_orders=0, session_sell_orders=0, volume=0, volumehigh=0, volumelow=0, time=0, digits=5, spread=0, spread_float=True, ticks_bookdepth=0, trade_calc_mode=0, trade_mode=4, start_time=0,...
This is a tuple with many standardized classes (for each symbol), with standardized arguments (custom, chart_mode,...).
Does anybody know how can I iterate though those arguments and make a list [] of them?