Detecting an object (arrow) on current bar

 

Hi all, I would like to program my EA to detect if an object appears (an arrow... put there by an indicator) on the current bar of my chart. Is this possible?


Thanks!

Shawn

 
 


Thanks Viffer... can this find it on the current bar? Any thoughts on how I would do that?


Thanks!

Shawn

 

Normally, to have drawn the arrow in the first place, it will have been given a name and ObjectFind() will look for the name. Presumably some where in your code, there will be the code that created the object. Normally it would be some combination of label and time to generate the name. You can then reference this with ObjectFind(). AFAIK, the only automatically drawn arrow would be the ones with order send. and you could reference these points with OrderSelect.

Does that help any?

V

 
Viffer:

Normally, to have drawn the arrow in the first place, it will have been given a name and ObjectFind() will look for the name. Presumably some where in your code, there will be the code that created the object. Normally it would be some combination of label and time to generate the name. You can then reference this with ObjectFind(). AFAIK, the only automatically drawn arrow would be the ones with order send. and you could reference these points with OrderSelect.

Does that help any?

V



Well, the thing is there could be several of these arrows drawn on the chart and I only want to check to see if there is one drawn on the current bar only. Do you know if there's a way to check that?


(I don't care about the arrows drawn with "OrderSend"... they're not the ones I'm looking for. It's the big up and down pointing arrow objects that I want to detect)

 

So if you right click on your chart, and select objects list, you will see that each of the arrows will have a name. It is this name that you need to detect it with ObjectFind. Afaik, there is no other way.. Normally, when programs name an object they use a consistant method, normally consisting of a lable and a time. The name might look like "Arrow" and a string of numbers. Normally that string of numbers would be the time for the bar where the arrow is drawn. It si wholly dependent on the code that was used to create and name the arrow in the first place. If it is a standardazed approach then you could use Objectfind() like this...

ObjectFind("Arrow"+Time[0]); 

As I say, this will be wholly dependent on the method used to name the arrow in the first place.

V

 
Viffer:

So if you right click on your chart, and select objects list, you will see that each of the arrows will have a name. It is this name that you need to detect it with ObjectFind. Afaik, there is no other way.. Normally, when programs name an object they use a consistant method, normally consisting of a lable and a time. The name might look like "Arrow" and a string of numbers. Normally that string of numbers would be the time for the bar where the arrow is drawn. It si wholly dependent on the code that was used to create and name the arrow in the first place. If it is a standardazed approach then you could use Objectfind() like this...

As I say, this will be wholly dependent on the method used to name the arrow in the first place.

V


Thanks Viffer, I think with "ObjectFind("Arrow"+Time[0])" I should be able to do it!


Thanks

Shawn

 
<Deleted>
 
Hi, I was inspired a bit by this thread - and what if the name of the object is floating (but a shared segment) , and I would like to read the parameters of the object and check, for example, the color? 
 
StickyLab Home #: what if the name of the object is floating (but a shared segment) , and I would like to read the parameters of the object and check, for example, the color? 
  1. Do you really expect that people are still watching this thread after twelve (12) years?
    Don't resurrect old threads without a very good reason. A lot has changed since Build 600 and Higher. (2014)

  2. What is a floating name?
         How To Ask Questions The Smart Way. (2004)
              Be precise and informative about your problem

  3. You want to read it, so do it. Show us your attempt (using the CODE button) and state the nature of your difficulty.
              No free help (2017)

 
@William Roeder 
Do you really expect that people are still watching this thread after twelve (12) years?
Don't resurrect old threads without a very good reason. A lot has changed since Build 600 and Higher. (2014)

What is a floating name?
     How To Ask Questions The Smart Way. (2004)
          Be precise and informative about your problem

You want to read it, so do it. Show us your attempt (using the CODE button) and state the nature of your difficulty.
          No free help (2017)

 I think the problem is my lack of good programming skills, which makes it beyond time - at least I hope so.
Such that the first part of the name is unchanging, and the addition after the hyphen has random numbers(at least I haven't discovered any correlation)

never mind, better if I make a new topic
Reason: