Unable to set OBJ_ARROW_BUY and _SELL properties

Back to topics list To post a new topic, please log in or register
avatar
20
niquedegraaff 2016.04.25 04:28
 
Not sure if this is a known problem but I'm unable to set the OBJ_ARROW_BUY and OBJ_ARROW_SELL properties.

string obj_name = PREFIX + " Arrow:" + TimeToStr(Time[i])
ObjectCreate(0, obj_name, OBJ_ARROW_SELL, 0, Time[i], Low[i] - (WindowPriceMax() - WindowPriceMin()) / 15);
ObjectSetInteger(0, obj_name, OBJPROP_STYLE, STYLE_SOLID);
ObjectSetInteger(0, obj_name, OBJPROP_COLOR, Red);

 

Results in
Wrong arrows



What am i doing wrong here?

avatar
Moderator
3418
GumRai 2016.04.25 05:37 #
 
string obj_name = PREFIX + " Arrow:" + TimeToStr(Time[i])

will not compile because you have missed the ; at the end of the line.

There does seem to be limitations to these arrows. You can change the colour, but not the size.

They do not print as they are described, in fact there seems to be no difference between OBJ_ARROW_BUY and OBJ_ARROW_SELL

If you are tring to emulate the trade open and close arrows use

   ObjectCreate(0,obj_name,OBJ_ARROW,0,Time[i],Low[i]-(WindowPriceMax()-WindowPriceMin())/15);
   ObjectSetInteger(0,obj_name,OBJPROP_ARROWCODE,1);

for the trade open and arrow code 3 for the close



Back to topics list  

To add comments, please log in or register