v1 to v2
The version 2 of our scripting language comes with the following changes:- Multiple sequences can now be defined.
- Sequences can now be used with strategy scripting.
-
Sequences are no longer constructed from one condition per line, instead the new
thenoperator should be used. -
New
{any_inactive_step}placeholder returning true if any step but the active one is true, can only be used for invalidation -
Actions
@invalidateand@set_stephave been replaced with their corresponding methods. - Actions no longer require to have the argument name specified:
@label(y = "{close}", text = "hello")
now: @label({close}, "hello")
- Actions argument values no longer requires to be in between quotes/double quotes.
-
y argument for
@labeland@lineactions now support historical referencing. -
Action
@valuewhennow accepts a newreferenceargument allowing to reuse the captured value in other conditions/actions. -
Removed
@filteraction.
Migrating from v1 to v2
Defining Sequences
Scripted alerts using a sequence previously separated steps by linebreaks:then operator as follows:
Invalidating Sequences
Previously sequences were invalidated using the@invalidate action:
!:
invalidate as long as an udp is defined for the sequence:
In V1 invalidation always took place first, as such we want
{my_sequence}.invalidate() to appear first in the script.Changing Step
Previously users could change the active step of a sequence using the@set_step action:
set_step action:
In V1 setting a sequence step always took place first, as such we want
{my_sequence}.set_step(0) to appear first in the script.Accessing a sequence active step
Previously users could access the active step of a sequence (the step subject to evaluation) using the{step} placeholder.
Due to the possibility with version 2 of hacing multipe sequences in a single script, the active step can be obtained from a defined UDP for the sequence:
Accessing a sequence elapsed bars since new step
Previously users could access the numbers of bars elapsed since a last step was true or invalidation of the sequence using the{barssince_step} placeholder.
Due to the possibility with version 2 of hacing multipe sequences in a single script, the active step can be obtained from a defined UDP for the sequence:
Filtering each steps with @filter
Previously users could apply a condition to all steps of a sequence with a single usage of the@filter action as follows:

