Errors, bugs, questions - page 1150

 
svds75:
I'm sorry, I don't understand. Perhaps you know the answer and gave me a hint. I also thought about it - if you had told me which function, ObjectFind() or ObjectDelete(), generates an error in _LastError, or any other, maybe I would understand.

I've tried many variants (even in this code), not to mention the place of application. And if/else below it seems to be possible to remove it and the error remains.

By and large it can be bypassed. You have to write more code checking the object after you deal with it decently. I find it easier to delete it and create it anew with the necessary parameters because its parameters are changing many times during runtime. That's what I encountered and that's why I'm asking.

There is only one message, because at first call of OnCalculate object doesn't exist and ObjectFind generates error, then object is created, so subsequent calls of ObjectFind in OnCalculate work without error.
 
barabashkakvn:
ObjectFind

Returned value

If successful, the function returns the number of the subwindow (0 means main chart window) where the found object is located. If the object is not found, the function returns a negative number. To get additional information about the error, call the GetLastError() function.

If the object is not found, this is an error. At that, the ObjectFind function itself will return a negative number and the error number can be obtained.

This is more clear:

Run it in debug and see the value of variable"find".

I got it, thanks for the clarification. I just thought that the error was caused by incorrect parameter ObjectFind or something else although it was done by the compiler. Well, never mind, especially since it says "To get additional information about an error..." .

Well, thanks anyway, we will take it into account now.

 
mql5:
There is only one message, because on the first call to OnCalculate the object does not exist and ObjectFind generates an error, then the object is created, so subsequent calls to ObjectFind in OnCalculate work without error.
This is just about this example. But in my process it may be deleted. And the error is written again. In general, I already understood. THANK YOU!
 
      IndicatorSetDouble (INDICATOR_MAXIMUM,???);
      IndicatorSetDouble (INDICATOR_MINIMUM,???);

Can you please tell me what value should be reported in order to override the scale fixation?

(purpose: in the "Scale" tab of the settings of the tool, uncheck the boxes programmatically)

 
Fry:

Can you please tell me what value should be reported in order to override the scale fixation?

(purpose: in the "Scale" tab of the settings of the tool, uncheck the boxes programmatically)

These checkboxes are not checked by default in the indicator. I don't know about unchecking them.
 
barabashkakvn:
These checkboxes are not checked in the indicator by default. As for unchecking, I do not know.

But this function puts them, so logically should remove them =).

During initialisation, I have one input that determines whether or not to lock the scale.

If the input =0, I'd like not to lock.

But, if this intu !=0 at least once (after loading of the indicator it's possible to change settings), then the checkboxes are programmatically set.

And how then to remove them?
 
Fry:

But this function checks them, so logically it should uncheck them =)

During initialisation, I have one input that determines whether or not to lock the scale.

If the input =0, I'd like not to lock.

But, if this intu !=0 at least once (after loading the input, the settings can be changed), then the checkboxes are programmatically set.

And then how do you uncheck them?
In this case, if you want to remove the checkmarks, the way out is the following: delete the current indicator and add a new one. In the new indicator, the scale is unchecked by default.
 

Folks, can you suggest where to read or throw me a link?

I need something like an alarm clock to set an order at a certain time and this time can be set from some drop-down panel.

 
What are these events in the feed?False events in the feed There are no events after the transition.
 
Can you tell me if I can leave feedback to the programmer only after the job is done?
Reason: