You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I understood that I used the new description - the old ones
are not in the description, but are still highlighted by the editorWhen using this function there is an error "2012.11.28 09:58:32 4194304 bytes not available", help to understand, increased swap file to 10GBt.
Yedelkin:
А лог-файл случайно алёртами не забивается?
Checked it, the log is 10 kBt, there have been more,
MemoryException 09:36:12 4194304 bytes not available" error, it repeats often.
Noticed (by previous code):
// Selection of period from array by index (from PERIOD_M5 (index - 5) to PERIOD_D1 (index - 19))
If less periods (e.g. PERIOD_M5 to PERIOD_M6) are taken for the enumeration, no error will occur.
// Selection of a period from an array by index (from PERIOD_M5 (index - 5) to PERIOD_D1 (index - 19))
1. which type of array are we talking about?
2. What value is contained in this array under index - e.g. 19?
1. what type of array are we talking about?
2. What value is contained in this array under the index, e.g. 19?
I think it's easier to do this, I wrote the function as a separate expert, you can run it and see for yourself.
If you have time and desire help. (The error is the same).
Duplicate code:
File is attached. Parameters of the tester (just in case)
EURUSD.e
H1
OHLC
2012.1.1 - 2012.4.1
Updating a question, I am interested in two errors:
1. 2012.11.28 11:45:18 4194304 bytes not available
I can't solve them yet, but if instead of enumerating periods m_period = PERIOD_INDEX[iperiod], set for examplePERIOD_H1, there will be no error,
but I need all periods.
2. 2012.11.28 11:45:49 2012.01.01 00:00:00 Alert: Error CopyBuffer - error number: 4806
to solve this error, I will uncommentSleep(1000); it will disappear and data from the buffer will be copied normally.
question: why? is it possible to do withoutSleep(1000), to avoid additional time wasting?
Unfortunately, I don't have a tester handy.
A bit of trivia. On the left side of the line you have
there is a variable of the int type on the left and a value of the ENUM_TIMEFRAMES type on the right. Why don't you declare 'ENUM_TIMEFRAMES m_period;' right in the fifth line?
2. You have a triple nested loop where one and the same indicator is called in a rather short time. Only for one symbol about 1400 calls occur. Used indicators just don't have time to free memory. Search the forum threads about the IndicatorRelease() function. It was once said that the use of this function in code is already an error.
A quick change of indicators in the code also explains the appearance of error 4806. The new indicator simply has no time to load the required data.
Can you tell me how to get rid of Abnormal termination?
The EA stops working and this can only be seen in the log, it is green on the chart.
I have changed the code taking into account your comments:
(corrected m_period = PERIOD_INDEX[iperiod];, error is not significant in this case - but thanks, I fixed it)
issue with error (Error CopyBuffer - error number: 4806) - removed, I cured it by Sleep(1000); - I put it down to not having enough time to create indicator.
The issue with the error (4194304 bytes not available) remains.
The remark about IndicatorRelease() - taken into account in the processing.
If anyone have thoughts, please share, thank you.