@jstap That you mean answer for disable Algor trade button in the Amazon web right ?
Unsolved How I disable Algo-Trading Button or send CTRL-E by FxDreema
-
How I disable Algo-Trading Button or send CTRL-E by FxDreema ?
Thank you in advance for the answer. -
This shows how to turn algo trading off
-
I made a custom block for mt4 and one for mt5, which one do you need?
-
@reyxv16 MT5 please
-
@jstap That you mean answer for disable Algor trade button in the Amazon web right ?
-
Create a custom block, add the following to the code:
bool Status = (bool) TerminalInfoInteger(TERMINAL_TRADE_ALLOWED);
if(Status != false)
{
HANDLE hChart = (HANDLE) ChartGetInteger(ChartID(), CHART_WINDOW_HANDLE);
PostMessageW(GetAncestor(hChart, GA_ROOT), WM_COMMAND, MT_WMCMD_EXPERTS, 0);
}
~next~
And below in the "Global variables, includes" window add the following:
#ifdef MQL5
#include <WinAPI\winapi.mqh>
#define MT_WMCMD_EXPERTS 32851
#else
#define HANDLE int
#define PVOID int
#import "user32.dll"
HANDLE GetAncestor( HANDLE hwnd, uint flags);
int PostMessageW( HANDLE hwnd, uint Msg, PVOID param, PVOID param );
#import
#define MT_WMCMD_EXPERTS 33020
#endif#define WM_COMMAND 0x0111
#define GA_ROOT 2 -
That would be the code for the block to turn off autotrading, you can vary the operation by modifying the line "if(Status != false)" to "if(Status == false)" to turn it on or create another block just to turn it on.
-
@reyxv16 Thank you very very much
But I don't know if this is the right way to do it.
Please help explain further. -
-
No, you didn't understand me, you need to create the custom block here: https://fxdreema.com/studio/MQL5
-
-
I must not have added this link, wasn't about my book @reyxv16 is correct, I was showing you this: https://fxdreema.com/forum/topic/19004/help-custom-mql-code?_=1718300737685
-
-
-
How i get winapi.mqh ?
-
I think it is already included in Metatrader 5
-
@reyxv16 Thank you so much
-
-
I had this when I first did this, it means you have something wrong, copy and past all you need and it will work
-
Thank you @jstap i will try that.