Discussing the article: "Creating a Trading Administrator Panel in MQL5 (Part VII): Trusted User, Recovery and Cryptography"

 

Check out the new article: Creating a Trading Administrator Panel in MQL5 (Part VII): Trusted User, Recovery and Cryptography.

Security prompts, such as those triggered every time you refresh the chart, add a new pair to the chat with the Admin Panel EA, or restart the terminal, can become tedious. In this discussion, we will explore and implement a feature that tracks the number of login attempts to identify a trusted user. After a set number of failed attempts, the application will transition to an advanced login procedure, which also facilitates passcode recovery for users who may have forgotten it. Additionally, we will cover how cryptography can be effectively integrated into the Admin Panel to enhance security.

Many applications and websites implement second-layer protection selectively, activating it only when suspicious activity is detected, such as anonymous IP usage, login attempts from new devices, or multiple failed login attempts. This approach minimizes interruptions while maintaining security.

In our case, delayed testing during development is caused by repeatedly entering passwords and checking the Telegram app for generated 6-digit codes. The frequent prompts can become tedious, particularly when triggered by terminal activity changes. Below are some notable activities that lead to device reinitialization and subsequent password requests:

  • Pair change
  • Time frame switching
  • Terminal reboot e.t.c

In certain scenarios, our programs reinitialize repeatedly due to varying activities—a process that is unavoidable for technical or operational reasons. The user validation algorithm is embedded at the start of the initialization function, making it impossible for the program to proceed without passing this step. However, we can introduce a bypass mechanism within the initialization function to optimize the process. This bypass algorithm monitors the number of login attempts, allowing for a more seamless experience during valid sessions.

Author: Clemence Benjamin