支持中心 帮助文档 联系我们
📱 微信: 18391752892 | 💬 QQ: 3313198376 | ✈️ Telegram | 📧 fishfx123@gmail.com
EURUSD 1.0856 +0.12% GBPUSD 1.2678 +0.08% USDJPY 149.23 -0.15% XAUUSD 2034.56 +0.34% EURUSD 1.0856 +0.12% GBPUSD 1.2678 +0.08% USDJPY 149.23 -0.15% XAUUSD 2034.56 +0.34%

The Easiest License

👤 作者: Dario Pedruzzi

4.5 分

¥0.00

📌 版本: v1.0
📥 下载: 0
⭐ 评分: 4.5

📝 产品详情

The Easiest License

作者Dario Pedruzzi
版本v1.0
激活数5

Use a plain google sheet to license your product

After years of developing trading software, I noticed the lack of a simple and cheap system to license the software to your customer. 

Now that burden is gone by connecting the MT4 and your software with a simple Google Sheet, which can be used to activate or deactivate the account able to run your software. 


With a minimum setup you'll be able to compile your software and distributing it without the fear of being spoiled by hackers or bad people.

On one spreadsheet you'll be able to manage multiple products and make your customer happy (and paying). 


What the library can do: 

  • include a header file and the class constructor in your software (Indicator or Expert Advisor or Utility) 
  • initiate the class and call the setup method 
  • use the CheckLicense method in an OnTimer or OnClick to get a response 


Type of responses: 

The CheckLicense method will return:

  • 0 if there is some issue (terminal not connected, account number equal to zero, and so on) 
  • 1 if the license is valid and the account can operate your software
  •  -1 if the account number provided is not able to operate your software 

What you will have to do to use the library: 

Activate the web requests to https://sheets.googleapis.com domain

Produce a header file and put it in the "includes" folder

Produce a Google Sheet API KEY (google it or wait for me writing the actual procedure) 

Collect the Google Sheet ID (it's in the URL of the spreadsheet) 

Manage your software behavior in the three cases (send an alert, deactivate, don't paint anything, and so on)


Code example for an Indicator: 

// header file (Copy and paste it in a new LicenseEngineHeader.mqh file in the includes folder)

//+------------------------------------------------------------------+
//|                                                        CGSLE.mqh |
//|                                 Copyright 2024, D'ario Woollover |
//|                               https://www.automazionetrading.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2024, D'ario Woollover"
#property link      "https://www.automazionetrading.com"
#property version   "1.00"
#property strict


//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
class CGSLE
  {

private:
   string            m_base_url;
   string            m_product_name;
   string            m_spreadsheet_id;
   string            m_column_id;
   string            m_api_key;
   int               m_account_count;
   string            m_allowed_accounts[];

   string            m_cookie, m_headers;
   char              m_post[], m_result[];
   int               m_timeout;


public:
                     CGSLE() {};
                    ~CGSLE() {};
   virtual void              Setup(string API_KEY, string spreadsheet_id, string product_name, string column_to_check = "A", int account_count = 300) {};

   virtual int               CheckLicense(int account_number) {return 0;}; 

private:
   virtual int               Initialize() {return 0;};
   virtual string            BuildURL() {return "";};

  };
//+------------------------------------------------------------------+


// includes in yourproduct file

    #include <LicenseEngineHeader.mqh>

#import "LicenseEngine.ex4" 
CGSLE *iGSLE();
#import

// initiation 

 LicenseEngine = iGSLE();
   
 LicenseEngine.Setup(PERSONAL_API_KEY, SPREADSHEET_ID, PRODUCT_NAME);

// onTick or OnTimer, OnCalculate implementation

   if(!IsConnected())
     {
      return;
     }

   int account_num = AccountNumber();
   int check = LicenseEngine.CheckLicense(account_num);

   if(check == -1 && !alertSent)
     {
      MessageBox("Sorry, your account is not licensed, please contact 'greatdeveloper@tradingdomain.com'", "Invalid Account",  MB_ICONERROR | MB_OK);
      alertSent = true;
      return;
     }

   if(check != 1)
     {
      return;
     }
     



In future releases, if requested: 

  • Expiration date support
  • Check license by email 
  • Alerts customization
  • Refresh of activated accounts every XXX minutes
  • MT5 Version

4

安全须知

本产品仅通过 MQL5.com 官方渠道获取。其他渠道版本可能缺少完整功能和技术支持。

EA 配置

交易品种XAUUSD
时间框架H1 (推荐)
推荐经纪商IC Markets, IC Trading
最低存款$300 / 0.01手

📸 截图预览