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
Do you really think that the OP will be able to understand that?
Many of us are here because we want to learn
Being a novice myself, I found that code very difficult to follow, but a good exercise
I believe that part of my difficulty was this
Should these 2 lines be reversed to be
?
Although I realise that having a function to delete objects is a great idea as it can be included in a template, I just felt that it is a bit over-complicated a response to the OP as he seems to be at the same level of ability as myself.
Not as clever, but I believe that it answers the OP's question.
Although I realise that having a function to delete objects is a great idea as it can be included in a template, I just felt that it is a bit over-complicated a response to the OP as he seems to be at the same level of ability as myself.
Not as clever, but I believe that it answers the OP's question.
Now you have hard coded the name. If you need another object name, you now have to write more code, and debug it again.
ObjectNameDeleteAll("Point");
Does it all, whither is the object starts with the name, contains the name, all object types, one object type, and you only have to debug it once, not how many times you need it.
Always factor your code into functions. Even trivial functions
Now when I decide to shift the daily by several hours (eliminate the 1-2 hour Sunday) I can use: where daily.acr are synthetic daily bars. No further testing on the remaining code needs to be done. If daily.acr is calculated correctly, so is Today and therefor the code that calls Tomorrow().WHRoeder:
How many times (and how long) are you going to look at the two lines below before you figure out why neither works?
About the same amount of times and length of time that I would have to look at
to figure out why neither works. I don't see your point (no pun intended) :)
Both would return -1 from the StringFind function wouldn't they?
As I already wrote in my post
I realise that having a function to delete objects is a great idea
The " Point" wouldn't work but (I think) it's obvious in the function call, not in the IF.
You you created objects called "Points" the function works. The IF won't.
The " Point" wouldn't work but (I think) it's obvious in the function call, not in the IF.
You you created objects called "Points" the function works. The IF won't.
Well it was immediately obvious to me in the IF code that you posted.
As the OP was trying to delete objects beginning with "Point", not "Points", I don't see the relevance
If using "Points", the code would need to be changed slightly, obviously.
I am not denying that your way of having the function, with a lot more flexibility and ready to go is far superior, just that it is possibly a little bit complicated for novice coders.
It's not obvious that the above modified code is broken. You can't just change "Point" to "Points". You'll spend hours or days trying to track down that error.
When you are quoting my post, please do not add your code within the quote area. My post did not include that code.
Yes, you would have to take into account that "Points" has 6 letters.