You really need to read the manual about ApplyStop http://www.amibroker.com/f?applystop
There are scenarios that are supported and described in great detail. Read those scenarios. Your scenario is listed as scenario 1. You don't need to call SetStopPrecedence at all. All that is required is described in manual.
I think my particular situation falls outside the examples given. I'd like the sell variable to trigger ahead of the profitstop when they occur on the same bar.
As I wrote, SetStopPrecedence does NOT affect regular exits. It only changes the ordering of stops (loss, trailing, N-bar, profit) that occur on same bar. You've got only one stop so calling SetStopPrecedence has absolutely ZERO effect.
As explained in manual: http://www.amibroker.com/f?applystop it is "ActivateStopsImmediately" setting that affects when stops are executed with regards to regular signals. If it is set to TRUE, regular signals are triggered first.