I would assume that the order gets set before you can trade it out.Now thats a good question and not one I've seen an official answer about.
For example, if the Pies bid on Reef McInnes this year after their 1st 2 picks, they will need to carry a deficit into next year. If they then trade their 1st rounder out during the draft what happens then? I know that if they trade it out in next years trade period then that will be the revised pick (ie. post the deficit) but if they do it in the same draft I don't know if that would have already been assumed to have occurred. Its an interesting one.
E.G. I they had pick 15, then minus the defict it becomes pick 20, then they are trading pick 20 out.
If they had traded the first round pick the next year, it would become the next time they use 1st round pick.
But this is the AFL so who knows.