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
등급
(560)
프로젝트
840
73%
중재
15
53% / 13%
기한 초과
193
23%
무료
비슷한 주문
This project is a self-optimizing, fully backtested algorithmic trading bot for XAUUSD (Gold) on the MetaTrader 5 platform. The bot utilizes a combination of technical and quantitative models to generate consistent monthly profits across different market sessions (Asian, London, US). Key features include: Market regime detection using Hidden Markov Models Multi-timeframe analysis for gold-specific patterns
I have my ea I lost ultimate set file I have old and I must adjust this for more stability and profitable I have ea and old set file profitable but no more stable
-Must check leverage XXXXXXX (0 means any leverage requirement) of the current instrument, (where i open chart) , or a instrument XXXXXX I specified for example if i put 0.05 which mean the leverage is 5% based on the instrument specification , it will check if it stay 0.05 or change. Example :If leverage requirements on the specification page change above 0.05 , the position will not open. -Check spread XXXXX(0 mean
Need a script or any program method to scan the Expert Advisor's log periodically and send email/sms alerts after a configured number of consecutive failures occurred. The error types and scan frequency should be configurable
I’ve developed a session-based Expert Advisor,Now, I’m looking for a professional MQL5 developer to refine, optimize, and potentially 1. **Code audit** for reliability, trade safety. 2. Optimize SL/TP placement to prevent errors with stop level restrictions. 3. Improve logic separation, speed, and memory handling. Fully working `.mq5` file (open source, no DLLs),Clean, commented code with good practices MQL5 Expert
I've developed a Ninjatrader strategy, and it works very well. However, it deactivates every time I exit. The strategy works semi-automatically, so I execute the trade in the chart trader. I would like to program a simple entry logic to backtest the strategy, but then it shouldn't deactivate after every trade. The strategy takes over trade management and opens a hedge position in another instrument. Do you think you

프로젝트 정보

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