Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1745 1...173817391740174117421743174417451746174717481749175017511752...1965 New comment Tretyakov Rostyslav 2021.11.13 14:40 #17441 Sergey Zhukov #:Rename any *.mq4 file to any extension and try to compile it, it won't work, the compiler will try to compile it as if it were MT5. Whatever I wrote there inside file, like( does not work until I rename the file back to *.mq4. How to bypass this, maybe someone knows from the pros? Take a screenshot of the file folder EVGENII SHELIPOV 2021.11.13 15:46 #17442 Good evening programmers! Help me understand! Here are two functions when testing an EA to determine the maximum profit for the account and for a currency pair. When testing, there are fundamentally different values and it's not swap and commission. Please help me to understand the error. Thanks in advance !!!! //+----------------------------------------------------------------------------+ //|Расчет максимального абсолютного профита сетки ордеров (по инструменту) | //+----------------------------------------------------------------------------+ double GetMaxProfitSymbol() { double oProfitSymbol = 0; for(int i = OrdersTotal()-1; i>=0; i--) { if(OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) { if(OrderSymbol() == Symbol() && OrderMagicNumber() == Magic) { if(OrderType() == OP_BUY || OrderType() == OP_SELL) { oProfitSymbol += OrderProfit(); if(oProfitSymbol > MaxProfitSymbol) MaxProfitSymbol = oProfitSymbol; } } } } return(MaxProfitSymbol); } //+----------------------------------------------------------------------------+ //|Расчет максимальной абсолютной прибыли сетки ордеров (по счету) | //+----------------------------------------------------------------------------+ double GetMaxProfit() { Profit = AccountProfit(); if(Profit > MaxProfit) MaxProfit = Profit; return(MaxProfit); } Error '(' - function [ARCHIVE] Any rookie question, [Archive!] Any rookie question, Tretyakov Rostyslav 2021.11.13 16:52 #17443 EVGENII SHELIPOV testing an EA to determine the maximum profit for the account and for a currency pair. When testing, there are fundamentally different values and it's not swap and commission. Please help me to understand the error. Thanks in advance !!!! One counts the total profit of closed trades and the other one of open trades EVGENII SHELIPOV 2021.11.13 17:03 #17444 MakarFX #:one counts the total profit of closed trades and the other one of open trades Makar if it is not difficult for idiots which one is which ? Tretyakov Rostyslav 2021.11.13 17:17 #17445 EVGENII SHELIPOV #:Makar if it's easy for idiots which one is which ? I wrote it in order. Ivan Butko 2021.11.14 00:59 #17446 Is there any way to upload the history for only a year or two or three? If you don't need any earlier data. Maybe there is a script Fast235 2021.11.14 02:51 #17447 Ivan Butko #: Is there any way to download the history only for a year or two or three? If earlier data is not needed. Maybe there is a script https://www.mql5.com/ru/docs/series/timeseries_access code below, if multisymbol robot, I recommend, it will load history, avoid errors of getting the handle set from when, there is an option. I haven't checked how history loading works now, half a year ago, this code from the help was necessary. Документация по MQL5: Доступ к таймсериям и индикаторам / Организация доступа к данным www.mql5.com Организация доступа к данным - Доступ к таймсериям и индикаторам - Справочник MQL5 - Справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5 new bar formed? Error when Debugging EA Any rookie question, so Ivan Butko 2021.11.14 11:50 #17448 Fast235 #:https://www.mql5.com/ru/docs/series/timeseries_access code below, if multisymbol robot, I recommend, it will load history, avoid errors of getting the handle set from when, there is an option. haven't checked how the history loading works now, half a year ago, this code from the help was necessary. Thank you very much, I will give it a try Ivan Butko 2021.11.14 15:04 #17449 Fast235 #:https://www.mql5.com/ru/docs/series/timeseries_access code below, if multisymbol robot, I recommend, it will load history, avoid errors of getting the handle set from when, there is an option. I haven't checked how history loading works now, half a year ago, this code from help was necessary. I tried it inMT4, 2021.11.14 17:01:40.506 Load History NZDCHF,M1: Start loadNZDCHF,M1from1635465600 Unfortunately, nothing happens. Went into the quote archive, it's 16216 unchanged. Tretyakov Rostyslav 2021.11.14 15:20 #17450 Ivan Butko #:Tried inMT4, 2021.11.14 17:01:40.506 Load History NZDCHF,M1: Start loadNZDCHF,M1from1635465600 Unfortunately nothing happens. Went to the quote archive, it's 16216 unchanged. First check this and second - maybe the broker does not have such a volume of quotes 1...173817391740174117421743174417451746174717481749175017511752...1965 New comment
Rename any *.mq4 file to any extension and try to compile it, it won't work, the compiler will try to compile it as if it were MT5.
Whatever I wrote there inside file, like(
does not work until I rename the file back to *.mq4.
How to bypass this, maybe someone knows from the pros?
Take a screenshot of the file folder
Good evening programmers! Help me understand!
Here are two functions when testing an EA to determine the maximum profit for the account and for a currency pair.
When testing, there are fundamentally different values and it's not swap and commission.
Please help me to understand the error. Thanks in advance !!!!
When testing, there are fundamentally different values and it's not swap and commission.
Please help me to understand the error. Thanks in advance !!!!
One counts the total profit of closed trades and the other one of open trades
one counts the total profit of closed trades and the other one of open trades
Makar if it is not difficult for idiots which one is which ?
Makar if it's easy for idiots which one is which ?
Maybe there is a script
Is there any way to download the history only for a year or two or three? If earlier data is not needed.
Maybe there is a script
https://www.mql5.com/ru/docs/series/timeseries_access
code below, if multisymbol robot, I recommend, it will load history, avoid errors of getting the handle
set from when, there is an option.
I haven't checked how history loading works now, half a year ago, this code from the help was necessary.
https://www.mql5.com/ru/docs/series/timeseries_access
code below, if multisymbol robot, I recommend, it will load history, avoid errors of getting the handle
set from when, there is an option.
haven't checked how the history loading works now, half a year ago, this code from the help was necessary.
Thank you very much, I will give it a try
https://www.mql5.com/ru/docs/series/timeseries_access
code below, if multisymbol robot, I recommend, it will load history, avoid errors of getting the handle
set from when, there is an option.
I haven't checked how history loading works now, half a year ago, this code from help was necessary.
I tried it inMT4, 2021.11.14 17:01:40.506 Load History NZDCHF,M1: Start loadNZDCHF,M1from1635465600
Unfortunately, nothing happens. Went into the quote archive, it's 16216 unchanged.
Tried inMT4, 2021.11.14 17:01:40.506 Load History NZDCHF,M1: Start loadNZDCHF,M1from1635465600
Unfortunately nothing happens. Went to the quote archive, it's 16216 unchanged.
First check this
and second - maybe the broker does not have such a volume of quotes