Skip to main content Skip to footer

Condition on Data (Value) Algo Element

 

The if-then statement is fundamental to any trading strategy. The logic of a strategy is built around various triggers. The most commonly used algo element is the condition for data.

Operands and Operations

 

This algo element allows users to compare two or even three data values. The input data can be an indicator, bar series, current market price, a constant value, or another type of data. To create a condition, the user needs to select the left operand and then choose an operation. For example, in the statement "if Current price is above… then…", the "current price" is the left operand, and "above" is the operation.

Operations and Operands

 

Depending on the selected operation, there may be zero, one, or two right operands:

 

1. Single Operand Operation:

  • For operations like "is rising", no right operand is needed. This operation checks if the left operand is increasing compared to its previous value.

  • Example: "if the current price is rising…".

2. Double Operand Operation:

  • For operations like "above", a single right operand is required. This operation checks if the left operand is greater than the right operand.

  • Example: "if the current price is above the moving average…".

3. Triple Operand Operation:

 

  • For operations like "between", two right operands are needed. This operation checks if the left operand is within a range defined by the two right operands.

  • Example: "if the current price is between the lower and upper bands…".

Creating Conditions

 

To create a condition:

  1. Select the Left Operand: Choose the primary data value to be evaluated, such as an indicator or current market price.

  2. Select the Operation: Choose the logical operation to apply (e.g., above, below, is rising).

  3. Specify the Right Operand(s): Depending on the operation, input the required right operand(s), such as another indicator value or a constant.

 

Conclusion

 

Conditions are a vital component in the Manual Strategy Builder, enabling traders to build logical, rule-based strategies. By comparing data values through various operations, traders can create dynamic and responsive strategies that react to market conditions effectively. This capability is essential for developing robust trading strategies within FinStudio, providing precise control over strategy behavior and execution.

Cookies Notice

We use cookies to improve your experience, personalize content, and analyze our traffic. By clicking "Accept All Cookies," you agree to the storing of cookies on your device. You can manage your cookie preferences at any time by visiting our Cookie Settings.