Features of the mql4 language, subtleties and techniques - page 3 12345678910...36 New comment [Deleted] 2017.04.19 09:08 #21 When launching a script, an indicator, an Expert Advisor, the names of variables are displayed in the Input Parameters tabextern int Период=10;If the #property strict directive is present, the comment is displayed instead of the variable name#property strict extern int Период=10; // Период отображения информации This is more informative, IMHO Alexey Viktorov 2017.04.19 11:03 #22 LRA: When launching a script, an indicator, an Expert Advisor, the names of variables are displayed in the Input Parameters tabIf the #property strict directive is present, the comment is displayed instead of the variable nameIMHO, it is more informative.Well, then especially for those who didn't know that. See the screenshot, everything is clear there. [Deleted] 2017.04.20 23:26 #23 There is a glitch in MT4: When the depo is greater than 999999, one digit is missing from the detailed report chart.If it is over 999999, two digits are missing. Only the top 5 digits are always displayed. Slava 2017.04.21 09:36 #24 LRA: There is a glitch in MT4: When the depo is greater than 999999, one digit is missing from the detailed report chart.If it is over 999999, two digits are missing. Only the top 5 digits are always displayed. Don't forget to say that you have the font scale set to 125% in the system settings [Deleted] 2017.04.21 18:46 #25 void OnStart() { Alert("Ордеров = ",OrdersHistoryTotal()); } Did you know that you can set the length of the story? This affects the time it takes to search! If you set today - there will be less of everything! At midnight will the story be empty? Optimally - the last 3 days. To the developers: how can you set the depth of history programmatically? [ARCHIVE]Any rookie question, so Getting the current day Machine learning in trading: fxsaber 2017.04.26 09:04 #26 Unlike MQL5, in MQL4 static arrays can change size. [Deleted] 2017.04.29 10:44 #27 fxsaber: Unlike MQL5, in MQL4 static arrays can change their size. Is there an error in the help?//+-------------------------------------------------------+ //| ArrayResize PROBA.mq4 | //+-------------------------------------------------------+ #property strict void OnStart() { int x[7]; int СтарыйРазмер=ArrayRange(x,0); ArrayResize(x,5); int МеньшийРазмер=ArrayRange(x,0); ArrayResize(x,9); int БольшийРазмер=ArrayRange(x,0); Alert("MQL4: СтарыйРазмер = ",СтарыйРазмер, " МеньшийРазмер = ",МеньшийРазмер, " БольшийРазмер = ",БольшийРазмер); } //+-------------------------------------------------------+ //| ArrayResize PROBA.mq5 | //+-------------------------------------------------------+ #property strict void OnStart() { int x[7]; int СтарыйРазмер=ArrayRange(x,0); ArrayResize(x,5); int МеньшийРазмер=ArrayRange(x,0); ArrayResize(x,9); int БольшийРазмер=ArrayRange(x,0); Alert("MQL5: СтарыйРазмер = ",СтарыйРазмер, " МеньшийРазмер = ",МеньшийРазмер, " БольшийРазмер = ",БольшийРазмер); } fxsaber 2017.04.29 10:46 #28 LRA: Is there an error in the certificate? There is no error if you consider that there are no static arrays in MQL4. fxsaber 2017.04.29 10:54 #29 On the subject of static, there is a subtle point in both languages Forum on trading, automated trading systems and testing trading strategies mt4 build 1066 James Cater, 2017.04.28 16:53 I have found a regression error with initialisation order of static variables within functionsThis was working in build 1065. I have reported this to the service desk#property strict #property indicator_chart_window int TestBrokenStatic() { static int stInt = 101; stInt++; return stInt; } int OnInit() { static int result = TestBrokenStatic(); Print("TestStatic Expected result 102 - Actual result=", result); result = TestBrokenStatic(); Print("TestStatic Expected result 103 - Actual result=", result); return INIT_SUCCEEDED; } int OnCalculate(const int rates_total, const int prev_calculated, const datetime &time[], const double &open[], const double &high[], const double &low[], const double &close[], const long &tick_volume[], const long &volume[], const int &spread[]) { return rates_total; } 2017.04.28 15:42:30.941 TestStatic EURCHF,H1: TestStatic Expected result 103 - Actual result=1022017.04.28 15:42:30.941 TestStatic EURCHF,H1: TestStatic Expected result 102 - Actual result=1 mt4 build 1066 Init() and DeInit() execution Errors, bugs, questions [Deleted] 2017.04.29 10:59 #30 fxsaber: There's a subtle moment in both languages What a subtle point... Did you write it in SD? 12345678910...36 New comment
When launching a script, an indicator, an Expert Advisor, the names of variables are displayed in the Input Parameters tab
If the #property strict directive is present, the comment is displayed instead of the variable name
When launching a script, an indicator, an Expert Advisor, the names of variables are displayed in the Input Parameters tab
If the #property strict directive is present, the comment is displayed instead of the variable name
IMHO, it is more informative.
Well, then especially for those who didn't know that. See the screenshot, everything is clear there.
There is a glitch in MT4: When the depo is greater than 999999, one digit is missing from the detailed report chart.
If it is over 999999, two digits are missing. Only the top 5 digits are always displayed.
There is a glitch in MT4: When the depo is greater than 999999, one digit is missing from the detailed report chart.
If it is over 999999, two digits are missing. Only the top 5 digits are always displayed.
Did you know that you can set the length of the story? This affects the time it takes to search!
If you set today - there will be less of everything! At midnight will the story be empty? Optimally - the last 3 days.
To the developers: how can you set the depth of history programmatically?
Unlike MQL5, in MQL4 static arrays can change their size.
Is there an error in the help?
//+-------------------------------------------------------+ //| ArrayResize PROBA.mq5 | //+-------------------------------------------------------+ #property strict void OnStart() { int x[7]; int СтарыйРазмер=ArrayRange(x,0); ArrayResize(x,5); int МеньшийРазмер=ArrayRange(x,0); ArrayResize(x,9); int БольшийРазмер=ArrayRange(x,0); Alert("MQL5: СтарыйРазмер = ",СтарыйРазмер, " МеньшийРазмер = ",МеньшийРазмер, " БольшийРазмер = ",БольшийРазмер); }Is there an error in the certificate?
Forum on trading, automated trading systems and testing trading strategies
mt4 build 1066
James Cater, 2017.04.28 16:53
I have found a regression error with initialisation order of static variables within functions
This was working in build 1065. I have reported this to the service desk
2017.04.28 15:42:30.941 TestStatic EURCHF,H1: TestStatic Expected result 103 - Actual result=102
2017.04.28 15:42:30.941 TestStatic EURCHF,H1: TestStatic Expected result 102 - Actual result=1
There's a subtle moment in both languages