Input Struct

Input Struct DOWNLOAD MT 📂

Input Struct

Info

The Input Struct is a Library for MetaTrader 5 that this library reduces routine actions when working with input parameters. OOP.

Usage

This tool is typically used for enhancing chart analysis and decision making.

Platform

This Library works exclusively on MetaTrader 5 (both build 600+ and newer versions).

Setup

Place the downloaded file in MQL5/Libraries folder via File ? Open Data Folder in MetaTrader 5.

How to Install and Use Input Struct

1. Storage: Place library files in the MQL/Libraries directory to ensure they are accessible to your projects.

2. Implementation: Include the library in your code using the #import directive, ensuring you match the exact function names and parameters.

3. Compilation: Ensure the library is present in the directory before you compile your main EA or script, as the compiler links them during this phase.

4. Management: Keep libraries organized in sub-folders if you manage many custom functions to maintain a clean project structure.

Frequently Asked Questions

Q: What is a library file used for? A: Libraries store reusable code modules, allowing you to centralize common logic used by multiple EAs or indicators.

Q: Is a library executable? A: No, libraries are non-executable files containing functions; they must be imported into an EA, indicator, or script to function.

Q: Can I update a library while the platform is running? A: You should compile your EA or script after updating a library to ensure the latest code changes are integrated.

What this tool does

This library reduces routine actions when working with input parameters.

Typical Use Case

This Library excels in automated trading and technical analysis on MetaTrader 5.

Compatible Platform & Setup

This Library works on MetaTrader 5. Place the file in the MQL5/Libraries folder and restart the terminal.

Description & Settings

Related: CCalendar Input Box - another powerful library for MetaTrader 5 traders.


This library reduces routine actions when working with input parameters.
OOP.
As an example of use, let's take a trading advisor. It is reasonable to use OOP-approach when writing trading logic, because it makes it easier to embed EA into more complex systems.

Also recommended: Inc GU I Color Input - similar library with strong performance on MetaTrader 5.

Architecturally, the OOP-advisor for the Tester looks like this.
This EA does not do anything. But when it comes not to trading logic, but only to working with input parameters, the code grows seriously, which worsens readability and increases the probability of error. In fact, you are required to perform unpleasant routine work.
All input parameters as a string..
Let's divert a little bit to the lines highlighted in the code.
Trade practice shows that it is convenient to save/read input parameters in string form, so that you can quickly and clearly see the sets of input parameters you are interested in (found).
For example, there are two sets of input parameters in the text above.
OOP-classics of working with input parameters.
The above cumbersome code is the same empty EA, but only with the addition (highlighted text) of working with input parameters. The code is unpleasant, and even without implementation of the important
INPUT_STRUCT::FromString
method.
If you want to add/remove one input parameter, you will have to make corresponding changes in five places of this code. And so it is every time!
OOP-alternative of working with input parameters..
There is noticeably less highlighted text. At the same time, all methods are implemented.
Usage scenarios.

Minimal time and error probability when changing a set of input parameters.

More time devoted to trade logic rather than technical features.

Saving/reading input parameter sets via string.

Significant simplification of writing complex systems (portfolios, etc.).

Easy connection of custom optimisation algorithms.
Note that with the OOP approach, a lot of repetitive text can be hidden in mqh files - as is done in both examples above. OOP can also be concise.
Features.

The proposed input parameter structure is , which greatly extends the applicability.

"Modified" structures can be passed into each other via the assignment operator. And always have the same size.

The library is cross-platform.

You may also like: Vertical histograms constructor - excellent alternative for library users on MetaTrader 5.

⚠ Limitations & Risk Warning

  • This tool is provided for educational and testing purposes only.
  • Past performance does not guarantee future results.
  • Trading involves substantial risk of loss. Use on a demo account first.
  • Results may vary depending on market conditions, broker, and settings.
  • We recommend thorough backtesting and forward testing before using with real funds.

You May also Like

RobotFX does not own any of the code provided on this platform. All tools are freely available on the internet; we simply index and re-offer them for download. We are not responsible for any financial losses that may occur. Trading responsibilities rely solely on the traders downloading and using the displayed Expert Advisors, indicators, and scripts. These tools are provided for educational purposes only and may require modification or optimization to align with a trader's specific strategy or needs.
© ROBOTFX - Best MetaTrader Expert Advisors & Indicators