CS Begin I1; I2; I3; End;
- CS - conditional statement.
- I - conditional instructions.
- Begin and End can be used with Then, Else, For, and While conditional statements.
- 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 execution statement should be followed by a semicolon (;).
If UpTrend is true then buy, otherwise sell short:
If UpTrend = True Then Begin Buy Next Bar Market; End Else Begin SellShort Next Bar Market; End;