Conditions
What are Condition Blocks are how to use them
Last updated
What are Condition Blocks are how to use them
Last updated
The Condition Block is a tool in the script builder that allows you to create trading logic by comparing different values in your trading strategy. It's used to make decisions based on specific market conditions or indicator values.
Setting Up a Condition: When you add a Condition Block to your strategy, you'll see three main components:
Line 1: The first value you want to compare
Condition: The type of comparison you want to make
Line 2: The second value you're comparing against
When Condition Blocks are connected to Tool Blocks such a: Indicators, Day and Time and Candle Patterns. The Condition Blocks will update, and show options that are available to that tool.
For Example: If we connect a Simple Moving Average (SMA) Indicator Block to a Condition Block, we will be able to create conditions for the SMA
For Example: If we connect a MACD Indicator Block to a Condition Block, we will be able to create conditions for the MACDs available outputs
The Condition Block outputs a True or False value based on whether the condition is met. This can be used by other blocks in your strategy to trigger actions, such as buying or selling
Green Connection Dot: If the Condition is TRUE it will continue to run the blocks connected to the Green Dot.
Red Connection Dot: If the Condition is FALSE it will continue to run the blocks connected to the Red Dot.
You can use multiple Condition Blocks to stack different conditions.
In this example, our first Condition Block checks to see if the current Close is above the SMA. If this is true, we then use a second Condition Block to check to see if a Morning Start Candle Pattern is present. If both of these Conditions are TRUE, we send a BUY
Entry/Exit Signals: Use conditions to determine when to enter or exit trades. For example, "When Fast MA crosses above Slow MA".
Trend Identification: Create conditions that help identify market trends, like "When price is above 200-day moving average".
Indicator Thresholds: Set up conditions based on indicator values, such as "When RSI is above 70".
Complex Logic: Combine multiple Condition Blocks to create more sophisticated trading rules.
Remember, Condition Blocks are the decision-makers in your strategy. They take the data from your indicators and market information and turn them into actionable signals. Experiment with different conditions to fine-tune your strategy's performance.