Compilation errors
-
Hello fxDreema. I'm having a problem to compile this my new project: https://fxdreema.com/shared/CByOLORKc
To find out, I'm building a strategy based on Donchian Channel indicator. If you want to verify that is correct, please do so.
......
donchian_channels.mq5 -
I think there is some bug when working with those ckeckboxes for input parameters. In the code it looks that "Extremes" is checked, but it's not in the block...
Nevermind, because this parameter is "weird". Sometimes they define something like custom data types inside custom indicators (also in EAs, in any MQL5 code), and this is what happens with that particular indicator. "Applied_Extrem" is not a valid datatype from the EA standpoint, also there is no constant HIGH_LOW defined in it. These are defined inside the indicator, but the EA does not care. The EA can only read indicator buffers, nothing more from the code of the indicator. Well, HIGH_LOW is some numeric value for sure, so you can use that value instead HIGH_LOW. And use "int" datatype instead of "Applied_Extrem". Somewhere on the top of the .mq5 file of this indicator you should find information about "Applied_Extrem"
-
I saw the code, and from what I understand, this enumeration.
//+-----------------------------------+ //| Enumeration declaration | //+-----------------------------------+ enum Applied_Extrem //Type of extreme points { HIGH_LOW, HIGH_LOW_OPEN, HIGH_LOW_CLOSE, OPEN_HIGH_LOW, CLOSE_HIGH_LOW };And now, what do I do?
-
HIGH_LOW equals to 0, HIGH_LOW_OPEN is 1, then 2, 3 and 4. But the EA can't see and use these constants. The same can be defined in the EA, but this is another story. Just define that parameter as "int" and give it values between 0 and 4.
Here is more about Enumerations: http://docs.mql4.com/basis/types/integer/enumeration
-
I did what you told me, but I continue with compilation errors.
https://fxdreema.com/shared/FuNkkrD5e

......
Compilation errors.PNG -
Look parameters in Buy now and Sell now blocks
-
Ok Thank you. FxDreema. I see now that was my fault. Now I can generate the EA. But I'm having trouble running the strategy. I tried some ways, but could not.
I'll be creating a new post for this project.
-
So you are having troubles working with fxDreema. Do you have some ideas and recommendations of how some things can be done? Things that does not exists already?
-
__HIGH_LOW equals to 0, HIGH_LOW_OPEN is 1, then 2, 3 and 4. But the EA can't see and use these constants. The same can be defined in the EA, but this is another story. Just define that parameter as "int" and give it values between 0 and 4.
[/quote:3iv2ab69]
How can I define in the EA? Managed to put these constants in external imput and how I do in code?
https://fxdreema.com/shared/MR01O6Hyc -
Just use int values from 0 to 4 for the input called Extremes
-
Yes. Put the enum Applied_Extern, and it worked.
But I don't know why also appears in visual test the HIGH_LOW enum.
See the code
......
TCF DC MM v1.3.mq5 -
https://fxdreema.com/shared/RDHu1LKdd
This is the result (that red line): http://prntscr.com/7dmv6jIf you want to use this enum, it's fine to put it into the EA as you did. Then you can also use the same data type for the indicator that is added in fxDreema - not int, but Applied_Extern. Now you have it with int: http://prntscr.com/7dmvvz
-
The Applied_Extern worked on the visual test, but to optimize don't. What is the problem?
-
Is it this or it's something else... because some things are disabled when optimizing, like working with objects or timer events. This is one of the things where I can't say what is the problem and as I can only guess, then I think that TeamViewer can make things faster

-
Hello friend. I'd like to, but as I don't speak English, but with a translator will be hard to our communication.
You could check in the code in which posted?
I'll be very grateful for that.
-
I think that it works for me.
This is how it looks when backtesting
http://prntscr.com/7fd3s1This is for Visual backtest (it's too slow for me to wait for all trades, to here is the first one only)
http://prntscr.com/7fd4bgAnd when optimizing
http://prntscr.com/7fd239
http://prntscr.com/7fd28c
http://prntscr.com/7fd2cx
http://prntscr.com/7fd2j5 -
You saw that in Visual Test he's still like 2 lines. How do I fix it? I want you to stay with only the currently selected Applied_Extern.
-
Most of the time I don't know what you are asking me. Here is a little tool that does amazing things: https://app.prntscr.com/en/index.html
-
Cool this site. I will be giving a sneak peak.
Here's the image:
I see the 2 lines is actually a shift, I don't know why that. Not working Applied_Extern features.
......
2 Lines.PNG