{% assign title = "Condition" %}
{% assign definition = site.data.trading_system.condition %}
{% assign preposition = "a" %}
{% if include.heading != "" %}
{{include.heading}} {{title}}
{% endif %}
{% if include.icon != "no" %}
{% endif %}
**{{ definition }}**
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." %}
{% if include.adding != "" %}
{{include.adding}} Adding {{preposition}} {{title}}
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 %}