Tickgenerator for weekend with the latest MT4-build

 

Hi,

I used for some months a Tickgenerator script, but it dont send now the tick to an indicator or an expert advisor. Only the comment in the scipt is refreshed and show me, the the script is running, but my indicator/expert advisor (include a test alert call) dont refreshed for do the alert.


#property show_inputs
#include <WinUser32.mqh>
#import "user32.dll"
   int PostMessageA(int hWnd, int Msg, int wParam, int lParam);
   int RegisterWindowMessageA(string lpString);
#import

extern int INTERVAL_MILLIS = 500;

int start(){
   if(!IsStopped()) {
      int hwnd = WindowHandle(Symbol(), Period());
      int MT4InternalMsg = RegisterWindowMessageA("MetaTrader4_Internal_Message");
      if(hwnd != 0 && MT4InternalMsg != 0) {
         PostMessageA(hwnd, MT4InternalMsg, 2, 1);
         Comment(MathRand());
      }
      Sleep(INTERVAL_MILLIS);
      RefreshRates();
      start();
   }
   return(0);
}


Any ideas?

 
use OnTimer()
 
OnTimer() in combination with PostMassageA or without?
Reason: