Reworked the script into a separate function. It doesn't want to work.
It can only work as a script that needs to be placed on the chart in the place where you want it to draw.
I would like the EA to draw the trend lines itself.
It's not difficult, if you look into the logic of the script. What is going on there? After all, the same should be done in the Expert Advisor. First, we calculate 2 coordinates for setting the line. Second, the trend line is an object. Therefore, in order to set this object on the chart, we need to use the ObjectCreate function. In fact, the MetaEditor's Help should help identify all functions that begin with the word Object - this will eliminate a lot of questions. Take a look here
I don't save objects, lines, channels, shapes and the like as soon as I switch to another timeframe, this was not the case before, and now I have to redraw it again with every switch. I don't know what to do with that, I just do not know how to do it.
I don't save objects, lines, channels, shapes and the like as soon as I switch to another timeframe, this was not the case before, and now I have to redraw it again with every switch. I have no such problems before, now I have to redraw it every time I move to another timeframe.
Do you have some kind of lame indicator or expert that cleans all the objects.
It is not difficult, if you look into the logic of the script. What is going on there? Well, the same thing must be done in the Expert Advisor. First, we calculate 2 coordinates for fixing the line. Second, the trend line is an object. Therefore, in order to set this object on the chart, we need to use the ObjectCreate function. In fact, the MetaEditor's Help should help identify all functions that begin with the word Object - this will eliminate a lot of questions. Take a look here
The difficulty is finding the points through which the line will later be drawn.
It is not difficult to draw lines when you can see these points. How do you "see" them programmatically?
It's not hard to draw lines when you see these points. How do you "see" them programmatically?
iHighest and iLowest to help you, and read the ZZ algorithm
ZS:not the easiest task, the code will be small, but the algorithm is complex, I can not find the code, but that's how I searched for a peak at High: High[iHighest(NULL,0,MODE_HIGH,i)
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
How do I draw a trend channel programmatically?
https://www.mql5.com/ru/code/9734
https://www.mql5.com/ru/code/9734
It turned out to be wrong.
Reworked the script into a separate function. It doesn't want to work.
It can only work as a script that needs to be thrown on the chart in the place where you want it to draw.
And I would like the EA to draw the trend lines itself.
It turned out to be wrong.
Reworked the script into a separate function. It doesn't want to work.
It can only work as a script that needs to be placed on the chart in the place where you want it to draw.
I would like the EA to draw the trend lines itself.
It's not difficult, if you look into the logic of the script. What is going on there? After all, the same should be done in the Expert Advisor. First, we calculate 2 coordinates for setting the line. Second, the trend line is an object. Therefore, in order to set this object on the chart, we need to use the ObjectCreate function. In fact, the MetaEditor's Help should help identify all functions that begin with the word Object - this will eliminate a lot of questions. Take a look here
I don't save objects, lines, channels, shapes and the like as soon as I switch to another timeframe, this was not the case before, and now I have to redraw it again with every switch. I don't know what to do with that, I just do not know how to do it.
I don't save objects, lines, channels, shapes and the like as soon as I switch to another timeframe, this was not the case before, and now I have to redraw it again with every switch. I have no such problems before, now I have to redraw it every time I move to another timeframe.
you have some kind of screwy indicator or expert that cleans all objects.
And how can this be fixed?
It is not difficult, if you look into the logic of the script. What is going on there? Well, the same thing must be done in the Expert Advisor. First, we calculate 2 coordinates for fixing the line. Second, the trend line is an object. Therefore, in order to set this object on the chart, we need to use the ObjectCreate function. In fact, the MetaEditor's Help should help identify all functions that begin with the word Object - this will eliminate a lot of questions. Take a look here
The difficulty is finding the points through which the line will later be drawn.
It is not difficult to draw lines when you can see these points. How do you "see" them programmatically?
It's not hard to draw lines when you see these points. How do you "see" them programmatically?
iHighest and iLowest to help you, and read the ZZ algorithm
ZS:not the easiest task, the code will be small, but the algorithm is complex, I can not find the code, but that's how I searched for a peak at High: High[iHighest(NULL,0,MODE_HIGH,i)