News Trading Risk Profiles and OOP Design in MQL5
Summary
This installment of a news-trading series revises an earlier MQL5 economic-calendar database project. It describes using object-oriented inheritance to organize country-specific news data, with a shared base class for event details and derived classes for individual countries. The examples explain public, private, and protected access, and show how subclasses can extend shared data handling.
The article also introduces configurable risk profiles for traders with different risk preferences and connects them to position volume, with the selected lot size and risk option displayed by an expert advisor. Its context includes storing calendar events and adjusting event times for broker daylight-saving schedules so historical testing can use aligned timestamps. The available text does not fully show the risk calculations, define the profiles in detail, or provide performance evidence. It therefore explains software structure and the intended risk controls more clearly than it demonstrates the effectiveness of a news-trading strategy.
Key ideas
- A shared news-data base class can hold event fields and behavior for country-specific derived classes.
- Public, private, and protected access settings determine which class members subclasses and objects can use.
- The project aims to store economic-calendar events with broker daylight-saving adjustments for historical testing.
- The expert advisor offers configurable risk options and displays the resulting position volume.
- The available description does not provide enough detail to assess the risk formulas or trading performance.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.