Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 779

 
volyal:

In that variant, after the first signalalerton ==false means that there will be no signal on the second date.

OK, it does not signal and it does not put an arrow. The ticks were in the specified interval

This construct is not logical - why would you need a loop if you don't know whether the condition will be fulfilled or not?

for(int i=limit; i>=0; i--) 
        {
        datetime t = TimeCurrent();
         if( (t >= Input1 && t < Input1 +60)  || ( t >= Input2 && t < Input2+60 ) || ( t >= Input3 && t < Input3+60) )
           {
            BufferUP[i]=low[i]-10*Point;//

            Alert("__",TimeCurrent());
           }
        }

It's the other way round.

datetime t = TimeCurrent();
if( (t >= Input1 && t < Input1 +60)  || ( t >= Input2 && t < Input2+60 ) || ( t >= Input3 && t < Input3+60) )
  {
  Alert("__",TimeCurrent());
  for(int i=limit; i>=0; i--) 
   {
    BufferUP[i]=low[i]-10*Point;//
   }
 }

Why isn't it beeping? I can't even guess. The conditions are clear and must work.

 
Igor Makanu:

This construction is not logical, why make a loop if you don't know if the condition will be fulfilled or not?

It's the other way round.

Why does it not signal? I cannot even guess that it does, the conditions must be clear

Thanks, it does, but it puts arrows on every bar in the history. I want it to put only those dates that are in the variables, for example, February 23 and March 5 at 23:55

input datetime Input1=D'23.02.2019 23:55';
input datetime Input2=D'05.03.2019 23:55';

Sorry for not saying so straight away.

 
volyal:

Thank you, it does, but it puts arrows on every bar in the history. I want it to put only the dates that are in the variables, e.g. February 23 and March 5 at 23:55

Sorry I didn't tell you right away.

You can search for dates using iBarShift() - it will return the bar number where you want to put the arrow

 
Igor Makanu:

dates should be searched with iBarShift() - it will return the number of the bar where you want to place the arrow

Thank you
 
Alexey Viktorov:
Thanks for the compliment, but you're too flattering. I graduated fifth grade in 1946. Were you born yet?

In sixty-six, we used to put the self-righteous ones in the toilets.

This is no place for self-promotion, and that's not what you consider your dignity. You'd be better off demonstrating your knowledge. You're all blah, blah, blah...

 

Hi, I have a line, I need to make it move after the new (calculated price)

I need to make the Horizontal line move after the new price when the variable sred gets a new price.

//--- расчет максимального значения закрытия\открытия  цены на кол-во выбранных последовательных барах(max)

   int high_in=iHighest(NULL,0,MODE_OPEN,max);
   int high_in2= iHighest(NULL,0,MODE_CLOSE,max);
   bigs=Open[high_in];
   big2=Close[high_in2];
   if (big2>=bigs) big_g=big2;
   else big_g=bigs;
   
//--- расчет минимального значения закрытия\открытия  цены на кол-во выбранных последовательных барах(min)
   
   int small_in= iLowest(NULL,0,MODE_OPEN,min);
   int small_in2= iLowest(NULL,0,MODE_CLOSE,min);
   small=Open[small_in];
   small2=Close[small_in2];
   if (small<=small2) small_g=small;//Проверка если цена открытия меньше цены закрытия, то действие будет выполняться по открытию.
   else small_g=small2;// или если нет то по закрытию
  
  sred=(big_g-small_g)/2+small_g;
  
  ObjectCreate("HLine",OBJ_HLINE,0,0,sred);
 
anatoliy.r:

Hi, I have a line, I need to make it move after the new (calculated price)

I need when the variable sred gets a new price, the Horizontal line should move after it.

Check out the function

ObjectMove

Changes the coordinates of the specified anchor point of the object.

boolObjectMove(
longchart_id,// chart ID
stringname,// object name
intpoint_index,// anchor number
datetimetime,// time
double price//price
);

 
Aleksey Vyazmikin:

Familiarise yourself with the function

ObjectMove

Changes the coordinates of the specified anchor point of an object.

boolObjectMove(
longchart_id,// chart ID
stringname,// object name
intpoint_index,// anchor number
datetimetime,// time
double price//price
);

Here I am ....... It turns out to be so easy! Thank you!!!)
 
Taras Slobodyanik:

the indicator shows a table of pairs/periods - you click on a cell - it shows the right TF/symbol, with the right patterns (and scans all at once, all patterns in one indicator, in one window)
you don't look at all 10-14 charts at once anyway

It's not clear. The multi-indicator (mi) only switches windows, so there is no problem with it in the terminal as it is. If it counts, then by processor load 1mi=14 not mi. Besides, to dump all the graphics from 14 TF into one window ... how is it? Plus each chat has its own indicator that also counts and draws? Loading 1 Mi+14 not Mi=28 not Mi. Wouldn't it be easier to organise the sound properly?

I certainly don't look at 14 charts at once, but I hear it right away):

 
Aleksey Vyazmikin:

It's a question of a person's cognitive peculiarities :)

Maybe you should work as a DJ in a disco instead of sitting in front of a computer :)

But I don't understand, when you say you have to wait a long time, the melodies are short in duration, but you get many signals at once - may be many of them are duplicates?

Or you just describe one signal by a group of sound files Symbol+period+event, but they are not so frequent?

Yes, a group of audio signals, otherwise you get a lot of audio files (see #7763). And the frequency, then it's dense, then it's empty. The main analysis comes at the opening bars. There are no duplicates, of course.

And in general it's not the melodies but the messages. Tones are not informative, birds were in the beginning, when you could count signals on the fingers):