{close}
placeholder, referencing the current closing price value>
, testing if the value to its left is greater than the value to its right{close[14]}
refer to the value of the closing price ({close}
) 14 bars ago (defined by the historical referencing operator [14]
)True
if the current closing price is higher than the closing price 14 bars ago.
and
and
allows to require more than one “sub-conditions” to be valid for the whole to be true.
For example, we could reuse our previous condition but be more strict such that we only want to know when the current closing price is greater than the closing price 14 bars ago when it is between 1pm and 3pm (exchange timezone). To do this we can simply add another sub-condition leading to:
and
is similar to using the custom alert creator and having multiple enabled conditions using the same step number.or
or
can be useful, requiring only one of the defined sub-conditions to be true in order for the alert to trigger.
For example, we could want to be alerted either on a strong bullish confirmation signal, or when the Smart Trail turns bullish, this could be easily achieved using the following script:
{bullish_confirmation+}
is true when we have a strong bullish confirmation signal.
{bullish_smart_trail}
when the Smart Trail is bullish, with the whole {bullish_smart_trail} and not {bullish_smart_trail[1]}
being true when the Smart Trail is currently bullish while the previous Smart trail is not bullish.
or
takes precedence over and
. You can think of this as a way to split a whole condition into multiple sub-conditions.For example if we have {A} and {B} or {C} > 0 or {D} and {E}
, the precedence of or would split this conditions leading to {A} and {B}
, {C} > 0
, and {D} and {E}
.Each of these individual sub-conditions would be evaluated individually, if one of them is true, then our whole condition is true.@invalidate
action:
@invalidate
action is true, we will go back to evaluating the sequence of conditions to step 1.
step
parameter in the @invalidate
action.
To illustrate this, we can reuse our previous sequence of conditions:
step=1
refer to the second step needing to be the one being evaluated in the sequence to apply the invalidation condition {close} > {open}
.
barssince_step
, which quantify the number of bars that elapsed since a step has started being evaluated or since invalidation took place.
For example, we can invalidate a sequence of conditions if the amount elapsed since a step is greater than 5 bars:
@filter
.
{volume} > 500
, leading to:
step
parameter in the @filter
action.
step=1
refer to the second step where our filtering condition {volume} > 500
will be applied.
//
.
Comments will be ignored when a scripted alert is evaluated.
For example: