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).
The CheckLicense method will return:
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 This email address is being protected from spambots. You need JavaScript enabled to view it.'", "Invalid Account", MB_ICONERROR | MB_OK); alertSent = true; return; } if(check != 1) { return; }
If for any reason you do not like the purchased program, you can request a refund within 30 days from the date of purchase. You can also make an exchange for any other product at an equal cost or by paying the difference.
Simply send a request for refund or exchange with your order number by email: [email protected].
Refund requests received more than 30 days after purchase will be rejected.