Questions from Beginners MQL5 MT5 MetaTrader 5 - page 989
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
How do I find the reason for this message?
Profiler
You don't know how to check the return value for zero? And don't know how to exit OnCalculate() with a return of zero? Have you never tried to search for information on the website?
This is not an indicator.
I intentionally specified whether I should do checks at each call or one at start of OnTick is enough...
Returns are not acceptable for me ... and to loop the wait in the tester is impossible, and in the real should work (or not?).
My rating is not for programming, I am not a programmer, and I am learning this complicated business only thanks to people like you, I really appreciate feedback from knowledgeable people.
Thank you for your understanding.
Profiler
What if it happens once a day or less?
Hello. I can't find anything, for some reason the handel only transfers when it's set to all periods, but I set it to a certain period and nothing happens. I don't know what the problem is. I tried to input data not from global variables directly into handel, the result is the same. What's wrong?
Study the error, Artem is right in saying that you should check everything 10 times...
ERR_INVALID_ARRAY
4006
Array of unsuitable type, unsuitable size or corrupted dynamic array object
ERR_INDICATOR_DATA_NOT_FOUND
4806
Requested data not found
Hello. I've noticed that the handel only transfers when it's set for all periods, but when I set it for a certain period, nothing happens. I do not understand what the problem is. Tried typing in handel directly not from global variables, result is the same. What's wrong? I need the value to be from the same period.
You take examples from the CodeBase from Scriptor's indicators, don't you? Right? Then look in his code (recently published) for examples that have MTF in their name, but without MCP.
MTF = MultiTimeFrame, MCP = MultiCurrencyPair. I.e., if you want to get data on the current symbol, but from another timeframe than the chart period, then you need an example of a multi-timeframe indicator. In MCP you should not get involved yet - there on the OOP with the use of the standard classes. You will get confused.
For example, this calculation:
It's only for MA working on the current period and symbol. For working on a different period, the calculation will be different. Look it up - everything is close, and the direction I gave you.
You take examples from the CodeBase from Scriptor's indicators, don't you? Right? Then look in his code (recently published) for examples that have MTF in their name, but without MCP.
MTF = MultiTimeFrame, MCP = MultiCurrencyPair. I.e., if you want to get data on the current symbol, but from another timeframe than the chart period, then you need an example of a multi-timeframe indicator. In MCP you should not get involved yet - there on the OOP with the use of the standard classes. You will get confused.
For example, this calculation:
it is only for MA working on current period and symbol. For work on a different period, the calculation will be different. Search - everything is close, and I gave you the direction.
Study the error, Artem is right in saying that you should check everything 10 times...
ERR_INVALID_ARRAY
4006
Array of unsuitable type, unsuitable size or corrupted dynamic array object
Thank you
Please, but I copied the wrong error, it should be
ERR_INDICATOR_DATA_NOT_FOUND
4806
The requested data was not found
The point is that the number of bars is different for different TFs and this should be taken into account.
Please, but I copied the wrong error, it should be
ERR_INDICATOR_DATA_NOT_FOUND
4806
The requested data was not found
The point is that the number of bars is different for different TFs and this should be taken into account.
I was just checking it. But the PROBLEM is that having set handel on one constant period, in
CopyBuffer the value on other timeframes is NOT PERMANENT. On the set handle period the value was, but on the smaller timeframes 0.0 (zero). Moved it around the buffer in search... zero. Why is it not passed toCopyBuffer ?