If
Then
当条件不成立时,执行 Else指定的陈述式。条件执行语句包含 If 和 Then ,不包含 Else。
Else
更多信息请见 If.
If E Then I1 Else I2
E
I1
I2
参数说明: E —— 逻辑表达式,值为true/false; I —— 陈述式。
I
如果满足条件UpTrend,则开多仓,否则开空仓:
If UpTrend Then Buy Next Bar Market Else SellShort Next Bar Market;
UpTrend
Then Buy Next Bar Market Else SellShort Next Bar Market