from sale to purchase, or from purchase to sale.
Once you start the first sale or purchase, the 180 days clock starts.
You can't stretch it out to one year.