You can't deduct capital losses on the sale of personal use property. A personal use asset that is sold at a loss generally isn't reported on your tax return unless it was reported to you on a 1099-K and you can't get a corrected version from the issuer of the form.
If you sold a personal use asset for more than what you bought it for, then you would generally report that on the Stock or Investment Sale Information screen. You can report any selling expenses by reducing the amount you enter as "Sale Proceeds" by the amount of your selling expenses.
Additionally, you must report the sale of the home if you can't exclude all of your capital gain from income. Use Schedule D (Form 1040), Capital Gains and Losses and Form 8949, Sales and Other Dispositions of Capital Assets when required to report the home sale.
Writing your own contracts is perfectly possible, and legal. But it's also an incredibly bad idea. There's two reasons for this: Property law is complicated. Because it's such a fundamental part of legislation, it's often lots and lots of different laws layered on top of each other.