How do I compound lot size based on order?

 

Hello,


My code below does not seem to work. I am trying to increase my lot size every time a new order is placed and incrementally increase it as more order are placed. 

input double Lotsize = 0.1;
input double Increment = 0.1;
double FinalLots = 0;

 for(int i = 0; i < OrdersTotal(); i++) { 

 FinalLots = Lotsize+Increment;
 }
 
 FinalLots = Lotsize;

 for(int i = 0; i < OrdersTotal(); i++) { 

 FinalLots += Increment;
 }
 
Simplified
 FinalLots = Lotsize + OrdersTotal() * Increment;