intOnCalculate(constint rates_total,
constint prev_calculated,
constint begin,
constdouble &price[])
{
//---if (prev_calculated==0) Print("Полный перерасчёт!");
//--- return value of prev_calculated for next callreturn(rates_total);
}
I throw it on the M5 chart:
2013.07.26 22:17:12 testprevbar (EURUSD,M5) Full recalculated! 2013.07.26 22:17:12 testprevbar (EURUSD,M5) Full recalculation! 2013.07.26 22:17:06 testprevbar (EURUSD,M5) Full recalculation! 2013.07.26 22:17:00 testprevbar (EURUSD,M5) Full recalculation! 2013.07.26 22:16:59 testprevbar (EURUSD,M5) Full recalculation! 2013.07.26 22:16:55 testprevbar (EURUSD,M5) Full recalculation! 2013.07.26 22:16:55 testprevbar (EURUSD,M5) Full recalculation! 2013.07.26 22:16:55 testprevbar (EURUSD,M5) Full recalculation! 2013.07.26 22:16:54 testprevbar (EURUSD,M5) Full recalculation! 2013.07.26 22:16:53 testprevbar (EURUSD,M5) Full recalculation! 2013.07.26 22:16:52 testprevbar (EURUSD,M5) Full recalculation! 2013.07.26 22:16:51 testprevbar (EURUSD,M5) Full recalculation! 2013.07.26 22:16:51 testprevbar (EURUSD,M5) Full recalculation! 2013.07.26 22:16:50 testprevbar (EURUSD,M5) Full recalculation! 2013.07.26 22:16:46 testprevbar (EURUSD,M5) Full recalculation! 2013.07.26 22:16:45 testprevbar (EURUSD,M5) Full recalculation! 2013.07.26 22:16:42 testprevbar (EURUSD,M5) Full recalculation! 2013.07.26 22:16:40 testprevbar (EURUSD,M5) Full recalculation! 2013.07.26 22:16:39 testprevbar (EURUSD,M5) Full recalculation! 2013.07.26 22:16:37 testprevbar (EURUSD,M5) Full recalculation! 2013.07.26 22:16:36 testprevbar (EURUSD,M5) Full recalculation! 2013.07.26 22:16:15 testprevbar (EURUSD,M5) Full recalculation! 2013.07.26 22:16:15 testprevbar (EURUSD,M5) Full recalculation! 2013.07.26 22:16:12 testprevbar (EURUSD,M5) Full recalculation! 2013.07.26 22:16:11 testprevbar (EURUSD,M5) Full recalculation! 2013.07.26 22:16:11 testprevbar (EURUSD,M5) Full recalculation! 2013.07.26 22:16:10 testprevbar (EURUSD,M5) Full recalculation! 2013.07.26 22:16:10 testprevbar (EURUSD,M5) Full recalculation! 2013.07.26 22:16:09 testprevbar (EURUSD,M5) Full recalculation! 2013.07.26 22:16:09 testprevbar (EURUSD,M5) Full recalculation! 2013.07.26 22:16:09 testprevbar (EURUSD,M5) Full recalculation! 2013.07.26 22:16:06 testprevbar (EURUSD,M5) Full recalculation! 2013.07.26 22:16:06 testprevbar (EURUSD,M5) Full recalculation! 2013.07.26 22:16:05 testprevbar (EURUSD,M5) Full recalculation!
And what the hell?
Help:
Необходимо отметить связь между значением, возвращаемым функцией OnCalculate() и вторым входным параметром prev_calculated. Параметр prev_calculated при вызове функции содержит значение, которое вернула функция OnCalculate() на предыдущем вызове. Это позволяет реализовать экономные алгоритмы расчета пользовательского индикатора с тем, чтобы избежать повторных расчетов для тех баров, которые не изменились с предыдущего запуска этой функции.
To do this, it is usually sufficient to return the value of the rates_total parameter, which contains the number of bars in the current function call. If since the last call of OnCalculate() price data were changed (for example, history was pumped deeper or history blanks were filled), then the value of input parameter prev_calculated will be set to zero by the terminal itself.
MetaDriver: You're evil! No bitcoins from you. Just Mongolian tugriks.
It's okay. I'm working on another bot with the guys over there. Just because I'm bored and too bored to write. Potentially this grail should beat my previous one.
Yes, sorry, transposed incorrectly from my code - does not work at non-trading time
bool bringToTop = true;
ChartSetInteger( chart_ID, CHART_BRING_TO_TOP, 0, bringToTop )
ChartSetInteger( chart_ID, CHART_BRING_TO_TOP, true )
//этим хотел показать что пробовал оба варианта
ChartGetInteger does not work, because CHART_BRING_TO_TOP is write only.
Today is a non-trading day, the error is reproduced again (which prevents testing). On trading day - everything works correctly - disconnected communication - still worked.
causes similar messages to appear from time to time : NL 2 21:06:36 Trades 2013.02.01 05:42:33 failed cancel order #0 buy 0.00 at market [Invalid request] LI 2 21:06:36 Trades 2013.02.01 05:42:33 failed cancel order #0 buy 0.00 at market [Invalid request] ? What can be the reason and how to fix it? Happens once in several dozen times of successful execution of this part of code.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Is there any money? :)))
How do you encourage people to have this kind of discussion?
Why does the terminal log in to login.mql5.com if there are empty fields in "settings - community"?
(821 build does not break in)I throw it on the M5 chart:
2013.07.26 22:17:12 testprevbar (EURUSD,M5) Full recalculation!
2013.07.26 22:17:06 testprevbar (EURUSD,M5) Full recalculation!
2013.07.26 22:17:00 testprevbar (EURUSD,M5) Full recalculation!
2013.07.26 22:16:59 testprevbar (EURUSD,M5) Full recalculation!
2013.07.26 22:16:55 testprevbar (EURUSD,M5) Full recalculation!
2013.07.26 22:16:55 testprevbar (EURUSD,M5) Full recalculation!
2013.07.26 22:16:55 testprevbar (EURUSD,M5) Full recalculation!
2013.07.26 22:16:54 testprevbar (EURUSD,M5) Full recalculation!
2013.07.26 22:16:53 testprevbar (EURUSD,M5) Full recalculation!
2013.07.26 22:16:52 testprevbar (EURUSD,M5) Full recalculation!
2013.07.26 22:16:51 testprevbar (EURUSD,M5) Full recalculation!
2013.07.26 22:16:51 testprevbar (EURUSD,M5) Full recalculation!
2013.07.26 22:16:50 testprevbar (EURUSD,M5) Full recalculation!
2013.07.26 22:16:46 testprevbar (EURUSD,M5) Full recalculation!
2013.07.26 22:16:45 testprevbar (EURUSD,M5) Full recalculation!
2013.07.26 22:16:42 testprevbar (EURUSD,M5) Full recalculation!
2013.07.26 22:16:40 testprevbar (EURUSD,M5) Full recalculation!
2013.07.26 22:16:39 testprevbar (EURUSD,M5) Full recalculation!
2013.07.26 22:16:37 testprevbar (EURUSD,M5) Full recalculation!
2013.07.26 22:16:36 testprevbar (EURUSD,M5) Full recalculation!
2013.07.26 22:16:15 testprevbar (EURUSD,M5) Full recalculation!
2013.07.26 22:16:15 testprevbar (EURUSD,M5) Full recalculation!
2013.07.26 22:16:12 testprevbar (EURUSD,M5) Full recalculation!
2013.07.26 22:16:11 testprevbar (EURUSD,M5) Full recalculation!
2013.07.26 22:16:11 testprevbar (EURUSD,M5) Full recalculation!
2013.07.26 22:16:10 testprevbar (EURUSD,M5) Full recalculation!
2013.07.26 22:16:10 testprevbar (EURUSD,M5) Full recalculation!
2013.07.26 22:16:09 testprevbar (EURUSD,M5) Full recalculation!
2013.07.26 22:16:09 testprevbar (EURUSD,M5) Full recalculation!
2013.07.26 22:16:09 testprevbar (EURUSD,M5) Full recalculation!
2013.07.26 22:16:06 testprevbar (EURUSD,M5) Full recalculation!
2013.07.26 22:16:06 testprevbar (EURUSD,M5) Full recalculation!
2013.07.26 22:16:05 testprevbar (EURUSD,M5) Full recalculation!
And what the hell?
Help:
Необходимо отметить связь между значением, возвращаемым функцией OnCalculate() и вторым входным параметром prev_calculated. Параметр prev_calculated при вызове функции содержит значение, которое вернула функция OnCalculate() на предыдущем вызове. Это позволяет реализовать экономные алгоритмы расчета пользовательского индикатора с тем, чтобы избежать повторных расчетов для тех баров, которые не изменились с предыдущего запуска этой функции.
To do this, it is usually sufficient to return the value of the rates_total parameter, which contains the number of bars in the current function call. If since the last call of OnCalculate() price data were changed (for example, history was pumped deeper or history blanks were filled), then the value of input parameter prev_calculated will be set to zero by the terminal itself.
prev_calculated can reset to 0, but why so often?
Posted bug #804979
A simple indicator:
I throw it on the M5 chart:
2013.07.26 22:17:12 testprevbar (EURUSD,M5) Full recalculation!
...............
And what the hell?
Reference:
prev_calculated can reset to 0, but why so often?Bitcoins OK? :)
It's not gonna do any good anyway.
You're evil! No bitcoins from you. Just Mongolian tugriks.
Bitcoins okay? :)
Nothing good will come of it anyway.
Forum on trading, automated trading systems and trading strategy testing
Bugs, bugs, questions
A100, 2013.07.22 09:28
Yes, sorry, transposed incorrectly from my code - does not work at non-trading timeChartGetInteger does not work, because CHART_BRING_TO_TOP is write only.Today is a non-trading day, the error is reproduced again (which prevents testing). On trading day - everything works correctly - disconnected communication - still worked.
Symptoms are the same https://www.mql5.com/ru/forum/1111/page1036#comment_550221
Can you please tell me why this piece of code is being used when the EA is running?
causes similar messages to appear from time to time :NL 2 21:06:36 Trades 2013.02.01 05:42:33 failed cancel order #0 buy 0.00 at market [Invalid request]
LI 2 21:06:36 Trades 2013.02.01 05:42:33 failed cancel order #0 buy 0.00 at market [Invalid request] ?
What can be the reason and how to fix it?
Happens once in several dozen times of successful execution of this part of code.
Bought a windows 8 x64 laptop and the problems started.
Found this in the terminal before I had time to use it. Ok but with colour selection it opens fully 50/50