Problem with AFL coding help required

#1
trying to generate a unique string for OCA group

the general idea is to take a string and append an number that keeps incrementing everytime the order is send
can anyone please help me

my code untill now is as follows
am trying to use barcount as a increamenting variable
the restrictions are the same number cannot be used twice during the day - it is mostly one second time frame for nifty just to clarify
and the number should have no commas


_SECTION_BEGIN("Price");
RequestTimedRefresh(1);
Plot( C, "Close", colorWhite, styleLine );
for (i =0 ; i < BarCount ;i++ ) // CORRECT
{
//printf("\n i = %g",i);
}
printf("\nMygroup" + BarCount);
_SECTION_END();
the pseudo code of the what i am trying to do is

if i has a value of not zero then goto inc
otherwise i=0; // we do not want to set i to 0 everytime just once and it should store the value of incremented i across the AFL as it is run ie during the whole day it should generate only one unique number
:inc
increment i
print mystring+i // combine the strings together



that would result in the following strings

mygroup1
mygroup2
mygroup3
mygroup4
mygroup5
mygroup6
...

mygroup(whateverlargenumber)

the only restriction is that the number cannot have commas as that causes the mysting+number to be read as the next parameter in the afl which is not wanted.
 
Last edited:

Similar threads