MetaTrader 5 Python User Group - how to use Python in Metatrader - page 79
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
Because the head() method(https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.head.html) returns an object, not a log output. To see the content, you need to explicitly send the object to print()
This anaconda for convenience outputs the objects as if print() was called.
Isuccessfully use the head method - without print - for various examples injupyter notebook. But this method does not work with the DataFrade object that MetaEditor creates. Therefore I asked - what is wrong with the object created by MetaEditor? Why does the head method work for all the examples, but not for the object created by MetaEditor?
Isuccessfully use head method for different examples injupyter notebook - without print. But this method does not work for DataFrade object, which is created by MetaEditor. That's why I asked - what is wrong with the object created by MetaEditor? Why does it work for all of the examples, but not for the object created by MetaEditor?
IPython automatically outputs (understands what to print), the terminal apparently interprets it differently
IPython outputs automatically (understands what to print), the terminal apparently interprets it differently
So I'm not running the example in the terminal. All marked DataFrame objects successfully print five lines using head method, but not the object created in MetaEditor.
This is how I run the example, not in the terminal. All marked DataFrame objects successfully print five lines using the head method, but not the object created in MetaEditor.
Well, then it's a mystery.
You have two duplicates of the code in the listing, by the way.Well, then it's a mystery.
You have two duplicates of the code in your listing, by the way.Thanks, copypast probably.
Hi.
I'm in trouble!
I can't figure out why there's an error.
Anyway.
WhilePyCharm is indexing something there I see following picture:
But, when the indexing ends and I run the code .... :
There is nometatrader5 module.How come? It's there in the project settings, it's there in Anaconda, but when I run it, it's not there!!!!
What's wrong?
My own answer.
importmetatrader5 as mt5 - wrong
Correct:import MetaTrader5 as mt5
How do I get a numpy array so that each value in it is incremented by 1?
As long as you needed a few elements, this number worked:
but how do you do it if you need an array of 100 elements?
How do I get a numpy array so that each value in it is incremented by 1?
As long as you needed a few elements, this number worked:
but how do I do it if I need an array of 100 elements?
np.arange(100)
Another question from a newcomer.
The situation is as follows. I have an indicator. When I add it to the chart in "cold" mode, it takes 7-8 seconds to be calculated.
I have done the same in python. The difference is that python saves the data in a .csv file.
Calculation in both cases is from 01.01.2019
Now the question: why can this happen?
Python has been working on the task for two and a half hours! It's just a shame to stop it... What if it's already over...
Just a little something to add. It's all tied up at
Requesting ticks for one day.
Finished... Almost three hours. What's to think? <<<<< that means 2:58.
I understand connection losses to MT5, other overheads.... But, 8 seconds vs 3 hours..... ???????? HOW ???????????