×

Sign up and get MultiCharts free

Use its powerful simulation mode with data included out of the box. Just fill out the form and start honing your trading skills with a few clicks.

Changes - MultiCharts

Changes

Jump to navigation Jump to search

To

118 bytes added, 11:11, 19 February 2012
no edit summary
[[To]] specifies that the value of the counter variable is to be increased by one on the completion of each loop.
For more information see [[For.]] ==== Usage ====
<syntaxhighlight>For Counter=IValue To FValue Begin
I1; I2;
End;</syntaxhighlight>
Where: [[Counter]] - a numerical variable used store the loop count
[[:'''Counter''' - a numerical variable used store the loop count.:'''IValue]] ''' - a numerical expression specifying the initial counter value.:'''FValue''' - a numerical expression specifying the final counter value.
== Notes ==* For more information see [[FValueFor]] - a numerical expression specifying .* See [[DownTo]] for '''decreasing''' the final counter value variable for one completion of the loop.
==== Example ====Add the high prices of the last 10 bars to the [[''HighPriceSum]] '' variable: <syntaxhighlight>For BarBackNo = 0 To 9 Begin  HighPriceSum = HighPriceSum + High[BarBackNo];
<syntaxhighlight>For BarBackNo=0 To 9 Begin
HighPriceSum=HighPriceSum+High[BarBackNo];
End;</syntaxhighlight>
 
[[Category:Comparisons and Loops]]

Navigation menu