×

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

Else

15 bytes added, 10:55, 19 February 2012
no edit summary
Used in combination with [[If]] and [[Then]] to form a conditional statement that executes specific instructions if a logical expression is false.
The conditional execution statement must contain both [[If]] and [[Then]] in addition to [[Else.]].
For more information see [[If.]] ==== Usage ====
<syntaxhighlight>If E Then I1 Else I2</syntaxhighlight>
Where: [[ :'''E]] ''' - a true/false expression. :'''I''' - conditional instructions. == Notes == * For more information see [[IIf]] - conditional instructions .
==== Example ====If [[''UpTrend]] '' is true then buy and if [[''UpTrend]] '' is false then sell short:  <syntaxhighlight>If UpTrend Then Buy Next Bar Market Else SellShort Next Bar Market;</syntaxhighlight>
<syntaxhighlight>If UpTrend = True Then
Buy Next Bar Market
Else
SellShort Next Bar Market;</syntaxhighlight>
[[Category:Comparisons and Loops]]

Navigation menu