One can not really "lock" a profit in financial trading. Therefore the variable name "TrailLock" is maybe a little misleading. What it does is sending a close command at market when the price drops below 90% of a previous maximum. Your profit then depends on the current price and the slippage. It will often be less than 90%. It can theoretically even close with a loss.

Using an extremely short time frame, such as 2 minutes, makes this even worse in the simulation, as the price history then contains only a few price ticks inside a frame. Your image above looks perfectly ok for a 2-minutes period. In real trading there are more price ticks per minute, so the profit could be a little better because it takes less time to exit. But it normally won't be 90%. For a more or less realistic simulation you normally use time frames of about 30 minutes or more.