Well I am not sure about the purpose of your code but would normally assume that the entry price is determined by the entry tick, not the last pending tick, and priceHigh is normally the high of a candle, not of a tick. You can see the highs and lows of the historical ticks with the History script.

https://manual.zorro-project.com/price.htm