Can I use OOP to write an indicator?

 

like topic 

 
What do you mean? See samples of classes using in the terminal_path\MQL5\Include\Indicators\  folder, where terminal_path is folder of the MetaTrader 4 terminal.

 

like is :

 

    MyIndicator::     MyIndicator()

  {

  Print("init now");

   

  }

 

   MyIndicator::    ~MyIndicator() 

   {

       

   } 

 

Reason: