It uses the highest an the lowest price whithin the box to set the open price of the stoporder.
this is the backtest
What is your question ?
my quetion is how to set a good trailing stop funtion, that would takeprofit at the highest value posible?
I could reach better profits making the takeprofit value equal to the height of the box and using a trailingstop with threshold funtion.