Without a sensor, you would have to add code to move it back to the a known starting position before you shut it down. Or one could also record the ending position before powerdown, and initialize from the recorded position on next power up.
But without a sensor/limit switch, (or a hard stop) it is an open-loop system and you can't really know where the actual position is.
Edit: One solution early 3d printers (and simple CNCs) without limit switches used was to have the operator manually move/jog the system to a known location and then start the operation from that zero point.