3.5 KiB
{% assign title = "Condition" %} {% assign definition = site.data.trading_system.condition %} {% assign preposition = "a" %} {% assign plural = "s" %}
{% if include.more == "yes" and include.heading == "more" %}
Click to learn more about {{ title | downcase }}{{plural}}
{% endif %}{% if include.heading != "" and include.heading != "more" %} {{include.heading}} {{title}} {% endif %}
{% if include.icon != "no" %}
{% if include.table == "yes" and include.icon != "no" %}
{% if include.more == "yes" and include.content == "more" and include.heading != "more" %}
Click to learn more about {{ title | downcase }}{{plural}}
{% endif %}{% if include.content != "no" %}
Therefore, conditions are used to mathematically describe what needs to happen with the market for a certain action to be taken.
For example:
Situation 1
-
Condition A:
chart.at01hs.candle.close > chart.at01hs.bollingerBand.MovingAverage→ This means that the latest candle at the 1 hour chart closed above the Bollinger Bands moving average. -
Condition B:
chart.at01hs.candle.previous.max > chart.at01hs.bollingerBand.previous.MovingAverage→ This means that the maximum value of the candle before the last one, was higher than the Bollinger Bands moving average.
In the example above, conditions A and B are comparison statements that may evaluate either true or false. In the case both would evaluate true then Situation 1 would be true as well.
{% include note.html content="To learn how to write conditions, start with the Syntax Overview." %}
{% endif %}
{% if include.more == "yes" and include.content != "more" and include.heading != "more" %}
Click to learn more about {{ title | downcase }}{{plural}}
{% endif %}{% if include.adding != "" %}
{{include.adding}} Adding {{preposition}} {{title}} Node
To add a condition, select Add Condition on the corresponding situation node menu. A condition with its JavaScript code node is added.
{% endif %}
{% if include.configuring != "" %}
{{include.configuring}} Configuring the {{title}}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
{% endif %}
{% if include.starting != "" %}
{{include.starting}} Starting {{preposition}} {{title}}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
{% endif %}
{% if include.more == "yes" %}