EA-45592 · Utility

ShapesCasting/Shapes5stats/EnvSignature

This is not a trading EA but a collection of MQL5 educational demonstration scripts. ShapesCasting demonstrates OOP type casting (upcast, downcast, dynamic_cast) in MQL5 class hierarchies. Shapes5stats extends the shape hierarchy with a Registrator pattern to count instantiated shapes per type. EnvSignature is a service that generates and validates SHA256-based environment signatures to bind a program to a specific terminal environment.

Open the interactive view (equity curve, symbol switch)

Key facts

CategoryUtility
RiskSafe
Rating★★★☆☆
TypeUtility tool
Timeframes—
Indicators—
Author—

Backtest results (H1, about 1 year)

Not backtested yet — this EA could not be converted automatically.

Strategy analysis

These files contain no trading strategy whatsoever. ShapesCasting demonstrates MQL5 OOP type casting: base class pointers can reference derived objects (upcasting), assigning base to derived requires dynamic_cast (downcasting) which returns NULL on failure, and void* pointers need dynamic_cast to recover type info. Shapes5stats embeds a Registrator inner class inside Shape, using a static array and static methods to track per-type instantiation counts, with a REGISTRATOR macro that auto-generates derived registrator classes. EnvSignature implements an environment-binding protection scheme: it collects terminal properties (language, path, CPU cores, memory, screen resolution, VPS status, program type), concatenates them with a secret and pepper string, hashes with SHA256, encodes with Base64 to produce a signature; the developer generates a validation string and distributes it to users, who at runtime compare the signature to verify the environment hasn't been tampered with. All three files are purely educational demonstrations of MQL5 language features with no entry conditions, exit conditions, or position management logic.

Strengths

  • Demonstrates core MQL5 OOP mechanisms including inheritance, polymorphism, and type casting with high educational value
  • EnvSignature's environment binding scheme is cleverly designed, using SHA256+Base64 to bind programs to specific terminal environments with practical utility
  • The Registrator pattern uses macros to auto-generate subclasses, showcasing MQL5 metaprogramming techniques and static member management

Weaknesses

  • Contains no trading logic whatsoever, cannot be directly used for live trading or strategy research
  • EnvSignature hardcodes the secret and pepper as macro definitions, relying on binary irreversibility for security, which risks reverse engineering exposure
  • ShapesCasting documents the deleted operator= issue caused by const members but does not provide a complete recommended solution

Possible improvements

  • EnvSignature should remove secrets from source code and read them at runtime via encrypted config files or secure input to enhance anti-reverse-engineering protection
  • Add a tolerance mechanism for environment property changes (e.g., allow CPU cores ±1) to prevent validation failures from legitimate hardware upgrades

Risk assessment

Overall risk: Safe

  • These scripts perform no trading operations, posing no financial risk
  • EnvSignature's security relies on source code secrecy; if the secret is leaked, the environment binding protection is completely compromised

Evaluation scores

Code quality4.0
Strategy logic1.0
Risk management5.0
Robustness3.0
Innovation3.0
Documentation4.0
Overall3.3

Parameters

ParameterDefaultDescription
Validation""Validation string for environment signature verification
Signature""Environment signature string for generating validation in developer mode
SecretPROGRAM_SPECIFIC_SECRETProgram-specific key for signature hash calculation
Pepper"="Instance-specific pepper value for name-value pair concatenation
I_AM_DEVELOPERdefinedDeveloper mode macro; enables validation string generation

Similar Utility EAs

Backtests are historical simulations and do not guarantee future results. Not financial advice.

Get the weekly Arena report

One email a week: ranking changes, new signals and new research. No spam; unsubscribe any time.