Can anyone help me converting this simple indicator to MQL5, please?

 

I paste the code here too:

//--------------------------------------------------------------------------

//                                                 Extend Box              |

//--------------------------------------------------------------------------



#property copyright ""



#property indicator_chart_window





//-----------------------------------------------------------------------------

void init()

 {

  

  return(0);

 }



//-----------------------------------------------------------------------------

void start() 

 {

  int mBoxTime;

  

  

  if(Time[0] > mBoxTime)

   {

     for(int i = ObjectsTotal()-1; i >= 0; i--)

       if(ObjectType(ObjectName(i)) == 16)

         ObjectSet(ObjectName(i), OBJPROP_TIME2, Time[0]*2);



      mBoxTime = Time[0];

   }



  return (0);

 }



//-----------------------------------------------------------------------------

void deinit()

 {



  return (0);

 }



//-----------------------------------------------------------------------------
Files:
 
  1. Please edit your (original) post and use the CODE button (Alt-S)! (For large amounts of code, attach it.)
              General rules and best pratices of the Forum. - General - MQL5 programming forum 2019.05.06
              Messages Editor

  2. Help you with what? You haven't stated a problem, you stated a want. Show us your attempt (using the CODE button) and state the nature of your problem.
              No free help 2017.04.21

    Or pay someone. Top of every page is the link Freelance.
              Hiring to write script - General - MQL5 programming forum 2018.05.12

  3. MT5 doesn't have a predefined Time[]. So use iTime(). Perhaps you should read the manual: iTime
       How To Ask Questions The Smart Way. 2004
          How To Interpret Answers.
             RTFM and STFW: How To Tell You've Seriously Screwed Up.

  4. You should stop using the old event handlers and IndicatorCounted() and start using new event handlers.
              Event Handling Functions - MQL4 Reference