Discussion of article "An attempt at developing an EA constructor" - page 4

 
Can you please tell me, are the files Trading_engine_4.mq5 and Indicators_Code.mq5, attached to this article, and files with the same names, posted by you in CodeBase, are identical or are there differences?
 
Verner999 #:
Can you please tell me, are the files Trading_engine_4.mq5 and Indicators_Code.mq5, attached to this article, and the files with the same names, posted by you in CodeBase, are identical or are there differences?

In CodeBase the versions are updated.

 
Vladimir Karputov #:

In CodeBase, versions are updated.

Got it. Thank you!

 
Good afternoon I am trying to understand the work of iDEMA_Full_EA. The Trailing() function does not modify the position and generates code 1. I tried it on two laptops....
Files:
 
gorbish modify the position and generates code 1. I tried it on two laptops....

Please insert the code correctly: after pressing the Code button, a pop-up window will appear - insert the code into this window.

 
gorbish modify the position and generates code 1. I tried it on two laptops...

Just checked: demo account, HEDGE. The parameters of the Expert Advisor are taken by default. SELL position modification was successful.

2022.02.18 11:28:07.824 2021.01.13 15:00:00   Deal ticket: 6, Order ticket: 6, Order retcode external: 0, Volume of deal or order: 0.01
2022.02.18 11:28:07.824 2021.01.13 15:00:00   Price, confirmed by broker: 1.21730, Current bid price: 1.21730 (the requote): 1.21730, Current ask price: 1.21731 (the requote): 1.21731
2022.02.18 11:28:07.824 2021.01.13 15:00:00   Broker comment: Request executed
2022.02.18 11:28:07.824 2021.01.13 15:00:00   OnTradeTransaction Transaction confirmed
2022.02.18 11:28:07.826 2021.01.13 15:37:36   stop loss triggered #5  sell 0.01 EURUSD 1.21629 sl: 1.21779 tp: 1.21169 [#7  buy 0.01 EURUSD at 1.21779]
2022.02.18 11:28:07.826 2021.01.13 15:37:36   deal #7  buy 0.01 EURUSD at 1.21779 done (based on order #7)
2022.02.18 11:28:07.826 2021.01.13 15:37:36   deal performed [#7  buy 0.01 EURUSD at 1.21779]
2022.02.18 11:28:07.826 2021.01.13 15:37:36   order performed buy 0.01 at 1.21779 [#7  buy 0.01 EURUSD at 1.21779]
2022.02.18 11:28:07.840 2021.01.13 18:00:00   position modified [#3  sell 0.01 EURUSD 1.21896 sl: 1.21846 tp: 1.21436]
2022.02.18 11:28:07.842 2021.01.13 18:00:00   CTrade::OrderSend: modify position #3  EURUSD (sl: 1.21846, tp: 1.21436) [done]

Just in case of tester settings


 

Hello, I'm running iDEMA_Full_EA_Pending, in the settings the Positions: Only one parameter is set to true ( only one position is allowed in the market), but on EURUSD, m5, demo account, hedge, several positions are opened. Maybe I have set the parameters wrong?

Files:
1.jpg  71 kb
3.jpg  283 kb
 

Hello @Vladimir Karputov -- this is a really good repository of best practices to increase reliability for handling market and pending orders in an EA... It serves as a very good source of inspiration, and I will certainly steal some great ideas you implemented here!

Having said that, I find the codebase a bit too "monolithic" for my personal taste, as I usually prefer a more modular approaches for my own use. Regardless, your EA framework will certainly be very useful to quickly create prototypes for testing new strategy ideas without investing too much time with multiple files, etc... That's really awesome for increasing productivity.

Since about version 2.XXX, I started maintaining two development branches  the normal procedural code and the code in the form of a class (the main objective of the class is implementing multicurrency EAs).

You mention an class-based version of your framework, but I couldn't find it in the attached code -- am I missing something or where can I find that? When testing a new idea, I prefer to operate across multiple symbols simultaneously, so I'd be very grateful if you can point me in the right direction to download those files.

 

Good afternoon, Vladimir. I am studying the article with interest. I was interested in the following phrase of your article:

"I started to lead two branches of constructor development - usual procedural code, and code in the form of a class (the main task of the class is to implement multicurrency experts)."

In the attached files I saw the use of standard classes, but I didn't find "code as a class" for use in multicurrency EAs. Is it located in another article? Perhaps, as a beginner and inexperienced, I have not figured it out. Could you please tell me where I can see the structure of a class-based programme for a multicurrency Expert Advisor? In the articles I find only procedural approach.

 

Do I understand correctly that construction here means adding/modifying/deleting code (i.e. not from scratch, but from scratch)?

Also, signals often require several indicators. Are there any similar examples created with the help of this constructor?