Screen show - Buy

 

When the buy order take place, how to show the data of:-\

a) Buying Price?

b) If the order has been closed, no more showing the buying price?

c) I get stucked at the writing below:-

ObjectDelete(name_8);
ObjectCreate(name_8, OBJ_LABEL, 0, 0, 0);
lg1="BUY";
ObjectSetText(name_8,""+lg1+"::"+DoubleToStr(Ask, Digits)+"", 9, "Arial", White);
//if((Ask-Bid)/point>=5){ObjectSetText(name_8,""+lg1+"::"+DoubleToStr(Ask, Digits)+"", 9, "Arial", White);
ObjectSet(name_8, OBJPROP_CORNER, 0);
ObjectSet(name_8, OBJPROP_XDISTANCE, 3);
ObjectSet(name_8, OBJPROP_YDISTANCE, 48);

Can someone correct me or this is totally wrong?

 

Probably, something like this:

int tik;

...

int start()

{

string str;

....//your program to open order

tik=OrderSend(...);

....

...//check this order

if(OrderSelect(tik,ORDER_BY_TICKET))

{

if(OrderCloseTime()==0)str=OrderOpenPrice();

else str="";

}

...//program for label

ObjectSet(str,.....);

...

}

Reason: