Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 494

 
artmedia70:

The closing of the weekly 1st bar can only be detected at the opening of the weekly 0th bar.

iBarShift() to help you



The calculation of the sum of movements of zero bars will start only after they open is understood, and I know, and I know that I should specify closing of the weekly bar in the line - int BarShift = iBarShift(SymbolName[j], 0, Time[i], true); but I can guess it, and how to do it? Because it's not a weekly bar but weekly period size and it doesn't remain, it keeps changing with every new bar (depending on the timeframe), i tried Friday close (DayOfWeek())==5), also it fails - the whole story breaks, because the indicator sees only last Friday close. i tried to use DayOfWeek(==5), but it breaks the story because the indicator sees only Friday's close .
 
string char[256];

...unexpexted token

how do I do it now ?

 

that's not the point... :-))) how has this line become wrong from the point of view of updated MQL4 ?

string char[256];
 
zoritch:

that's not the point... :-))) how has this line become wrong from the point of view of updated MQL4 ?

From the point of view of new MQL4 "char" is, like "string", a variable type.
 
TarasBY:
In terms of the new MQL4, "char" is, like "string", a variable type.


а... semyon Semyonych... :-))) i.e. reserved word
 
Vitek2010:

I know, and I know , that I should specify weekly bar close in string int BarShift = iBarShift(SymbolName[j], 0, Time[i], true); but how to do it? Because it's not a weekly bar but weekly period size and it doesn't remain, it keeps changing with every new bar (depending on the timeframe), i tried Friday close (DayOfWeek())==5), also it fails - the whole story breaks, because the indicator sees only last Friday close. i tried to use DayOfWeek(==5), but it breaks the story because the indicator sees only Friday's close .

What's stopping you from doing this?

iClose(SymbolName[j],PERIOD_W1 ,1);  //  2;  3;

Or don't you? ..... won't do?

reposted..... zoritch sorry.

 
zoritch:

а... semyon semyonych... :-))) i.e. reserved word
Zhen, you're really something. It's even coloured as a variable type.
 
r772ra:

What's stopping you from doing this?

Or don't you? ..... won't do?

rearranged..... zoritch sorry.

PERIOD_W1 . Это выражение дает не понятие недельного бара который отображен на графике .а всего лиш размер недели . и при возникновении нового бара например на н1 происжодит перемещение этого размера на час вперед . так что это все не то . 
 

Vitek2010:


Itseems to be a simple requirement - to determine the weekly close at lower timeframes.
iClose(SymbolName[j],PERIOD_W1 ,1);  //  2;  3;
This is the closing price of the week, and do not make it up, read the documentation carefully !
 

The terminal has updated from 509 to 600 and the EA gives this warning on compilation:

declaration of 'ErrNum' hides global declaration at line 81

and a part of the code:

string ErrorDescription(int ErrNum)
{
  switch(ErrNum)
  {

Can you please tell me what the problem is?