Discussion of article "Library for easy and quick development of MetaTrader programs (part XVIII): Interactivity of account and any other library objects"

 

New article Library for easy and quick development of MetaTrader programs (part XVIII): Interactivity of account and any other library objects has been published:

The article arranges the work of an account object on a new base object of all library objects, improves the CBaseObj base object and tests setting tracked parameters, as well as receiving events for any library objects.

Compile the EA, set zero values in the tester settings for the StopLoss in points and TakeProfit in points parameters. For the Mode of used symbols list parameter, select "Work only with the current symbol" and launch the M15 Last month visual EA test:


Before launching the test, we can see that the journal features the specified values for tracked symbol and account properties. During the visual testing, the messages about obtained events from the properties whose changes we are tracking are displayed in the journal. If the increase in the funds exceeds the controlled value, profitable positions are closed.

Thus, we have created the base object for all library objects, which provides its descendants with the event functionality and the methods for setting and receiving tracking parameters for any properties of any object at any time.
Going forward, this will greatly simplify the development of new classes for new objects.

Author: Artyom Trishkin

Artyom Trishkin
Artyom Trishkin
  • www.mql5.com
Trader's profile
 

Hello Artyom - I need a suggestion for overcoming an apparent limitation in DoEasy library... I am looking at the mechanism that allows to trigger events upon price reaching a specific level with e.g. CSymbol::SetControlBidLevel()or increasing/decreasing by a certain number of points with e.g. CSymbol::SetControlBidInc() and CSymbol::SetControlBidDec() -- it seems to me that, at any given point in time, I can only set one bid price level (or increase/decrease) per symbol. Is my understanding correct here?

If I have a multi-symbol, multi-timeframe EA that needs to control for events at multiple values (for level/increase/decrease) for the same symbol i.e. because of different timeframes, is there a simple and elegant way to do it with this library?

 
Dima Diall :

Hello Artyom - I need a suggestion for overcoming an apparent limitation in DoEasy library... I am looking at the mechanism that allows to trigger events upon price reaching a specific level with e.g. CSymbol::SetControlBidLevel()or increasing/decreasing by a certain number of points with e.g.  CSymbol::SetControlBidInc() and CSymbol::SetControlBidDec()  -- it seems to me that, at any given point in time, I can only set one bid price level (or increase/decrease) per symbol. Is my understanding correct here?

If I have a multi-symbol, multi-timeframe EA that needs to control for events at multiple values (for level/increase/decrease) for the same symbol i.e. because of different timeframes, is there a simple and elegant way to do it with this library?

Thanks for the suggestion. I'll see how this can be implemented.

 
Artyom Trishkin:

Thanks for the suggestion. I'll see how this can be implemented.

Great! Can you help me to think of a workaround I could try for now with the current DoEasy implementation?

Reason: