Errors, bugs, questions - page 1174

 

I switched computers at work yesterday from Windows XP/32 to Win7/64. Before that I traded normally on MT4 at work, updated codes from the storage and back to the storage. Now I can use my mt4 on 7, my proxy account is new, community login and password are new too. The problem is that I cannot synchronize codes with MetaEditor 4. In my profile I have"Connect storage" checked.

Today I changed password in community, installed second MT4 in different folder, added proxy, new login and password, trade is going, I see all MQ services, but no synchronization with storage, can not connect. Please advise where else the problem could be.


 
paladin800:

I switched computers at work yesterday from Windows XP/32 to Win7/64. Before that I traded normally on MT4 at work, updated codes from the storage and back to the storage. Now I can use my mt4 on 7, my proxy account is new, community login and password are new too. The problem is that I cannot synchronize codes with MetaEditor 4. In my profile I have"Connect storage" checked.

Today I changed password in community, installed second MT4 in different folder, added proxy, new login and password, trade is going, I see all MQ services, but no synchronization with storage, can not connect. Please advise where else the problem could be.


Reinstall my MT4 terminal with admin rights and run MT4 terminal with admin rights. MT4 in Vista/8/8.1 in this way sees both the storage and the folder with your codes and saves all the charts settings.
 
barabashkakvn:
Reinstall MT4 terminal with administrator rights and run MT4 terminal with administrator rights. MT4 in Vista/8/8.1 with this method sees both the storage and the folder with your codes and saves all chart settings.
I see. I'm working on forex here quietly at work, admin (hopefully) does not know, so with admin rights will not last. The problem is not critical, I will work via flash drive. Thanks for the clarification.
 
paladin800:
I see. I'm working on forex here on the sly, the admin (hopefully) doesn't know, so won't be able to hold on to the admin rights. The problem is not critical, I will work via flash drive. Thank you for the clarification.
You can also rent a VPS. Then you can log in through a remote desktop connection and no problems with admin rights.
 
compile error, build 969
template<typename T>
T plus( T a, T b )      { return ( a + b ); }

template<typename T>
int f( T& array[], int i )
{
        return ( plus( ::ArraySize( array ), i ) );
}

void OnStart()
{
        int a[ 2 ];
        int b = 1;
        Print( f( a, b ));
}

It arises because in the new build

template<typename T>
void g( T& array[] ) { Print( typename( ::ArraySize( array ))); }
void OnStart()
{
        int a[ 2 ];
        g( a ); //Результат: uint
}
uint ArraySize(...);
в то время как раньше было
 int ArraySize(...);
who am i interrupting ?
int ArraySize(...);

Why would you change it if help was silent and such changes could affect calculations?! And no one would even notice

 
A100:
Compilation error, build 969Because in the new build and who was bothered by it ?

Why change it when help is silent and such changes could affect calculations?! and no one would even notice

Help just always lags a bit. of course uint for array size is more reasonable, because the size cannot be negative anyway // and ulong would be even better :)
 
Another illogical thing is that
template<typename T>
void g( T& array[] )
{
        Print( typename( ::ArrayResize( array, 3 )));
}

void OnStart()
{
        int a[ 2 ];
        g( a ); //Результат: int
}

It turns out that ArraySize has been changed, but ArrayResize has not - changed? What is the fundamental difference?

The difference is this

Возвращаемое значение

При успешном выполнении функция возвращает количество всех элементов, содержащихся в массиве после изменения размера;
в противном случае возвращает -1 и массив не меняет размеры.

It turns out that you cannot change the return type in ArrayResize (because of '-1'). Well, if you cannot change ArrayResize type, why should you change ArraySize type?

 

This is the situation. I need to run Expert Advisor on EURNZD for a couple of years. I've already deleted the whole history for the symbol, loaded it again - the result is the same:

HistoryCenter: 5240 bars imported in 'EURNZD60'

It is only September 2013. The terminal does not allow to rewind the chart. When I open history center and click Download I get the message "There are no new data for a symbol EURNZD". I don't care if it's written incorrectly, but how can I get quotes? Does my broker really have no history? I don't know, I've never met any problems with other symbols.

P.S. That's it, the question is removed. After I gave up EURNZD and downloaded GBPAUD, suddenly this miracle of technology has seen new data for EURNZD. Who may be in a similar situation - then do not forget about "dancing with Tambourine" and the need to persistently tease the terminal in different ways. ;-)

P.P.S. Now the same thing happened to AUDNZD again. I had to stupidly click Download a bunch of times in a row until it suddenly saw the data.

 
MetaDriver:
Help is just always a bit delayed. of course uint for array size is smarter, since the size cannot be negative anyway // and ulong would be even better :)

template<typename T>
void g( T& str ) { Print( typename( ::StringLen( str ))); }
void OnStart()
{
        string str = "ABC";
        g( str ); //Результат: int
}

String length cannot be negative either, but it makes more sense to use int to denote length/size - for one simple reason that functions (search, calculate, etc) generally return length/size, or -1 in case of failure, which makes error handling much easier.

 
A100:
Compilation error, build 969
...
Why would you change it when help is silent and such changes may affect calculations?! And no one will even notice it

Regarding ArraySize, I raised a similar problem on MQL4 the other day: https://www.mql5.com/ru/forum/152471. As far as I understand, everything should be the same in MQL5.

Perhaps, my message has been considered there :) Concerning this problem, the Service Desk has replied that the reason was incorrect operation of the optimizer and they will change the type to uint in new builds. Actually it is uint now, just undocumented :) They will change it to uint for ArrayResize too, but I advised them to change it to ulong, otherwise they will have to return to this problem because of the lack of 32-bit values when storing large volumes.

And as for the value -1 on error, there should be no problem with it because: (int)-1 = (uint)-1 = 0xFFFFFFFFFF = UINT_MAX, i.e. the bit representation is the same. Though the comparison operation will give a different result. i.e. if it was so in the code

if (ArrayResize(...) < 0) ...

it will become incorrect.