Orders not closing at take profit level

 
What causes some orders not closing at exact take profit level
 
Check line 247 of your code
 
amando:
Check line 247 of your code
A TP trigger is not depending of the code :-D
 
kamada2020:
What causes some orders not closing at exact take profit level
Slippage. A TP is a market order, it fills at available price.