Forum

CopyTicks() Inconsistent Behavior

Hello all! I can't make sense of why the CopyTicks() returns what it returns. I use this code: MqlTick ticks_array[]; int n = CopyTicks ( Symbol (), ticks_array, COPY_TICKS_ALL , 0 , N); if (n != N) { Print ("Waiting for ticks..."); return prev_calculated; }

A call to MessageBox() make subsequent calls to TerminalInfoInteger(TERMINAL_KEYSTATE_*) return incorrect result?

It looks like a call to MessageBox() breaks something in the ability of MetaTrader to detect key presses correctly. Consider for example this sample EA code: void OnChartEvent ( const int id, const long &lparam, const double &dparam, const string

Negative HEX numbers no longer working in latest builds?

In MT5 Build 3091, the result of executing this line: Print (- 0xFF ); is this: 4294967041 In MT4, it is still the same as before: - 255 Why the change? Will it hold in later builds

Bug in CreateInstanceId() - Standard Library (\Include\Controls\Dialog.mqh)

There is an issue in the following method of the CAppDialog class: //+------------------------------------------------------------------+ //| Create unique prefix for object names | //+------------------------------------------------------------------+ string

Bug in Standard Library (\Include\Controls\Dialog.mqh)

The implementation of bool CAppDialog ::CreateIndicator(const int x1,const int y1,const int x2,const int y2) method has the following two lines: int total= ChartIndicatorsTotal (m_chart.ChartId(),m_subwin); m_indicator_name= ChartIndicatorName (m_chart.ChartId(),m_subwin,total- 1 );

MQL5.com Accounts/Products Transfer/Merging

Hello all! I am looking to acquire a business that lists their products for sale MQL5.com Market, and I would like to understand whether it is possible to merge that business' MQL5.com account into mine, because keeping two separate MQL5.com accounts seems to be against the Terms of Use : 12.11. The

SMTP connection fails

I am trying to switch my MT5 to a new mail server and I am getting weird errors when I test the email settings. I had no problem connecting to this mail server and sending emails via SMTP from several other applications, so I am pretty sure it works correctly. MT5, on the other hand, encounters

Minor bug in MQL5 documentation (OnCalculate)

For some reason, the documentation syntax uses curled brackets instead of the square ones for the time array

Updating indicator display when market is closed

I have an indicator that needs to gather data from several trading instruments before calculating. It uses OnTimer event to make sure everything is updated. However, if the market is closed and the indicator failed to update all the necessary data before the first (and the only one) OnCalculate

Disable Autotrading Globally from MQL5 Code Without DLLs

I know how to disable autotrading from MQL code using DLL calls, but is it possible to do the same without DLLs? I do not need enabling autotrading, only disabling