Discussion of article "Plotting trend lines based on fractals using MQL4 and MQL5" - page 2

 
Roman Kornev:
Greetings, please tell me how to put an Expert Advisor in mt4. I downloaded the file trendlines.mq4 compiled it and sent it together with the source code to the folder mql4/Indicators, reloaded the terminal, I try to attach the indicator to the chart - no reaction. What am I doing wrong?

Error: "... sent to the mql4/Indicators folder...", so after downloading the code editor MetaEditor is automatically opened, which automatically places the programme in the necessary directory. And after compilation you don't need to "send" anyone anywhere.

Added: and in general - this is not an indicator, but an Expert Advisor!

 
Karputov Vladimir:

Error: "... sent to the folder mql4/Indicators...", so after downloading the code editor MetaEditor is automatically opened, which automatically places the programme in the necessary directory. And after compilation you don't need to "send" anyone anywhere.

Added: and in general - this is not an indicator, but an Expert Advisor!

Thanks. I opened its properties as an Expert Advisor and saw there only line style settings. That's why I thought it was an indicator. Moreover, it has not opened a single trade in the Euro tester for a month. Maybe I didn't read the article carefully, but I just decided to include it....
 
Roman Kornev:
Thank you. I opened its properties as an EA and saw only line style settings there. That's why I thought it was an indicator. Moreover, it has not opened a single trade in the euro tester for a month. Maybe I didn't read the article carefully, of course, I just decided to include it....
Hello, it (EA) does not open trades. The purpose of the article was not to write an EA that would open trades. I just provided a solution to automate the drawing of trend lines. Thank you for your time and attention to the article.
 

Good afternoon.

I ran the Expert Advisor on the MQL5 tester and it turned out that it redraws the line by changing only one point (fresher), the extremum number 2 in each of the lines remains unchanged. It turns out that if you do not overload the EA for a long time, the lines will not be relevant.

The code seems to provide a check for updating all extrema. I don't understand where the problem is.

 
Good night, please tell me if you have a solution for MT5, so that in the external parameters of the Expert Advisor you can change the number of bars to the left and right of the H/L extremum of the fractal. For example, so that the EA builds fractals according to the formula 4/2 (four bars before and two after the extremum)????
 
or at least 3/3, 4/4, ...
 
Hello! The search for extrema for building trend lines (TL) can be implemented in different ways, but there are situations when the line built in this way crosses neighbouring bars that do not form a fractal, or their price is insignificantly different from the price of the extremum (especially during a long flat period). Have you thought about ways to check the TL for such "falling out" bars? I mean, when the price between extrema is, for example, below the support TL, but it is above the price of the first LOW, on which the TL is built? In this case, it is more logical to use this "dropout" price to build the TL?
 
Fedot:
Hello! The search for extrema for building trend lines (TL) can be implemented in different ways, but there are situations when the line built in this way crosses neighbouring bars that do not form a fractal, or their price is insignificantly different from the price of the extremum (especially during a long flat period). Have you thought about ways to check the TL for such "falling out" bars? I mean, when the price between extrema is, for example, below the support TL, but it is above the price of the first LOW, on which the TL is built? In this case it is more logical to use this "falling" price to build the TL?

98% do not know how to build TLs even manually, let alone by software. In the article they are not built correctly either.

So your task is not solvable.

 
Fedot:
Hello! The search for extrema for building trend lines (TL) can be implemented in different ways, but there are situations when the line built in this way crosses neighbouring bars that do not form a fractal, or their price is insignificantly different from the price of the extremum (especially during a long flat period). Have you thought about ways to check the TL for such "falling out" bars? I mean, when the price between extrema is, for example, below the support TL, but it is above the price of the first LOW, on which the TL is built? In this case, it is more logical to use this "falling" price to build the TL?

The simplest and long-tested way is to take the segments formed by the ZigZag indicator as ready-made trend lines.

 
aleger:

The simplest and long-tested is to take the segments formed by the ZigZag indicator as ready-made trend lines.

But the zig-zag is built from the minimum to the maximum and, again, to the minimum. And the question is not how to find extrema, but how to build a TL that does not cross intermediate bars.