[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 976
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
Choose the right one.
It's working!!! It's just that I was finding a lot of unnecessary stuff, and I don't know how to weed out the unnecessary stuff.
Thank you!
and can the first arrow be found and then exit the loop?
Which one is it? Either one? Or both, but only the first?
If any first arrow is needed, then exit the loop when it is found, but if both arrows are needed, then the loop, or rather the search within the loop, needs to be rewritten.
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 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 break the loop and return will be needed only if it is a function, and it will return the value of the arrow buffer found, not the number of the bar this arrow is on.
oops...so i wrote it right ?
I don't need the bar number.
I need any of the very first arrow and that value to remember .
About return....This value in brackets will be the arrow ? (Can this value be seen, felt, touched somehow? Or is it simple as there is a voltage in the socket or there is none ? That is zero and one ?)
Regarding my code, I want to further clarify syntax
for (int i=0; i<Bars(); i++)
{
signal = iCustom (NULL,0 and so on... up arrow buffer )
// here we should also add a buffer check for both the up-arrow and the down-arrow as you do ?
signal2=iCustom (NULL,0 and so on... down arrow buffer )
// and here we still need to arrange a check if (signal || signal2>0) to remember the value and exit the loop.
Geez...something got me confused... how to output in return if we have signal and signal2 what to output from them if it turns out to be more than zero ???
{ // this is where brackets are needed ???
return(signal)
}
break
}What is the order of substitution of bars instead of i in iCustom
And what is the order of substitution of bars instead of i in iCustom
So I wanted to ask, is the value for the up and down arrow on the selected bar calculated at the same time
?The indicator, if it draws arrows through a buffer, can only output different arrows with different buffers. Therefore, the up arrow is output by one buffer, the down arrow by another. In order to detect and find both arrows, both buffers must be checked.
In the loop, at the very beginning, the values at the 0th bar are checked at i=0; at the next iteration of the loop, the first bar is checked at i=1, then the second, third, and so on, until i=nBars-1
In the loop, the values of both buffers are checked at each iteration of the loop.
Will such a construction with GlobalFlag signed and Break operator work?
But before that, in the block where variables are initialized, should this variable be initialized as well ? And give int type to ?????
Anyway. I have an idea for a robot. I can't write the program myself, but if you're interested, let me know.
Anyway. I have an idea for a robot. I can't write the program myself, of course. If you're interested, whistle.
Do you think you'll get whistled at? More like booing... :)
Throw the idea out there and see if people will come around (if the idea is good) ... And for an agreed fee may even be a little more active ... :)
Anyway. I have an idea for a robot. I can't write the program myself, but if you're interested, let me know.