INFO indicator I need help with this code.

 

I want this to do something when the current stoploss is greater than the previos stoploss. Can someone help?

Please?

for(int i = PositionsTotal()-1; i >= 0; i--)
     {
      ulong posTicket = PositionGetTicket(i);
      if(PositionSelectByTicket(posTicket))
        {
         double posOpenPrice = PositionGetDouble(POSITION_PRICE_OPEN);
         double posVolume = PositionGetDouble(POSITION_VOLUME);
         double posTp = PositionGetDouble(POSITION_TP);
         double posSl = PositionGetDouble(POSITION_SL);
         ENUM_POSITION_TYPE posType = (ENUM_POSITION_TYPE)PositionGetInteger(POSITION_TYPE);
         if(posType == POSITION_TYPE_BUY)
           {
            double Bid = NormalizeDouble(SymbolInfoDouble(_Symbol, SYMBOL_BID), _Digits);
            static double posTp;
            double pre_take_pofit = posTp;
            posTp;
            if(posTp<pre_take_pofit)
            m_counter_up=1;
           }
         
        }
     }
 
I really don't understand what this could mean: "I want this to do something". What is this and what is something?
 
It is for an indicator that counts pips fo my EA which I run together. I would like it to set the counter to 0 when the stoplose moves in the correct direction. What I mean by correct direction is that it is a trailing stop that moves every 15 ticks. So every 15 ticks the counter would go to 0.
 
There are plenty of solution: https://www.mql5.com/en/search#!keyword=trailing