For the next sell price divide N by 1 minus safe minus minimum trade % i.e. if safe = 10%, minimum trade size = 5% then 1 - 0.1 - 0.05 = 0.85 (so N / 0.85)
For next buy price divide N by 1 + safe + minimum trade % i.e. if safe = 10% minimum trade size = 5% then 1 + 0.1 + 0.05 = 1.15 (so N / 1.15)
I know I’m responding to an ancient post, but I recently worked out formulas for the same algebraically from standard aim rules. This formula (which is simpler and gives the same results) and mine both exhibit the same problem. When holdings are down to 1 share (which is plausible as I’m using leaps), it gives a negative sell price. Does anyone have a variation on the formula which gives a valid result when holdings are 1 share?