Calculate next position considering the first one

 
Hi,

Suppose I open a buy trade at 1.23000 on eurusd with an expected TP of 10pips

The market goes against me and I'd like open a new trade, this time short, at 1.20000 with a TP of 10pips.

How can I calculate the lot size if I'd like to close all the trade in profit if the second one reaches the To?

Thanks a lot