Disable/Enable Auto/Algo-Trading

 

Hello all,

I want to sell an EA in the Market. Can I use this code below, or is this not allowed by the rules?

thanks

#include <WinAPI\winapi.mqh>
#define MT_WMCMD_EXPERTS 32851
#define WM_COMMAND 0x0111
#define GA_ROOT    2

//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void autoTradingSwitch(bool state)
  {
   if(state == (bool)TerminalInfoInteger(TERMINAL_TRADE_ALLOWED))
     {
      return;
     }
     
   HANDLE hChart = (HANDLE) ChartGetInteger(ChartID(), CHART_WINDOW_HANDLE);
   PostMessageW(GetAncestor(hChart, GA_ROOT), WM_COMMAND, MT_WMCMD_EXPERTS, 0);
  }
 
better.trader every.day: I want to sell an EA in the Market. Can I use this code below, or is this not allowed by the rules?

Read the rules! DLL calls are not allowed ...

IV. Products

  1. The Product offered through the Market service can be provided only as a compiled file with the EX5/EX4 extension.
  2. Products must not contain calls to any DLL, including Microsoft Windows system libraries.

Rules of Using the Market Service
Rules of Using the Market Service
  • www.mql5.com
General Provisions and Conditions of Use service Market
 
Fernando Carreiro #:

Read the rules! DLL calls are not allowed ...

IV. Products

  1. The Product offered through the Market service can be provided only as a compiled file with the EX5/EX4 extension.
  2. Products must not contain calls to any DLL, including Microsoft Windows system libraries.

thank you, Fernando.