Entry & Exit Logic

Designing the execution handshake. Learn how to combine market setups with precise triggers for professional order entry.

Updated 2024-03-23
intermediate

Entry & Exit Logic

In systematic trading, an entry is not a single guess; it is a Logical Handshake. It requires a specific set of market conditions (the Setup) to align with a specific moment in time (the Trigger). Designing high-precision logic is the process of filtering out low-probability environments so that your execution nodes only fire when your edge is at its peak.

The Signal vs. The Order

A signal is a mathematical 'True' state in your logic graph. An order is the physical instruction sent to the exchange. Not every 'True' signal should result in an order—professional logic includes filters for time-of-day, open exposure, and account margin.

The Hierarchy of Entry: Setup vs. Trigger

To minimize "False Positives," professional strategies separate logic into two layers:

  • The Setup (Condition): The broad market environment. For example: "Price must be above the 200-SMA" and "RSI must be below 30." These conditions can be true for many bars in a row.
  • The Trigger (Event): The specific microsecond the trade is executed. For example: "Price crosses above the 10-period high."

By using Logic Nodes (AND) in AlgoLift, you ensure that the Trigger only fires if the Setup conditions are already met.

Designing Logical Filters

Filters are the "Gatekeepers" of your strategy. They don't generate trades; they prevent bad ones.

  • Time-of-Day Filters: Restrict trading to high-liquidity windows (e.g., the first two hours of the NY session) to avoid erratic "thin" market moves.
  • Regime Filters: Use ADX or Standard Deviation nodes to ensure you aren't using a Trend-Following trigger in a sideways, ranging market.
  • Correlation Filters: If you are already in a trade on NQ (Nasdaq), you may want to prevent an entry on ES (S&P 500) to avoid doubling your directional risk.
Under the Hood: The Boolean Node Graph

In the AlgoLift Builder, every logic chain eventually terminates in a Boolean State (True or False). You can chain dozens of conditions together using OR/AND/NOT logic. If the final output is 'True,' the signal is passed to the Entry Node, which then checks your risk management rules before transmitting the order to the engine.

Primary and Secondary Exits

Professional strategies never enter a trade without knowing exactly how to get out. We categorize exits into two types:

  1. Risk Exits (Stop Losses): Your "Emergency Brake." This can be a fixed point value, a percentage of price, or a volatility-based level (ATR).
  2. Profit Exits (Targets): Where you collect your edge. These can be "Static" (a fixed price) or "Dynamic" (closing the trade when an indicator reverses, such as a Parabolic SAR flip).

Advanced Execution: Scale-Ins & Scale-Outs

AlgoLift allows for non-binary entries. You don't have to enter your full position all at once.

  • Scaling In: Adding to a winning trade as price action confirms your thesis. This allows you to "Size Up" into strength while keeping your initial risk small.
  • Partial Exits (Scaling Out): Taking 50% of your profit at Target A and moving your stop to Breakeven for the remaining 50%. This "De-risks" the trade and allows you to capture "Runners" with house money.
Pro Tip: Exit on Logic Change

Some of the most robust strategies don't use fixed targets at all. They use Logic-Based Exits. For example: "Close the Long position the moment the 5-period SMA crosses back below the 10-period SMA." This ensures you stay in the move for exactly as long as the momentum exists.