Complete the task when there is any change

 
I am looking for a solution, my code is updated every day and I would like the update to be made every time there are any changes, e.g. a new position is opened or a position changes, or the price in an open position changes. whether it is feasible.

I'm sending some code


//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
//---
    EventKillTimer();
  }
  //+------------------------------------------------------------------+
//| Timer function                                                   |
//+------------------------------------------------------------------+
string lastDay="";
void OnTimer()
  {
//---
string day=     TimeToString (TimeCurrent(), TIME_DATE)+"";
if(lastDay!=day){
lastDay=day;

}
   open_position();
   orders();
   history_orders();
   account_info();
  }
 
Michal Wolny:
...  my code is updated every day ...



"Code update" means a new version of the program?

In order to be able to react to changes in your positions, you must also observe "OnTradeTransaction" in addition to "OnTimer"