[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 977

 
tuma88:

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 to give int type to ?????


I don't understand what you want to achieve ... To find the first occurrence of both arrows and memorize their values? Or what?

Well, try it:

double DataIndUP, DataIndDN;
int    i, BarWithArrowUP, BarWithArrowDN, 
       nBars = 250 ;  // nBars = количество проверяемых баров вглубь истории
bool   FindArrowUP = false,
       FindArrowDN = false;  

for (i=0; i<nBars; i++) {
   DataIndUP = iCustom(Symbol(),Period(),"Имя индюшонка", через запятую все параметры индюка , номер буфера стрелки вверх, i)
   DataIndDN = iCustom(Symbol(),Period(),"Имя индюшонка", через запятую все параметры индюка , номер буфера стрелки вниз, i)
   if (DataIndUP !=EMPTY_VALUE)                             // Если найдена стрелка вверх
   if (!FindArrowUP) {                                      // Если это её первое вхождение с начала цикла
      BarWithArrowUP=iBarShift(Symbol(),Period(),Time[i]);  // найдём бар со стрелкой вверх
      FindArrowUP = true;                                   // Ставим флаг, что стрелочку вверх уже нашли одну
      }
   if (DataIndDN !=EMPTY_VALUE)                             // Если найдена стрелка вниз
      BarWithArrowDN=iBarShift(Symbol(),Period(),Time[i]);  // найден бар со стрелкой вниз
   if (!FindArrowDN) {                                      // Если это её первое вхождение с начала цикла
      BarWithArrowDN=iBarShift(Symbol(),Period(),Time[i]);  // найдём бар со стрелкой вниз
      FindArrowDN = true;                                   // Ставим флаг, что стрелочку вниз уже нашли одну
      }
   }

... After the loop is executed, the variables BarWithArrowUP and BarWithArrowDN will contain bar numbers with the first arrows up and down that were found closest to the current bar.

Before doing the next search don't forget to reset flags FindArrowUP and FindArrowDN to false

But such code is better to execute as a function and call it when it is necessary to search for next nearest arrows.

 
tuma88:
and are you successful with your hands using this algorithm?

I don't have enough speed with my hands.
 
artmedia70:

Do you think you'll be 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 bit more active ... :)


Are there a lot of people like me with ideas?
 
Tupen:

that there are a lot of people like me with ideas?
Ideas swarm around in everybody's head like flies... The main thing is to know how to separate the flies from the cutlets...
 
artmedia70:
Ideas swarm around in everybody's head like flies... The main thing is to know how to separate the flies from the cutlets...

Tell me where to write. I'll try to make my point.
 
Tupen:

Tell me where to write. I'll try to make a point.
♪ write it right here ♪
 
Hello Ladies! Help me make the following: build an indicator for MT4: a simple three-period moving average
from Highs and Lows, applied to the chart using the method,
"sum the High (or Low) of the last three days, divide the sum by three and apply
the resulting indicator to the chart, shifting it one day ahead". This miracle should look like the one in the attachment.
 
Techno:
write directly here

)) in case it's bullshit. at least someone will laugh.
 
Tupen:

)) in case it's bullshit. At least one of us will laugh.
Every third person writes nonsense here, you're anonymous anyway, what have you got to lose? We'll appreciate the idea
 
Techno:
Every third person here writes nonsense, you're anonymous anyway, what have you got to lose?

i'm afraid))) what if it's a good idea and it won't come back to me
Reason: