What do the pros have to say: How to get mouse scroll values in MQL? [repost from the fifth forum]. - page 8

 

Thank you, a little late, but still.

 
Ihor Herasko:

First of all, it would be a good idea to decide in what form the information about the event occurrence should be received: directly or indirectly?

Assuming that writing your own DLL is not an option, why not do away with the API as well? If the indirect method is suitable:

We should loop a script that checks the index of the first visible bar in a window - WindowFirstVisibleBar (you can do it together with the number of bars in the window - WindowBarsPerChart). If they differ from the previous value, the chart has been checked. True, in this case not only mouse wheel could be the cause (zooming in time - "+", "-", clicking Home or End, direct jump to the desired date).

In any case, there's not enough information yet to know what exactly is required from detecting a mouse wheel spin event. Then you can suggest methods.

P.S. And if you need access to window handling function, it is SetWindowLongPtr (see msdn). But you can't do without DLL, because you can't assign a new message processing procedure, located in MQL code.


Note, this post practically contains the solution. It was a little underdone for some reason. The author first grasped a simple and correct idea and then lost it, having gone in search of a global solution along with the rest. What a pity...


P.S. I was glad to help).

 
Реter Konow:

Note, this post practically contains the solution. It's a bit underwhelming for some reason. The author first grasped a simple and correct idea and then lost it, going off in search of a global solution with the rest of us. What a pity...


P.S. I was glad to help).


Those were the days, old language, limited possibilities... ... so I had to do some juggling... The author, i.e. me, successfully solved this problem, and then lost interest )))

 
Реter Konow:

The best option would be to give you the solution in general terms, but not with the aim of proving anything, but on the basis of friendship.

Of course, the realisation is an attempt to find a way out of a hopeless situation. With the complete lack of scrolling with the wheel, it is the simplest and most "native" solution. For a full-fledged solution, I've already contacted servicedesk. Whether it is or not depends on the developers.

I understood that the implementation would be with a bouncing schedule. I agree that the best solution is to fall at the feet of the developers and ask them to add a scrolling and wheel-clicking event, as well as the ability to temporarily disable chart scrolling with the mouse wheel. After all, it's not that hard for them - just a few lines of code. I don't understand why they suddenly decided that nobody will need a mouse wheel... But if we really need it, then solution from bouncing chart, as an option, could be to disable chart itself ( ChartSetInteger(0,CHART_SHOW,false); ) and create its double via CCanvas, but it's of course all tambourines, walking to a neighbour across the North Pole.

But still - credit and you, Peter - a cool guy and a good programmer. I've always said that, but I've also said that you waste your creativity on "growing tomatoes in Turkey", where nobody needs them for fuck's sake.

 
Nikolai Semko:

...but also said that you're wasting your creativity on "growing tomatoes in Turkey", where nobody wants them.

I will make my point.

Right now the MT5 platform has a lot of potential. Many possibilities and libraries. But at the same time the development of MQL-programs has reached a deadlock.

The barrier to further development is the lack of opportunities to grow programs within the platform.

Users can not further extend their software functionality without the ability to bring the control modules to a graphical interface.

The lack of GUI in MQL-programs is a global barrier to their further development. Renat said that the period of "childish" one page programs must come to an end. I completely agree with him. But how can it be over if traders have no physical possibility to get out of "short trousers"?

Let's enumerate the consequences of the lack of GUI in MQL-programs:

  • Inability to combine more program blocks that would empower the user.
  • Squeezed to a limit the scope of user interaction with his program.
  • Lack of serious semi-automatic trading as such. Many would prefer semi-automatic trading to fully automatic.
  • The inconvenience of market research, which does not allow professionals to run full speed.
  • No own maintenance of statistics.
  • Necessity to work with third-party applications through crutches, the premise of which is the lack of a GUI. After all, if it were available, the research can be carried out in MQL-programs.

All useful information of MT5 is kind of "locked" inside and not really accessible.

As soon as GUI will appear, crutches will disappear and possibilities will be opened in MT5. There will also be many new features.

//-----------------------------------------------------------------------------------------------------------

My axiom: OPERATIONAL PROGRAMMES CANNOT BE COMPLETE IF THEY DO NOT HAVE A GRAPHIC INTERFACE AS A USER INTERACTION SOFTWARE. It will be detached and locked inside the machine. It's always uncomfortable to work with. If it is primitive and simple to begin with, then GUI is not needed, but in such a field as trading, the program should be constantly evolving and interacting with the user. Without this, the whole branch of algotrading will reach a ceiling and will not develop.

 
Реter Konow:

I will state my point of view.

Now the MT5 platform has a huge potential. A lot of possibilities and libraries. But at the same time, the development of MQL programs has reached a deadlock.

The lack of opportunities to grow programs within the platform is an obstacle for further development.

Users cannot further extend their software functionality without being able to put modules to control it in a GUI.

The lack of GUI in MQL-programs is a global barrier to their further development. Renat said that the period of "childish" one page programs must be over. I completely agree with him. But how can it be over if traders have no physical possibility to get out of "short trousers"?

Let's enumerate the consequences of the lack of GUI in MQL-programs:

  • The inability to integrate more program blocks that would enhance the user experience.
  • The narrowed down scope of the user's interaction with their program.
  • Absence of serious semi-automatic trading as such. Many would prefer semi-automatic trading to fully automatic.
  • The inconvenience of market research, which does not allow professionals to run full speed.
  • No in-house statistics keeping.
  • Necessity to work with third-party applications through crutches, the premise of which is the lack of a GUI. After all, if there was one, the research can be carried out in MQL-programs.

All the useful material of MT5 is kind of "locked" inside and not available.

As soon as GUI will appear, crutches will disappear and possibilities in MT5 will be open. Also a lot of new features will appear.

//-----------------------------------------------------------------------------------------------------------

My axiom: a COMPLEX PROGRAM CANNOT BE COMPLETE IF IT HAS NO GRAPHIC INTERFACE AS AN ACTION TO USER. It will be detached and locked inside the machine. It's always uncomfortable to work with. If it is primitive and simple to begin with, then GUI is unnecessary, but in such a field as trading, the program should be constantly evolving and interacting with the user. Without this, the whole branch of algotrading will reach a ceiling and will not develop.


I do understand what Renat meant, I created more than a hundred indicators and dozens of robots and in the end I realized it was nothing, but I got some experience and understanding. Now I've been working on one robot for several years, where interface is the last thing and artificial intelligence is everything. Renat didn't mean that you need a multi-page interface. I was talking about the number of pages of code, or rather the amount of effort and creative thinking put into it, whereas on Market, the vast majority of products are childish, useless trinkets. What does GUI have to do with it? GUIs can only confuse the potential buyer, or pull dust in their eyes, or scare them with their complexity. All you are working on now - and Anatoly too, by the way, pardon me - is all a la Windows 95. People today are accustomed and spoilt by a completely different interface paradigm. Look at the interface of your android phone or iPhone. Simplicity, minimalism, intuitiveness. That's what you have to strive for.

Peter, take Google.com, for example. What kind of interface do you see there? And this company is capitalised at half a trillion USD. On the contrary, they tend to minimize the interface, because their interface 15 years ago was more sophisticated and, I think, in a few years their interface will be even more modest. And they are the main trendsetters in GUI fashion. All of your enumerations of the need for GUI is declarative and exaggerated, or rather GUI has nothing to do with it (well, you can only leave it for semi-automatic trading). Look at the latest technology from Google - TensorFlow. This is a machine learning technology, AI technology and pattern recognition, which would be very useful for programmers of automated trading to master, but this technology doesn't need GUI. Really - what am I talking about, if for you OOP technology is a useless tool!

 
Nikolai Semko:

I understand perfectly what Renat meant, as I myself have created more than a hundred indicators and dozens of robots, but eventually realized that it was all nothing, but I gained some experience and understanding. Now I've been working on one robot for several years, where interface is the last thing and artificial intelligence is everything. Renat didn't mean that you need a multi-page interface. I was talking about the number of pages of code, or rather the amount of effort and creative thinking put into it, whereas on Market, the vast majority of products are childish, useless trinkets. What does this have to do with GUIs? GUIs can only confuse the potential buyer, or pull dust in their eyes, or scare them with their complexity. All you are working on now - and Anatoly too, by the way, pardon me - is all a la Windows 95. People today are accustomed and spoilt by a completely different interface paradigm. Look at the interface of your android phone or iPhone. Simplicity, minimalism, intuitiveness. That's what you have to strive for.

Peter, take Google.com, for example. What kind of interface do you see there? And this company is capitalised at half a trillion USD. On the contrary, they tend to minimize the interface, because their interface 15 years ago was more sophisticated and, I think, in a few years their interface will be even more modest. And they are the main trendsetters in GUI fashion. All of your enumerations of the need for GUI is declarative and exaggerated, or rather GUI has nothing to do with it (well, you can only leave it for semi-automatic trading). Look at the latest technology from Google - TensorFlow. This is a machine learning technology, AI technology and pattern recognition, which would be very useful for programmers of automated trading to master, but this technology doesn't need GUI. Really - what am I talking about, if for you OOP technology is a useless tool!

Nikolay, we don't understand each other).

OOP is really useless for me personally but I don't deny its usefulness for others. Let them use it to their health.

GUI is a practical necessity. GUI will open up space to make programs more complex. It will enrich the currently scarce environment for the implementation of creative ideas. It will give programs a face of their own.

MO (machine learning), on the contrary, will lead algotrading into a hopeless dead end. An automated guessing game devoid of any understanding of market processes. A black box recycling statistical mush. It amputates traders' desire to understand the market and create their own strategies. Training in technical analysis and articles on it will be irrelevant. The time of death of trader's thought will come. The black box will wipe it out.

Nikolai, our ecosystem needs to be a diverse and rich environment. We need to expand. Algotraders need new software opportunities. I just want to open another one to them).


By the way, you too should finally take up a massive project and start realising your abilities. I feel that you want it yourself, but there's no way. It's a pity because you have a huge creative potential. So, I am waiting for the demonstration of your designs. I hope I will surely see them).

 

Реter Konow:

...It will enrich the currently scarce environment for the implementation of creative ideas. It will give programmes a face of their own.

I should clarify what I mean by "scarce environment for creative expression". I'm afraid I'll be misunderstood. MT5 is potentially a very rich environment for creative ideas in algorithmic trading. But its potential is currently used by traders, I think, by 20% to 30%.

It is the present space of the field of practical use that I called "meagre environment", not the potential one. Perhaps I didn't put it accurately.

There's an expression: "Existence determines consciousness".

Our current Genesis is programs without GUIs, created in the face of high intellectual barriers. This Genesis, has defined our consciousness and we do not want GUIs and semi-automated trading. We believe in the meaning of fitting parameters to history as a means of optimising strategies. That is, we are not trying to improve the strategy by deepening our understanding of the market, but by adjusting to the history. In other words - self-deception. This is how our consciousness has been defined for years. And for some reason nobody considers optimization to be blatant dust in the eye. But only thanks to it tester grails are obtained.

Any barriers are useful for mental gymnastics, but for free creativity there are too many barriers now. Some entities help us in the realization of an idea, others hinder us. Note - it only took me a fraction of the capabilities of a programming language to build my own graphical 'machine', with a mark-up language. And it's not about programming talent at all, just the ability to distinguish things by their essence. If a person doesn't have this ability, he/she will get hopelessly confused with various things and will not realize his/her potential. The prism of looking at things determines the efficiency of our work and the scale of practical implementation of talent.

I just want to help others with my own self-fulfillment, and lead MT5 to a global breakthrough. How else could it be done? In general, if talented people like you, Nikolay, or Anatoly help me, we will surely move mountains).

 
Реter Konow:

...if talented people like you Nikolai, or Anatoly help me, we will definitely move mountains!)

No, I'm sorry, Pyotr, but you move your own mountains. And I'll move my own mountains. ))
 
Nikolai Semko:
No, Peter, I'm sorry, but you move your own mountains. And I'll move my mountains. ))

I said"like you", not you.) I wasn't going to lay my "mountain" on you.)

Reason: