Errors, bugs, questions - page 3014

 

b2875

 
Here is the question: How can I set up a custom symbol, which is a copy of some cross-pair (for example, CADJPY), but with modified ticks, but in such a way, that the strategy tester would not use USDCAD, USDJPY base pairs when using it. Positions should be correctly counted for profits and losses.
 
Maksim Emeliashin:
Here is the question: How can I set up a custom symbol, which is a copy of some cross-pair (for example, CADJPY), but with modified ticks, but in such a way, that the strategy tester would not use USDCAD and USDJPY base pairs. Positions should be correctly counted for profits and losses.

Pip-based mode.

 
fxsaber:

Pip-based mode.

Oh indeed, doesn't use base pairs in this mode. Eh, will have to rewrite all the code where I have current profit statistics counted for fixing.

 

I have 12 cores, 6 physical cores with hyperthreading. I only want to keep the physical ones, how do I know which ones to keep and which to disable?

 
Alain Verleyen:

I have 12 cores, 6 physical cores with hyperthreading. I only want to keep the physical ones, how do I know which ones to keep and which to turn off?

Just disable half of them
 
Aliaksandr Hryshyn:
Just turn off half of it

Yes. That's right.

 
Aliaksandr Hryshyn :
Just disable half of them.
Slava:

Yes. That's right.

Thank you.

Done, I have 6 physical cores, 12 agents, the last 6 disabled.


But all cores are still being used (though less heavily than with 12 agents). What is the explanation?


 
Alain Verleyen:

I have 12 cores, 6 physical cores with hyperthreading. I only want to keep the physical ones, how do I know which ones to keep and which ones to disable?

Hypercores make sense if testing puts most of the quotes in the cache. Let's say if we're testing on ticks based on real ones, there's no use in hypercores, the speed doesn't change. However, for testing on OHLC 1M in one or two years - the speed of 12 hypercores is noticeably higher than six physical ones.

 

Who can tell me if it's something I did wrong or an MQL5 bug?

Code

/*******************Expert initialization function*******************/
int OnInit()
 {
  MqlDateTime mqlTime;
  datetime tgmt = TimeGMT();
  TimeToStruct(tgmt, mqlTime);
  return(INIT_SUCCEEDED);
 }/******************************************************************/

Structure is empty even though variable tgmt contains normal current time...

Code

/*******************Expert initialization function*******************/
int OnInit()
 {
  MqlDateTime mqlTime;
  datetime tgmt = TimeGMT(mqlTime);
  //TimeToStruct(tgmt, mqlTime);
  return(INIT_SUCCEEDED);
 }/******************************************************************/

The structure contains rubbish despite the fact that the tgmt variable contains the normal current time...

On this hardware

2021.05.13 09:42:03.384 Terminal        MetaTrader 5 x64 build 2899 started for MetaQuotes Software Corp.
2021.05.13 09:42:03.384 Terminal        Windows 7 Service Pack 1 build 7601, AMD FX-4170 Quad-Core, 8 / 11 Gb memory, 56 / 465 Gb disk, IE 11, Admin, GMT+3

In OnTick() handler also