position.pricecurrent vs symbolinfotick

 

Hi all,

I'm currently PositionInfo's pricecurrent to check my position for take profit and experiencing sever slippage

will changing to symbolinfotick improves the situation?

Is there any difference between these two method?


        if(position.PriceCurrent() - position.PriceOpen() >= tmpTP * adjustpt)
               {
                  cPos = true;
               }
 

need some help here, which is better?

I tried profiling which is very new to me

//+------------------------------------------------------------------+
//| Check Close                                                      |
//+------------------------------------------------------------------+
void CheckClose()
  {
//---

   bool     cPos  = false;

   double   tmpTP = TP,
            tmpSL = SL;

   MqlTick  tick;

   for(int i = PositionsTotal() - 1; i >= 0; i--)
   {
      if(position.SelectByIndex(i) &&
         position.Symbol() == _Symbol &&
         position.Magic() == MagicNum)
         {
            if(position.PositionType() == POSITION_TYPE_BUY)
            {
               if(!SymbolInfoTick(_Symbol, tick)) return;

               if(tick.bid - position.PriceOpen() > tmpTP * adjustpt)
               {
                  cPos = true;
               }

               if(position.PriceCurrent() - position.PriceOpen() > tmpTP * adjustpt)
               {
                  cPos = true;
               }
            }

            if(cPos)
            {

            }
         }
   }

//---
  }
 
There is no difference. 
 
Enrique Dangeroux #:
There is no difference. 
After running backrest with position.pricecurrent vs tick.ask/bid there's difference in the profit.

So which one should I use?
 
Enrique Dangeroux #:
There is no difference. 
These prices are not equal, priceCurrent is != ask and bid