Hello I was looking for proper way to calculate position size that includes the cost of placing a trade (spread, commission)
So overall if I have $10k account and choose 10% risk
After a losing trade, I will have exactly $9k left in my account balance.
AccountBalance * percent + commission = Risk = ( OrderOpenPrice - OrderStopLoss )*Direction() * DeltaPerLot() * lotsize. Solve for lotsize and normalize properly.
You place the stop where it needs to be - where the reason for the trade is no longer valid. E.g. trading a support bounce the stop goes below the support. Note that OrderOpenPrice - OrderStopLoss includes the spread.