@karthiey Is the lot size supposed to be doubled no matter what? Then you can use this option:
01.png
On the other issue, you will need to store the value of the previous closed SL trade. But I'm not sure if that distance will be exactly the same all the time. Will open price depend on the last candle size?