horizontal ray that follows mouse pointer

 
Hello @Lorentzos Roussos , I was wondering if you could help me. What I need to code is a simple indicator or EA that whenever I hit the "B" or "S" keys on my keyboard an horizontal ray shows up right at the mouse pointer and it moves along with it and once I click over the chart then it "releases" the horizontal ray so it won't move anymore. The problem is that I don't fully understand how the CHART_EVENT functions work so I haven't been able to control it 100%. I really appreciate any help you can provide.
 

My GUI/Trade Assistant EA (for MT4): 'Money Manager Graphic Tool' indicator by 'takycard' - Risk Management - Articles, Library comments - MQL5 programming forum - Page 6 #55 2018.01.14 and modified for screen resolution #75 2020.02.17 is close. It places the buy/sell line where the mouse is. You are responsible for moving it (or SL/TP), while it calculates the lotsize. study it.

 

Williams solution does exactly that .

What is going on is William catches the mouse move event and translates the mouse coordinates to price and time (you care about the price)

 
I found it, thank you very much!!
Reason: