Zone Recovery Calculator Algorithm

 

I want to create Zone Recovery Calculator to calculate the cost for each buy and sell for every cycle this calculator work with fixed Recovery Gap Like 50 pip for every cycle and can work with increment or decrement  Recovery Gap like 10 pip for 1st cycle 15 pip for 2nd cycle 20 for 3rd ,25,30,35 etc OR 50,45,40,35,30

i already create the expert but i want to create calculator to determined the cost for every cycle before i start trading and to know the capacity of my account

please i want helping with algorithms to create the calculator ( sorry about my weak English)