I need to duplicate the following for loop with different arguments. Is there an existing AMI broker function that does the below or should I define my own function to do this? I feel like such function should exist but I can't find it anywhere in the forum.
for( i = 1; i < BarCount; i++ )
{
if ( ema20[ i ] > ema20[ i - 1 ] )
{
consecutiveEMARising[i]=consecutiveEMARising[i-1]+1;
}
else
{
consecutiveEMARising[i]=0;
}
}