Questions from Beginners MQL5 MT5 MetaTrader 5 - page 472

 
Artyom Trishkin:
What's the problem then? I take it you don't like the visual inconsistency of the lines in the different windows. Press Ctrl+D, move the mouse over the indicator lines, and look in the data window to see if the values match...
The values match. What is not satisfactory is that the same curves in different windows are mutually arranged differently. In one window, the red line is higher than the green one and lower in the other one, etc. The trade signal is exactly that - fast one is higher than the slow one, then we open and close below it. I was told in another thread that only one indicator displaying three lines at once gives correct mutual positioning.
 
Mike:
Make a positive array index from a negative Variant.
So we need to make it a negative value....
 
-Aleks-:

I did it as you wrote, but it doesn't work as it should - I don't know what's wrong yet - I need to print....

I do not understand about the string.

else           Fibo = -arrFibo[-Variant];

So what do we get, that we're asking for the minus index of the array or what?

I must have put a minus in my head and now I can't understand it :)))

else           Fibo = -arrFibo[Variant];
Do it this way.
 
Mike:
The values are the same. The problem is that the same curves in different windows are arranged differently. In one window the red line is higher than the green one, while in another one it is lower, etc. The trade signal is exactly that - fast one is higher than the slow one, then we open and close below it. I was told in another thread that only one indicator displaying three lines at once gives correct mutual positioning.
If you'd give me your MA which is in a separate window (?) - I'd like to take a look at the problem. Not the one with three lines, but the one with only one buffer, but the indicator in its own window.
 
Artyom Trishkin:
Could you give me your MA which is in a separate window(?) - to see what your problem is. Not the one with three lines, but the one with only one buffer, but the indicator in its own window.
Artem, thanks for your participation. :) I have sent the text of the indicator in my personal message.
 

Could you please tell me how to combine the same EA together in the code?

the easiest way to copy code text

 
Sergey Baboshin:

Could you please tell me how to combine the same EA together in the code?

the easiest way to copy code text

Why merge two EAs of the same type together?
 
Mike:
In case Variant is negative, expression -Variant gives positive index for sampling from array.
In the same case we need negative Fibo values, so -arrFibo.

It all worked - there was my bug!

Rate increment 0.07% :)

 
-Aleks-:

It's working - it was my fault!

Speed increase 0.07% :)

I didn't give advice because of the speed. I was just aesthetically challenged by your code. :)
 
Mike:
I didn't give the advice because of the speed. I was just aesthetically challenged by your code. :)
Thanks for the wise advice - I can use a similar design in the future.
Reason: