OPEN-SOURCE SCRIPT
LBM-Strategy Engine Pro: The Ultimate Confluence Indicator

Overview
Welcome to the Strategy Engine Pro, the ultimate confluence indicator designed for traders who demand precision and full control over their trading signals. This is not just an indicator; it is a complete, customizable strategy-building framework.
It seamlessly integrates three powerful concepts into a single, intuitive tool:
Core Features
1. Advanced Moving Average Trend Analysis
The indicator plots 5 fully configurable Moving Averages (MAs). You can choose the Period and Type (SMA, EMA, WMA, HMA, RMA) for each one. But its true power lies in its unique color-coding system, which analyzes the slope and momentum of each MA, not just its price.
MA Color Code:
This provides an instant visual snapshot of the market trend across five different timeframes.
2. Support & Resistance Cycle Engine
Forget simple pivot points. This indicator incorporates a sophisticated engine that identifies and plots significant "Master Cycle" levels on your chart.
Anchored Levels: These S/R lines are persistent and intelligent. When a key resistance level is broken, it automatically "flips" and becomes the new anchored support level, and vice-versa. This accurately maps out the market's structural progression.
The Strategy Builder: Your Personal Trading Lab
This is the heart of the indicator. You have 10 sequential rules that allow you to define the exact conditions for a Buy signal. The Sell signal is generated as the logical, symmetrical opposite.
For each rule, you can configure:
Important Note on Sell Signals: Sell conditions are designed to be the symmetrical opposite of the buy conditions you create.
This ensures your sell strategy mirrors the logic of your buy strategy, preventing the "inverse problem" of getting sell signals on every candle that isn't a buy signal.
Mastering the Connectors: ( ) AND and ( ) OR
The true power of the Strategy Builder lies in its connectors, which allow you to create complex, multi-layered logic. The connector on a rule defines how it connects to the next active rule.
next group with a big "OR".
Example: (R1 AND R2) OR (R3 AND R4)
This creates two possible paths for a signal.
- Rule 1: Condition R1, Connector AND
- Rule 2: Condition R2, Connector ( ) OR <-- This closes the first group and links to the next with OR.
- Rule 3: Condition R3, Connector AND
- Rule 4: Condition R4
Example: (R1 OR R2) AND (R3 OR R4)
This requires a condition from the first group and a condition from the second group to be true.
- Rule 1: Condition R1, Connector OR
- Rule 2: Condition R2, Connector ( ) AND <-- This closes the first OR group and links to the next with AND.
- Rule 3: Condition R3, Connector OR
- Rule 4: Condition R4
By strategically combining these connectors, you can build any logical trading scenario you can imagine. We look forward to seeing the powerful strategies the community creates with this engine.
Welcome to the Strategy Engine Pro, the ultimate confluence indicator designed for traders who demand precision and full control over their trading signals. This is not just an indicator; it is a complete, customizable strategy-building framework.
It seamlessly integrates three powerful concepts into a single, intuitive tool:
- Advanced Moving Average Trend Analysis to define the market context.
- An intelligent Support & Resistance Cycle Engine to identify key price levels.
- A flexible 10-rule Strategy Builder that lets you design, test, and refine your own entry signals with surgical precision.
Core Features
1. Advanced Moving Average Trend Analysis
The indicator plots 5 fully configurable Moving Averages (MAs). You can choose the Period and Type (SMA, EMA, WMA, HMA, RMA) for each one. But its true power lies in its unique color-coding system, which analyzes the slope and momentum of each MA, not just its price.
MA Color Code:
- Green: The MA is in a strong, confirmed uptrend.
- Red: The MA is in a strong, confirmed downtrend.
- Yellow: The MA is flat or in a transitional (sideways) phase.
This provides an instant visual snapshot of the market trend across five different timeframes.
2. Support & Resistance Cycle Engine
Forget simple pivot points. This indicator incorporates a sophisticated engine that identifies and plots significant "Master Cycle" levels on your chart.
Anchored Levels: These S/R lines are persistent and intelligent. When a key resistance level is broken, it automatically "flips" and becomes the new anchored support level, and vice-versa. This accurately maps out the market's structural progression.
The Strategy Builder: Your Personal Trading Lab
This is the heart of the indicator. You have 10 sequential rules that allow you to define the exact conditions for a Buy signal. The Sell signal is generated as the logical, symmetrical opposite.
For each rule, you can configure:
- Source A & Source B: Choose from a wide range of data points:
Price values: Close, Open, High, Low.
Previous candle values: Close Before, Open Before, etc.
Moving Average values: MA 1 through MA 5.
MA Trend Colors: MA 1 Color, MA 2 Color Before, etc. - Operator: Define the comparison logic:
*Standard: >, <, >=, <=
*Events: Crossover, Crossunder
*Color Logic: Is Color, Is NOT Color, Turned Color, Ceased to be Color
Important Note on Sell Signals: Sell conditions are designed to be the symmetrical opposite of the buy conditions you create.
- If Buy is Close > MA 1, Sell will be Close < MA 1.
- If Buy is MA 1 Color Is Green, Sell will be MA 1 Color Is Red.
- If Buy is MA 1 Color Turned Green, Sell will be MA 1 Color Turned Red.
This ensures your sell strategy mirrors the logic of your buy strategy, preventing the "inverse problem" of getting sell signals on every candle that isn't a buy signal.
Mastering the Connectors: ( ) AND and ( ) OR
The true power of the Strategy Builder lies in its connectors, which allow you to create complex, multi-layered logic. The connector on a rule defines how it connects to the next active rule.
- AND & OR: These work as you'd expect, creating a continuous chain of conditions.
- Rule 1 (AND) & Rule 2 is evaluated as (R1 AND R2).
- ( ) OR (The Group Separator): This is your most powerful tool. It acts like closing a parenthesis in an equation. It finalizes the current group of rules and connects it to the
next group with a big "OR".
Example: (R1 AND R2) OR (R3 AND R4)
This creates two possible paths for a signal.
- Rule 1: Condition R1, Connector AND
- Rule 2: Condition R2, Connector ( ) OR <-- This closes the first group and links to the next with OR.
- Rule 3: Condition R3, Connector AND
- Rule 4: Condition R4
- ( ) AND (The Super-Filter): This allows you to create a "master" condition that must be true in addition to other complex conditions.
Example: (R1 OR R2) AND (R3 OR R4)
This requires a condition from the first group and a condition from the second group to be true.
- Rule 1: Condition R1, Connector OR
- Rule 2: Condition R2, Connector ( ) AND <-- This closes the first OR group and links to the next with AND.
- Rule 3: Condition R3, Connector OR
- Rule 4: Condition R4
By strategically combining these connectors, you can build any logical trading scenario you can imagine. We look forward to seeing the powerful strategies the community creates with this engine.
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。