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

 
Maxim Kuznetsov:

return rates_total-1 or 0

It didn't help, I understood from Victor's previous comment that there are no tick volumes on the history, they can only be generated in the strategy tester or downloaded from the history, and the chart only has the standard data, OCHL and all, and the tick volumes are only on the current bar.
 
PokrovMT5:
It didn't help, I understood from Victor's previous comment that there are no tick volumes on the history, they can only be generated in the strategy tester or swapped from the history, and the chart only has standard data, OCHL and all, and ticks are only on the current bar.

yes, there are no ticks in the history :-) tick volumes only

Collect ticks in real time, write them to a file, so that at restart you can get the previous ones from there.

And return from OnCalculate a number smaller than rates_total. Or 0 (then buffers will not be displayed by Ctrl-D) or for example rates_total-1, to calculate ticks. Otherwise OnCalculate will be called strictly by bars or history paging.

 
Maxim Kuznetsov:

yes, there are no ticks in the history :-) tick volumes only

collect the ticks in real time, write them to a file so that when you restart, you can take the previous ones from there.

And to return from OnCalculate still must be a number smaller than rates_total. Or 0 (then buffers will not be displayed by Ctrl-D) or for example rates_total-1, to calculate ticks. Otherwise, OnCalculate will be called strictly by bars or history paging.


Thanks, that's all against the people there's nothing normal about this MT )) That's why DTs use this platform.

 
PokrovMT5:

Thank you, there's nothing normal about this MT against the people )) That's why DCs are using this platform.

the 5 kinda has a ticking story...the CopyTicks bug fighting epic is over
 
PokrovMT5:

And the link doesn't work, it says no page.

Yeah, I messed up. Here's the link. But you can't get the ticks on the story.

TicksVolume
TicksVolume
  • votes: 29
  • 2015.12.11
  • Alexey Viktorov
  • www.mql5.com
Индикатор тиковых объемов. Показывает изменение цены с увеличением и понижением.
 

Hi!

I have inserted a function to draw buy and sell arrows in the EA:

int DrawArrow (int CodeArrow, color ColorArrow, int i, int TypeArrow) 
 {     string nm = DoubleToStr(Time[i], 0); // название объекта

   if (i<=0) return (-1);// рисуем на закрытых барах
   if (ObjectFind(nm)<=0)
      {
         if (TypeArrow == 0) ObjectCreate(0,nm, OBJ_ARROW_BUY, 0, iTime(NULL,0,i),iHigh(NULL,0,i)+0.00004); // стрелка вверх над баром
         else ObjectCreate(0,nm, OBJ_ARROW_SELL, 0, iTime(NULL,0,i),iLow(NULL,0,i)-0.00001); // стрелка вниз под баром
      }
 //     ObjectSet(nm, OBJPROP_ARROWCODE, CodeArrow);
      ObjectSet(nm, OBJPROP_COLOR , ColorArrow);
   return (0);
   }

But the arrows are not drawing, what is the problem?

 

Good afternoon! How do I check an array for an empty cell?

string MyArray[];
if(MyArray[i2]==EMPTY_VALUE) ???
 
Nauris Zukas:

Good afternoon! How do you check an array for an empty cell?


Initially, initialize the array with a value that will never occur, such as 999999999999999999999

And then compare...

You have given too little information, I think there are better methods...

 
Vladimir Pastushak:

Initially initialise the array with a value that will never occur, e.g. 99999999999999999999999

And then compare...

You have given too little information, I think there are better methods...

Thank you! This would work for me as an option:

if(StringLen(MyArray[i2])==0)


But I thought maybe there's some function that will work for all array types.

 
Nauris Zukas:

Thank you! For string as an option this would work:


But I thought maybe there's a function that will work for all array types.


ZeroMemory (...) initializes array of string type with NULL value

Reason: