Emulation of ticks from an EA/indicator - page 6

 
IgorM:

nope..., not working

no errors in the log, even the internet in the terminal, on the advice of Vadim, did not disconnect - there are no ticks on the output anyway


Igor, can you write your configuration?
 
FAQ: Igor, could you write down your configuration?

I've got a laptopAsus F80C ,I do not even remember that that did not work on this laptop, even " Call of Duty: Modern Warfare 3" not lagged, asOpenCL under MT5 works :)

ZS: There is also a Core 2 Duo laptop with integrated graphics, but it just "dusts" in the drawer under the TV, sometimes watching cartoons on it - to throw away the pity and no need to use, you can certainly check it, but lazy :)

 
I was referring to the software configuration, what kind of software, how many bits, admin rights, etc.
 
FAQ: I meant software configuration, what kind of software, how many bits, admin rights, etc.

all updates installed to date

ZS: no problems in winXP on this laptop - the code works

 
yes, by the way, the last code seems to work a little differently from the previous ones: if you right-click "refresh" on the graph, there will be two ticks
 
I used the code from the first page and it all worked at once (I have XP). I have attached it to my Expert Advisor and it works without any problems. I wish there were more of this code, verified and understandable to non-programmers like myself! By the way and on the server 2003 R2 is also all good.
 
expertboss:
I used the code from the first page and it all worked at once (I have XP). I have attached it to my Expert Advisor and it works without any problems. I wish there were more of this code, verified and understandable to non-programmers like myself! By the way, everything is fine on the server 2003 R2.
The first page there was not quite a correct variant that might cause a failure. You'd better take the corrected version on the fifth page.
 

Anyway, here is the final version of the function:

int SetMyTimer(int TimerId, int Interval)
{    
  int hWnd= WindowHandle(Symbol(),Period());
  int MT4InternMsg= RegisterWindowMessageA("MetaTrader4_Internal_Message");
  int PostMsgAddr= GetProcAddress(GetModuleHandleA("user32.dll"),"PostMessageA");
  if (PostMsgAddr==0 || hWnd==0) return(0);
  // push ebp; move ebp,esp; push 01; push 02; push MT4InternMsg; push hWnd; mov eax,PostMsgAddr; call eax; pop ebp; ret 0010;    
  int value[]={ 0x55, 0x8B,0xEC, 0x6A,01, 0x6A,02, 0x68,0000, 0x68,0000, 0xB8,0000, 0xFF,0xD0, 0x5D, 0xC2,0x10 };
  int len[]=  { 1,    1,   1,    1,   1,  1,   1,  1,   4,    1,   4,    1,   4,    1,   1,    1,    1,   2 };
  value[8]=MT4InternMsg;  value[10]=hWnd;  value[12]=PostMsgAddr;
  static int TimerCode[7];  ArrayInitialize(TimerCode,0);
  int byte=0;  
  for (int i=0;  i<ArraySize(value);  i++)
    for (int j=0;  j<len[i];  j++, byte++)
      TimerCode[byte/4] |= value[i]>>(8*j)&0xFF<<(byte%4*8);

  return ( SetTimer(hWnd, TimerId, Interval, TimerCode) );
}
 

Thank you. I've already spent about an hour in the morning reading all the pages, thoroughly. I consider your argument about what's better and what's worse to be without substance. There are programmers who have nothing to deal with libraries and download what they need or run any function without problems, then those codes with bug fixers are ok for them, but there are those like me, self taught, for example, to understand and write my own working functions took more than one month (I mean a general knowledge in details) and then to "catch up" how functions work in the same "Autograph" (although honor and praise to the author as clearly spelled everything) also difficulties. That's why I have to use something shorter and more understandable - for people like me. This option is closer to me. Of course I can not figure out how this function works, especially in assembler, but it's here! Connect it to your creation and go ahead.

By the way, not to be unfounded, I tried both of them, yours is better, just my personal opinion. To sum it up: Everyone understands what he works with and who is closer to what. I used to search for some reasons and it's not in vain, I found this theme because it was difficult to move further in development without these ticks, I had to look through orders history and see how they were closed and what kind of strategy is further done. Here.

To be honest I did not come here for that but because of a question, I share my thoughts based on what I have read.

Rather, not even a question, and wrote that the XP and the server is working properly, but the server is Russian 2003 standard, I wanted to change the company and there are only 2008 and 2003 interprices, tried to run it does not go, tried to change the library on the servers with the version that works not there and then the server does not give even dll registrars see that not his version and immediately pushes his. Perhaps so designed. Okay, today is very late, tomorrow I will finish what I got and try the indicator and the latest version of the function.

Alexander.

 

I don't understand how a tick generator can be used practically, and what's the point of using it? (except for sporting interest). If you know what to do with it, you may use it in your own practice (for example, you may calculate the average slippage taking into account bar, spread and tick volume parameters). The ticks generator in the tester is neither better nor worse than other generators, because neither of them reflect the real movement in the minute bar. And if you try to simulate from the ball - then to be realistic it would be nice to take into account the snapshot of quotes (damned if it is big) - the maximum - one third of a second for the lion's share of S&P brokers with rare bursts. But it still doesn't help, not at all.

I raise a toast to ticks!