Strategy Logic Guide

What this helps you do

This guide helps you understand how strategies decide when to enter and when to exit a trade. By breaking down Buy and Sell logic into simple True or False conditions, you’ll be able to read any strategy with confidence, understand why a trade is Active, Ending, or Inactive, and troubleshoot your own logic when building custom strategies.

It gives you a clear mental model for how indicators combine into rules, how rule groups work, and how the platform evaluates those rules bar by bar.


What a strategy really is

You can think of a strategy as a simple rule set that asks a yes or no question about price behavior.

In the background, the Strategy Builder is looking at past data and answering questions like:

“When A happens, how often does B happen afterward, and with what risk and reward?”

On the chart, that logic shows up as conditions that can be either True or False on any given bar. Those conditions are built from indicators you already know, such as MACD, Heikin Ashi candles, RSI, moving averages, and others.

This guide explains how those conditions combine into Buy and Sell logic, and how that logic becomes the trade stages you see on the platform.


Single conditions

In the following diagram, you see the simplest possible case: one condition built from one indicator.

Examples of single conditions:

  • “MACD line is above the signal line.”
  • “Today’s Heikin Ashi candle is bullish.”
  • “RSI is below 30.”
  • For each bar, that condition is evaluated and can only be in one of two states:

  • True if the rule is met.
  • False if the rule is not met.
  • When a strategy uses a single condition as its Buy or Sell trigger, the logic is direct:

  • If the condition is True, the Buy or Sell condition is True.
  • If the condition is False, the Buy or Sell condition is False.

  • Groups of conditions (”AND” logic)

    Most strategies are built from groups of conditions, not just a single one. This lets you combine several indicators so that a trade only triggers when multiple things line up at the same time.

    Examples of grouped Buy conditions:

  • “Heikin Ashi is bullish and MACD has crossed up.”
  • “Price is above the 50 SMA and RSI is above 50.”
  • Inside a group like this, the logic is:

  • Every condition in the group must be True for the group to be True.
  • If any condition in the group is False, the whole group is False.
  • This is standard AND logic.

    The following diagram is basically showing:

  • Several conditions feeding into a “Buy condition.”
  • The Buy condition only turns True when all of its child conditions are True at the same time.
  • You can read this as:

    “Only enter when all of my checklist items are checked.”


    Either/or logic (OR between groups)

    Sometimes you want more than one way for a trade to qualify. For example, maybe you are willing to buy either on a breakout or on a pullback.

    To model that, a strategy can use separate groups of conditions that are linked with an OR.

    Think of it as:

  • Group A: “Breakout” rules.
  • Group B: “Pullback” rules.
  • Each group can have its own internal “AND” logic, just like in the previous section. The difference is in how the top level decides whether the Buy or Sell condition is True.

    For a Buy or Sell condition built from several groups with OR logic:

  • If at least one group is True, the overall Buy or Sell condition becomes True.
  • It is not necessary for every indicator in every group to be True.
  • It is not even necessary for more than one group to be True. One is enough.
  • That is what the following diagram represents:

  • There are two groups feeding into a single Buy/Sell condition.
  • As long as one of the groups evaluates to True, the overall condition becomes True.
  • You can read this as:

    “Enter the trade if this set of rules is met, or if that alternative set of rules is met.”


    How Buy and Sell conditions work together

    So far, everything has been about one side of the trade at a time. In a real strategy, you always have both:

  • A Buy condition that decides when a trade can start.
  • A Sell condition that decides when an existing trade should end.
  • On every bar, the platform evaluates:

  • Is the Buy condition True or False?
  • Is the Sell condition True or False?
  • Those two answers combine into the trade state. This is what the following diagram shows:

    For long strategies, you can read the logic like this:

    Trade status: Active

  • Buy condition: True
  • Sell condition: False
  • The entry rules are satisfied and the exit rules are not. The strategy considers the long trade currently on.

    Trade status: Ending

  • Buy condition: True
  • Sell condition: True
  • The entry rules are still satisfied, but the exit rules have also turned True. This marks the bar where the trade is closing. In practice you treat this as the last bar of the trade.

    Trade status: Inactive (no position)

    This can happen in two ways:

  • Buy False, Sell False
  • Neither your entry rules nor your exit rules are satisfied. There is no open position and nothing special is happening.

  • Buy False, Sell True
  • The exit rules are satisfied but the entry rules are not. For a long strategy, this still counts as “no trade on.” It simply means your selling conditions are present without an active long position.

    The key point is that a long trade is only considered active when the Buy condition is True and the Sell condition is False. Every other combination is treated as “not in a trade” on that bar.

    For short strategies, you invert the meaning:

  • The “Buy” side describes rules to open the short.
  • The “Sell” side describes rules to exit the short.
  • The True or False logic works the same way. The only difference is the direction of the trade.


    How this connects to strategy stages on the platform

    When you subscribe to a strategy on Wallstreet.io, you see stages such as Starting, Active, Ending, and Inactive in the Strategy Notifications, in the Strategies scan results, and in the View Stats panel.

    Behind the scenes, those stages come directly from the logic you just saw.

    You can read them like this:

  • Starting
  • This is the first bar where the strategy detects a new trade. Buy is True and Sell is False, and there was no active position on the previous bar. It marks the beginning of a new sequence of Active bars.

  • Active (Day X)
  • The trade is on and the entry rules remain satisfied. Buy is True and Sell is False, and the strategy is counting how many bars the trade has been open.

  • Ending
  • This is the bar where the Sell logic turns True while the strategy still has an open trade. It is the closing bar for that trade.

  • Inactive
  • There is no position on. Either the entry rules are not met, the exit rules have already been processed, or both.

    Once you understand how the True and False states combine, these stages stop feeling mysterious. You can always trace them back to:

  • Which conditions are part of the Buy logic.
  • Which conditions are part of the Sell logic.
  • Whether each group is using AND inside the group or OR between groups.

  • How to reason about a strategy you are reviewing

    When you are reviewing a pre-built strategy or one you built yourself, it helps to walk through the logic in plain language.

    For example, reviewing the strategy below you might say:

  • “This strategy opens a long trade when there is a bullish Heikin Ashi candle and MACD crosses up, or when price breaks above the 50 SMA. It closes the trade when MACD crosses down or when RSI moves above 70.”
  • Then you can mentally map that explanation to the diagrams:

  • Inside each group, conditions must all be True together.
  • Across groups that feed a Buy or Sell condition, only one group needs to be True.
  • For the trade to be actually active, you always come back to the same rule: Buy True, Sell False.
  • This way, you can read strategy logic as a checklist instead of a tangle of indicators.