Error -2 'Invalid arguments'
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)
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':