[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

symbol_info_tick does not verify that a valid symbol was returned from Metatrader5 #9

Open
metaperl opened this issue Sep 27, 2020 · 1 comment

Comments

@metaperl
Copy link
Contributor

symbol_info_tick does not ensure that a valid value was obtained. If one has not shown the symbol in the Market Watch window then 'None' is returned for the symbol instead of an exception.

@nicholishen
Copy link
Owner
nicholishen commented Sep 28, 2020

That is the default behavior programmed by MetaQuotes. In order to modify that behavior using pymt5adapter you have to use the context manager and set the raise_on_errors flag.

import pymt5adapter as mta
with mta.connected(raise_on_errors=True):
    s = mta.symbol_info_tick('Not a symbol')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants