Deletes or changes the description of the object

 
Hi

In this piece of code I believe that EA changes the color of a predetermined trendline after an order has been executed.



if (BuySig)
  {
      ObjectSet(obj_name, OBJPROP_COLOR, White);
      ObjectSet(obj_name, OBJPROP_WIDTH, 2);
    //if (BuyCnt > 0) return;
    if (OrdersCountBar0(0, OP_BUY, obj_name) > 0) return;
    
    //-----
    
    if (MarketExecution)
    {
      for (int i=0; i<RepeatN; i++)
      {
        RefreshRates();
        price = Ask;        
        
        comment = "{" + obj_name + "}";

        ticket = Buy(Symbol(), GetLots(), price, 0, 0, Magic, comment);
        if (ticket > 0) break;
      }
  




I would like to change the line that changes the color of the trendline by a line that deletes or changes the description of the object (trendline in question).

ObjectSet(obj_name, OBJPROP_COLOR, White);
Could anyone help?
 
OBJPROP_TEXT
OBJPROP_TOOLTIP
 
Hi
In this piece of code I believe that EA changes the color of a predetermined trendline after an order has been executed.

if (BuySig)
:
if (ticket > 0) break;
}

I would like to change the line that changes the color of the trendline by a line that deletes or changes the description of the object (trendline in question).
ObjectSet(obj_name, OBJPROP_COLOR, White);
Could anyone help?
Don't add text inside quoted text or SRC blocks, put it outside. MQL4 Forum editor problem - MQL4 and MetaTrader 4 - MQL4 programming forum
 
Marco vd Heijden:

Thanks for the answer.

I was not able to use the functions you indicated because I do not know much programming.

But I was able to use the ObjectsDeleteAll function that met my purpose and was more like including in the code.
 
whroeder1:
Don't add text inside quoted text or SRC blocks, put it outside. MQL4 Forum editor problem - MQL4 and MetaTrader 4 - MQL4 programming forum

Thanks for the guidance.

I'm getting better.