Questions from Beginners MQL4 MT4 MetaTrader 4 - page 227
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi, the problem is probably not the zero crossing but the crossing from one buffer to another. At one bar the signal ends and at the next bar the signal is already in another buffer, what colour would you like to see between the two adjacent bars? It is not clear.
If you want to make a third buffer with a yellow line and put it under these two, it would be beautiful!
Hi, the problem is probably not the zero crossing but the crossing from one buffer to another. At one bar the signal ends and at the next bar the signal is already in another buffer, what colour would you like to see between the two adjacent bars? It is not clear.
If you want, make a third buffer with a yellow line and put it under these two, it will be beautiful!
Alexey, thanks for the help.
I don't need three colours, two is quite enough. I would like the empty spaces to be drawn with a line of the previous colour. I do not understand what you mean by " On one bar the signal is over, and on the next bar the signal is in a different buffer". At each bar, there is a value in one of the buffers, so it should also be displayed on the chart, or am I missing something?
Well look, time is discrete on the chart, the minimum unit is 1 bar. That is, there is no partial time between bars, as it were. If you replace the rendering with a bar chart, you have two bars - two bars of different colours. But there is nothing between them. And the line is drawn in such a way (such a property is made) that it connects values of the same buffer, but not different ones. That's why there are holes.
If you want it for beauty, then you can try giving the end values overlapping on both buffers. You signal to the new buffer, but still signal to the old one bar.
But if you then take the signal from such indicator into Expert Advisor, it will be inaccurate.
Or a histogram is a good option without any extra hassle. I vote for the bar chart.
Alexei, thank you for your help.
I don't need three colours, two is quite enough. I would like the empty spaces to be drawn with a line of the previous colour. I don't understand what you mean by " At one bar the signal ends, and at the next bar the signal is already in another buffer". At each bar, there is a value in one of the buffers, it means that it should be displayed on the chart, or am I missing something?
leave one buffer without conditions and overlay the second one with conditions on the first one
Well look, time is discrete on the chart, the minimum unit is 1 bar. That is, there is no partial time between bars, as it were. If you replace the rendering with a bar chart, you have two bars - two bars of different colours. But there is nothing between them. And the line is drawn in such a way (such a property is made) that it connects values of the same buffer, but not different ones. That's why there are holes.
If you want it for beauty, then you can try giving the end values overlapping on both buffers. You signal to the new buffer, but still signal to the old one bar.
But if you then take the signal from such indicator into Expert Advisor, it will be inaccurate.
Or a histogram is a good option without any extra hassle. I vote for the bar chart.
My sincere thanks Aleksey.
Now even my head is all sorted out. I could have done it myself, but not as short and elegant as Yuri's subsequent advice.
leave one buffer unconditional, and overlay the second with conditions on the first
Hats off to you, Yuri.
Such an elegant and concise solution I couldn't have imagined.
Hats off to you, Yuri.
I couldn't have imagined such an elegant and concise solution.
it was not my idea, here on the forum, just like you found out
there are a lot of solutions in the code base, and not only that
Thanks for the thanks!
Why do my questions keep getting ignored?
depends on the questions...