EURJPY Long Setup

Entered a Long at 140.782

SL: 139.667
TP: 143.683

I also got stopped out on this one. Looking at the chart now, if only I placed my TP in the 142 range which was a strong resistance then it would have gone well.

How do you calculate your stops?