{% 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" %}
{% endif %} {% if include.table == "yes" and include.icon != "no" %} {% endif %} {% endif %} {% if include.definition == "bold" %} {{ definition }} {% else %} {% if include.definition != "no" %} {{ definition }} {% endif %} {% endif %} {% if include.table == "yes" and include.icon != "no" %}
{% endif %} {% 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" %}
{% endif %}