Hi, i created an object/line on the chart which i want to use as a TP level.
To get the value of the line is use the following code:
When i put the buyarea2 variable in a Comment, i see the precise value (for example 1.2970.
But how do i use this in my OrderSend command to use this as my TP? If i put something like:
i get a strange value? And also after searching on the net i found some code like this, but i doesn't work either:
the first line gives me the exact pips distance to the line, but i'm stuck at the ordersend command.
Who can help me?
To get the value of the line is use the following code:
Inserted Code
buyarea2=ObjectGet("tpline", OBJPROP_PRICE1);
When i put the buyarea2 variable in a Comment, i see the precise value (for example 1.2970.
But how do i use this in my OrderSend command to use this as my TP? If i put something like:
Inserted Code
OrderSend(Symbol(),OP_BUY,0.1,Ask,50,Ask-mysl*pips2dbl,Ask+buyarea2,NULL,MagicNumber,0,Blue);
Inserted Code
TP=Ask+(MathFloor(MathAbs((buyarea2-Ask)/Point)/10)); OrderSend(Symbol(),OP_BUY,0.1,Ask,50,Ask-mysl*pips2dbl,TP,NULL,MagicNumber,0,Blue);
the first line gives me the exact pips distance to the line, but i'm stuck at the ordersend command.
Who can help me?