How to set Takeprofit not in pips but as closing in profit?

 

I would like to set my TakeProfit as closing in profit and not in pips. Below is my code closing in profit.

for(int Loop=OrdersTotal()-1;Loop>=0;Loop--)
  {
   if(OrderSelect(Loop,SELECT_BY_POS,MODE_TRADES))
   if(OrderSymbol()==Symbol()&&OrderMagicNumber()==MagicNumber)
   { 
    bool CloseTrade=false;
    int Type=OrderType();
    double Profit=OrderLots()*200;
    switch(Type)
    {
     case OP_BUY:if(OrderProfit()>=Profit)CloseTrade=OrderClose(OrderTicket(),OrderLots(),OrderClosePrice(),0,clrGreen);break;
     case OP_SELL:if(OrderProfit()>=Profit)CloseTrade=OrderClose(OrderTicket(),OrderLots(),OrderClosePrice(),0,clrGreen);break;
     //Print("ErrorCode:",GetLastError());                         
    }
   }
  }

Now I would like to set this closing in profit function as a take profit. I tried with the following code as shown below:

for(int Loop3=OrdersTotal()-1;Loop3>=0;Loop3--)
  {
   bool BuySel=OrderSelect(Loop3,SELECT_BY_POS,MODE_TRADES);
  }
  
  double TickValue=MarketInfo(Symbol(),MODE_TICKVALUE);
  
  double TakeProfitBuy=OrderLots()*TakeProfit/OrderOpenPrice()*TickValue;
 The code above is incorrect when placing as my takeprofit.