INVITE-ONLY SCRIPT

Logic Flow Signals & Backtest [bercutiatia]

161
To understand the advanced logic of the tool, it is essential that you carefully read each topic and check the visual examples in this presentation.

--

Who is the Logic Flow Signals & Backtest tool recommended for?

Ideal for traders looking to increase the reliability and level of their operations. Recommended for those who want to create rigorous confluences, validate strategies with backtesting, and transform emotional management into systematic and measurable processes.

How can the Logic Flow Signals & Backtest tool help me?

High-confidence signals! You combine TradingView indicators and create a single robust signal, eliminating the frustration of having to spend hours in front of the chart and still clicking at the wrong time. This ensures that your entry is validated by logic, not emotional impulse.

--

Logic Flow Signals & Backtest is a versatile and powerful tool designed to test and validate your trading ideas with indicators from the TradingView community.

Extreme flexibility: Allows you to combine indicators available on TradingView (EMAs, RSI, MACD, SMC, etc.) to create custom entry and exit logics.

Sequential Logic: Goes far beyond simple crossovers. You can define rules where signal A must occur before signal B — and, if desired, before signal C or D — to validate an entry. Add time, order, and context filters, creating truly intelligent sequential logic that generates a single final alert only when all conditions align.

With Stages (Stage 1, Stage 2, etc.), your entries follow the exact sequence you define. And the best part: you no longer need to spend hours in front of the chart waiting for confluences. Simply set up your stages once, create an alert in TradingView, and the system will automatically notify you when the ideal combination of signals occurs.

Sequence Invalidation: Offers the option to define conditions that, if they occur, immediately cancel an ongoing entry sequence, helping to avoid entries in unfavorable scenarios.

Explaining the first image example (chart below):

LONG INDICATOR 1 (Stage 1): The market confirms a change in character (CHoCH Bullish). The system enters an alert state awaiting the confluence of the next indicators.

LONG INDICATOR 2 and 3 (Stage 2): Entry is only released when the SMA17 crosses above the SMA72 (indicator 2), but with one condition: The SMA72 must be ABOVE the SMA305 (indicator 3); Without this alignment of indicator 3, the signal of indicator 2 does not occur.

LONG INDICATOR 4 (Invalidation Rule): If at any point in the sequence the SMA72 crosses below the SMA305, the setup is immediately canceled and no entry signal is generated. The sequence restarts with indicator 1.

EXIT LONG (Hybrid Exit TP + SIGNAL): The trade seeks a TP target of 1000 ticks, but has a technical "Trailing Stop": if the trend reverses (Exit Long Indicator 1 = SMA72 crosses below the SMA305) before the target, the position is closed to protect capital.

SHORT INDICATOR 1 (Stage 1): Identification of weakness in the market with a Bearish CHoCH.

SHORT INDICATOR 2 and 3 (Stage 2): Entry is only released when the SMA17 crosses below the SMA72 (indicator 2), but with a strict condition: The SMA72 must be BELOW the SMA305 (indicator 3); Without this STATE of indicator 3, the signal from indicator 2 does not occur.

SHORT INDICATOR 4 (Invalidation Rule): If at any point in the sequence the SMA72 crosses above the SMA305, the setup is immediately canceled and no entry signal is generated. The sequence starts again with indicator 1.

EXIT SHORT (Hybrid Exit TP + SIGNAL): The trade seeks a target of 1000 ticks, but has a technical "Trailing Stop": if the downtrend reverses (Exit Short Indicator 1 = SMA72 crosses above the SMA305) before the target, the position is closed to protect capital.
スナップショット
In this strategy, we use the external indicators: Multiple MTF MA [xdecow] and Smart Money Concepts (Advanced)

--

Stage Duration: In STAGE DURATION, you control the maximum time (in candles) allowed for each transition between stages to occur. If the time limit expires before the next stage is reached, the sequence is reset. Keep it at 0 to disable the time limit.

The "Stage Duration" function is available in four separate blocks on the settings panel:

- LONG - STAGE DURATION: Controls the time limit (in candles) between Long entry stages (for example from Stage 1 to Stage 2).
- LONG EXIT - STAGE DURATION: Controls the time limit between Long exit stages.
- SHORT - STAGE DURATION: Controls the time limit between Short entry stages.
- SHORT EXIT - STAGE DURATION: Controls the time limit between Short exit stages.

Explaining the second image example (chart below):

Stage 1 (INDICATOR 1): New Fair Value Gap (FVG) Bullish Confirmed.

- Meaning: The move starts with a bullish FVG (Fair Value Gap), indicating a confirmed imbalance where buyers were much more aggressive than sellers.

Stage 2 (INDICATOR 2): EMA10 crossing above the EMA50.

- Meaning: Immediately after the FVG trigger, the fast moving average (10 periods) crosses the intermediate moving average (50 periods). This confirms that the initial FVG impulse was not an isolated event but the beginning of a short-term trend.

Stage 3: In this final stage, we require two simultaneous confirmations to validate the entry:

- INDICATOR 3: The EMA10 crosses above the EMA100, indicating that the movement has enough strength to break through larger barriers.
- INDICATOR 4: The RSI must be above its own moving average (SMA14). This ensures the asset is gaining momentum at the exact moment the averages are broken, avoiding entries in "tired" markets.

Stage Duration: The most important feature of this setup is the restricted time window.

- Rule: From Stage 1 to 2, and from Stage 2 to 3, the maximum interval to accept confluences is only 3 candles.
- Why this is vital? If the market took 20 candles to align these conditions, it would indicate weakness or indecision. By demanding that everything happens within a maximum of 3 candles per step, the setup filters only the moves where buying pressure is urgent and aggressive, increasing the probability of an explosive move in favor of the trade.

Asymmetric Risk Management: To complement a high-probability and high-pressure setup, we use aggressive risk management:

- Stop Loss (Technical/Short): 200 Ticks. If the buying pressure fails quickly, we exit early with a small loss.
- Take Profit (Long Target): 1000 Ticks. We aim to ride the impulse "leg" that the setup identified.
- Risk/Reward: 5:1. This means a single winning trade covers five losing trades, making the strategy mathematically viable in the long term.
スナップショット
In this strategy, we use the external indicators: Multiple MTF MA [xdecow], Smart Money Concepts (Advanced) and Relative Strength Index (RSI) [TV - Technicals].

--

Multiple Operating Modes

It is not limited to sequences. It can operate by confluence (where all signals must be valid at the same time), by single trigger (only one signal is required), or by "OR" logic (any one of the defined signals).

- If you use only Stage 1 in more than one indicator session, the entry will only occur if all enabled conditions are true simultaneously.
- Any condition defined as OR can trigger the entry by itself.
- If only one condition block is enabled, the single indicator will function as a simple signal.

Multiple and Simultaneous Exits

It allows for the configuration of exits by both indicators and TP/SL targets. The strategy will close the trade as soon as any of these conditions are met first (indicator signal, profit target, or loss limit

Integrated Risk Management

It includes Stop Loss and Take Profit exits by percentage and ticks, which are easy to configure and essential for risk management. The strategy calculates the exact TP and SL prices based on your entry price and monitors the market on every tick.

Explaining the Third Image Example (Chart Below)

The move was validated by a 4-step logical sequence (Stage 1) and managed by a hybrid exit system.

Short Indicator 1, 2, and 3: The price (Close) crossed below the SMA200, SMA72, and SMA17 averages simultaneously.

- What this means: When a single candle has the strength to break below the short-term (17), mid-term (72), and long-term (200) averages, it indicates a high probability for the price to seek lower levels.

To reinforce Indicators 1 through 3, we added an extra layer of confirmation.

Short Indicator 4: The Positive Volume Index (PVI) needed to be below its own long-term average (EMA300).

- Why this is important: PVI below the average confirms that selling volume is dominant, validating that the break of the averages was not just noise.

Triple Exit Management (Maximum Security)

The great advantage of this tool is the ability to manage risk dynamically. In this trade, we configured three simultaneous exit conditions, where the first one to be met closes the position:

1. Financial Target (TP): A fixed Take Profit of 15%.
2. Exit Short Indicator 1 (Technical Exit 1): If the average (SMA72) crosses above the average (SMA200), the trade is closed.
3. Exit Short Indicator 2 (Technical Exit 2): If the PVI crosses above the EMA300, indicating an entry of buying strength, the trade is closed.

"OR" Logic: The tool monitors these conditions in real-time. Whichever occurs first triggers the exit, ensuring you lock in profit (TP) or protect your capital at the first sign from the indicators.
スナップショット
In this strategy, we use the external indicators: Multiple MTF MA [xdecow] and Positive Volume Index [HPotter].

--

Reversal Mode (Stop and Reverse)

The Reversal Mode (Stop and Reverse) allows a new signal in the opposite direction (e.g., a SELL signal) to automatically close an existing position (e.g., BUY) and open a new one (sell). This "stop and reverse" function can be enabled or disabled in the settings, giving you full control over whether the strategy should only exit (awaiting a new signal) or immediately reverse the position.

Explaining the Fourth Image Example (Chart Below)

In this example, we demonstrate a setup focused on capturing every market "flip," keeping the trader positioned 100% of the time ("Always-in"), a technique widely used in automation.

- Long Entry: Occurs immediately upon confirming a bullish change of character (New CHoCH Bullish).
- Short Entry: Occurs immediately upon confirming a bearish change of character (New CHoCH Bearish).
- Exit (The Differentiator): We are not using fixed TP or SL here. The exit is triggered by Automatic Reversal.

The Power of "Exit by Opposite Signal"

Notice the labels on the chart: "Close Short" followed immediately by a "Long." This happens because the Allow Reversal function is enabled in the tool's settings.

When the market generates a buy signal, the tool understands that the sell thesis has been invalidated. It simultaneously sends an order to close the Short position and open a new Long position.

When to use this exit rule?

- Capturing Long Trends / Directional Movements: Ideal for volatile assets where you want to ride the trend until the market structure effectively changes.
- Operational Simplification: Eliminates the need to guess profit targets and acts as a loss limiter when the price moves against your position. The market dictates when to enter and when to exit.

Hybrid Flexibility:

The strongest point of Logic Flow is that you don't have to choose just one method. Reversal can be used in two ways:

1. Individually (as in the image): Reversal is the only form of exit. You stay in the move until the opposite signal.
2. Combined (Hybrid): You can enable Reversal and configure a safety Stop Loss + technical Take Profit (Exit Long/Short Indicator).
- Example: If the price hits your TP/SL first, you exit. If the market turns before the TP, the Reversal takes you out of the trade and generates a new trend alert.
スナップショット
In this strategy, we use the external indicators: Smart Money Concepts [LuxAlgo].

--

Backtesting: Far beyond creating logic and generating signals, Logic Flow Signals stands out due to its Integrated Backtest.

Backtesting serves as a reality check for the trader. It takes the strategy out of the realm of "imagination" and puts it to the test against historical data.

Here are the 4 main practical uses:

1. Verifying Feasibility (Proof of Concept): The most obvious use is to answer: "Does this idea make money?". Many strategies look visually perfect on the chart, but when you run the backtest, you discover that brokerage fees or frequent "stops" consume all the profit.

2. Knowing the "Worst-Case Scenario" (Drawdown): Maximum Drawdown: It shows you what the largest accumulated drop the strategy has ever experienced was. By identifying a Drawdown that exceeds the desired risk tolerance, the backtest allows for parameter optimization in search of a more efficient balance between risk and return.

3. Fine-Tuning (Optimization): It allows you to make changes such as: Increasing the profit target, changing the stop, removing an indicator, changing the chart timeframe, among other actions. You can test various variations instantly to find the most efficient configuration.

4. Expectation Management and Discipline: Backtesting does not eliminate fear nor guarantee that the future will repeat the past, but it serves as a reference map.

The Real Role: Aligning expectation with reality.

In the image below, you can check out how a backtest result is generated:
スナップショット
スナップショット
スナップショット
スナップショット
スナップショット

To understand the backtest results shown above, check the chart and the detailed operational logic below:

This operational example seeks to identify altcoins that are demonstrating an explosive decorrelation relative to Bitcoin. The logic is: we want to buy only the assets that are outperforming the market leader, precisely at the moment when speculative money (Open Interest) heavily enters the market.

For the buy signal (Long) to be triggered, three conditions must be simultaneously true (Stage 1):

Long Indicator 1 (Altcoin Strength): The asset's RSI must be above the 70 level (Overbought), indicating extremely strong bullish momentum.

Long Indicator 2 (Bitcoin Weakness): Bitcoin's RSI must be below the 50 level. This confirms that the Altcoin's rally is genuine and independent.

Long Indicator 3 (Money Flow): The Open Interest (open contracts) must be above the Extreme level of the OI DELTA indicator. This validates that new money is aggressively entering the asset to sustain the rally.

Risk Management: In this example, we configured an aggressive target to capture the altcoin volatility:

- Take Profit: 100%
- Stop Loss: 20%
- Risk/Reward: 5:1
スナップショット
In this strategy, we use the external indicators: RSI Crypto Strength (Asset vs BTC) [bercutiatia] and Open Interest Delta [By Leviathan].

--

Configuring an Indicator Block

Each block (BUY INDICATOR 1, BUY INDICATOR 2, ...) allows you to define a complete condition.

- Enable (Activate): Simply turns this indicator block on or off.
- Source A: The first value you want to analyze.
example: The Closing Price (Close), Opening Price (Open), or another TradingView indicator.
- Condition: How 'Source A' will be compared.
example: Crossover/Crossunder, Greater Than, Less Than, Cross Up.
- Comparison Type: The option that defines whether you will compare 'Source A' with a fixed number or with another indicator.
- Fixed Value: Used if you selected "Fixed Value".
example: For an RSI greater than 70 condition, Source A would be the RSI, the Condition would be Greater Than, and the Fixed Value would be 70.
- Source B: Used if you selected "Source B".
example: For a condition where the EMA10 crosses above the EMA200, Source A would be the EMA10, the Condition would be 'Cross Up', and Source B would be the EMA200.
スナップショット

--

Configurable Alert Signals

Configurable Alert Signals: The tool allows for the creation of fully customized alerts for different types of events, such as entries, signal-based exits, take profit, and stop loss. These alerts can be used for both strategy automation and manual, real-time notifications.

The message field is highly flexible: it accepts dynamic placeholders, JSON structure, UUID identifiers, or any custom text, allowing integration with other external tools and systems via webhook.

Configuring Your Messages:

- LONG/SHORT - ALERTS: Defines the message for new entries.
- LONG/SHORT INDICATOR EXIT - ALERTS: Defines the message for signal-based exits (e.g., moving average cross).
- REVERSAL - ALERTS: Defines the message for when a position is closed by an opposite signal (stop-and-reverse).
- LONG/SHORT TP/SL EXIT - ALERTS: Defines the message for exits triggered by take profit (TP) or stop loss (SL), via percentage or ticks.

A Single Alert to Control Everything

You don't need to create separate alerts for "Buy," "Sell," or "Exits." On a single screen, you can create strategies by defining entries, signal-based exits, profit targets, or stop limits.

Alert Times (Operating Window)

In the Alert Times section, you can define a specific time (and time zone) for the strategy to generate entry or exit signals.
スナップショット

--

To create your alert, simply follow these steps:

- Condition: Select the script name: "Logic Flow Signals & Backtest".
- Message: Insert only the placeholder: {{strategy.order.alert_message}}

Once this single alert is active, it will "listen" to all orders executed by the strategy.

This means you can have your Long-Term, Short-Term, Signal-Based Exits, and TP/SL strategies active simultaneously. When any of these events are plotted on the chart, the script will send the customized message (which you wrote in the fields) to your single alert.
スナップショット

--

Advanced period filters: Allow you to test the strategy in specific date ranges, over the last X days, or over the last X bars, facilitating performance analysis in different market environments.
スナップショット

--

Status Panel: Displays a clear summary of all active rules and settings directly on the chart, facilitating the visualization and confirmation of the running logic.

Additionally, it has a settings box where you can activate or deactivate the panel, choose its position (such as at the bottom or side), and adjust its size.
スナップショット

--

The Thumbnail strategy uses the following external indicators: Multiple MTF MA [xdecow] and Breakout Finder [LonesomeTheBlue].

--

Final Considerations:

The Logic Flow Signals & Backtest tool is a versatile and powerful system, designed to test and apply trading ideas based on multiple indicators from TradingView.

Its differential is being a customization environment: the script does not have integrated graphical indicators, as the objective is precisely to allow the user to combine and integrate multiple existing indicators in the TradingView community to build unique entry and exit logics.

It offers flexibility and precision, but the true value emerges when the trader integrates the tool into a consistent trading plan, with efficient risk management (Stop Loss and Take Profit), leverage control, and a professional mindset.

Important: Risk of Repainting (Unstable Data): Avoid indicators that 'repaint' (those that change their values ​​in past bars after the closing of new candles). The backtest will be invalidated, and the actual performance of the strategy will fail.

Legal Warning and Didactic Purpose:

It is fundamental to understand that all visual examples, charts, and texts contained in this description do not constitute financial advice, buy or sell recommendations, nor a promise of easy or guaranteed gains.

This is an advanced support tool, not an automatic profit system. Use the integrated backtesting to evaluate the historical behavior of strategies before real execution and understand how different market conditions impact your results. The sole purpose of this material is to demonstrate the logical and execution capacity of the script, serving as a didactic guide for you to test and validate your own ideas.

Conclusion and Risk Warning:

Success in financial markets comes not only from a set of charting indicators, but from the trader's understanding, practice, and discipline. Our objective is to provide a robust, customizable, and intuitive solution, created to enhance your technical analysis and broaden your strategic vision, without replacing critical thinking and conscious decision-making.

Finally, remember: past results do not guarantee future performance. The real differentiator lies in continuous learning, testing, and evolution.

免責事項

この情報および投稿は、TradingViewが提供または推奨する金融、投資、トレード、その他のアドバイスや推奨を意図するものではなく、それらを構成するものでもありません。詳細は利用規約をご覧ください。