OBJ Arrow placed too low

 
Hi, i'm using the OBJ_ARROW and the problem is that it stay too low on the graph, it's attached to the right price but the symbol itseft it's under that price
 
Lagger2807:
Hi, i'm using the OBJ_ARROW and the problem is that it stay too low on the graph, it's attached to the right price but the symbol itseft it's under that price

OBJPROP_ANCHOR

 
Mohamad Zulhairi Baba:

OBJPROP_ANCHOR

is it normal that it doesn't change?

it will be my solution but doesn't seem to do anything

 

I'm not claiming anything... so

here is the code with anchor_center (graph screenshot attached)

string up_arrow="up_arrow";
    
ObjectCreate(0,up_arrow,OBJ_ARROW,0,time,0);
ObjectSetInteger(0,up_arrow,OBJPROP_WIDTH,2);
ObjectSetInteger(0,up_arrow,OBJPROP_ARROWCODE,108);
ObjectSetDouble(0,up_arrow,OBJPROP_PRICE,1.12395);
ObjectSetInteger(0,up_arrow,OBJPROP_ANCHOR,ANCHOR_CENTER);

and here with anchor_top (default?... screenshot attached)

string up_arrow="up_arrow";
     
ObjectCreate(0,up_arrow,OBJ_ARROW,0,time,0);
ObjectSetInteger(0,up_arrow,OBJPROP_WIDTH,2);
ObjectSetInteger(0,up_arrow,OBJPROP_ARROWCODE,108);
ObjectSetDouble(0,up_arrow,OBJPROP_PRICE,1.12395);
ObjectSetInteger(0,up_arrow,OBJPROP_ANCHOR,ANCHOR_TOP);

it's obvious that I have done something wrong, but i don't know what

Files:
 
Lagger2807:

I'm not claiming anything... so

here is the code with anchor_center (graph screenshot attached)

and here with anchor_top (default?... screenshot attached)

it's obvious that I have done something wrong, but i don't know what

try this


string up_arrow="up_arrow";
double buffer = 0.001;

if(ObjectFind(0,up_arrow)==0) ObjectCreate(0,up_arrow,OBJ_ARROW,0,time,0);
else {
    ObjectDelete(0,up_arrow);
    ObjectCreate(0,up_arrow,OBJ_ARROW,0,time,0);
}
ObjectSetInteger(0,up_arrow,OBJPROP_WIDTH,2);
ObjectSetInteger(0,up_arrow,OBJPROP_ARROWCODE,108);
ObjectSetDouble(0,up_arrow,OBJPROP_PRICE,1.12395-buffer);
ObjectSetInteger(0,up_arrow,OBJPROP_ANCHOR,ANCHOR_BOTTOM);