The while keyword is al part of while (described below) and do-while statements.
The while statement lets you repeat a statement until a specified expression becomes false.
Syntax
while ( expression ) statement
The expression must have arithmetic (numeric/boolean) type. Execution proceeds as follows:
If expression is true (nonzero), the body of the statement is executed and the process is repeated beginning at step 1.
This is an example of the while statement:
i = 10;
while( i < 20 )
{
Plot( MA( Close, i ), "MA" + WriteVal( i, 0 ), colorBlack + i );
i = i + 1;
}
The example plots 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 - bar moving averages.