Gallery of UIs written in MQL - page 10

 

...And lastly today, one more cheeky thing - a copy of the ME settings window.


Here it is easier to understand which window is "not real".))

 
Реter Konow #:

Yeah, sure. It wasn't a problem.

Don't ask me how, I can't remember a thing.))))))

Nikolai will answer better.

It is surprising, because even the inbuilt panel from MQ fast trading has such a bug!

 
Aleksey Vyazmikin #:

Amazing, because even the inbuilt panel from MQ fast trading is endowed with such a bug!

You just need to control the properties of objects. The algorithm must know which object the cursor is above and which object is in "focus". Change the property of the object at the bottom so that it does not react to the cursor and click. I think so, but I may be wrong because I don't remember. It's been years.

 
I remember that my algorithm switched off scrolling of the chart while the cursor was above my window and I was scrolling something in it. Then, when the cursor returned to the free space of the chart, the algorithm enabled scrolling again.
 
Реter Konow #:
I remember

Can't we watch it now?

 
Aleksey Vyazmikin #:

Can't we watch it now?

I have tens of thousands of lines of code scattered over dozens of files in my archive, and I don't remember a thing.)))) I'll try to look at it at my leisure.

 
Реter Konow #:

I have tens of thousands of lines of code scattered over dozens of files in my archive, and I don't remember a thing.)))))) I'll try to look at leisure.

Oh how I understand, I also have it on different computers... When trying to put everything together, you realise that you don't understand the meaning of the code :) Now I've started to write a lot of comments in code - it's convenient, though it seems to be an unnecessary waste of time when you write code, but when you come back to it a year later, it helps a lot.

 
Aleksey Vyazmikin #:

Oh how I understand, I also have it on different computers..... when trying to bring everything together you realise that you don't understand the meaning of the code :) Now I've started to write a lot of comments in the code - it's handy, though it seems like an unnecessary waste of time when writing code, but when you come back to it a year later, it helps a lot.

I'm afraid that if I get into the archive, the gallery will never end, lol.)))))) There's a constructor there, and it's very easy to create new windows on it. And what if I want to finish the visual editor...? Then I'll be stuck for months, and what for?))))))

 
Aleksey Vyazmikin #:

... Now I've started to write a lot of comments in the code - it's handy, though it seems like an unnecessary waste of time when writing code, but when you come back to it a year later, it helps a lot.

I completely agree about comments. You should definitely write explanations to the code.

 
Aleksey Vyazmikin #:
I have no experience in developing such interfaces, but what I used from different sources had a significant drawback, namely that sometimes(!) other objects on the chart were clicked through them. Were you able to solve this problem?

My interfaces were, of course, significantly simpler. I didn't use Canvas, but simply built a panel from standard controls. To prevent other objects on the chart from shining through, I redrew all the window components once a minute:

if (iTime(_Symbol,PERIOD_M1,0) > LastMinute && !IsTesting()) { 
   LastMinute = iTime(_Symbol,PERIOD_M1,0);
   for (int i = 0; i < 45 ; i++) {
      long tf = ObjectGetInteger(0, Controls[i], OBJPROP_TIMEFRAMES);
      if (ObjectSetInteger(0, Controls[i], OBJPROP_TIMEFRAMES, -1)) 
         ObjectSetInteger(0, Controls[i], OBJPROP_TIMEFRAMES, tf);
   }
}

Here Controls is an array containing component names.