Errors, bugs, questions - page 2615

 

Right now in the MT5 custom indicators the resizing of the arrows is not working. Please fix or advise how to change.

PlotIndexSetInteger(0, PLOT_DRAW_TYPE, DRAW_ARROW);
PlotIndexSetInteger(0, PLOT_ARROW, 233);
PlotIndexSetInteger(0, PLOT_LINE_WIDTH, 2); //1,2,3 - размер не меняется
PS. Managed to figure out the reason. Even interesting. MT5, unlike MT4, arbitrarily scales the size of the arrows to the minimum when zooming out of the chart width (Zoom Out).
 
Can you tell me how to find out the handle of your terminal from an EA that is running in the Tester, using WinAPI?
 
fxsaber:
Can you tell me how to find out the handle of your terminal from an EA that's running in the Tester using WinAPI?

I could be wrong, but I think you are looking for a process PID , then google "winapi id of your program"

ZS: GetCurrentProcessId

 
Igor Makanu:

I could be wrong, but it seems you are looking for the PID of the process , then google the query "winapi id of your program"

I need the EA running on the Agent to be able to get the Terminal handle from which it was sent to run in the Agent.

 
 return a++;

It turns out you cannot do so :( ++ does not work in this case, although in a more complex form it returns "a" and then somehow performs ++, i.e. the returned value is not equal to "a".

 int tt=0;
 #define AAA (0==0) ? (tt++):0
int Primer() {return AAA;}
void OnStart()
  {
  int a=Primer();
  Print(a," ",tt, a!=tt? " WTF?!!": "");
  
  }

2019.12.09 16:17:51.363 proba (EURUSD,H1) 0 1 WTF?!


build 2093
 
fxsaber:

I need an EA running on an Agent to be able to get the Terminal handle from which it was sent to run in the Agent.

complex task, i have no idea how agents are run, i think googling the PID of the parent process in my opinion will complicate things even more

i don't know what to do, but i think i need to pass some kind of identifier (magic number) to agents and process it there


SZZ: I have a feeling even reading a file located on RAMDisk will be faster than calling WinAPI several times when searching for a parent process, i.e. writing into a file in a shared folder

 
Alexandr Andreev:

2019.12.09 16:17:51.363 proba (EURUSD,H1) 0 1 WTF!!!

That's right. a gets the tt before the increment.

 
 
fxsaber:

That's right. a gets tt before increment.

Yeah, I totally forgot about the "i++" "++i"

 

I see, i.e. you solve the eternal problem of data exchange between terminals, i haven't thought in this direction, i usually write everything in dll, which is not solved in MQL, i rarely look for solutions in WinAPI - it takes a long time

SZZY: Yesterday I read about SQLite, the description clearly contains explanation that the database can be opened both for writing and only for reading, the DB dll itself can be installed separately, I would have looked for optimal data exchange solution, I will have to study this stuff

Reason: