Calculate Lot Size To recover Previous Loss (Loss in pips) for a fixed TP pips?

 
a bit confused about how to calculate the lotsize if I want to recover the lost pips based on a fixed TP?

For instance , If my loss is 100 Pips , and I have a fixed TP of 30 pips , now how do I calculate the lot so that if the 30 pips TP is triggered it will recover the lost 100 pips ?
 

A PIP is a unit of distance. You can't have a loss of 100 PIPs any more than you can have a loss of 100 miles. Loss is a change in account balance.

Risk depends on your initial stop loss, lot size, and the value of the symbol. It does not depend on margin and leverage. No SL means you have infinite risk. Never risk more than a small percentage of your trading funds, certainly less than 2% per trade, 6% total.

  1. 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.

  2. AccountBalance * percent/100 = RISK = OrderLots * (|OrderOpenPrice - OrderStopLoss| * DeltaPerLot + CommissionPerLot) (Note OOP-OSL includes the spread, and DeltaPerLot is usually around $10/PIP but it takes account of the exchange rates of the pair vs. your account currency.)

  3. Do NOT use TickValue by itself - DeltaPerLot and verify that MODE_TICKVALUE is returning a value in your deposit currency, as promised by the documentation, or whether it is returning a value in the instrument's base currency.
              MODE_TICKVALUE is not reliable on non-fx instruments with many brokers - MQL4 programming forum (2017)
              Is there an universal solution for Tick value? - Currency Pairs - General - MQL5 programming forum (2018)
              Lot value calculation off by a factor of 100 - MQL5 programming forum (2019)

Doing the algebra, you get lotSize = loss /  (100*pips+spread) / DeltaPerLot.
 
William Roeder #:

A PIP is a unit of distance. You can't have a loss of 100 PIPs any more than you can have a loss of 100 miles. Loss is a change in account balance.

Doing the algebra, you get lotSize = loss /  (100*pips+spread) / DeltaPerLot.

Thanks William Roeder , few question please : 

 LotSize = loss /  (100*pips+spread) / DeltaPerLot // here "loss" is the money that was lost  ? 

 LotSize = loss /  (100*pips+spread) / DeltaPerLot // here "pips" is the takeprofit ? 

 LotSize = loss /  (100*pips+spread) / DeltaPerLot // What is  "100" ? 



I Tried the above mentiond formula 
26 /(100 * 30)/ PointValuePerLot() // 26 is the money lost , 30 is the TP 
But I am getting : 7.40331...........74e-09 ?

can you please point where I am going wrong ?
 

I misread your loss of 100 Pips vs your 30 Pip TP. 

RISK = OrderLots * (|OrderOpenPrice - OrderStopLoss| * DeltaPerLot

loss / (TP * DeltaPerLot) = lots

$26 / (30 * 0.0001 * 1 / 0.00001) = 8.67 lots.

Reason: