[ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5. - page 8

 
Chiripaha:

I can't figure it out - how do you rename an object?

You can't.

How do you even rename something that identifies you?

 
sergeev:

no way.

how do you even rename something that identifies you.


Wait.... I set up a line (any line) then go into its settings and give it a new name. Hence, it is renamed somehow.

OK. I'm willing to assume that the old one is deleted and the new one is made... Then this is the path, if I understand correctly, to follow? (if not renamed).

And probably on the same principle renaming via object properties happens? Or is it not...?

And renaming is possible in principle - otherwise this term wouldn't exist in nature... : )) (for how you can...) - I'm just interested in how it's implemented here.

As an option I can suggest the idea - highlight by object number - query its name and give it a new name... Why not...?

Then... You have to rename a file in your software somehow... Although they (files) identify themselves too. I'm not a programmer - I don't know how to do it, but I know it should. That's what I need help with, to understand how it's done (in code).

 
Chiripaha:
...Then... You do rename the file somehow in the software... Although they (files) identify themselves too. I'm not a programmer - I don't know how to do it, but I know it should. So I need help to understand how to do it (in code).
I believe that programmers, as convinced perverts, delete the old object and create a new one in its place with the same parameters but with a new name. Can you imagine?
Moreover, after changing any small hair in the text, the text editor rewrites the whole file instead of writing this small hair in it!

All in all, it's a madhouse...
 
Chiripaha:

Wait.... I set up a line (any line) then go into its settings and give it a new name. It must be renamed somehow.

OK. I'm willing to assume that the old one is deleted and the new one is made... Then this is the path, if I understand correctly, to follow? (if it doesn't get renamed).

Probably the same principle is used for renaming through object properties? Or not...?

And renaming is possible in principle - otherwise the term wouldn't exist in nature... : )) (for how one can...) - I am interested in how it is implemented here.

As an option I can suggest the idea - highlight by object number - query its name and give it a new name... Why not...

Then... you rename the file somehow in the software... Although they (files) identify themselves too. I'm not a programmer - I don't know how to do it, but I know it must. That's what I need help with, to understand how it's done (in code).


You really can't change the name of an object (rename it). You can create another object with the same properties and delete the first one.

1. Create an object, e.g. a line. Try creating another object with the same name. Error 4200 will return -- the object already exists.

(2) Now try to create an object with a different name and the same properties as the first object (superimpose one object onto another). The appearance of the object will not change.

3) Now change the properties of any of the objects (e.g. coordinates). Two lines will appear on the chart.

 
sergeev:

line 108

return(0) is clearly unnecessary + sell trades are for some reason taken out of the is new bar condition


I removed return(0) from line 108. I don't understand what to do with the is new bar condition, so that it would apply to sell as well
 
rigonich:


You really can't change the name of an object (rename it). You can create another object, with the same properties, and delete the first one.

1. Create an object, such as a line. Try to create another object with the same name. Error 4200 will return - the object already exists.

2. now try to create an object with a different name and the same properties as the first object (superimpose one object on the other). The appearance of the object will not change.

3) Now change the properties of any of the objects, for example coordinates. Two lines will appear on the graph.

Yes, I did it in my studies, but I assumed that there is a more rational way. Although, while waiting for an answer, at night I wrote through deleting implementation of this case.

So the labour was not "in vain"... : ))) Although, I'd still try it in different ways, if there were any.

Thank you very much for helping to bring certainty to this issue.

 
Hello, could you please suggest a function like multi lot.

What would be after closing a position to open a new one but with an enlarged lot.

I just need such a function for an EA, and I've not even seen an example of such a function :)
 
granit77:
I believe that programmers, as convinced perverts, delete the old object, and in its place create a new one, with the same parameters, but with a new name. Can you imagine?
Moreover, after changing any small hair in the text, the text editor rewrites the whole file instead of writing this small hair in it!

All in all, it's a madhouse...

Yes, I totally agree with you (for the irrationality of humanity's programmatic imperfections). I imagine my wife goes to the passport office to change her surname. And there she is "deleted" and given another one instead, but... with the same parameters and... a new passport. : )))

But, frankly speaking, I didn't imagine that. And it's hard for me to assess how true (rational) it is now. Is there any articles on this subject? Where could this question be read? or at least how to ask the right question to search in search engines?

Thank you very much.

 
Chiripaha:

Yes, I totally agree with you (for the irrationality of humanity's programmatic imperfections). I imagine my wife goes to the passport office to change her surname. And there she is "deleted" and given another one instead, but... with the same parameters and... a new passport. : )))



Unfortunately, they only remove the passport.
 
Hi. Make a brute-force order function, if the last order does not meet the expectations, then prescribe in the function an increase in the lot for the order opening function.
Reason: