[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 975
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
Yes, I understand about the indicator buffers.
But how to put in a loop to check this buffer?
Well, yes, I understand about the indicator buffers.
But how to put it into a loop to check this buffer? How about this?
for (int i=0; i<Bars(); i++)
{
signal = iCustom (NULL,0 etc. )
if (signal>0)
return(signal)
break
}
Somewhat like this.
This code will not do anything useful - each time the arrow is found in the loop, it will assign to the variables BarWithArrowUP and BarWithArrowDN the number of the bar where the arrow is found. It is up to you to decide how to handle them. You can create an array where you will save the bars with arrows up and down, and then take numbers of the bars with arrows from this array; or you can, or you can, whatever you want... :)
Your code will find the very first arrow from the beginning of the loop. break will interrupt the loop, while return is needed only if it is a function and will return the value of the found arrow buffer to you, not the number of the bar where this arrow stands.
What a mess... :) If you know which buffer to take data from, then arrange a loop through this buffer from the current bar deep into the history and if the buffer has a non-zero value - then the arrow...
0 and 1 indicator buffers are used to draw the arrows.
If you look at the figure, there are no arrows between points A and B, then I wonder if there will be nothing in the buffers either .Will there be zero?
And the last buffer value is saved?
0 and 1 indicator buffers are used to draw the arrows.
If you look at the figure, there are no arrows between points A and B, then I wonder if there will be nothing in the buffers either .Will there be zero?
Is the last buffer value saved?
Dear experts. Could you please suggest a function that shows only the breakeven level for market orders of the same type?
Dear experts. Could you please suggest a function that shows only the breakeven level for market orders of the same type?
Somewhere like this...
This code won't do anything useful - every time an arrow is found in the loop, it will assign the BarWithArrowUP and BarWithArrowDN variables the number of the bar where the arrow is found. It is up to you to decide how to handle them. You can create an array where you will save the bars with arrows up and down, and then take the numbers of arrow bars from these arrow arrays, or you can, or you can, whatever you want... :)
Thanks !
Or, can you find the first arrow and then exit the loop?
Is your site search not working???
It works!!! Only that I found a lot of unnecessary stuff, and I don't know how to sift it out.
It's working!!! Only that I found a lot of unnecessary things, and I don't know how to sift out the unnecessary things.
THANKS to the title of the thread, I might add "Nowhere with you either".