已更新
OmniFlamo Builder Lab

No-Code Visual Strategy Building, Backtesting, and Trading Automation
🔶 Introduction: From Indicators to Complete Trading Strategies
OmniFlamo Builder Lab is a visual, no-code strategy building and backtesting platform on TradingView. It is not designed to provide ready-made trading strategies, nor to make users build complicated trading rules by stacking large numbers of Boolean conditions. Instead, it enables users to build, backtest, and refine trading strategies in multiple layers, using TradingView's extensive range of indicators and organizing the process around trading logic.
A complete trading strategy requires more than basic buy and sell entry signals. It must also consider whether signals are valid, how different signals work together, how trends affect trading, and how open positions should be exited. OmniFlamo Builder Lab organizes these elements into relatively independent, combinable logic modules. Users can start with basic buy and sell signals, then add signal filtering, trend analysis, independent exit rules, stop-loss and take-profit settings, and other forms of risk control to build a complete trading strategy.
OmniFlamo Builder Lab organizes signal construction into layers based on trading semantics. Users simply select trigger and filter modes, then choose the relevant indicator data lines or configure the required parameters. Each module has a clearly defined role, its configuration is independent, and its results are visualized.
Users can directly inspect historical trades and profitability in the strategy backtest results, adjust indicators, their own parameters, and strategy logic, and then use the results to guide the next round of strategy development, adjustment, and validation. This allows strategy research to be based on historical data and backtesting rather than relying solely on visual inspection of trading signals, making the evaluation process more objective and efficient.
🔶 1. Main Trigger
Main Trigger is the basic signal module of a strategy. It defines the fundamental conditions for generating buy and sell signals. Users select a trigger mode according to the trading semantics of the indicator they use, and then select the relevant indicator data lines. There is no need to break every trading action down into a separate set of condition expressions.
OmniFlamo Builder Lab provides multiple trigger modes to accommodate different types of indicator signals:
- Line Cross: Generates buy and sell signals based on the crossover relationship between selected indicator lines
- Threshold Cross: Generates buy and sell signals based on the crossover relationship between an indicator line and a specified threshold
- OB/OS Break: Establishes buy and sell signals when an indicator line breaks out of an overbought or oversold region
- OB/OS Return: Establishes buy and sell signals when an indicator line returns from an overbought or oversold region
- OB/OS Reverse: Generates buy and sell signals using overbought or oversold conditions as reversal criteria
- Channel Break: Generates buy and sell signals when an indicator line breaks through a channel boundary
- Channel Return: Generates signals when an indicator line returns inside a channel after moving outside it
- Channel Touch: Generates signals when an indicator line touches a channel boundary and reverses
- Channel Reverse: Generates signals when an indicator line breaks through a channel boundary and reverses
- Direction Reverse: Generates signals when the direction of a selected indicator line reverses
- HighLow Break: Generates signals when price breaks above or below the high or low of a specified number of candles
- BuySell Mark: Uses buy and sell markers provided by an indicator as the signal source
These modes correspond to different trading logic patterns found in indicators. Rather than rebuilding a separate set of logic conditions for every mode, users select the trigger type that best matches the indicator's native meaning or their own interpretation of it, and then configure the parameters required by that mode.
OmniFlamo Builder Lab uses a mode-driven configuration interface. Once a trigger mode is selected, the interface displays the corresponding configuration options and disables parameters that are not required by the current mode. This guides configuration and reduces distractions from irrelevant parameters.
Main Trigger defines the strategy's basic buy and sell signals. Whether those signals require further confirmation, whether they are subject to trend restrictions, and how open positions are ultimately managed are handled by the subsequent modules.
🔶 2. Auxiliary Logic
Basic buy and sell signals from a single indicator are not necessarily suitable for direct use in trading. Some signals may become more effective when additional conditions are met; others may benefit from confirmation by subsequent signals. Some strategies may also need to incorporate multiple signal sequences as parallel sources of trading signals.
Auxiliary Logic provides independent logical controls for these requirements. It does not replace Main Trigger. Instead, it adds different forms of constraints, confirmation, or supplementary signals to the basic signals generated by Main Trigger.
🔹 2.1 Filter — Signal Filtering
Filter modes determine whether basic buy and sell signals are allowed to pass, based on the states of additional indicator lines.
OmniFlamo Builder Lab provides the following filter modes:
- Line Comparison: Filters signals according to the relative positions of selected indicator lines
- Threshold Side: Filters signals according to which side of a specified threshold the indicator data is on
- OB/OS Break: Filters signals according to the trend implications of an indicator line breaking through an overbought or oversold boundary
- OB/OS Return: Filters signals according to the reversal implications of an indicator line returning after breaking through an overbought or oversold boundary
- Channel Break: Filters signals according to the trend implications of an indicator line breaking through a channel boundary
- Channel Return: Filters signals according to the reversal implications of an indicator line returning after breaking through a channel boundary
- Direction: Filters signals according to the direction of an indicator line
- Triple Lines: Filters signals according to the relationships among three data lines
The key idea behind filtering is to separate the generation of a signal from the decision to allow that signal to take effect. For example, a buy signal from an indicator does not necessarily mean that the strategy must buy immediately. Users can impose additional requirements, such as specific relationships between other indicators or particular market conditions.
This structure is useful for restricting the market environments in which signals can take effect and reducing trading opportunities that do not meet the strategy's requirements. Whether a filter is effective must still be evaluated using actual market data and backtesting results.
🔹 2.2 Validation — Condition Validation
Validation adds extra validity conditions to basic buy and sell signals. It focuses on whether a current signal satisfies the specified validation requirements.
The available modes include:
- Validation Above: For example, requires volume to be above one of its moving averages before a buy or sell signal is considered valid.
- Validation Range: Checks whether indicator data falls within a specified range.
- Validation Less: Checks whether indicator data is below a specified value.
- Validation Greater: For example, requires ADX to be greater than 20 before a buy or sell signal is allowed.
Users can use volume, trend strength, or other indicator data as validation criteria, requiring basic buy and sell signals to satisfy additional conditions before they can proceed through the strategy logic.
🔹 2.3 Sync Confirm — Signal Confirmation
Sync Confirm determines whether a signal remains valid based on the timing relationship between the initial signal and a confirmation signal.
Its key distinction is that it does not simply require two signals to occur simultaneously, nor does it retrospectively validate an earlier basic signal after a later confirmation signal appears. Instead, the logic works as follows: a basic buy or sell signal occurs first. A corresponding new buy or sell signal must then appear within a specified number of candles. Only the subsequent signal—the confirmation signal—becomes the valid buy or sell signal.
Therefore, the subsequent confirmation signal itself marks the point at which confirmation is completed. If no qualifying confirmation signal appears within the specified window after the initial signal, the initial signal is discarded.
This mechanism is suitable for strategies that need to determine whether a signal persists, whether it occurs again, or whether trading conditions should be confirmed by a subsequent signal. Users can configure the confirmation window according to their strategy requirements, although the actual results still depend on the selected signals and market conditions.
🔹 2.4 Parallel Trigger — Parallel Signal Triggering
Parallel Trigger adds another sequence of buy and sell signals, providing the strategy with an additional source of triggers.
Unlike Sync Confirm, Parallel Trigger does not require an initial signal to occur before waiting for another signal to confirm it over time. Instead, it incorporates another sequence of buy and sell signals into the strategy's valid signal sources.
This mode is suitable for strategies that combine multiple signal sequences and use them as additional trigger sources. Whether combining different signals improves strategy performance must be determined through actual backtesting; adding more signals does not, by itself, imply better results.
🔶 3. Trend/Filter — Trend and Market-State Filtering
Trend/Filter is the module for filtering trading signals based on trends and market conditions.
It is similar to the Filter modes in Auxiliary Logic, but the two focus on different aspects. Auxiliary filtering places greater emphasis on adding conditional constraints to basic buy and sell signals. Trend/Filter is also fundamentally a filtering mechanism, but it organizes its rules primarily around trend direction and market conditions, adding another dimension of signal screening.
Trend/Filter also uses a mode-driven configuration interface. Users select an appropriate mode and then configure its corresponding parameters. Options that do not apply to the current mode are grayed out.
By combining Main Trigger, Auxiliary Logic, and Trend/Filter, OmniFlamo Builder Lab allows users to define basic trading signals, apply various forms of auxiliary refinement, and filter trading signals according to trends and market conditions. Users can then observe how different combinations of rules affect historical trading results.
🔶 4. Only Close — Independent Position Exits
Only Close is a dedicated module for defining independent exit signals. It uses trigger modes similar to those in Main Trigger, but with one important difference: its signals are used exclusively to close positions. They do not open new long or short positions, and the module does not provide the various filtering mechanisms available elsewhere.
Main Trigger, Auxiliary Logic, and Trend/Filter jointly determine entry signals. Only Close, by contrast, generates buy or sell signals from a separate set of trading logic to determine when existing positions should be exited.
For example, a strategy may use a combination of indicator-line rules to determine entry opportunities, but use a different indicator's trigger mode to determine when a position should end. By assigning entry and exit decisions to different signal groups, the strategy does not have to rely entirely on reverse entry signals or stop-loss and take-profit triggers to exit positions.
Only Close is particularly suitable for strategies that need more flexible and sophisticated exit rules than ordinary reverse signals can provide. If the exit logic is more complex—for example, if it requires multiple indicators, multiple trigger conditions, or composite buy and sell signals with additional filtering—users can build the required composite signals using the OmniFlamo Builder Pro framework indicator, then bring those signals into Only Close using the BuySell Mark mode.
🔶 5. Stop/Profit — Stop-Loss, Take-Profit, and Risk Control
OmniFlamo Builder Lab provides three modes that enable stop-loss and take-profit functionality, as well as a mode that does not use stop-loss or take-profit, to accommodate different order-management requirements. Stop-loss and take-profit values can be calculated using ATR or percentages.
- No Stop/Profit
- Flexible (SL/Reverse)
- Flexible (SL/TP/Reverse)
- Strict (Only SL/TP)
🔹 5.1 No Stop/Profit — No Stop-Loss or Take-Profit
No stop-loss or take-profit is configured. Positions are exited by reverse trading signals or Only Close signals.
This mode is suitable for examining the effectiveness of the buy and sell signals themselves, and for comparing backtest performance before and after introducing stop-loss and take-profit rules.
🔹 5.2 Flexible (SL/Reverse) — Stop-Loss Without Take-Profit
This mode uses a stop-loss but no take-profit. Positions are exited by whichever occurs first among the stop-loss, an Only Close signal, and a reverse signal.
🔹 5.3 Flexible (SL/TP/Reverse) — Stop-Loss and Take-Profit
Both stop-loss and take-profit are enabled. Positions are exited by whichever occurs first among the stop-loss, take-profit, an Only Close signal, and a reverse signal.
🔹 5.4 Strict (Only SL/TP) — Exit Only Through Stop-Loss or Take-Profit
This mode also enables both stop-loss and take-profit, but positions can only be exited when the stop-loss or take-profit condition is met.
Reverse entry signals no longer serve as exit conditions, and Only Close signals cannot bypass this mode's restrictions to close a position. In other words, although Only Close is an exit-signal mechanism, it is not necessarily active in every exit mode. In this mode, the available exit paths are restricted to stop-loss and take-profit.
This mode is suitable for strategies that need to strictly test fixed stop-loss and take-profit exit rules, particularly systems in which entry signals establish positions and price targets or risk boundaries determine when those positions end.
🔹 5.5 Order Funds and Maximum Potential Loss
In addition to stop-loss and take-profit settings, OmniFlamo Builder Lab provides controls for the maximum funds allocated to each order and the maximum potential loss associated with each order.
These settings help users incorporate position sizing and risk constraints into strategy design rather than focusing solely on buy and sell signals. The order-funds limit can cap the funds allocated to an individual order, while the maximum potential loss setting constrains the amount of funds used for each order based on its potential loss.
Backtested calculations of funds and losses do not guarantee the same results in live trading. Actual execution can also be affected by slippage, fees, fill conditions, and external platform rules.
🔶 6. Strategy Backtesting and Iterative Refinement
OmniFlamo Builder Lab integrates strategy construction with TradingView's historical backtesting, allowing users to observe historical trading performance directly after modifying a strategy.
Backtest results are useful for more than checking final returns. They also help users understand how a strategy trades, including its historical trade records, performance curve, and changes in results under different combinations of rules. By examining this information, users can further investigate whether a strategy's problems may originate from signal quality, filtering conditions, trend constraints, exit methods, or risk controls.
OmniFlamo Builder Lab supports repeated strategy adjustments within the same building environment. Common areas for refinement include:
- Adjusting indicator combinations: Replacing or changing the indicators used in a strategy to observe how different signal sources affect backtest results
- Adjusting indicator parameters: Modifying an indicator's own parameters to test whether changes in its sensitivity improve strategy performance
- Adjusting strategy logic: Changing the main trigger mode, auxiliary filters, confirmation conditions, trend conditions, or independent exit methods
- Adjusting trade-management rules: Changing stop-loss and take-profit modes and related funds and risk-control settings, then comparing the results
The purpose of this iterative process is not to pursue the most attractive possible equity curve from a single backtest. It is to gradually understand how different parameters and logic affect a strategy. Users can start with a relatively simple strategy, validate its basic signals, and then progressively add filtering, trend conditions, or exit rules to observe the effects of each change.
However, historical backtesting carries a risk of overfitting. Repeatedly adjusting parameters until a strategy performs exceptionally well over a particular historical period does not mean it will maintain the same performance in future markets. Backtest results should therefore be evaluated across different market phases and time ranges, together with the soundness of the strategy logic, rather than judged solely by a single performance metric.
🔶 7. Strategy Alerts and Trading Automation
OmniFlamo Builder Lab is not only used to build and backtest trading strategies. It also supports sending strategy-related trading events or instructions through TradingView alerts to external trade-execution systems, enabling automated trading.
OmniFlamo Builder Lab provides two distinct automation paths. The first uses customizable TradingView strategy alert templates to send strategy-order information to a third-party trade-execution system. The second bypasses the strategy alert templates and sends trading instructions directly to the FlamoHub trade-execution hub through `alert()`. These two paths differ in how instructions are generated, how they are configured, and how they operate.
🔹 7.1 TRADE Switch — Control of Strategy Order Simulation and Alert Output
The TRADE switch controls order simulation by the strategy engine, the backtest display, and strategy-order alert output.
When TRADE is turned off, users can focus on configuring indicator lines, adjusting parameters, and building trading logic without enabling strategy order simulation, backtesting, or strategy-order alert output. This makes the configuration workflow smoother and faster.
When TRADE is turned on, strategy trades are simulated on historical data, and corresponding alerts are triggered by order events generated by the strategy engine. Users can examine historical trade records and backtest results on the chart to evaluate strategy performance. They can also use strategy-order alerts to send relevant trading information to an external execution system.
Note that the TRADE switch controls strategy-engine trade simulation and its associated strategy-order alert output. It does not control the independent instruction-output path that sends alerts directly to FlamoHub through `alert()`. The behavior of that path is described in Section 7.3.
🔹 7.2 TradingView Strategy Alert Templates
OmniFlamo Builder Lab provides customizable TradingView strategy alert templates that convert strategy-order information into JSON messages for compatible third-party trade-execution systems.
Parameter names in the template can be modified to meet the receiving system's interface requirements, but the meaning of each placeholder is defined. For example:
- "action": Strategy order comment, which can be used to identify the corresponding trading action
- "symbol": Base currency of the trading instrument
- "side": Direction of the strategy order
- "tvcode": TradingView chart symbol code
- "price": Strategy order price
- "amount": Strategy order quantity
- "stopPrice": Stop-loss price generated internally by Lab and output through a placeholder
- "profitPrice": Take-profit price generated internally by Lab and output through a placeholder
The "stopPrice" and "profitPrice" parameters are used to pass the stop-loss and take-profit prices. An execution system that can handle only basic trading instructions may ignore these two parameters and execute buy and sell actions entirely according to the alerts generated by the strategy engine.
If stop-loss and take-profit orders need to be submitted to the exchange, the parameter names can be modified to match the interface requirements of the third-party trade-execution system, and the template placeholders can be used to pass the stop-loss and take-profit prices. In this case, however, once the corresponding stop-loss and take-profit orders have been successfully submitted to the exchange and are handled and triggered by the exchange, the third-party trade-execution system should ignore the corresponding subsequent stop-loss and take-profit trigger alerts generated by the strategy engine. These alerts have an "action" value of "StopS", "ProfitS", "StopL", or "ProfitL". Ignoring them avoids duplicate execution. The specific method for identifying and handling these events depends on the third-party execution system's interface protocol and implementation.
🔹 7.3 Direct `alert()` Alerts to FlamoHub
In addition to using TradingView strategy alert templates, users can bypass those templates entirely and use `alert()` alerts to send trading-instruction JSON directly to the FlamoHub trade-execution hub. The JSON follows the FlamoHub pass-through JSON instruction protocol and allows automated buy and sell orders with stop-loss and take-profit functionality to be executed.
Unlike the customizable strategy alert templates described in Section 7.2, this path uses JSON messages generated from the UI settings. These messages include order quantity, funds parameters, stop-loss and take-profit settings, and other execution options. Users neither need to nor can modify the JSON structure or protocol fields used by this path.
An important feature of this path is that it is not controlled by the TRADE switch. Even when TRADE is Off, `alert()` alerts still generate trading instructions according to the UI settings and send them directly to FlamoHub. Therefore, turning TRADE off does not disable all automated instruction output. It only disables strategy-engine trade simulation and strategy-order alert output.
🔹 Boundaries and Risks of Automated Trading
Regardless of which strategy-automation path is used, it is important to distinguish three stages: strategy backtesting, alert output, and actual order execution.
Historical backtesting reflects results produced by the strategy engine using historical data and simulated rules. It is not equivalent to actual order execution on an exchange. A successfully triggered alert or a successfully sent message does not guarantee that a trading instruction will be received, accepted, or filled. Actual results can also be affected by the external execution system, trading-account configuration, exchange rules, network latency, market liquidity, fees, slippage, and order restrictions.
🔶 Conclusion
OmniFlamo Builder Lab is an efficient visual strategy-building platform designed to turn a user's trading idea, even one that occurs in a flash of inspiration, into a strategy quickly and without coding. It does not include built-in technical indicators or provide ready-made trading strategies. Instead, it integrates indicator-signal triggering, auxiliary logic, trend analysis, market-state filtering, independent exits, stop-loss and take-profit settings, funds constraints, historical backtesting, and strategy alert output into one environment.
From a trader's perspective, users can build highly practical strategies with clear logical structures and explicit trading rules by drawing on TradingView's extensive indicator ecosystem, including protected-source indicators and purchased commercial indicators.
The efficiency of OmniFlamo Builder Lab comes from its complete workflow of strategy construction, historical backtesting, and iterative refinement. Users can start with simple buy and sell trigger conditions, progressively add filtering and confirmation logic, and build a complete trading strategy. They can examine historical trade records and backtest performance on the chart, adjust indicators and their parameters, and repeatedly validate the effects of different trading logic and rules.
For users who want to automate the execution of effective strategies, OmniFlamo Builder Lab supports sending trading instructions to third-party trade-execution systems through its built-in TradingView strategy alert templates. It also provides a direct route to the FlamoHub trade-execution hub through `alert()` alerts, bypassing the strategy alert templates. During automated trading, users can monitor changes in strategy performance over time through continuously updated visualized orders and backtest results, and adjust their strategies when appropriate. OmniFlamo Builder Lab does not guarantee returns, and the historical backtest performance of a strategy does not represent its future live-trading results.
OmniFlamo Builder Lab is suitable for stocks, futures, forex, cryptocurrencies, and other markets supported by TradingView charts. Whether it can be used for a particular instrument, and whether its backtest results are meaningful, depends on the instrument, data quality, timeframe, and, most importantly, the technical indicators and rules used to build the strategy.
If you believe there is no Holy Grail in trading, that markets are constantly changing, and that any strategy can lose its effectiveness over time; if you believe traders ultimately trade strategies rather than isolated indicator signals, and that repeatedly searching for a replacement strategy when an existing one stops working can be a persistent challenge; if you believe technical indicators can have some degree of effectiveness and that trading strategies can be built on them; and if you believe trading is a probability game in which long-term profitability requires strategies with a probabilistic edge and a degree of stability over an appropriately long historical period, then OmniFlamo Builder Lab is designed for you.
And if you also want to take your strategies into automated execution, OmniFlamo Builder Lab is even more suited to your needs.
====================================================================
OmniFlamo Builder Lab —— 无代码可视化策略构建、回测与交易自动化
====================================================================
🔶 引言:从指标到完整交易策略
OmniFlamo Builder Lab 是 TradingView 上可视化、无代码的策略构建与回测平台。它的设计目标不是提供一套交易策略,更不是让用户大量堆叠布尔条件来编写繁琐的交易规则,而是让用户能够基于海量的 TradingView 指标,以交易逻辑为核心,多层次构建交易策略、回测和调整策略。
一套完整的交易策略,仅有基本的买卖入场信号是不够的,还需要考虑信号是否有效、不同信号如何配合、趋势如何影响交易,以及持仓后应当如何退出。OmniFlamo Builder Lab 将这些环节组织为相对独立、可以组合的逻辑模块,使用户能够从基本的买卖信号出发,再根据需要进行信号过滤、趋势判断、独立平仓设置、止盈止损等风险控制,最后形成交易策略。
OmniFlamo Builder Lab 的特点是以交易语义分层组织信号构建策略,用户只需选择触发与过滤模式及相应指标的数据线或设定参数即可。各个模块职责明确,功能配置独立,结果可视化。
用户可以直接观察策略回测图在历史数据上的交易记录与盈利表现,调整指标、指标自身的参数和策略逻辑,再根据回测结果进行下一轮策略构建调整与验证。这使策略开发研究完全建立在真实的历史数据上而不是停留在交易信号肉眼观察上。及时性与可靠性更高。
🔶 一、Main Trigger — 主触发
Main Trigger 是策略的基础信号模块,负责定义产生买入和卖出信号的基本条件。用户根据所使用指标的交易语义选择触发模式,再选择指标线即可,不必将每一种交易行为都拆解成独立的条件表达式。
OmniFlamo Builder Lab 提供多种触发模式,以适应不同类型的指标信号:
Line Cross(双线交叉):根据所选指标线之间的交叉关系产生买卖信号
Threshold Cross(阈值交叉):根据指标线与指定阈值之间的交叉关系产生买卖信号
OB/OS Break(超买超卖突破):以指标线超买或超卖区域的突破建立买卖点
OB/OS Return(超买超卖返回):以指标线从超买或超卖区域返回建立买卖点
OB/OS Reverse(超买超卖反转):以超买超卖为反转条件产生买卖点
Channel Break(通道突破):以指标线突破通道边界产生买卖信号
Channel Return(通道返回):以指标线从通道外返回通道范围产生信号
Channel Touch(通道触及):以指标线触及通道边界反转产生信号
Channel Reverse(通道反转):以指标线突破通道边界反转产生信号
Direction Reverse(方向反转):根据所选指标线方向发生反转产生信号
HighLow Break(高低点突破):根据价格突破或跌破指定K线数的高点或低点产生信号
BuySell Mark(买卖标记):利用指标提供的买卖标记作为信号来源
这些模式对应的是不同指标的交易逻辑。用户不必为每一种模式重新搭建一套逻辑条件,而是根据所用指标的原生含义或自己认为的含义选择适合的触发类型,再配置该模式所需的参数。
OmniFlamo Builder Lab 采用模式驱动的配置方式:选择某种触发模式后,界面会根据模式显示相应的配置项;当前模式不需要的参数则会被禁用。这样可以引导及减少无关参数对用户的干扰。
Main Trigger 定义的是策略的基础买卖信号。至于信号是否还需要其他条件确认、是否受到趋势限制,以及最终如何处理持仓,则由后续模块分别负责。
🔶 二、Auxiliary Logic — 辅助逻辑
来自于单一指标的基础买卖信号并不适合直接用于交易。某些信号需要满足额外条件才可能更有效;某些信号配合后续信号确认更好;另一些策略则希望将多组信号并行纳入基础买卖信号。
Auxiliary Logic 为这些需求提供独立的逻辑控制。它不是取代 Main Trigger,而是在其产生的基础信号之上增加不同形式的约束、确认或补充。
🔹 2.1 Filter — 信号过滤
过滤模式用于根据额外的指标线所处的状态,决定基础买卖信号的去留。
OmniFlamo Builder Lab 提供的过滤模式:
Line Comparison(双线比较):根据所选指标线之间的上下关系进行过滤
Threshold Side(阈值位置):根据指标线数据处于指定阈值的哪一侧进行过滤
OB/OS Break(超买超卖突破):根据指标线突破超买超卖边界的趋势含义进行过滤
OB/OS Return(超买超卖返回):根据指标线突破超买超卖边界后返回的反转含义进行过滤
Channel Break(通道突破):根据指标线突破通道边界的趋势含义进行过滤
Channel Return(通道返回):根据指标线突破通道边界后返回的反转含义进行过滤
Direction(方向):根据指标线的方向进行过滤
Triple Lines(三线关系):根据三条数据线之间的关系进行过滤
过滤逻辑的重点,是把“产生信号”和“允许信号生效”分开处理。例如,某个指标出现买入信号,并不意味着策略必须立即买入;用户可以进一步要求其他指标满足特定关系,或者要求市场处于某种状态。
这种结构适合用来限制信号出现的环境,减少不符合策略要求的交易机会。过滤条件是否有效,仍需要结合实际市场数据和回测结果进行检验。
🔹 2.2 Validation — 条件验证
Validation 用于对基础买卖信号增加额外的有效性条件。它关注的是:当前买卖信号是否满足设定的验证要求。
相关模式包括:
Validation Above:例如,要求成交量高于它的某个均线,买卖信号才有效。
Validation Range:验证指标数据是否处于指定范围内。
Validation Less:验证指标数据是否小于设定值。
Validation Greater:例如,要求 ADX 大于 20,才允许买卖信号有效。
用户可以将成交量、趋势强度或其他指标数据作为验证依据,让基础买卖信号必须满足额外条件后才能进入策略逻辑。
🔹 2.3 Sync Confirm — 信号确认
Sync Confirm 根据基础信号与确认信号之间时间关系决定买卖信号的去留。
它的关键并不是简单地要求两个信号同时出现,也不是在后续确认信号出现后,回头将过去基础信号认定为有效。其逻辑是:首先出现一个基础买入或卖出信号,随后在指定的 K 线数量范围内,再出现相应的新买卖信号,后续信号(确认信号)才构成有效买卖信号。
因此,后续确认信号本身才是完成确认的有效时点。如果基础信号出现后,在指定窗口内没有出现符合要求的后续确认信号,基础信号就被丢弃了。
这种机制适合需要观察信号是否持续、是否再次出现,或希望通过后续信号确认交易条件的策略。用户可以根据策略需要设置确认窗口,但具体效果仍取决于所选信号及市场环境。
🔹 2.4 Parallel Trigger — 并行触发
Parallel Trigger 用于加入另一组买卖信号序列,为策略增加额外的触发来源。
与 Sync Confirm 不同,Parallel Trigger 的重点不是要求基础信号出现后,再等待另一信号进行时间确认,而是将另一组买卖信号纳入策略的有效信号。
它适合希望在同一策略中组合多组信号、增加触发来源的场景。至于不同信号如何组合才能改善策略表现,需要通过实际回测来判断,不能仅凭增加信号数量推断效果。
🔶 三、Trend/Filter — 趋势及过滤
Trend/Filter 是从趋势和市场状态角度过滤交易信号的模块。
与前面的辅助逻辑里的 Filter 模式相似,但两者的关注角度不同。辅助过滤更侧重对基础买卖信号增加条件约束;Trend/Filter 本质上也是过滤,主要围绕趋势方向、市场状态组织规则,多一层信号筛选维度。
Trend/Filter 同样采用模式驱动。用户选择适合的模式后,再配置相应的参数,不适用于当前模式的配置项会置灰。
通过 Main Trigger、Auxiliary Logic 与 Trend/Filter 组合,OmniFlamo Builder Lab 能让用户设置基础交易信号、对基础交易信号进行各种辅助修正和对交易信号进行趋势及状态过滤,并观察不同规则组合对策略的历史交易结果的影响。
🔶 四、Only Close — 独立平仓
Only Close 是专门用于定义独立平仓信号的模块。它与 Main Trigger 使用相似的触发模式,但有一个重要区别:Only Close 的信号只用于平仓,不参与建立新的买入或卖出仓位,也没有提供各种过滤逻辑。
Main Trigger、Auxiliary Logic 与 Trend/Filter 共同决定交易入场信号,而 Only Close 是独立的交易逻辑产生的买卖点信号,决定退出已有持仓的时机。
例如,一个策略使用一套指标线组合规则决定入场机会,但使用另一种指标线的触发模式决定持仓结束时机。入场和出场由不同的信号组负责,能够让策略的退出规则不必完全依赖反向入场信号或止盈止损的触发。
Only Close 尤其适合需要比普通反向信号更灵活更精巧的出场规则的策略。如果出场逻辑本身比较复杂,例如需要组合多个指标、多个触发条件或更复杂过滤后的综合买卖信号,可以使用 OmniFlamo Builder Pro 框架指标构建所需的综合信号,再使用 "BuySell Mark" 模式将综合信号引入到 Only Close。
🔶 五、Stop/Profit — 止盈止损与风险控制
OmniFlamo Builder Lab 提供三种止盈止损模式,以适应不同的交易订单管理需求。止盈止损值可按 ATR 或 百分比计算。
No Stop/Profit
Flexible (SL/Reverse)
Flexible (SL/TP/Reverse)
Strict (Only SL/TP)
🔹 5.1 No Stop/Profit — 不使用止盈止损
不设置止盈止损,订单的出场由反向交易信号或 Only Close 信号决定。
适合查看买卖信号本身的有效性,也可以用于对比加入止盈止损之后的回测表现。
🔹 5.2 Flexible (SL/Reverse) — 设置止损不设止盈
只有止损没有止盈,订单会根据遇到的先后顺序从止损、Only Close 信号或反向信号出场。
🔹 5.3 Flexible (SL/TP/Reverse) — 设置止盈止损
启用止盈止损,订单会根据遇到的先后顺序从止损、止盈、Only Close 信号或反向信号出场。
🔹 5.4 Strict (Only SL/TP) — 仅通过止盈止损退出
此模式同样启用止盈和止损,但持仓只能通过止盈或止损条件退出。
反向入场信号不再作为平仓依据,Only Close 信号也不能绕过这一模式的限制来结束持仓。也就是说,Only Close 虽然属于出场信号,但并不代表它必须参与每一种出场模式;此模式下的订单出场路径被限定为止盈和止损。
这种模式适合希望严格检验固定止盈止损退出规则的策略,尤其适用于研究由入场信号建立仓位、再由价格目标或风险边界决定持仓结束时机的交易系统。
🔹 5.5 订单资金与最大可能亏损
除了止盈止损设置,OmniFlamo Builder Lab 还提供每笔订单的最大资金控制,以及每个订单最大可能亏损资金的相关设置。
这类设置用于帮助用户将订单规模与风险约束纳入策略设计,而不只是关注买卖信号本身。订单资金上限可以限制单笔订单的资金规模;最大可能亏损资金设置则用于从潜在亏损角度约束每次的下单资金值。
回测中的资金和亏损计算不等于真实交易结果,实际执行还会受到滑点、手续费、成交条件以及外部平台规则等因素影响。
🔶 六、策略回测与迭代调整
OmniFlamo Builder Lab 将策略构建与 TradingView 的历史回测结合,使用户能够在修改策略后,直接观察历史数据上的交易表现。
回测结果不仅用于查看最终收益,还可以帮助用户理解策略的交易过程,包括历史交易记录、策略表现曲线,以及不同规则组合下交易结果的变化。通过观察这些信息,用户可以进一步判断策略的问题可能来自信号质量、过滤条件、趋势约束、出场方式或风险控制。
OmniFlamo Builder Lab 支持在同一构建环境中反复调整策略。常见的改进方向包括:
调整指标组合:替换或改变参与策略的指标,观察不同信号来源对回测结果的影响
调整指标自身参数:修改指标的原有参数设置,检验指标灵敏度变化是否改善策略表现
调整策略逻辑:改变主触发模式、辅助过滤、确认条件、趋势条件或独立出场方式
调整交易管理规则:改变止盈止损模式及相关资金、风险控制设置,再比较回测结果
这种迭代方式的重点不是追求某一次回测出现最漂亮的收益曲线,而是逐步理解不同参数与逻辑对策略的影响。用户可以从一个相对简单的策略开始,先验证基本信号,再逐层加入过滤、趋势或出场条件,观察每次改变带来的结果差异。
但是,历史回测存在过度拟合的风险。不断修改参数,直到策略在某一段历史数据上表现优异,并不意味着它能够在未来市场中保持同样的表现。因此,回测结果应结合不同市场阶段、不同时间范围和策略逻辑的合理性进行判断,而不应仅依据单一收益指标作出结论。
🔶 七、策略警报与交易自动化
OmniFlamo Builder Lab 不仅用于构建和回测交易策略,还支持将策略相关的交易事件或交易指令通过 TradingView 警报输出,连接外部交易执行系统,实现策略的自动化交易。
OmniFlamo Builder Lab 提供两条不同的自动化路径:一是使用可定制的 TradingView 策略警报模板,将策略警报订单信息发送至第三方交易执行系统;二是绕过策略警报模板,通过 alert() 警报将交易指令直接发送至 FlamoHub 交易执行中枢。两条路径的指令生成方式、配置方法和工作机制有所不同。
🔹 7.1 TRADE 开关— 策略下单模拟与警报输出控制
TRADE 开关控制策略引擎的下单模拟、回测图及策略订单警报输出。
关闭 TRADE 时,用户可以专注于配置指标线、调整参数和构建交易逻辑,不启用策略下单模拟、回测及策略订单警报输出。界面操作更顺捷。
开启 TRADE 就会在历史数据上模拟策略交易,并根据策略引擎产生的订单事件触发相应警报。用户可以通过图表上的历史交易记录和回测结果检查策略表现,也可以利用策略订单警报将相关交易信息发送至外部执行系统。
需要注意,TRADE 开关控制的是策略引擎的交易模拟及相关策略订单警报输出,并不控制通过 "alert()" 直接发送至 FlamoHub 的独立指令输出路径。该路径的具体行为见第 7.3 节。
🔹 7.2 TradingView 策略警报模板
OmniFlamo Builder Lab 提供可定制的 TradingView 策略警报模板,用于将策略订单相关信息转换为 JSON 消息,发送至兼容的第三方交易执行系统。
模板中的参数名称可以根据接收端的接口要求进行修改,但各个占位符所代表的数据含义是明确的。例如:
"action":策略订单注释,可用于识别相应的交易动作
"symbol":品种的基础货币
"side":策略订单方向
"tvcode":TradingView 图表交易品种代码
"price":策略订单价格
"amount":策略订单数量
"stopPrice":止损价格,Lab 内部生成,占位符输出
"profitPrice":止盈价格,Lab 内部生成,占位符输出
其中,"stopPrice" 和 "profitPrice" 用于传递止损价和止盈价。对于只能处理基本交易指令的执行系统,可以忽略这两个参数,完全按策略引擎的警报执行买卖;如果需要将止损和止盈订单提交至交易所,则可以根据第三方交易执行系统接收端的接口要求修改这两个参数名称,并使用模板里的占位符传递止损价和止盈价。不过这样的话,对于策略引擎发出的止盈止损触发时的买卖警报("action"为"StopS"/"ProfitS"/"StopL"/"ProfitL")第三方交易执行系统就应该忽略。具体如何识别和处理这些事件,取决于第三方执行系统的接口协议与实现方式。
🔹 7.3 alert() 警报直通 FlamoHub
除了使用 TradingView 策略警报模板,用户更可以不经过策略警报模板,通过 alert() 警报将遵循 FlamoHub 透传式 JSON 指令协议的交易指令 JSON 直接发送至 FlamoHub 交易执行中枢执行带止盈止损的自动买卖下单。
与 7.2 节中可定制的策略警报模板不同,这条路径使用根据 UI 设置生成的 JSON 消息,里面包含了下单数量、资金参数、止盈止损及其他执行选项,用户无需也不能修改这条路径的 JSON 结构或协议字段。这条路径的一个重要特点是:它不受 TRADE 开关控制。即使 TRADE 为 Off,alert() 警报也会根据 UI 设置生成交易指令直接发送至 FlamoHub。因此,关闭 TRADE 并不意味着关闭所有自动化指令输出,它只关闭策略引擎的交易模拟及策略订单警报输出。
🔹 自动化交易的边界与风险
无论采用哪条策略自动化交易路径,都需要区分策略回测、警报输出和真实订单执行这三个环节。
历史回测反映的是策略引擎根据历史数据和模拟规则得到的结果,不等同于真实交易所的订单执行。警报成功触发或消息成功发送,也不代表交易指令必然被接收、接受或成交。实际结果还会受到外部执行系统、交易账户配置、交易所规则、网络延迟、市场流动性、手续费、滑点及订单限制等因素影响。
🔶 总结
OmniFlamo Builder Lab 是一个高效的可视化策略构建平台,致力于让用户一闪念的交易想法无代码极速实现为策略。它不内置任何技术指标,也不提供现成的交易策略,而是将各类指标信号触发、辅助逻辑、趋势判断、状态过滤、独立平仓、止盈止损、资金约束、历史回测与策略警报输出整合为一体,让用户从交易者的角度,基于海量的 TradingView 指标资源(包括源码受保护的指标与购买的商业指标)以清晰的逻辑结构和明确的交易规则构建高实用性策略。
OmniFlamo Builder Lab 的高效体现在从策略构建、历史回测到迭代调整的完整流程中。用户可以从简单的买卖触发条件开始,逐步增加过滤和确认逻辑,建立完整的交易策略。利用图表上的历史交易记录与回测表现检查策略,调整指标及其参数,反复验证不同交易逻辑与规则的作用。
对于希望进一步自动化执行有效策略的用户,OmniFlamo Builder Lab 支持通过它内置的 TradingView 策略警报模板输出交易指令到第三方交易执行系统,更可以绕过策略警报模板以 alert() 警报方式直通 FlamoHub 交易执行中枢。在自动化交易过程中,用户通过持续更新的可视化订单与回测结果,能实时监控策略有效性随时间的变化,以适时调整策略。OmniFlamo Builder Lab 不提供收益保证,已构建策略的历史回测表现也不代表未来的真实交易结果。
OmniFlamo Builder Lab 适用于股票、期货、外汇、加密货币等 TradingView 图表支持的市场。具体能否用于某个标的,以及回测结果是否具有参考价值,取决于交易品种、数据质量、时间周期,更重要的是使用何种技术指标及构建规则。
如果你认为交易没有圣杯、市场是不断变化的、任何策略的有效性都可能随时间而变化,如果你认为交易者其实是在交易一套策略而不是孤立的指标信号、也常为策略失效要不断寻找策略苦恼,如果你认为技术指标具有一定的有效性、交易策略可以建立在技术指标之上,如果你认为交易是概率游戏、要长期盈利只能交易在适当长度的历史数据上具有概率优势与稳定性的策略,那么 OmniFlamo Builder Lab 就是为你准备的。如果你还希望让策略走向自动化执行,那么 OmniFlamo Builder Lab 更是为你而来。
版本注释
Modify Author's instructions版本注释
Modify Author's instructions版本注释
Modify Author's instructions版本注释
1. Adjusted the layout to align with TradingView's underlying system updates to script settings UI elements.2. Add Filter Modes:
- OB/OS Reverse
- Channel Touch
- Channel Reverse
版本注释
Adjusted script settings UI layout💎【Subscribe OmniFlamo Builder】whop.com/flamo/omniflamo-builder-lab
🔥【Lab Strategy Share】tradingview.com/chart/yiQB0a4M
⚡【Auto-Trade】flamohub.cc
ℹ️ Support: t.me/OmniFlamo
✉️ Email: tradeflamo@gmail.com
🔥【Lab Strategy Share】tradingview.com/chart/yiQB0a4M
⚡【Auto-Trade】flamohub.cc
ℹ️ Support: t.me/OmniFlamo
✉️ Email: tradeflamo@gmail.com
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
💎【Subscribe OmniFlamo Builder】whop.com/flamo/omniflamo-builder-lab
🔥【Lab Strategy Share】tradingview.com/chart/yiQB0a4M
⚡【Auto-Trade】flamohub.cc
ℹ️ Support: t.me/OmniFlamo
✉️ Email: tradeflamo@gmail.com
🔥【Lab Strategy Share】tradingview.com/chart/yiQB0a4M
⚡【Auto-Trade】flamohub.cc
ℹ️ Support: t.me/OmniFlamo
✉️ Email: tradeflamo@gmail.com
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。