in your case it worked out only 2 of 3 lines, I adapted it to the task at hand and it turns out that the first line stay (as it should) and the level of the other two (red and blue) with the given conditions ( instead of red and blue line was a single line - and it was red ifRSI2>RSI3 and blue ifRSI2<RSI3) become straight and only red like it doesn't know it is RSI I attach a screenshot.
Andrey Kipyatkov #: in your case, it turns out that only 2 of the 3 lines, I adapted it to the problem, and it turns out that the first line stay (as it should) and the level of the other two (red and blue) with given conditions ( instead of a red and blue line was a single line - and it was red ifRSI2>RSI3 and blue ifRSI2<RSI3) become straight and only red like it doesn't know it is RSI I attach a screenshot.
Andrey Kipyatkov #: in your case it worked out only 2 of 3 lines, I adapted it to the task at hand and it turns out that the first line stay (as it should) and the level of the other two (red and blue) with the given conditions ( instead of red and blue line was a single line - and it was red ifRSI2>RSI3 and blue ifRSI2<RSI3) become straight and only red like it doesn't know it is RSI I attach a screenshot.
Thanks for helping with the code but if it's not difficult I'd like to understand the point. When you write everything in one line you:
Buf0[i] = iRSI(NULL,0,D10,0,i); - you specify in this string that zero array is a rsy line with the parameter given above
if(iRSI(NULL,0,D11,0,i)>iRSI(NULL,0,D12,0,i)) then you are saying that Rsai with parameter D11 >D12
Buf1[i] = Buf0[i]; and then you match (superimpose one line over the other) psi with parameter D11 and D10
else
Buf1[i] = EMPTY_VALUE; and you tell it not to render xy with parameter D11. but when you work with 3 lines
Buf0[i] = iRSI(NULL,0,D10,0,i); you say how to draw 1
line Buf1[i] = (iRSI(NULL,0,D11,0,i)+iRSI(NULL,0,D12,0,i))/2; next you add and divide by 2 2 and 3 - This action is not very clear to me because before you were equating arrays and superimposing one line over the other why this syntax.
if(iRSI(NULL,0,D11,0,i)>iRSI(NULL,0,D12,0,i)) then you repeat the example you say that Rsai with parameterD11>D12
Buf2[i] = Buf1[i]; and you equate
the
3rd and 2nd
lines
else
Buf2[i] = EMPTY_VALUE; and say not to draw the second line
I see correctly how you give the language "parameters" and why in the second case you added arrays and divided by 2
I thank you for your help with the code, but if it's not too much trouble, I'd like to understand the gist of it. When you write everything in one line you:
Andrew, let's first define your condition from the first post
I wanted to clarify whether there is a way to prescribe in the code instead of a red and blue line (RSI2 and RSI3 in the picture (attached as well), respectively) was one line - and it was red if RSI2>RSI3 and blue if RSI2 < RSI3
so, instead of red and blue one - we get the average of these lines, i.e.
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.
Yes, of course. First: 0, last: OrdersTotal()-1
Ah, there's an array, really from scratch...
I attach a screenshot.
in your case, it turns out that only 2 of the 3 lines, I adapted it to the problem, and it turns out that the first line stay (as it should) and the level of the other two (red and blue) with given conditions ( instead of a red and blue line was a single line - and it was red ifRSI2>RSI3 and blue ifRSI2<RSI3) become straight and only red like it doesn't know it is RSI
I attach a screenshot.
How do you equalise Buf1 and Buf2?
In your condition they are 0!
in your case it worked out only 2 of 3 lines, I adapted it to the task at hand and it turns out that the first line stay (as it should) and the level of the other two (red and blue) with the given conditions ( instead of red and blue line was a single line - and it was red ifRSI2>RSI3 and blue ifRSI2<RSI3) become straight and only red like it doesn't know it is RSI
I attach a screenshot.
Hi all, can you please tell me the difference between a trading robot and a trading advisor?
but when you work with 3 lines
I see correctly how you give the language "parameters" and why in the second case you added arrays and divided by 2
It's the same thing... play on words
A play on words.
From the next branch. Without colluding...
Andrew, let's first define your condition from the first post
so, instead of red and blue one - we get the average of these lines, i.e.
and this line, by default, has red colour.
Further, when the condition is met
we do not change the line colour as it cannot be done in MT4,
we take and overlay another line with another colour