MQ5 & WinAPI
-
I have run the MQL5 script in fxDreema, tested it in both "Custom block" and in the "Custom MQL code" block, the result appears to be the same error:
can't open "S:\www-node\Server.....\WinAPI\winapi.mqhThis is likely caused by preventing WinApi in the server. Therefore, I would like to ask the system administrator to help check this matter. Thank you in advance.

-
But script for MT4 can run no problem.
-
And This script MQL5 can run direct on MT5 >>>
#define MT_WMCMD_EXPERTS 32851
#define WM_COMMAND 0x0111
#define GA_ROOT 2
#include <WinAPI\winapi.mqh>void AlgoTradingStatus(bool Enable)
{
bool Status = (bool) TerminalInfoInteger(TERMINAL_TRADE_ALLOWED);
if(Enable != Status)
{
HANDLE hChart = (HANDLE) ChartGetInteger(ChartID(), CHART_WINDOW_HANDLE);
PostMessageW(GetAncestor(hChart, GA_ROOT), WM_COMMAND, MT_WMCMD_EXPERTS, 0);
}
}void OnStart()
{
AlgoTradingStatus(false);
} -
To ask the system administrator, click back to main page at the top of this one, and send a message from there.
-
Thank you again @jstap
-
@XDV...

-
Hello, Mr. Jestap. Is your book sold on any other site besides Amazon?
The reason for my question: because I live in Iran and we are banned from buying from Amazon, we cannot buy unless we buy from a site other than Amazon. -
No unfortunately, because they do the printing and sharing