1,501
edits
m (→Notes) |
|||
(One intermediate revision by the same user not shown) | |||
Line 21: | Line 21: | ||
== Examples == | == Examples == | ||
Trigger an alert on the bar where the Close price crosses below 1350.00: | Trigger an alert on the bar where the Close price crosses below 1350.00: | ||
<syntaxhighlight>Plot1(Close); | <syntaxhighlight>Plot1(Close); | ||
If Plot1 Cross Below 1350.50 Then | If Plot1 Cross Below 1350.50 Then | ||
Line 30: | Line 30: | ||
To open a short position if a 5-period moving average crosses below a 10-period moving average: | To open a short position if a 5-period moving average crosses below a 10-period moving average: | ||
<syntaxhighlight> | <syntaxhighlight> | ||
If (Average(Close, 5) cross below Average(Close, 10)) then | |||
SellShort ("ES") 1 contracts next bar at | SellShort ("ES") 1 contracts next bar at Market; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
[[Category:Comparisons and Loops]] | [[Category:Comparisons and Loops]] |