Help me understand this EA

 

Hello,

 

i'm pretty new to programming, i'm studiyng a Renko Expert Advisor, it converts a normal chart in a Renko chart. File is attached, i'm understanding pretty much everything, expect this:

 

void UpdateChartWindow()
{
  if(hwnd == 0)
  {
    hwnd = WindowHandle(sSymbolName, RenkoTimeFrame);
    if(hwnd != 0) Print("Chart window detected");
  }
  if(EmulateOnLineChart && MT4InternalMsg == 0) MT4InternalMsg = RegisterWindowMessageW("MetaTrader4_Internal_Message");
  if(hwnd != 0) if(PostMessageW(hwnd, WM_COMMAND, 0x822c, 0) == 0) hwnd = 0;
  if(hwnd != 0 && MT4InternalMsg != 0) PostMessageW(hwnd, MT4InternalMsg, 2, 1);
  return;
}

 

can anyone help me understand this, what's the difference beetween EmulateOnLineChart=True/Flase? 

Files:
 
It send ticks "fake" ticks to the chart.
 

Ok. what i don't understand is how it does! can you elaborate a bit about this please??

 
d.bignotti:

Ok. what i don't understand is how it does! can you elaborate a bit about this please??

Check documentation for mql4 functions.

Not mql4 function calls are using WINAPI (Windows DLL), you can check the documentation on Microsoft site.