inside of OnCalculate(), our code iterates bars from earlier to existing and purposely ignores the unclosed bar to stop repainting. The change of the present bar is zero, and our loop ends at one. ) — an indicator that demonstrates the gain/loss for any interval in percentage or pips. Only gain/decline bigger than supplied limit is exhibited.