MetaTrader 4 Build 529 beta released with new compiler - page 41

 
St0nE:

Am I right in assuming that such a thing is no longer possible in 4?


it didn't before .....
 
VOLDEMAR:

it hasn't channeled before .....
So how's it working for me now on the real, it's probably been two years now? :-)
 
  bool isNewBar=false;

  if (ExpertBars!=Bars) {
    ExpertBars=Bars;   
    isNewBar=true;     
  }

Bars Returns the number of bars in the history for the corresponding symbol period. There are 2 variants of this function.

As we know in MT4 Bars can be 15000 now and 16000 an hour later,

This function is the most useless, and with 100% probability it gives nonsense every time ....

 
If you are detecting the appearance of a new bar, it is done a little differently ....
 
alexvd:

Can you describe the settings set in the strategy tester, the input parameters, the tick generation model... + attach the Expert Advisor to be tested.

Send a request to Service Desk.

By the way, how do you measure the testing time?


The time is measured by GetTickCount.

Concerning Service Desk: I would like to wait for iBands to be corrected (for now bb0_ma= iBands(NULL,TF_0, Per_BB0, (int)Dev_BB0, 0, PRICE_CLOSE, MODE_MAIN, 0);)

 
zigan:


Time is measured by GetTickCount.

About servisdesk: I would like to wait for iBands fixing (for now it is used like this: bb0_ma= iBands(NULL,TF_0, Per_BB0, (int)Dev_BB0, 0, PRICE_CLOSE, MODE_MAIN, 0);)


In all versions of the terminal the deviation parameter was an integer, I encountered this ...

For my tasks I always used Bands indicator called via iCustom () ....

The deviation parameter of the custom indicator can be set as a fractional number ...

 
VOLDEMAR:
If you define the appearance of a new bar, it's done a little differently ....

Yes, that's how I define the new bar and now, on 509 it works stable.

Today I updated to 537 and got an error when working with an array. Opened the new doc, and yes, there are two ways to use Bars.

That's why I asked here. If you don't mind, can you please suggest another workable way of defining a new bar?

Thank you...

 
VOLDEMAR:


In all versions of the terminal the deviation parameter was an integer, I have encountered it...

To solve my tasks I always used Bands indicator called via iCustom () ....

With the custom indicator the deviation parameter could be set as a fractional number ...


Now that's news! So used to the five-horse double:

int  iBands(
   string              symbol,            // имя символа
   ENUM_TIMEFRAMES     period,            // период
   int                 bands_period,      // период для расчета средней линии
   int                 bands_shift,       // смещение индикатора по горизонтали
   double              deviation,         // кол-во стандартных отклонений
   ENUM_APPLIED_PRICE  applied_price      // тип цены или handle
   );

It never occurred to me that it could be an integer... there's a range of 1 to 3. And what's the point of integer representation? Just to make it work faster?

 
St0nE:

Yes, that's how I define the new bar and now, on 509 it works stable.

Today I updated to 537 and got an error when working with an array. Opened the new doc, and yes, there are two ways to use Bars.

That's why I asked here. If you don't mind, could you please suggest another working variant for defining a new bar?

Thank you...


The documentation so far has an incorrect description of Bars, there are 2 options for representing Bars as a function from 5, but in reality this is not the case.

Bars is agood old variable for total number of bars displayed on the current chart, be alert and careful.

 
ALXIMIKS:


The description of Bars in the documentation so far is wrong, there are 2 options to represent Bars as a function with 5, but in reality it's not.

Bars is a good old variable of the total number of bars displayed on the current chart, be alert and careful.


Ok... But now nothing comes up when compiling, and there is an error when starting the run

2013.11.12 13:55:25.445 2008.01.02 15:47 array out of range in 'Procedure.mq4' (331,25)

And that's exactly where Bars is used...