Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1871

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
Hello.
In the robot's code, there are arrows created by the ObjectCreate command. Is it possible to make arrows that are created above/below the price move proportionally away/close to the price when zooming in/out? If I make a small distance - when zooming out the arrows hit the price, if I make a larger distance from the price - when zooming in I have to constantly look for these arrows outside the window...
Vivaldi
found the market via MT
Try downloading via Chrome or Firefox. It should offer a choice of terminal location.
As far as I remember, but I may be wrong, it is possible to get the price value in height (in pixels), which means it is possible to do so. But I haven't tested it in practice.
Try downloading via Chrome or Firfox. It should offer a choice of terminal location.
The terminal location is selected during installation. What the installer was downloaded through is irrelevant.
Michael, a big request to you to stop your malicious practice of providing false information.
I join in the question.
Also about enum: If there is EnumToString function, why not StringToEnum - some incredibly complex task there?
Saving enum values in the database as numbers is not an option, because if some new value is added to the enum in the middle, that's it, the data in the database turned into a pumpkin, and they are unreadable as numbers, so you cannot look through them with your eyes.
It is possible to find a constant in enum with the help of brute force function (by the same principle#18697), translating it using EnumToString and comparing with the sought. All that remains is to return the result.
Thank you. I'll keep it in mind, although it's the in-house method that's missing, as writing your own is just multiplying the code.
The in-house code is also written by someone else and also takes time to execute. The only thing is that it can be more optimized. But in general, if there is no function in MQL, the programmer has everything to write his or her own. And this can't but rejoice.
What's wrong with a lot of code? Save it to a module by creating your own folder in the Include directory and plug it into your applications when needed. By the way, this is another advantage of MQL.Process CHARTEVENT_CHART_CHANGE in the OnChartEvent handler . Divide chart height ChartGetDouble()CHART_PRICE_MAX- CHART_FIXED_MIN by specific number. The obtained value is added to the price or subtracted from it (depending on where the arrow should be up or down). In case of moving or scaling the graph, the obtained value will always be visually the same.
The location of the terminal is selected during installation. What the installer was downloaded through does not matter.
Michael, a big request to you to stop your malicious practice of providing false information.
It's only during installation that the location of the program is selected...? Are you serious?!
As far as I remember, but I could be wrong, it is possible to get the price value in height (in pixels), which means it can be done that way. But I haven't tested it in practice.
In this case it makes no sense to translate into pixels#18711.
In this case it makes no sense to convert to pixels#18711.
Possibly, pointed out that I haven't done such a thing in practice, just wondering.
Only the installation selects the location of the program...? Are you serious?!
Try downloading via Chrome or Firefox. It should offer a choice of terminal location.
Then explain the difference which browser the installer is downloaded with?
Probably indicated that I haven't done this in practice, just wondering.
What difference does it make which browser the installer is downloaded with?
Then study MQL properly to begin with andgive your advice to everyone.You don't know how to do anything and you don't understand what others write, accusing them of giving supposedly wrong information in your opinion!
P.S. To those who give the right advice you write something like "don't confuse newcomers". But at the same time you confuse everyone.