An iterable variable declaration
Use an Array
colombodave:
Can I declare variables in a loop, each with a different name?
So I would end up with a variable for each order ie.
varXXXXXXXX = 1.2548
varYYYYYYYY = 0.8849
varZZZZZZZZ = 110.48
Any help or guidance would be appreciated.
You need to use a mapping object, i.e. a dictionary/hash-map.
CHashMap<int, double> top; for(int i=0; i<OrdersTotal(); i++) if(OrderSelect(i, SELECT_BY_POS)) top.Add(OrderTicket(), OrderOpenPrice());
Can I declare variables in a loop, each with a different name?
So I would end up with a variable for each order ie.
varXXXXXXXX = 1.2548
varYYYYYYYY = 0.8849
varZZZZZZZZ = 110.48
Any help or guidance would be appreciated.