MQL5 Algo Trading
387K subscribers
2.56K photos
2.56K links
The best publications of the largest community of algotraders.

Subscribe to stay up-to-date with modern technologies and trading programs development.
Download Telegram
Improving library classes:

Add code in \MQL5\Include\DoEasy\Defines.mqh to include the new graphical element type. Create an enumeration for standard images like Info, Warning, Error icons. Define new integer properties increasing the total from 122 to 129. Include new string properties and criteria for sorting graphical elements.

Update \MQL5\Include\DoEasy\Data.mqh to add new message indices and corresponding text messages. Modify \MQL5\Include\DoEasy\Objects\Graph\GBaseObj.mqh to return new control descriptions via the TypeElementDescription() method.

The \MQL5\Include\DoEasy\Objects\Graph\GCnvElement.mqh file requires methods for writing pointers to base objects for ToolTip associations. Ensure element opacity and display flags can be overridden in inherited classes. Introduce SetOpacityDraw method for shadow objects.

In \MQL5\Include\DoEasy\Obje...
#MQL5 #MT5 #Tooltip #WinForms

Read more...
πŸ‘42❀35πŸ†7πŸ”₯5πŸ‘¨β€πŸ’»3
Starting a new development focused on the SplitContainer control from MS Visual Studio toolkit. This control, known for its two-panel design separated by a movable separator, relies on a completely transparent base container. The panels are descendants of the CContainer class and feature a static setup with default parameter values, including a vertical separator positioned at 50 pixels from the edge and a separator width of 4 pixels. By default, the panels adopt a Fixed3D frame type.

Enhancements include adding new WinForms object types, macro substitutions for background and border colors, and properties for Integer graphical elements. Enumeration for non-resizable panels is specified, and graphical element sorting by new properties is facilitated. Methods returning descriptions of new graphical elements and properties are implemented.

The aux...
#MQL5 #MT5 #SplitContainer #WinForms

Read more...
πŸ‘38❀20πŸŽ‰5πŸ‘Œ2πŸ‘¨β€πŸ’»2πŸ‘€2
Explore the innovative expansion of the TabControl WinForms object with enhanced scrolling functionality for MetaTrader 5 developers. The article delves into refining the object structure to mimic MS Visual Studio behaviors regarding tab header arrangement. Focus on optimizing user interactionsβ€”header shifts when selected, and strategic button placements for improved navigation. Enhanced library management segments auxiliary controls into distinct folders, streamlining code structure. By implementing precise event-driven models, efficient message handling across multiple classes is ensured, allowing seamless control interactions. These developments not only enhance functionality but also set a foundation for future comprehensive scroll control implementations.
#MQL5 #MT5 #WinForms #UIUX

Read more...
πŸ‘41❀32πŸ‘¨β€πŸ’»7πŸ‘4🀯4😎4πŸ‘Œ2
Implementing enhanced tab management within a control involves new improvements and considerations. Tabs can be placed on any side of the control and utilize a new mode for tabs to stretch accordingly, ensuring rows adjust to control dimensions. The stretching logic varies with top/bottom tabs stretching in width, while side tabs stretch in height.

Updates to the class structure include introducing new properties to manage tab header positions effectively and ensuring they accommodate changes in size dynamically. Improved error handling aids in debugging graphical element constraints. Header placement is carefully managed to maintain aesthetic and functional integrity, especially when switching between different sizing modes.

These changes enhance the user experience in managing tab controls, optimizing responsiveness and layout versatility. Future ...
#MQL5 #MT5 #Algorithm #WinForms

Read more...
πŸ‘25❀17πŸ‘¨β€πŸ’»11πŸ‘Œ1
In recent development of the TabControl WinForms object, a challenge was encountered with graphical element name length that limited the object creation process. The prior naming convention incorporated a full hierarchical reference in each child element's name, often exceeding the 63-character limit. A new naming methodology was implemented to resolve this by using the program name, element type, and an index indicating the number of similar elements already present.

This change allows unlimited nesting without exceeding name length restrictions. To further enhance clarity on the purpose and identification of elements, a new "description" property was introduced. This property provides a meaningful description, making it easier to reference these elements directly in the program.

In parallel, continued development of the TabControl included the crea...
#MQL5 #MT5 #Algorithm #WinForms

Read more...
πŸ‘44❀14πŸ‘Œ9πŸ‘¨β€πŸ’»7πŸ†4πŸŽ‰2πŸ‘€2
Refine your MetaTrader 5 algorithmic trading library with improvements to graphical library classes that address mouse interaction issues and optimize color handling. The article discusses enhancements including new sorting properties for graphical elements and a restructured naming convention to prevent excessive name lengths that can lead to resource handling issues. It introduces the development of the TabControl WinForms object, outlining preparations for its full implementation. These adjustments cater to improved layout flexibility and performance, highlighting the significance of efficient UI interaction handling and clean system resource management, essential for both traders and developers refining their trading algorithms.
#MQL5 #MT5 #WinForms #GUI

Read more...
❀38πŸ‘28πŸ‘Œ4✍3😈2⚑1πŸ‘¨β€πŸ’»1
Creating a base class for WinForms object lists in your library enhances modularity and reusability. This class will encapsulate common functionalities needed for handling lists of WinForms objects, serving as a foundation for derived classes such as ListBox and ButtonListBox. By implementing this base object, you'll streamline future developments, ensuring a consistent structure and reducing redundancy.

Enhancements in library classes include making necessary adjustments in access controls for private methods to maintain functionality after recent client terminal updates. This involves refining inheritance and encapsulation practices to ensure seamless interaction with private methods through protected access.

The addition of new graphical element types and properties supports the comprehensive handling of UI elements. In the context of creating g...
#MQL5 #MT5 #WinForms #SoftwareDev

Read more...
❀46πŸ‘27πŸ‘¨β€πŸ’»10πŸ‘Œ4⚑1✍1
Organizing WinForms objects into independent groups enhances flexibility and control within containers. Typically, objects like RadioButtons are interconnected, requiring management of group indices to allow separate toggle functions within the same container. Assigning group indices helps manage interaction rules. For instance, assigning a different group index to some RadioButtons enables them to function independently, avoiding the need for additional containers.

Enhancements in object properties, such as unique IDs for graphical elements, streamline access and identification. Each graphical element gains a unique ID, facilitating efficient management. The updated property assignment ensures the highest available ID is utilized, maintaining the robustness of object relationships.

Modifications also include improving control features of buttons a...
#MQL5 #MT5 #WinForms #Programming

Read more...
πŸ‘55❀21πŸ‘Œ3πŸ†3πŸ‘¨β€πŸ’»2
Explore how to enhance MetaTrader 5 WinForms objects with interactive and animated features to create a more dynamic trading interface. The latest update enables mouse interactivity, allowing GUI elements like buttons to respond visually to user actions. By tracking mouse events and states, elements can adjust their appearance based on user interactionβ€”such as changing color on hover or press. This functionality adheres to typical Windows OS behavior, providing a seamless user experience. Developers are guided through adding new properties, managing event handling, and modifying graphical object behavior to support real-time user interaction, enabling more complex algorithmic trading solutions.
#MQL5 #MT5 #WinForms #UIProgramming

Read more...
πŸ‘55❀28πŸ†14πŸ‘Œ6πŸ‘¨β€πŸ’»4✍3
Significant improvements are underway in WinForms objects for enhanced library cohesion. Adjustments to method names and property structures are aligning with a unified method, streamlining graphical object developers' workflows. Each WinForms object now uniformly manages integer, real, and string properties, with flags indicating unsupported features.

Interactive capacity sees advancement with elements like buttons and radio buttons being created. Mouse interactions are enhanced by recognizing cursor positions and responding with events.

Library classes are refined, with default control values updated. Integration of new graphical properties and sorting criteria expands capabilities. Methods for property saving and restoration are in development stages, ensuring robust object management across application sessions.

Methodological consistency is ac...
#MQL5 #MT5 #WinForms #DevLibrary

Read more...
❀42πŸ‘32πŸ†7πŸ‘¨β€πŸ’»6πŸ‘Œ1
Creating specialized WinForms objects in a library requires structuring categories similar to MS Visual Studio. Standard controls, containers, and other elements should inherit from a shared base object, CWinFormBase, to ensure consistent attributes and methods. Developing a GroupBox within the containers category and a CheckBox in standard controls facilitates identifying shared properties necessitating a common class for each category to streamline code development for future objects.

Incorporating macro substitutions for default properties upon object creation and refining enum lists to reflect categories supports library enhancement. GroupBox, designed to visually group objects, incorporates a frame, while CheckBox, inheriting from the Label object, allows states like checked, unchecked, or undefined using a label. Future implementations will conside...

πŸ‘‰ Read | NeuroBook | Share!

#MQL5 #MT5 #WinForms
πŸ‘45❀26✍7⚑6πŸ‘Œ3πŸ‘¨β€πŸ’»3πŸ’”2
Explore the latest advancements in panel object management for MetaTrader 5! Delve into enhanced auto-resizing techniques for container-bound objects, ensuring a seamless display without disruptive visual effects. Discover improved batch handling that optimizes size adjustments only after the final object placement, effectively reducing flickers. Learn about new functionality added to WinForms objects and the Symbol library, facilitating advanced sorting and selection capabilities. Streamline graphical object interactions with robust methods for managing properties, enabling precise visual configurations in Expert Advisors. Elevate your algorithmic trading setup with these refined techniques for robust and efficient software development.

πŸ‘‰ Read | Signals | Share!

#MQL5 #MT5 #WinForms
πŸ‘13❀3πŸ‘¨β€πŸ’»2⚑1πŸ‘Œ1πŸ’”1
To enhance the functionality of our WinForms library objects, the implementation begins with creating a new base class that will serve as a blueprint for all subsequent WinForms objects. This foundational class will streamline properties inherited across multiple components, eliminating redundancy in property application.

This base class will be derived from the broader form object class that already handles mouse interactions effectively. Implementing the AutoSize and AutoSizeMode for panel objects involves ensuring the size of the container dynamically adjusts to accommodate objects without overlap. This is critical, especially when objects are docked and aligned in sequence, requiring accurate resizing of the panel.

We optimized object handling by pre-arranging elements within the panel structure before rendering, ensuring smooth transitions and ...

πŸ‘‰ Read | Calendar | Share!

#MQL5 #MT5 #WinForms
πŸ‘40❀25πŸ‘Œ5πŸ‘¨β€πŸ’»4πŸŽ‰3⚑1πŸ”₯1
This article examines the functionality of the WinForms Panel control, focusing on its Padding and Dock properties. WinForms Panel serves as a container for positioning other objects, allowing the specification of binding methods upon creation within the container. There are six Dock property settings that determine object placement within a container's borders, each considering the container's Padding value to define object distance from the border.

The approach involves introducing an underlay object to manage object placement within the panel effectively, facilitating convenient arrangement and drawing on the canvas, thereby eliminating the need for recalculating coordinates and sizes. Further details include creating various form object styles and managing gradient fills, improving class functionality, and augmenting library classes through enhanced ...

πŸ‘‰ Read | Docs | Share!

#MQL5 #MT5 #WinForms
πŸ‘52❀33⚑6πŸ‘¨β€πŸ’»4πŸŽ‰2πŸ†2