Long account = AccountInfoInteger( ACCOUNT_LOGIN) - string broker = AccountInfoString( ACCOUNT_COMPANY) +-+ //| Expert initialization function | //+-+ int OnInit() +-+ //| PasswordProtectedEA.mq5 | //| Copyright 2012, | //| | //+-+ #property copyright "Copyright 2012, " #property link "" #property version "1.00" #include Ĭonst string allowed_passwords = Password is checked in OnChartEvent() method after receiving CHARTEVENT_OBJECT_ENDEDIT event. There is a predefined array of allowed passwords that is matched against a password inserted by a user. The code below initializes a CChartObjectEdit field that is be used to insert a password. We can use an input variable or a direct textbox to enter the code. During first run after installation the user is queried with a dialog box to insert a password tied with a software copy (like the Microsoft Windows or Microsoft Office serial key) and if the entered password matches the user is allowed to use a single registered copy of a software. The first most used solution for a protection of computer software is password or license key protection. Both solutions used together can only make the protection stronger and more secure against software theft. This is really good for all developers and will not invalidate ideas presented in this article. is providing some options for licensing the code directly from the Market section. I am aware that MetaQuotes Software Corp. I will also describe how to enhance this solution with base64 encoding and provide advice for PGP support to make ultra-secure protection for MQL5 Expert Advisors and Indicators. I will make use of this solution to provide an example of a remote license. My last article on MQL5-RPC framework described Remote Procedure Calls from MetaTrader 5 to any XML-RPC server. Then it introduces a remote license server concept. The article starts with simple password protection and follows with key generators, licensing a given brokers account and time-limit protection. All examples in the article will refer to Expert Advisors but the same rules can be applied to Scripts and Indicators. This article will present a few different ways to protect MQL5 software. Most developers need to have their code secured.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |