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?


for(int i = PositionsTotal()-1; i >= 0; i--)
      ulong posTicket = PositionGetTicket(i);
         double posOpenPrice = PositionGetDouble(POSITION_PRICE_OPEN);
         double posVolume = PositionGetDouble(POSITION_VOLUME);
         double posTp = PositionGetDouble(POSITION_TP);
         double posSl = PositionGetDouble(POSITION_SL);
         if(posType == POSITION_TYPE_BUY)
            double Bid = NormalizeDouble(SymbolInfoDouble(_Symbol, SYMBOL_BID), _Digits);
            static double posTp;
            double pre_take_pofit = posTp;
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:!keyword=trailing