Questions from a "dummy" - page 202

 
Yedelkin:
Have a look at the request description for Market Execution. I think there are no SL or TP levels for this type of market order execution.

Thank you!

 

Men, please help me with advice. Is it possible to declare typedef in C?

class Q2;   // Нуудачная попытка объявления typedef'а в строке 9.

class Q {
public:
   void fn(Q2 w); 
};

class W2 {};
typedef W2 Q2;

void Q::fn(Q2 w) {}
 
220Volt:

Men, please help me with advice. Is it possible to declare typedef in C?

typedef is used to name basic or spawned types, while typedef introduces a new type
 
220Volt:

Men, please help me with advice. Is it possible to declare typedef in C?

First of all, this is C++.

Secondly, do you want to use the name both as a synonym of W2 and as a new class at the same time? What do you want?

 

I seem to have failed to explain clearly, thank you for your attention.

 
220Volt:

I don't seem to have made myself clear, thank you for your attention.

Ah, I think I've got it, now.

class W2;
typedef W2 Q2;

class Q {
public:
   void fn(Q2 w); 
};

class W2 {};

void Q::fn(Q2 w) {}
 

Can't copy 1000 values into an array. EA code:

double h[1000],l[1000];
Print(CopyHigh("EURUSD",PERIOD_D1,1,1000,h)," ",CopyLow("EURUSD",PERIOD_D1,1,1000,l));

I am running it in the tester on a Daily period using opening prices only.

I see the following in the log:

EM      0       Core 1  13:07:52        2012.09.25 00:00:00   451 451
LD      0       Core 1  13:07:52        2012.09.26 00:00:00   452 452
CR      0       Core 1  13:07:52        2012.09.27 00:00:00   453 453
JI      0       Core 1  13:07:52        2012.09.28 00:00:00   454 454
OG      0       Core 1  13:07:52        2012.10.01 00:00:00   455 455
JN      0       Core 1  13:07:52        2012.10.02 00:00:00   456 456
QD      0       Core 1  13:07:52        2012.10.03 00:00:00   457 457
DS      0       Core 1  13:07:52        2012.10.04 00:00:00   458 458
KI      0       Core 1  13:07:52        2012.10.05 00:00:00   459 459
PP      0       Core 1  13:07:52        2012.10.08 00:00:00   460 460
GN      0       Core 1  13:07:52        2012.10.09 00:00:00   461 461
GE      0       Core 1  13:07:52        2012.10.10 00:00:00   462 462
PS      0       Core 1  13:07:52        2012.10.11 00:00:00   463 463
IJ      0       Core 1  13:07:52        2012.10.12 00:00:00   464 464
LP      0       Core 1  13:07:52        2012.10.15 00:00:00   465 465
EO      0       Core 1  13:07:52        2012.10.16 00:00:00   466 466
NE      0       Core 1  13:07:52        2012.10.17 00:00:00   467 467
OL      0       Core 1  13:07:52        2012.10.18 00:00:00   468 468
HJ      0       Core 1  13:07:52        2012.10.19 00:00:00   469 469
HQ      0       Core 1  13:07:52        2012.10.22 00:00:00   470 470
OO      0       Core 1  13:07:52        2012.10.23 00:00:00   471 471
FF      0       Core 1  13:07:52        2012.10.24 00:00:00   472 472
ML      0       Core 1  13:07:52        2012.10.25 00:00:00   473 473
DK      0       Core 1  13:07:52        2012.10.26 00:00:00   474 474
IQ      0       Core 1  13:07:52        2012.10.29 00:00:00   475 475
IH      0       Core 1  13:07:52        2012.10.30 00:00:00   476 476
RF      0       Core 1  13:07:52        2012.10.31 00:00:00   477 477

Maximum number of bars on the chart =100000.

The question is how to copy 1000 values into an array?

Документация по MQL5: Стандартные константы, перечисления и структуры / Состояние окружения / Состояние клиентского терминала
Документация по MQL5: Стандартные константы, перечисления и структуры / Состояние окружения / Состояние клиентского терминала
  • www.mql5.com
Стандартные константы, перечисления и структуры / Состояние окружения / Состояние клиентского терминала - Документация по MQL5
 
solandr: I cannot copy 1000 values into an array. Expert Advisor code: I am running in tester on Daily period using opening prices only.

In the log I see the following:Maximum number of bars on the chart =100000. The question is how to copy 1000 values into an array?

And try to set the testing interval to 3 years ago.
 
Good afternoon! Could you please give me the code to run an EA in a standalone chart... Indicators and scripts work, but the Expert Advisor is silent! Thanks in advance!
 
solandr:

Can't copy 1000 values into an array. EA code:

The testing agent only downloads the missing history with a small margin to provide the necessary data on the history to calculate the indicators at the start of testing. The minimum amount of history to be downloaded from the trade server for timeframes D1 and less is one year. So, if you start testing on the interval 2010.11.01-2010.12.01 (testing on the interval of one month) with the period M15 (each bar is 15 minutes), the terminal will request the history for the whole year 2010. For the Weekly timeframe, we will request the history of 100 bars, which is about two years (there are 52 weeks in a year). For testing on Monthly timeframe the agent will request the history for 8 years( 12 months * 8 years = 96 months).
Reason: