Script to Refresh Experts Log File in Real Time

MQL4 전문가 스크립트

작업 종료됨

실행 시간 15 일

명시

Can someone write me a script that will force the experts log file to refresh in real time?

I've written an EA that reads in and uses some information from the experts log file, so I need it to refresh in real time. However, the log file is only updated in intervals throughout the day I think, when the terminal is closed, or when you right click on the log in the terminal and click open. 

I have some code (below) that uses WinAPI functions to do something similar with the "Journal" file. It performs the "right click and open" process on the journal repeatedly to keep it updated.

So there are two possible solutions to my problem:

1. Modify the code below for me, to perform the process on the "Experts Log" file instead - I have been unable to do this myself as I don't have any experience with WinAPI and don't know the equivalent code to the "33101" to reference the Experts Log.

2. Produce a better solution for refreshing the log file - opening and closing the file folder every few ticks is far from ideal. So you may know a better or more efficient solution to solve my problem. (I will pay more for a better and more efficient solution if more time is involved).

Please contact me to discuss further...

#include <WinUser32.mqh>

#import "user32.dll"
  int GetAncestor(int hWnd, int gaFlags);
#import
//+------------------------------------------------------------------+
//| script program start function                                    |
//+------------------------------------------------------------------+
void start()
{
  int hwnd = GetAncestor(WindowHandle(Symbol(),Period()),2); // find the Terminal handle no.
  PostMessageW(hwnd,WM_COMMAND ,33101,0); // open the folder contains the log files
  //-----
  while (FindIfDirOpened() == 0) // check if the folder opened
      {
      Sleep(100);
      FindIfDirOpened();
      }
   PostMessageW(FindIfDirOpened(), WM_CLOSE, 0, 0); //close the folder
}

int FindIfDirOpened()
   {
   string log = "logs";
   string i;
   int handle = FindWindowW(i ,log);
   return(handle);
   }

 

응답함

1
개발자 1
등급
(13)
프로젝트
24
42%
중재
3
33% / 0%
기한 초과
4
17%
무료
2
개발자 2
등급
(25)
프로젝트
50
28%
중재
47
9% / 72%
기한 초과
23
46%
무료
3
개발자 3
등급
(550)
프로젝트
829
73%
중재
15
53% / 13%
기한 초과
193
23%
작업중
비슷한 주문
I currently have a Forex trading script in .txt format that I want to be converted to a functional/working robot (in .mq4), without altering the strategy of the script. The strategy of the script is already in and shouldn't be changed unless with mutual understanding

프로젝트 정보

예산
10 - 30 USD
개발자에게
9 - 27 USD
기한
에서 1  5 일