We want to improve the zigzag indicator (the same PZigzag :) Can you tell me how the first line can be rotated 180 degrees? That way you get a solid straight line, which actually consists of two lines. Half of it will be in the past and half in the future. That is, to turn the line N from the zero candle to N candles forward?
The first line has the coordinates 1. N (bar number) and Price (Close[N]) The second line has coordinates 2. N-per(seed) and Price2(Close[N-per])
To get the third point as a continuation of this line, you must to know the coordinates of the third point, which are 3. N-2*per and Price2(Close[N-per]) +DeltaPrice
DeltaPrice=Price2(Close[N-per])-Price (Close[N])
This is theory, the practice will be slightly different.
The first line has coordinates<br / translate="no"> 1. N (bar number) and Price (Close[N]) The second line has the coordinates 2. N-per(seed) and Price2(Close[N-per])
To get the third point as a continuation of this line, you must to know the coordinates of the third point, which are 3. N-2*per and Price2(Close[N-per]) +DeltaPrice
DeltaPrice=Price2(Close[N-per])-Price (Close[N])
This is theory, the practice will be slightly different.
Good academic explanation :) Could you add a shift by N candles to the right in the same code. Of course, maybe it's not very modest of me, but I hope you will find the idea interesting :)
Apparently, we don't understand each other. I don't understand what to shift. The easiest way to shift for a single buffer indicator is to add a second buffer in which you assign values to buffer2[i+N]=buffer1[i]. In doing so, suppress the output of the first buffer on the chart, and output the second buffer.
Apparently, we don't understand each other. I don't understand what to shift. <br / translate="no"> The easiest way to shift a single buffer indicator is to add a second buffer where you assign values to buffer2[i+N]=buffer1[i]. At the same time, suppress the output of the first buffer on the chart, and output the second one.
It is not just a shift, it is a 180-degree reverse of the first line itself. The picture shows the same first line, but rotated 180 degrees and highlighted in yellow.
Interesting link. I would like to discuss with you some issues of mathematical logic in an intimate atmosphere :) Which of your mailboxes can I use? You have our mailbox.
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.
Thanks for the help. It's behaving correctly now :)
1. N (bar number) and Price (Close[N])
The second line has coordinates
2. N-per(seed) and Price2(Close[N-per])
To get the third point as a continuation of this line, you must
to know the coordinates of the third point, which are
3. N-2*per and Price2(Close[N-per]) +DeltaPrice
DeltaPrice=Price2(Close[N-per])-Price (Close[N])
This is theory, the practice will be slightly different.
The second line has the coordinates
2. N-per(seed) and Price2(Close[N-per])
To get the third point as a continuation of this line, you must
to know the coordinates of the third point, which are
3. N-2*per and Price2(Close[N-per]) +DeltaPrice
DeltaPrice=Price2(Close[N-per])-Price (Close[N])
This is theory, the practice will be slightly different.
Good academic explanation :) Could you add a shift by N candles to the right in the same code. Of course, maybe it's not very modest of me, but I hope you will find the idea interesting :)
The easiest way to shift for a single buffer indicator is to add a second buffer in which you assign values to buffer2[i+N]=buffer1[i].
In doing so, suppress the output of the first buffer on the chart, and output the second buffer.
At the same time, suppress the output of the first buffer on the chart, and output the second one.
It is not just a shift, it is a 180-degree reverse of the first line itself. The picture shows the same first line, but rotated 180 degrees and highlighted in yellow.
Interesting link. I would like to discuss with you some issues of mathematical logic in an intimate atmosphere :) Which of your mailboxes can I use? You have our mailbox.