Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 95
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
Yes. Variables with i_ are input variables (from the word intut, which can be changed by the user...), and pt is a global variable too, which is visible everywhere...
No, the lot has not been normalised. Never encountered it in tester... And what does lot have to do with the object (error 4200)?
What does lot have to do with it? If the lot is invalid, the error handling function is called, which will cause objects to be built.
If the lot is wrong, there will be an error in the tester. You say that you don't build objects, but in the function
still builds objects:
That's probably where the bug is buried. You may have to do something there. Comment out the output of the chart in this function. If the error is gone, you are looking for the reason behind it in the function.
Hello, I am new to mql programming. I have a problem, I have a custom indicator, not written by me, it generates buy and sell signals in the form of arrows, for this purpose there are two buffers in the indicator, the problem is that I can not properly read the signals from the indicator to the Expert Advisor to make a buy or sell.
The code for the indicator:
...
To paste the code correctly in the forum click on the SRC and then copy the code.
SRC to insert code!!!
and it's not a hindrance, it's highly recommended!
Hello, I am new to mql programming. I have a problem, I have a custom indicator, not written by me, it generates buy and sell signals in the form of arrows, for this purpose there are two buffers in the indicator, the problem is that I can not properly read the signals from the indicator to the Expert Advisor to make a buy or sell.
Indicator code:
I'll know, thank you! Fix it?
I'll know, thank you! Fix it?
pr is a print function. And the error, this is already a standard constant. Logically, this is not acceptable at all. If you still suspect the pr function, here it is:
Well, replace it with the usual print and watch the log.
there object is created, object name is not unique, that's why there is an error when creating an object.
What does this have to do with the lot? If lot is wrong, then error handling function is called and it will cause building objects.
If the lot is wrong, there will be an error in the tester as well. You say that you don't build objects, but in the function
objects are still being built:
That's probably where the problem lies. You may have to do something there. Comment out the output of the chart in this function. If the error is gone, you are looking for the cause of the error in the function
I had already thought of that myself, and your answer just hit the same spot. The problem disappeared with commenting out places with this function. Apparently, when using it, you have to delete all objects in the input at once, right? I.e. at the very beginning of the pr function, I mean.
I've already thought about it myself, and just now your answer hit the same point. The problem disappeared with commenting out places with this function. Apparently, when using it, you have to delete all objects on the input at once, right? I.e. at the very beginning of the pr function, I mean...
I honestly don't know the logic of your function. Whether it should delete objects or build them, I don't know. Tell me what you want it to do and we'll see where the logic is wrong. However, if the function tries to build a graphical object but fails, it means it already exists. So what next according to the logic of your program? You can build a new object with a different name (for example, add the current time to the object name (TimeToStr(TimeCurrent()))) or, if you already have an object but need to change its properties, do not build it again, but simply change its properties. Then the error will not appear again.
It's as simple as that. The main thing is to know what you want. :)
Hello, I am new to mql programming. I have a problem, I have a custom indicator, not written by me, it generates buy and sell signals in the form of arrows, for this purpose there are two buffers in the indicator, the problem is that I can not properly read the signals from the indicator to the Expert Advisor to make a buy or sell.
Indicator code:
Are you sure you have all curly brackets in place. They are missing in some places. That's why your logic is flawed. And most likely the result is not what you expected.