Ataros:
Is "Symbol" a string and not a class with __repr__ or __str__ methods? Also, are the rest of the variables numbers and not strings?I've been trying to solve this problem for days and days but I can't. I'm on the verge of a nervous breakdown!
I run the Script 'A.py' and every time the mt5.copy_rates_range function, with diffrent arguments, it always gives me the error -2 'Invalid arguments'.
The beauty is that, these same arguments, inserted in the same function in another Script 'B.py' always work perfectly.
Python Script 'A.py':
Python Script 'B.py':
You can check their type with:
print(type(startTime))
Alexandre, thanks for answering me.
print(type(Symbol)) # -> <class 'str'> print(type(timeframe)) # -> <class 'int'> print(type(startTime)) # -> <class 'int'> print(type(endTime)) # -> <class 'numpy.int64'>
What does a data type 'numpy.int64' mean?
And most importantly, how can I convert it to an 'int' data type?
Thanks again, Alexandre.
endTime = int(endTime)

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
I've been trying to solve this problem for days and days but I can't. I'm on the verge of a nervous breakdown!
I run the Script 'A.py' and every time the mt5.copy_rates_range function, with diffrent arguments, it always gives me the error -2 'Invalid arguments'.
The beauty is that, these same arguments, inserted in the same function in another Script 'B.py' always work perfectly.
Python Script 'A.py':
Python Script 'B.py':