Errors, bugs, questions - page 2684

 
fxsaber:

You misunderstand. It is indeed searchable on any Terminal. But I can only access the account on my own. Not on any other terminal.

Most likely the terminal that is not connecting has cached old access points and no new access points (brokers change access point configurations).

1) Have you previously made connections (successful or unsuccessful) to Swissquote-Server on an unconnected terminal?

2) Go to the open account window, enter "Swissquote-Server", press Enter, wait for success and try to connect again

3) Is this a reinstalled/new/unused computer? What operating system is it and are the updates up to date?

 
Renat Fatkhullin:

Most likely on the terminal where the connection fails, the old access points are cached and there are no new ones (brokers change access point configurations).

1) On an unconnected terminal, have you previously made connections (successful or unsuccessful) to the Swissquote-Server?

I haven't.

2) Go to the open account window, enter "Swissquote-Server", press Enter, wait for success and try to connect again.

Exactly what I always do when I need to connect to a server which wasn't on the list. Server is listed, no connection.

3) Is this a reinstalled/new/unused computer? What operating system and are there any updates?

Native terminal.

2020.03.26 08:05:40.967 Terminal        Swissquote Bank MT5 Client Terminal x64 build 2368 started for Swissquote Bank SA
2020.03.26 08:05:40.969 Terminal        Windows 7 Service Pack 1 build 7601, Intel Core i7-2700 K  @ 3.50 GHz, 7 / 15 Gb memory, 4 / 29 Gb disk, IE 11, Admin, GMT+2
2020.03.26 08:05:40.969 Terminal        C:\Program Files\Swissquote Bank MT5 Client Terminal


Alien Terminal.

2020.03.26 08:06:51.678 ICMarkets - MetaTrader 5 x64 build 2368 started for International Capital Markets Pty Ltd.
2020.03.26 08:06:51.679 Windows 7 Service Pack 1 build 7601, Intel Core i7-2700 K  @ 3.50 GHz, 7 / 15 Gb memory, 4 / 29 Gb disk, IE 11, Admin, GMT+2
2020.03.26 08:06:51.679 C:\Program Files\ICMarkets - MetaTrader 5


Runs on the same machine. If I destroy the config folder, the connection goes through. But then I lose data of all other accounts on Research Terminal.


ZS Can you PM me the server IP address so I can try it directly?

 
fxsaber:

I didn't.

That's what I always do when I need to connect to a server that wasn't on the list. The server is listed, no connection.

Native terminal.


Alien Terminal.


Runs on the same machine. If I destroy the config folder, the connection goes. But then I lose data of all other accounts on Research Terminal.


ZS Can you PM me the IP address of the server so I can try it directly?

I got connected without any problems:

2020.03.26 13:34:06.558 Network new demo account '6036452' opened on Swissquote-Server
2020.03.26 13:34:21.308 Network '8550475': disconnected from MetaQuotes-Demo
2020.03.26 13:34:22.540 HistoryCenter   delete old files from E:\MetaQuotes\MetaTrader 5\bases\Swissquote-Server\history\AEP, last access time 2018.03.02 18:42
2020.03.26 13:34:23.588 Experts automated trading is disabled because the account has been changed
2020.03.26 13:34:23.946 Network '6036452': authorized on Swissquote-Server
2020.03.26 13:34:23.946 Network '6036452': previous successful authorization performed from 176.49.173.218 on 2020.03.26 07:34:05
2020.03.26 13:34:25.751 Network '6036452': terminal synchronized with Swissquote Bank SA
2020.03.26 13:34:25.751 Network '6036452': trading has been enabled - hedging mode
2020.03.26 13:34:26.843 Network '6036452': scanning network for access points
2020.03.26 13:35:01.961 Network '6036452': scanning network finished
 
Artyom Trishkin:

I got everything connected without any problems:

Yes, the demo gets in without any problems.

2020.03.26 08:42:07.401 new demo account '6036453' opened on Swissquote-Server
2020.03.26 08:42:09.188 '6036453': authorized on Swissquote-Server


On the real one, it doesn't.

2020.03.26 08:42:40.551 '6036453': disconnected from Swissquote-Server
2020.03.26 08:42:41.418 'xxxxxxx': no connection to Swissquote-Server
 
fxsaber:

Yes, the demo gets in without any problems.


On the real one, no.

There were two servers:

I created the demo on the first one.

Maybe real on the second one?

 
Artyom Trishkin:

There were two servers:

I created a demo on the first one.

The same.

Maybe real on the second one?

There was a different trading server on the second one.

 

Guys help please!

Not long ago I started programming, I got these errors, tell me what is it about...

1. I used MarketInfo(Symbol(),MODE_TICKVALUE). My EURUSD pair in the tester shows number 0.01, but in the terminal it is 1.

2. iClose,iOpen,iHigh,iLow sometimes return 0 when shift=1.


Thank you

 

The issue of speed of ArrayResize()+reserve still troubles me.
This time the issue concerns arrays of primitivedata types.

#define  K 1000
#define  M (1000 * K)

#define    SpeedTest(test_count,msg,EX_pref, EX_test, EX_post) {         \
               uint result = 0; ulong count=test_count;                 \
               for(ulong ii=0;ii<count&&!_StopFlag;ii++){               \ 
                   EX_pref                                              \
                   uint start=GetTickCount();                           \
                   EX_test                                              \
                   result += GetTickCount() - start;                    \ 
                   EX_post                                              \
               }                                                        \
               printf("%-60s: loops=%i ms=%u",msg,count,result);}
                                              
class A{
public:
   int data;
};


template<typename T>
void test1(const int test_count, const int array_size){
   T class_array[];
   T tmp[];
   
   SpeedTest(
      test_count, StringFormat("Test %s ArrayResize all", typename(T)),
      {}
      ,
      {
         ArrayResize(class_array, array_size);
         for(int i = 1; i <= array_size; i++){
            ArrayResize(class_array, array_size, i);
            class_array[i-1] = NULL;
         }
      },
      {            
         ArraySwap(tmp, class_array);
         ArrayFree(tmp);
      }
   )
};

template<typename T>
void test2(const int test_count, const int array_size){
   T class_array[];
   T tmp[];
   
   SpeedTest(
      test_count, StringFormat("Test %s ArrayResize one by one with reserved memory", typename(T)),
      {},
      {
         ArrayResize(class_array, array_size);         
         for(int i = 1; i <= array_size; i++){
            ArrayResize(class_array, i, i);
            class_array[i-1] = NULL;
         }
      },   
      {            
         ArraySwap(tmp, class_array);
         ArrayFree(tmp);
      }
   )
};

 


void OnStart()
{
  const int test_count = 1;
  const int array_size = 20*K*K;  
  
   printf("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA");
   test1<int>(test_count, array_size);              // Avg time: release( 120) / debug( 155)
   test2<int>(test_count, array_size);              // Avg time: release( 205) / debug( 235)
   test1<int>(test_count, array_size);
   test2<int>(test_count, array_size);
   test1<int>(test_count, array_size);
   test2<int>(test_count, array_size);
   test1<int>(test_count, array_size);
   test2<int>(test_count, array_size);
   test1<int>(test_count, array_size);
   test2<int>(test_count, array_size);
   
   printf("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA");
   test1<double>(test_count, array_size);           // Avg time: release( 155) / debug( 190)
   test2<double>(test_count, array_size);           // Avg time: release( 250) / debug( 260)
   test1<double>(test_count, array_size);
   test2<double>(test_count, array_size);
   test1<double>(test_count, array_size);
   test2<double>(test_count, array_size);
   test1<double>(test_count, array_size);
   test2<double>(test_count, array_size);
   test1<double>(test_count, array_size);
   test2<double>(test_count, array_size);
   
   printf("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA");
   test1<A*>(test_count, array_size);              // Avg time: release( 190) / debug( 200)
   test2<A*>(test_count, array_size);              // Avg time: release( 330) / debug( 340)
   test1<A*>(test_count, array_size);
   test2<A*>(test_count, array_size);
   test1<A*>(test_count, array_size);
   test2<A*>(test_count, array_size);
   test1<A*>(test_count, array_size);
   test2<A*>(test_count, array_size);
   test1<A*>(test_count, array_size);
   test2<A*>(test_count, array_size);
}

Compared to the previous version, the code has been slightly improved:
- for both tests ArrayResize is guaranteed to be called the same number of times, previously the optimizer contributed...
- ArrayFree time is excluded from the runtime calculation;


For primitive data types ArrayResize()+reserve is executed more than 3 times slower than usual ArrayResize() (205 ms vs. 65 ms).
This is very much, so for Generic\ArrayList.mqh on 20M calls to CArrayList::Add the speed without and with reserving memory is 1.85 times different (170 ms vs 95 ms).
Something is obviously wrong here.

Is there any way to improve speed for the primitive ArrayResize()+reserve functionality types?
What could be such a big loss there?

I understand that the reality may be much more complicated, but there are just a couple of checks that affect the result of execution:

IsDynamic == true
IsIndexBuffer == false
IsSetAsSerrias == false
new_size > size
new_size < capacity
IsFundamental == true (or constructor and destructor == 0)

Some checks can even be combined via a bitmask to speed up the main, more likely direction of code execution.
And in the rare cases when the bitmask check fails, to additionally specify which of the flags affected the result...

 
fxsaber:

Yes, the demo gets in without any problems.

On the real one, no.

2020.03.26 08:42:41.418 'xxxxxxx': no connection to Swissquote-Server

Good day,

1. On the terminal (research), where there is no connection to the real account, this account is present in the list of accounts?

That is, is this xxxxxxxx account shown in the navigator?


2. If there is an xxxxxxxx account, is it displayed with the name YYYYYY after a colon (not just as a number)?

3. If the account xxxxxxxx is present, then if you delete it (in the navigator via Delete menu command) and reconnect, then the connection is successful?


Thank you

 
Anton:

1. On the terminal (research terminal) where the connection to the real account does not go through is this account present in the list of accounts?

That is, whether this xxxxxxxx account is displayed in the navigator:

It shows xxxx.

2. If account xxxxxxxx is present, is it displayed with the name YYYYY after a colon (not just as a number)?

No YYYYY and no colon.

3. if I have xxxxxxxx account, if I delete it (in the navigator via Delete) and re-connect it, will it connect?

Got it!


Looks like the first time I connected, I just entered the server name. This entry appeared in the navigator, but there was no trade server data and a blank went there. And even after forcing the data through the search for that account, a blank was still being substituted.


Thank you!


SZZ On topic.

Forum on trading, automated trading systems and testing trading strategies

New version of the MetaTrader 5 platform build 2280

fxsaber, 2020.02.19 11:32

When connecting to an existing trading account, if I specify a wrong trading server name, the account is moved in the Navigator in such a way, that one would think it has just disappeared.


When logging in to MetaQuotes-Demo, specify the MetaQuotes-Demo2 server address. See what happens in the Navigator. Please apply this rule to existing accounts only after a successful connection.

Search string: Uluchshenie 005.