×

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
Open main menu

Changes

Begin

344 bytes removed, 10:57, 19 February 2012
no edit summary
Used in combination with <syntaxhighlight>[[End</syntaxhighlight> ]] to group instructions for conditional execution; a <syntaxhighlight>[[Begin</syntaxhighlight> ]] must always be followed by an <syntaxhighlight>[[End]].</syntaxhighlight> == Usage ==<syntaxhighlight>CS Begin</syntaxhighlight> and <syntaxhighlight> I1; I2; I3;End;</syntaxhighlight> can be used with <syntaxhighlight>Then, Else, For,</syntaxhighlight> and <syntaxhighlight>While</syntaxhighlight> conditional statements.
<syntaxhighlight>Begin</syntaxhighlight> should not be followed by a semicolon (;), code lines within an instruction group should end with a semicolon (;), and only the last instance of <syntaxhighlight>End</syntaxhighlight> within the same Where:  :'''CS''' - conditional execution statement should be followed by a semicolon (;). ==== Usage ====<syntaxhighlight>CS Begin</syntaxhighlight>I1;I2;I3;<syntaxhighlight>End;</syntaxhighlight>:'''I''' - conditional instructions.
Where: <syntaxhighlight>CS</syntaxhighlight> - == Notes ==* [[Begin]] and [[End]] can be used with [[Then]], [[Else]], [[For]], and [[While]] conditional statementstatements. I - * [[Begin]] should not be followed by a semicolon (;), code lines within an instruction group should end with a semicolon (;), and only the last instance of [[End]] within the same conditional instructions execution statement should be followed by a semicolon (;).
==== Example ====If ''UpTrend '' is true then buy, otherwise sell short:
<syntaxhighlight>If</syntaxhighlight> UpTrend <syntaxhighlight>= True Then Begin Buy Next Bar Market;
End
Else Begin
SellShort Next Bar Market;
End;</syntaxhighlight>
[[Category:Comparisons and Loops]]