How to get an information from user interface ? MQL5

 

Hello,

I'm creating a simple script that opens a long position.

Here's my code:

#include <Trade\Trade.mqh>
CTrade trade;

double Ask;

void OnStart()
  {
   Ask = SymbolInfoDouble(_Symbol, SYMBOL_ASK);
   trade.Buy(1.0, _Symbol,Ask, 0, 0, "Long");   
  }


For instance, it can only open a long position with a fixed lot size (1.0) 

I would like my script to read the size lot from the UI on the top left hand corner of the screen:



Is there a library, or any way for the script to get this information and put it as a value ? 

Thanks in advance for your answers.

Files:
screen.png  8 kb
 
Axel: I'm creating a simple script that opens a long position. Here's my code: For instance, it can only open a long position with a fixed lot size (1.0) I would like my script to read the size lot from the UI on the top left hand corner of the screen: Is there a library, or any way for the script to get this information and put it as a value ? Thanks in advance for your answers.
Not possible to read the values in the built-in trading panel. No access is provided in MQL. You have to implement your own graphical trading panel, like the many examples of such in the CodeBase.