May be because x is incorrect?
Carl Schreiber:
May be because x is incorrect?
x is an integer that represents the index number of the current object. x is obtained by running a for statement of every object on the current chart using ObjectsTotal(). Also, I'm testing this with only one object on the chart. Apologies for not clarifying that.May be because x is incorrect?
Like I mentioned, I have it working with OBJ_HLINE, OBJ_TREND, and OBJ_CHANNEL. Those get recognized perfectly by the if statement. Maybe there's something different about OBJ_ARROW_LEFT_PRICE?
Print out your variables, and find out why.
ObjectType() of OBJ_ARROW_LEFT_PRICE will come up as OBJ_ARROW
Thanks. Turns out, it's recognized as an ObjectType() of 22 (OBJ_ARROW_THUMB_DOWN).Even though my testing said it's OBJ_ARROW_THUMB_DOWN, this is pretty much what's happening.
I'm not sure why it's like that, but I'm guessing the workaround is check the arrow code for the arrow type I'm looking for.
I'm not sure why it's like that, but I'm guessing the workaround is check the arrow code for the arrow type I'm looking for.
user3822:
Thanks. Turns out, it's recognized as an ObjectType() of 22 (OBJ_ARROW_THUMB_DOWN).Even though my testing said it's OBJ_ARROW_THUMB_DOWN, this is pretty much what's happening.
I'm not sure why it's like that, but I'm guessing the workaround is check the arrow code for the arrow type I'm looking for.
Thanks. Turns out, it's recognized as an ObjectType() of 22 (OBJ_ARROW_THUMB_DOWN).Even though my testing said it's OBJ_ARROW_THUMB_DOWN, this is pretty much what's happening.
I'm not sure why it's like that, but I'm guessing the workaround is check the arrow code for the arrow type I'm looking for.
22 is OBJ_ARROW
You just found another example of a "sub-object arrow type" (for want of a better phrase)
ENUM_OBJECT object_type = 22;
printf("ObjectType %i is %s", object_type, EnumToString(object_type));
printf("ObjectType %i is %s", object_type, EnumToString(object_type));
2017.02.15 15:10:45.186 Test Ger30Sb317,M1: ObjectType 22 is OBJ_ARROW
honest_knave:
So all arrows fall under OBJ_ARROW object type?
22 is OBJ_ARROW
You just found another example of a "sub-object arrow type" (for want of a better phrase)
ENUM_OBJECT object_type = 22;
printf("ObjectType %i is %s", object_type, EnumToString(object_type));
printf("ObjectType %i is %s", object_type, EnumToString(object_type));
2017.02.15 15:10:45.186 Test Ger30Sb317,M1: ObjectType 22 is OBJ_ARROW
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
I wrote an if statement to recognize left price labels, but for some reason, it doesn't recognize that the object is a Left Price Label.
}
Thanks for the help.