Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 956

 
Igor Kryuchkov:

In the loop, I run it through the bars.


Count is used as an object name - have you checked what is written to it?
 
Artyom Trishkin:
Count is used as an object name - did you check what is written to it?

The numbers range from 0 to 5000. Which number is the name of the RECTANGLE depends on when the condition in the loop is triggered.

The condition is triggered exactly several times, because a number of arrows are drawn on the graph in the condition.

 
Igor Kryuchkov:

The numbers range from 0 to 5000. Which number is the name of the RECTANGLE depends on when the condition in the loop is triggered.

The condition is triggered exactly several times, because a number of arrows are drawn on the graph in the condition.

Have you checked what is written to it?
 
Artyom Trishkin:
what's being written into it have you checked?

Yes. Numbers from 0 to 5000. For example 213, 435, 4357

 
Igor Kryuchkov:

Yes. Numbers from 0 to 5000. For example 213, 435, 4357.

But you do not use Count for object coordinates, but

Time[i+20], Close[i+1]
 
Artyom Trishkin:

But at the same time for object coordinates you use not Count, but

OK, let's use i instead of Count, the situation is the same.

 
Igor Kryuchkov:

OK, let's say we put i instead of Count, situation is the same.

Ctrl+B --> "All" button.

You know, I'm getting tired of having to pull bits and pieces of information from you. I feel like I'm talking to a non-programmer.

It turns out you also have products in the marketplace.

I thought you were a novice because you put the loop index in the object name without any conversion or name prefix. How are you going to delete the objects afterwards?

 
Artyom Trishkin:

Ctrl+B --> All button

You know, I'm starting to get tired of teasing you by bits and pieces for information. I feel like I'm talking to a non-programmer.

Ctrl+B --> "All" button - there's one object, which is what I'm talking about. The problem is, if I create a RECTANGLE the normal way without Canvas. It creates the right number ofRECTANGLE objects.

With Canvas, I can only create one. Why is it like that? I make a unique name for eachRECTANGLE.


The thanks to the programmer, of course.

 
Artyom Trishkin:

Ctrl+B --> "All" button.

You know, I'm getting tired of having to pull bits and pieces of information out of you. I feel like I'm talking to a non-programmer.

It appears that you have products in the marketplace as well.

I thought you are a beginner since you put loop index without any conversion or name prefix. How are you going to delete objects afterwards?

I didn't write removal in void OnDeinit(const int reason). But a temporary solution for me is manual deletion of all the objects after each compilation.

 
Igor Kryuchkov:

Ctrl+B --> "All" button - there's one object, which is what I'm talking about. The problem is that if I create a RECTANGLE the normal way without Canvas. It creates the right number ofRECTANGLE objects.

With Canvas, I can only create one. Why is it like that? I make a unique name for eachRECTANGLE.


Thank you for the programmer, of course.

No fully reproducible code - no concrete discussion. I don't know what you've done there. You've made some kind of problem out of the simplest of things.

Reason: