Set paramaters
🚨🚧🚧🚧 Work in progress 🚧🚧🚧🚨
Iterations  Val. @@V_i \%@@  Invest. @@I_i@@  Com. @@C_i \%@@  Delay @@\delta_i@@  Rate @@R_i \%@@  Divis. @@D_i@@  Row 

Complete results
@@k@@  Int. @@J_k@@  Tot. i. @@T_k@@  Am. @@A_k@@  Profit @@P_k@@ 

Explanations

Amount
@@
\ \begin{array}[t]{l}
A_0 = I_0\\
A_k = \underbrace{A_{k1}}_{\begin{array}{c}\text{previous}\\\text{amount}\\\end{array}}
+ \underbrace{I_k}_{\begin{array}{c}\text{current new}\\\text{investment}\\\end{array}}
+ \underbrace{\frac{C_k}{100} A_{k1\delta_k} \frac{R_{k\delta_k}}{100 D_{k\delta_k}}}_{\begin{array}{c}\text{current part of}\\\text{compound interest}\\\end{array}}
= A_{k1} + I_k + \frac{C_k}{100} J_{k\delta_k}\\
\end{array}
@@
The current amount @@A_k@@ is the sum of the previous amount @@A_{k1}@@, a current new investment @@I_k@@, and a compound percentage @@C_k@@ of a previous amount interest @@J_{k\delta_k} = A_{k1\delta_k} \frac{R_{k\delta_k}}{100 D_{k\delta_k}}@@.
When @@C_k = 0@@, there is a simple interest: nothing of the interest is reinjected to the amount, i.e. all is really a profit.
When @@C_k = 100@@, there is a compound interest: all the interest is reinjected to the amount (with a delay of @@\delta_k@@ iterations), and so there is no real profit.
When @@0 < C_k < 100@@, only @@C_k@@ percents are used as a compound interest, the remain @@100  C_k@@ percents are profit.When @@\delta_k = 0@@, there is no delay, i.e. the interest is computed on the immediate previous amount @@A_{k1}@@.
When @@\delta_k > 0@@, the interest is computed on older amount @@A_{k1\delta_k}@@. That models a delay of @@\delta_k@@ iterations before injection on the interest.Divisor @@D_k@@ is use to facilitate an interest rate percentage @@R_k@@ given for a period different than the period corresponding to one iteration. For example, for a @@R_k@@ given for one year and an iteration period of one day, then set @@D_k = 365@@.
 Current all interest (regardless compound percentage) for one iteration @@ \ \begin{array}[t]{l} J_0 = 0\\ J_k = A_{k1} \frac{R_k}{100 D_k}\\ \end{array} @@

Delayed interest
@@
\ \begin{array}[t]{l}
J'_0 = 0\\
J'_k = \sum\limits_{i + \delta_i = k} J_i
= \text{sum of all }J_i\text{ such that }i + \delta_i = k\\
\end{array}
@@
When delay @@\delta_k = 0@@ for all @@k@@, then @@J'_k = J_k@@ for all @@k@@.

Total invested
@@
\ \begin{array}[t]{l}
T_0 = I_0\\
T_k = T_{k1} + I_k = I_0 + I_1 + I_2 + \cdots + I_k = \sum\limits_{i=0}^k I_i\\
\end{array}
@@
@@I_0@@ is the initial investment.
For each @@k@@, the current total invested @@T_k@@ is the sum of the previous total invested @@T_{k1}@@ and the current new investment @@I_k@@. 
Profit
@@
\ \begin{array}[t]{l}
P_0 = 0\\
P_k = \underbrace{P_{k1}}_{\begin{array}{c}\text{previous}\\\text{profit}\\\end{array}}
+ \underbrace{\frac{V_k}{100} I_k}_{\begin{array}{c}\text{current part of}\\\text{investment as}\\\text{kept profit value}\\\end{array}}
+ \underbrace{\frac{100  C_k}{100} A_{k1} \frac{R_k}{100 D_k}}_{\begin{array}{c}\text{current part of}\\\textit{not}\text{ compound interest}\\\end{array}}
= P_{k1} + \frac{V_k}{100} I_k + \frac{100  C_k}{100} J_k\\
\end{array}
@@
The current profit @@P_k@@ is the sum of the previous profit @@P_{k1}@@, the percentage @@V_k@@ of the current new investment @@I_k@@ that is considered as a kept profit value, and the part of the previous amount interest @@J_k = A_{k1} \frac{R_k}{100 D_k}@@ not reinjected to the amount.
When @@V_k = 0@@, all the investment is considered lost.
When @@V_k = 100@@, all the investment is considered as kept profit value.
Examples
Formulas to compute directly the result after @@k@@ iterations under some circumstances
For starting amount @@\alpha \in \mathbb{R}@@, rate @@\tau \in \mathbb{R}@@ and number of iterations @@k \in \mathbb{N}@@.
Simple interest on constant amount:
Amount @@A_k = \alpha \Rightarrow@@ Profits @@P_k = k \tau \alpha@@ 
Evolution of the amount with compound interest:
@@\left.\begin{array}{ll} A_0 & = \alpha\\ A_{k+1} & = A_k + \tau A_k = (1 + \tau) A_k\\ \end{array}\right\} \Rightarrow A_k = (1 + \tau)^k \alpha@@ 
Evolution of the amount with compound interest and perpetual adding of starting amount:
@@\left.\begin{array}{ll} A_0 & = \alpha\\ A_{k+1} & = A_k + \tau A_k + \alpha = (1 + \tau) A_k + \alpha\\ \end{array}\right\} \Rightarrow A_k = \alpha \sum\limits_{i=0}^k (1 + \tau)^i = \frac{(1 + \tau)^{k+1}\,\,1}{\tau} \alpha@@ (when @@\tau \ne 0@@)
Links
 The JavaScript file used by this application: compoundinterest.js
 This application uses these other free softwares:
 APR – APY conversion
🚧 Todo 🚧
 Think about delay when not 100% compound interest.
 Withdrawal, by negative investement @@I_k@@.
 Add final operation on profit, to allow compute real profit after taxes.
 Implement buttons to add/delete/move rows.
 Load/save data.
 Add some examples with links to load corresponding data.