Hi everyone,
I’m using the official MetaTrader5 Python package and trying to retrieve per-day quote/trade session time windows for symbols.
From MQL5 docs, I can see session window functions exist:
- SymbolInfoSessionQuote: https://www.mql5.com/en/docs/marketinformation/symbolinfosessionquote
- (and similarly SymbolInfoSessionTrade)
In Python docs, I’m using symbol_info():
My findings in Python (MetaTrader5 package version 5.0.5640):
- symbol_info() returns fields like session_open / session_close, but these appear to be prices (or 0.0), not quote/trade session time windows.
- The module does not expose symbol_info_session_quote or symbol_info_session_trade (attribute missing). Or rather it does but they are empty on all symbols
"session_quote_windows": {}, "session_trade_windows": {}
So I currently cannot get weekday session windows from Python the same way MQL5 can.
Questions:
- Is this expected (i.e., not supported yet in Python API)?
- Are there plans to expose SymbolInfoSessionQuote / SymbolInfoSessionTrade equivalents in the Python package?
- If yes, is there an ETA or roadmap version?
Use case: strategy/backtest session-aware rules (e.g., exchange/session-specific ORB windows) need reliable per-symbol session-time metadata. Especially in regards to the upcoming change in daylights savings time.
Thanks!
Where do you see that "session_quote_windows": {}, "session_trade_windows": {} ?
I reported it to MetaQuotes attention.
I see it in the output of my own metadata endpoint/wrapper, where I persist symbol metadata snapshots (from Python MT5 calls) and include those two computed fields.
To be explicit: those two fields are not native symbol_info() fields. I build them by calling:
- mt5.symbol_info_session_quote(symbol, day_of_week, session_index)
- mt5.symbol_info_session_trade(symbol, day_of_week, session_index)
and aggregating results. In my environment, those calls return no usable rows, so both objects remain {}.
Main point of this post is MQL5 parity:
- I understand symbol_info() docs in Python don’t promise these windows.
- But MQL5 has dedicated session-window APIs (SymbolInfoSessionQuote/Trade), and Python has equivalent function names.
- So I tested the Python parity path, and currently it yields empty session windows for me.
Python
MQL5
-
SymbolInfoSessionQuote
https://www.mql5.com/en/docs/marketinformation/symbolinfosessionquote -
SymbolInfoSessionTrade
https://www.mql5.com/en/docs/marketinformation/symbolinfosessiontrade
- www.mql5.com
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi everyone,
I’m using the official MetaTrader5 Python package and trying to retrieve per-day quote/trade session time windows for symbols.
From MQL5 docs, I can see session window functions exist:
In Python docs, I’m using symbol_info():
My findings in Python (MetaTrader5 package version 5.0.5640):
"session_quote_windows": {}, "session_trade_windows": {}
So I currently cannot get weekday session windows from Python the same way MQL5 can.
Questions:
Use case: strategy/backtest session-aware rules (e.g., exchange/session-specific ORB windows) need reliable per-symbol session-time metadata. Especially in regards to the upcoming change in daylights savings time.
Thanks!