double stopLossDiff = price - stopLossPrice; takeProfitPrice = price + stopLossDiff * takeProfitMult; double stopLossPips = stopLossDiff / instrument.getPipValue();