Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 453

 
Mickey Moose:

I came across another nuance that I hadn't thought of before

1) We have a lot of Expert Advisors installed on the pairs

2) When opening an order by any Expert Advisor with its own settings (some EA opens 0.1 or 0.5, for example), this record will appear in the EAs line

3) The line "Experts" is read and other robots will delete themselves if there are open positions for more than x lots.


The question is how to read and process it ? it is not included in the log files.

Why treat your teeth at the proctologist?
 
Artyom Trishkin:
Why treat your teeth at the proctologist?

That's a strange question...

 
Alexey Viktorov:

A strange question...

Why do you need to know the volume of open positions in an account through expert journal entries?
Didn't it seem strange to you?
 
Artyom Trishkin:
Why treat your teeth at the proctologist?

because any expert or indicator leaves a record there when any operation is performed, but unlike log files they are not saved (I am not good at this and could be wrong now)

 
Mickey Moose:

because any expert or indicator leaves an entry there when making any operation

And why find out the speed you are driving from a traffic cop's radar?
And you can also find out your speed from your navigator - it determines your speed via satellite by the difference between the control points.

 
Mickey Moose:

because any expert or indicator leaves a record there when making any operation


Why not read the data from open trades?

 
Vladislav Andruschenko:


why not read data from open transactions? why rustle up logs?

I became interested in writing a product that takes dependencies from other products that come without source code

I just downloaded something from the Internet and added it to the portfolio without thinking about the result and only values that can be taken from the logs are corrected.
 
Mickey Moose:

I became interested in writing a product that takes dependencies from other products that come without source code

I just downloaded something from the internet and added it to the portfolio without thinking about the result and only values that can be taken from the logs are corrected
So why read the logs?)
 
STARIJ:
#define  WM_COMMAND                    0x0111
#property indicator_chart_window
#import "user32.dll"
int RegisterWindowMessageA(string lpstring);
int PostMessageA(int  hWnd,int  Msg,int  wParam,string lParam);
int New_Bar;
datetime Time_0,Time_our;
#import
int start()
 {
     New_Bar=0;                   // Для начала обнулимся
  if (Time_0 != Time[0])          // Если уже другое время начала бара
      {
      New_Bar= 1;                 // А вот и новый бар
      Time_0 = Time[0];           // Запомним время начала нового бара
      Time_our=Time_0+10;
      }
  if   (Time_our>TimeCurrent())   
      {
      PostMessageA (WindowHandle (Symbol(), Period()), WM_COMMAND, 33324, 0);
      PostMessageA (WindowHandle (Symbol(), 0), RegisterWindowMessageA ("MetaTrader4_Internal_Message"), 2, 1);
      Time_0 = Time[0];
      Time_our=Time[0];
      } 
 return(0);
 }

Thank you, here's the final version.

 
Vladislav Andruschenko:
So why read the logs?)

I'm still going through all the options that seem realistic for this purpose.

Reason: