OnChartEvent() HELP !!!

 

Hello, I need help in MQL4 , what should I use in (OnChartEvent) to be able to move two lines at the same time, while the mouse button is pressed. EXAMPLE: imagine two horizontal lines, while I move one up the other moves down AT THE SAME TIME, not just when I release the mouse button.

thanks...
 
  1. Why did you post your MT4 question in the MT5 General section instead of the MQL4 section, (bottom of the Root page)?
              General rules and best pratices of the Forum. - General - MQL5 programming forum?
    Next time, post in the correct place. The moderators will likely move this thread there soon.

  2. Just monitor the location of the lines. When one moves, move the other the same amount. See my GUI/Trade Assistant EA like mine (for MT4): 'Money Manager Graphic Tool' indicator by 'takycard' - Risk Management - Articles, Library comments - MQL5 programming forum - Page 6 #55 (2018) and modified for screen resolution #75 (2020.02.17)

 
William Roeder # :
  1. Por que você postar seu MT 4 de interrogação no MT 5 seção Geral em vez do MQL 4 seção , (parte inferior da página Root )? Regras gerais e melhores práticas do Fórum. - Geral - Fórum de programação MQL5 ? Da próxima vez, poste no lugar correto. Os moderadores provavelmente moverão este tópico para lá em breve.
              

  2. Apenas monitore a localização das linhas. Quando você se move, mova o outro na mesma quantidade. Veja minha GUI / Trade Assistant EA como a minha (para MT 4 ): Indicador 'Money Manager Graphic Tool' por 'takycard' - Gestão de Risco - Artigos, Comentários da Biblioteca - Fórum de programação MQL5 - Página 6 # 55 (20 18 ) e modificado para resolução de tela # 75 (17.02.2020)


is my first post here on the forum. I saw your code, what I need is: Imagine, moving the Label of the Lines at the same time as moving the line, and not at the moment you release. type the FIBONACCI tool.
 
zuqueto200 #: what I need is: Imagine, moving the Label of the Lines at the same time as moving the line, and not at the moment you release. 

What is exactly what my GUI does.

 
William Roeder # :

O que é exatamente o que minha GUI faz.


I noticed that your EA is immediately updated with the release of the mouse button and I need it to run like the FIBONACCI tool, when you move the lines the level descriptions move at the same time (together) while i'm positioning on the chart, even before the mouse button is released thanks for helping me. :)
 
zuqueto200 #:


I noticed that your EA is immediately updated with the release of the mouse button and I need it to run like the FIBONACCI tool, when you move the lines the level descriptions move at the same time (together) while i'm positioning on the chart, even before the mouse button is released thanks for helping me. :)

There's a CHARTEVENT_MOUSE_MOVE event.

https://www.mql5.com/en/docs/event_handlers/onchartevent
Documentation on MQL5: Event Handling / OnChartEvent
Documentation on MQL5: Event Handling / OnChartEvent
  • www.mql5.com
OnChartEvent - Event Handling - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
zuqueto200 #: I noticed that your EA is immediately updated with the release of the mouse button and I need it to run like the FIBONACCI too

You keep repeating yourself but are not listening.

  1. It doesn't do anything with the release. It follows the mouse for the initial placement of the buy/sell line.
  2. That has nothing to do with dragging the GUI.

gui

 
William Roeder #:

You keep repeating yourself but are not listening.

  1. That has nothing to do with dragging the GUI.

I didn't say you do it on mouse move, I just pointed out that the event exists, he can just captures the mouse position and update the graphics.

 
William Roeder # :

Você fica se repetindo, mas não está ouvindo.

  1. Não faz nada com o lançamento. Segue o mouse para a colocação inicial da linha de compra / venda.
  2. Isso não tem nada a ver com arrastar uma GUI.


market

https://drive.google.com/file/d/1d7oU9afZ0WNwGTU63yIj5w50SA-vYORa/view?usp=sharing


your GUI is not working from my MT4, take a look at how it's happening, that's why I'm not able to make this function of CHARTEVENT_MOUSE_MOVE, can you tell me what it can be?

 
William Roeder

Did you see my last post? what do you say?

 ???
William Roeder #:

Você fica se repetindo, mas não está ouvindo.

  1. Não faz nada com o lançamento. Segue o mouse para a colocação inicial da linha de compra / venda.
  2. Isso não tem nada a ver com arrastar uma GUI.


William Roeder
William Roeder
  • www.mql5.com
Trader's profile