Zen ProThe Trading Theory of Entanglement (缠论), developed by a Chinese trading Master in 2006, is the single most complete and comprehensive trading theory known today. Although the theory remains ‘mysterious’ among traders outside China, millions and millions of Chinese traders study this theory everyday, and the theory has been proven to provide the closest description of market behaviors for all types of market including forex, stocks, derivatives, commodity, and cryptocurrency etc., and for all time frames no matter monthly, daily, 30m, 1m or even in seconds. The theory’s philosophy is based on human greed, hatred, delusion, arrogance and doubt, which reveal the most fundamental aspects of any market. For this reason, other trading theories or techniques such as the Dow theory, the Elliott Wave theory, and the Gann theory etc. can all find their explanations as well as their limitations from the Theory of Entanglement.
Fractals, strokes, line segments and pivots are basic elements in the Theory of Entanglement, and only by accurately drawing them on a chart can one find the most accurate buying and selling points. However, manually drawing these elements on an ever-changing chart is both challenging and time consuming, and may lead to incorrect interpretation of the market trend. Our Zen Pro indicator aims to provide the most accurate drawings of strokes, line segments, and pivots, as well as to automate the drawing process for three consecutive levels such as 1m, 5m, and 30m (similar to time frames but not necessarily the same). Buying and selling points are also labeled on the chart to provide users with appropriate trading guidance.
Note that different from the ZigZag indicator or its related ones which mainly connect high and low points on a chart, our developed Zen Pro is a highly structured and well organized technical indicator, and the elements defined in the theory are constructed step by step in the following manner: a pair of top and bottom fractals form a stroke, a minimum of three consecutive strokes form a line segment, and the overlapping area of three consecutive line segments defines a pivot (indicated by the rectangular area). The pivot is the key component to help identify trend continuation or reversal, based on the so-called trend divergence. More importantly, distinguished from other similar indicators implementing the Theory of Entanglement, our Zen Pro perfectly realizes recursions of multiple levels (time frames). For example, a stroke at a higher timeframe of 30m coincides with a line segment in a lower timeframe of 5m, and also coincides with a ‘trend type’ (see below definition) at an even lower timeframe of 1m. This feature is essential for multi-timeframe trading and provides confluence of buying and selling signals at multiple timeframes.
It is important to emphasize that users are strongly recommended to apply the Theory of Entanglement to analyze the current trend (whether it will continue or reverse) based on the drawings provided by the indicator, rather than blindly follow the labels of buying and selling points as signals. For acquiring more information on our Zen Pro, getting tips on how to use it more effectively in trading, as well as learning the Theory of Entanglement from basic concepts, interested users are encouraged to contact the author directly.
Zen Pro缠论指标应用了一套严格的数学递归运算逻辑,能够自动处理k线包含关系,识别顶、底分型,实现自动画笔、笔中枢、线段、线段中枢、走势类型等完美缠论走势图中的基础组成元素。
本指标的强大之处在于其可以做到走势结构的选择性递归生长,做到完美的区间套定位,高级别笔与低级别线段、走势类型的表里关系对应,以及接近做到高级别的任意标准笔、任意标准线段在低级别均具有内部结构和有理由地成立!
本指标用强大的数学递归运算逻辑,解决了千人千缠的难点,对走势进行清晰地逻辑划分,并可自动识别本级别与次级别背驰和盘整背驰,从而准确地标注本级别1、2、3类买卖点,为使用缠论交易的用户在交易上提供了最有效的帮助,让缠论不再高不可攀!
注:自前期的Zen指标发布一年多以来,我们收到了很多用户的良好反馈,但同时也深知其所存在的不足,因此我们听取了用户的宝贵意见,经过上万次的编译、调试与修改,现已在新发布的Zen Pro指标中解决了Zen指标的所有问题,例如需要手动设置单笔成线段的比例,以及手动设置成笔条件等等。Zen Pro无需用户自行设置,实现了根据当前条件完全自动划分走势。其对于走势的分析更加精确,展现出更加清晰的走势结构,从而使用户可以更有效和准确地判断当前走势的延续与转折。目前Zen Pro已达到我们对缠论指标用于准确描述市场行为的所有预期。
另:当前市场上有很多缠论指标供用户选择,而判断一个指标是否有效的标准不仅仅是该指标能否在大周期(≥ 4小时)或某个时间阶段对走势划分准确,而更是其能否清晰展现小周期(< 30分)的走势结构,以及更加重要的一点,是否能够实现多级别联立(即递归)。目前几乎所有其他的指标均未能实现对于走势结构的递归,从而仅适合于单一周期的操作。
而我们开发的Zen Pro以实现级别递归为基础,但又不仅仅局限于严格递归(若严格递归则可达到 > 99%),而是为更好地适应走势,依据走势的多义性对线段及走势类型进行调整,从而使生成的走势图更加利于分析,大大增加了用户对未来走势判断的准确程度,也同时极大程度上增强了用户的交易信心。
Relations between fractal, stroke, line segment, pivot, and some important definitions:
• Stroke: Connecting two adjacent top and bottom fractals with at least one candlestick in between.
• Line segment: Consists of an odd number of strokes, at least three strokes are required, and the first three strokes must have overlapping portions.
• Level: Levels generally correspond to time frames of the chart, such as 1w, 1d, 4h, 30m, 5m, 1m etc. Sub-level: The above levels are respectively the sub-levels of the previous level.
• Pivot: The part of a trend type at a certain level that is overlapped by at least three consecutive sub-level trend types.
• Trend type: There are two trend types: trend and range. In trend, there are also two types: rising trend and falling trend.
• Range: At any level, a completed trend type contains only one pivot.
• Trend: At any level, a completed trend type contains at least two pivots in the same direction in sequence, which is called a trend at this level.
List of drawings on the chart (for default color settings):
1. Thick blue lines: Strokes at the current level.
2. Thick orange lines: Strokes at a higher level, also line segments at the current level.
3. White dotted lines: Line segments at a higher level, also strokes at two levels higher from the current one.
4. Blue shaded rectangles: Pivots at the sub-level in a trend or a range.
5. Green shaded rectangles: Pivots at the current level in a rising trend or a range.
6. Orange shaded rectangles: Pivots at the current level in a falling trend or a range.
List of labels on the chart (above the candle: sell signal, below the candle: buy signal)
1. Small "1" label below the candle: The lower-level 1st buying point due to the bottom trend divergence or range divergence calculated from MACD: Buy signal
2. Small "1" label above the candle: The lower-level 1st selling point due to the top trend divergence or range divergence calculated from MACD: Sell signal
3. Large "1", "2", "3" labels below the candle: The current-level 1st, 2nd, and 3rd buying points due to the bottom trend divergence or range divergence calculated from MACD: Buy signal
4. Large "1", "2", "3" labels above the candle: The current-level 1st, 2nd, and 3rd selling points due to the top trend divergence or range divergence calculated from MACD: Sell signal
Chanlun
ChanLun ProChanLun, also known as Entanglement Theory or "缠论", is a highly regarded technical analysis methodology that originated in China. Since its introduction in 2006, ChanLun has rapidly gained significant attention and a strong following within the Chinese trader community due to its exceptional ability to navigate complex market dynamics.
ChanLun places great emphasis on market structure, price action, momentum, and the intricate interplay between market forces. It recognizes that the market operates in cyclical patterns and aims to capture the underlying structure and rhythm of price movements. Through meticulous analysis of the intricate relationships between price and time, it provides traders with a unique perspective on market trends, potential reversals, and critical turning points.
This indicator offers a meticulous and comprehensive implementation of the ChanLun theory. It facilitates in-depth analysis and visual representation of all essential components, encompassing “Candlestick Conversion”, "Candlestick Standardization", "Fractal", "Stroke", "Segment", "Pivot", and "Buying/Selling Point".
🟠 Algorithm
🔵 Step 1: Candlestick Conversion
In ChanLun, candlestick analysis focuses less on the opening/closing prices and wicks, but rather emphasizes the price range at which the stock price has reached. As a result, the initial step in ChanLun involves converting each candlestick to contain solely the high and low prices, disregarding other elements.
🔵 Step 2: Candlestick Standardization
In the second step, the converted candlesticks are standardized to ensure strict directional consistency and eliminate the presence of inner bars or outer bars. For any adjacent two candlesticks A and B where one’s price range completely encompasses another, A and B are merged into a new candlestick C. If A is trending up from its previous candle, then C will be defined such that high(C) = max(high(A), high(B)) and low(C) = max(low(A), low(B)). If A is trending down from its previous candle, then C will be defined such that high(C) = min(high(A), high(B)) and low(C) = min(low(A), low(B)).
After completing these steps, when considering any adjacent candlesticks A and B, we can always observe either of the following conditions:
1. high(A) > high(B) and low(A) > low(B)
2. high(A) < high(B) and low(A) < low(B)
The chart below illustrates how the candlesticks would appear after this step.
🔵 Step 3: Fractals
A "Fractal" refers to the pattern formed by three consecutive "standardized" candlesticks, where the middle candlestick shows a clear higher or lower value compared to the surrounding candlesticks. When considering three adjacent candlesticks, A, B, and C, we have either of the two conditions:
1. high(B) > high(A) and high(B) > high(C) and low(B) > low(A) and low(B) > low(C)
2. high(B) < low(A) and high(B) < low(C) and low(B) < low(A) and low(B) < low(C)
For #1 above, we refer to the combination of A, B, and C as a “Top Fractal”, whereas for #2 we designate it as a “Bottom Fractal”.
The chart below illustrates all the fractals, with the red triangles indicating the Top Fractals and the green triangles indicating the Bottom Fractals.
🔵 Step 4: Strokes
A “Stroke” is a line connecting a top fractal and a bottom fractal, subject to the following rules:
1. There must be at least one "free" candlestick positioned between these fractals, meaning it is not part of either the top or bottom fractal. This guarantees that a stroke encompasses a minimum range of five candlesticks from beginning to end.
2. The top fractal must have a higher price compared to the bottom fractal.
3. The endpoint fractals should represent the highest or lowest point throughout the entire span of the stroke. (There is an option within this indicator to enable or disable this rule.)
Strokes enable traders to identify and visualize significant price swings or trends while effectively filtering out minor fluctuations.
🔵 Step 5: Segments
A "Segment" is a higher-level line that connects the starting and ending points of at least three consecutive strokes, reflecting the current trend of the market structure. It continues to extend as new strokes emerge, until there is a break in the market structure. The break occurs when an uptrend forms a lower high and lower low, or when a downtrend forms a higher high and higher low. It's worth noting that during trading ranges, it is common for strokes to exhibit a higher high and lower low or a higher low and lower high pattern (similar to inner bars and outer bars). In such cases, the strokes will be merged in a similar manner as described earlier for candlesticks, until there is a distinct break in the market structure. Segments provide a relatively stable depiction of the market trend in a higher timeframe, as opposed to strokes.
It is important to note that the algorithm used to calculate segments from strokes can be recursively applied to the generated segments again, forming higher-level segments that represent the market trend on a even larger timeframe.
🔵 Step 6: Pivots
In ChanLun, the term "Pivot" does not indicate a price reversal point. Instead, it represents a trading range where the price of a security tends to fluctuate. Within a given "Segment," the pivot is determined by the overlap of two consecutive strokes moving in the opposite direction of the segment. When two downtrend strokes A and B form a pivot P within an uptrend segment S, the upper and lower bounds of the pivot are defined as follows:
1. upper(P) = min(high(A), high(B)
2. lower(P) = max(low(A), low(B))
The pivot range is typically where consolidation occurs and where there is a high trading volume.
If a future stroke, moving in the opposite direction of the current segment, overlaps with the upper and lower bounds of the pivot, it is merged into the existing pivot and extends the pivot along the x-axis. A new pivot is formed when two consecutive strokes moving in the opposite direction of the current segment, intersect with each other without overlapping the previous pivot.
Likewise, pivots can also be recursively identified within the higher-level segments. The blue boxes below represent the "Segment Pivots" that are identified within the context of higher-level segments.
🔵 Step 7: Buying/Selling Points
There are three types of buying/selling points defined in ChanLun.
1. Type 1 Buying and Selling Points: Also known as trend reversal points. These points are where the old segments terminate and new segments are generated.
2. Type 2 Buying and Selling Points: Also known as trend continuation points. These points occur while the price is in the midst of a trend and signify the continuation of the trend. In an uptrend, the Type 2 buying point is the rebound point after the price retraces to a previous low or support level, indicating that the price may continue to rise. In a downtrend, the Type 2 selling point is the pullback point after the price rallies to a previous high or resistance level, indicating that the price may continue to decline.
3. Type 3 Buying and Selling Points: These points indicate the retests of breakouts from pivot ranges. The presence of these retest points suggests that the price has the potential to continue its upward/downward movement above/below the pivot levels.
A discerning reader may notice that these buying/selling points are lagging indicators. For example, by the time a new segment is confirmed, multiple candlesticks have already occurred since the type 1 buying/selling point of that segment.
Indeed, it is true that the buying/selling points lag behind the actual market movements. However, ChanLun addresses this issue through the utilization of multi-timeframe analysis. By examining the confirmed buying/selling points in a lower timeframe, one can gather additional confidence in determining the overall trend of the higher timeframe.
🔵 Step 8: Divergence
Another core technique in ChanLun is the application of divergence to anticipate the emergence of type 1 buying/selling points. While MACD is the most commonly employed indicator for detecting divergence, other indicators such as RSI can also be utilized for this purpose.
🟠 Summary
In essence, ChanLun is a robust approach to technical analysis that integrates the careful examination and interpretation of price charts, the application of technical indicators and quantitative tools, and a keen attention to multiple timeframes. Its objective is to identify prevailing market trends and uncover potential trading prospects. What sets ChanLun apart is its holistic methodology, which blends both qualitative and quantitative analysis to facilitate informed and successful trading decisions.
🟠 NOTE
The freely available "ChanLun | AlgoTrader" script, published by the same account, incorporates only a limited set of fundamental concepts from ChanLun.
In contrast, this script is a premium invite-only version that represents a comprehensive implementation of the complete ChanLun methodology, specifically tailored for more experienced and professional traders.
________________________________________________________________________________
该指标严格按照缠论原文实现了包括“K线标准化”、“分型”、“笔”、“线段”、“中枢”和“买卖点”在内的所有关键元素。它旨在为缠友们提供一个准确可靠的缠论实现,以便快速而精准地分析市场,从而获得更优秀的交易业绩。
该指标的主要特点如下:
1. 实时标记所有缠论元素:该指标具备实时识别和标记分型、笔、线段、中枢和买卖点的功能,提供清晰的信号和准确的趋势判断。
2. 多种笔段算法选择:提供三种不同的笔算法(“老笔”、“新笔”和“4K”)以及两种线段算法(“特征序列”和“1+1终结”),满足不同交易者个性化需求,可根据偏好和策略选择最适合的算法。
3. 三级别联立:指标同步计算并显示笔、线段和递归高级段,提供更全面的市场动态分析。
4. 自定义颜色:用户可以根据个人喜好和需求自定义指标的颜色方案,与图表风格和视觉需求完美匹配。
5. 完美实现K线回放功能:指标充分利用了K线回放功能,让交易者能够回顾和分析历史市场数据,提高对市场趋势的研究和理解,增强市场洞察力和决策能力。
ChanLun [AlgoTrader]ChanLun, also known as Entanglement Theory or "缠论," is a highly regarded technical analysis methodology that originated in China. Since its introduction in 2006, ChanLun has rapidly gained significant attention and a strong following within the Chinese trader community due to its exceptional ability to navigate complex market dynamics.
ChanLun places great emphasis on market structure, price action, momentum, and the intricate interplay between market forces. It recognizes that the market operates in cyclical patterns and aims to capture the underlying structure and rhythm of price movements. Through meticulous analysis of the intricate relationships between price and time, it provides traders with a unique perspective on market trends, potential reversals, and critical turning points.
This indicator incorporates three fundamental components of the ChanLun methodology, namely "Candle Standardization," "Fractal," and "Stroke."
- "Candle Standardization" is a process in which the candles are standardized to ensure strict directional consistency and eliminate the presence of inner bars or outer bars.
- "Fractal" refers to the formation of three consecutive "standardized" bars, with the middle bar demonstrating a definitive higher or lower value compared to the bars surrounding it.
- "Stroke" is a line connecting a top fractal and a bottom fractal, subject to the strict condition that there is a minimum of one free bar positioned between them. This requirement ensures that a stroke encompasses a minimum span of five bars from end to end. It is crucial to emphasize that the top fractal consistently maintains a higher value than the bottom fractal.
Within the ChanLun algorithm, these components are processed meticulously and sequentially. The initial step involves candle standardization, where the candles are harmonized to adhere to strict criteria. Subsequently, the identification of fractals takes place by examining the standardized candles. Finally, the stroke component is applied, establishing connections between top and bottom fractals while ensuring the defined conditions are met.
The final component, stroke, enables traders to identify and visualize significant price swings or trends while effectively filtering out minor fluctuations. This functionality proves particularly valuable in recognizing major support and resistance levels, trend reversals, and chart patterns, enhancing the overall analysis process.
__________________________________________________________________________________________________________
本指标严格按照缠论原理实现了三个核心要素,分别为“K线标准化”、“分型”和“笔”。它旨在为缠友们提供准确而可靠的市场分析工具,以在交易中获得更好的表现。
该指标的特色如下:
1. 实时标记分型和笔:本指标具备实时识别和标记分型和笔的功能,以提供清晰的信号和准确的趋势判断。
2. 多种笔算法选择:本指标提供三种不同的笔算法,包括“老笔”、“新笔”和“4K”。这样的设计能够满足不同缠友的个性化需求,让大家根据自己的偏好和策略选择最适合的算法。
3. 自定义颜色:缠友们可以根据自己的喜好和需求,自定义指标的颜色方案。这样的灵活性使得指标能够与图表风格和视觉需求完美匹配。
4. 完美实现K线回放功能:本指标充分利用了K线回放功能,使缠友们能够回顾和分析历史市场数据,从而可以更好地研究和理解市场趋势,提高对市场的洞察力和决策能力。
Chan Theory - CHANLUN | CZSCChan Theory (CHANLUN) is a technical analysis theory created by Chinese analyst CZSC, primarily applied in the analysis and decision-making of financial markets such as stocks, futures, forex, and crypto.
It is a technical analysis method based on price and time, including candlestick patterns, fractal theory, box theory, trend theory, divergence theory, multiple time frame analysis, and more.
"Chan" means zen, indicating that the fluctuations in the market are rooted in human nature, such as greed, anger, ignorance, slowness, and suspicion.
"Chan" is also the pinyin of the Chinese character '缠', which means entanglement or entwining. as the fluctuations in the stock market were intertwined like a spiral.
Concepts
Fractal - fractal is formed by three candlesticks, with the middle one being the highest for a top fractal and the lowest for a bottom fractal. In Chan Theory, the first step is to traverse all candlesticks to find all valid fractals.
Stroke - stroke is usually composed of multiple fractals, with a top fractal and a bottom fractal at both ends, and the connection between them forms a stroke with clear high and low points. This is the smallest unit of composition in Chan Theory, similar to the zigzag algorithm.
Segment - segment is generated from strokes based on the feature sequence algorithm, and a segment contains at least three strokes. a segment is a higher level of period, indicating the trend of the market at a higher level,similar to period 5M to period 30M.
Box - box is the overlapping area of multiple segments, and a box contains at least three segments. A box represents a densely traded area and a temporary consensus price range,the bull-bear battle has not produced a clear outcome, it means that the market is in a state of uncertainty and that the direction of the trend is unclear.
Trend - In Chan Theory, two or more boxes in the same direction form a trend,If the box position are gradually rising, it is defined as an uptrend,conversely, it is a downtrend.
Differences with ZigZag
Both the Chan Theory Stroke and the ZigZag are formed by connecting the high and low points to create a line. But in Chan Theory, there are strict additional requirements:
There must be at least five candlesticks between the high and low points, Otherwise it does not form a Stroke.
The high and low fractal cannot share the same candlestick,Otherwise it does not form a Stroke.
There must be at least three candlesticks between the high and low fractal,these three candlesticks must move in the same direction.
There may be complex situations where there are multiple top or bottom patterns in a single Stroke, requiring special handling to determine the connection rules for the lines.
Chan Theory is a complex theory that includes not only Stroke, but also other theories such as Box、Recursion and Divergence.
Recursion
The processing flow of the Chan Theory is similar to a ternary algorithm, It organizes chaotic candlestick into an orderly system (Fractal -> Stroke -> Segment -> Box -> Trend),levels gradually increase from small to large. We can let the levels develop continuously to obtain the appropriate level for analysis and trading, In Chan Theory, it is called "recursion". This method allows us to observe the structure of smaller levels to make trading decisions at the current level,and it allows us to combine multiple levels to determine specific trading points.
Divergence
Chan Theory uses MACD to infer the strength of the trend as momentum analysis. Chan Theory calculates the MACD area of the K-line to quantify the strength of a trend, and compares the areas of the front and back two sections of the same level box to determine whether the trend is exhausted,it is called "divergence". this is one of the important part to determine trading points.
缠论是一种技术分析理论,由中国分析师 "缠中说禅"所创立,主要应用于股票、期货、外汇、加密货币等金融市场的分析和决策。
市场哲学和禅
以股市为基础。缠者,价格重叠区间也,买卖双方阵地战之区域也;禅者,破解之道也。以阵地战为
中心,比较前后两段之力度大小,大者,留之,小者,去之。
以现实存在为基础。缠者,人性之纠结,贪嗔疾慢疑也;禅者,觉悟、超脱者也。以禅破缠,上善若
水,尤如空筒,随波而走,方入空门。
技术分析简解
以走势中枢为中间点的力度比较,尤如拔河,力大者,持有原仓位,力小者,反向操作。
把走势全部同级别分解,关注新的走势之形成,以前一走势段为中间点与再前一走势段比大小,大者,
留之,小者,去之。
进行多重赋格性的同级别分解操作,尤如行船、尤如开车,以不同档位适应不同情况
技术分析量化组件
形态学 - 笔、线段、走势中枢、走势类型
动力学 - 背驰、走势中枢、走势的能量结构
壹缠脚本是以缠论为核心理论,实现的技术分析指标系统
功能说明
基于缠论分析 实时笔段走势画线、自动中枢标识、多级别K线递归走势、实时标注缠论三类买卖点
支持配置多种笔、段、走势规则 满足交易者的笔段习惯和风格
支持TradingView警报机制 实时推送各级别买卖点通知到邮箱或Webhook
脚本图例说明
笔段走势 - 蓝线为当前级别K线构成的笔,紫色线为基于笔级别特征序列处理生成的段,紫线为基于当前级别段生成的走势
中枢级别 - 各级别画线、中枢、买卖点提示信息采用同一颜色。即笔级别中枢同为浅蓝色、段级别中枢为橙色。
MACD面积 - 笔段走势的末端数字为对应笔段的MACD面积, 蓝色为笔MACD面积,橙色为段MACD面积,紫色为走势MACD面积。
chanlunGenerate a small line according to the pattern of the K-line, where green represents long and red represents short; (we call it pen)
then according to the small line segment, a large line(we call it line) is generated according to the new high or new low rule; (we call it line)
finally, a rectangle is generated according to the overlap interval of the large line.(we call it zhongshu)
Chanlun ChannelThe black line is the current real price, and it's middle of the channel. when close price is in the channel,it means that the market is in balance.
the market need a lot of energy to leave the channel,if the price can leave the channel,the channel will become support or pressure.
缠论中枢(简化版),没有行情时价格围绕黑色线上下波动,价格离开中枢需要较大的量能,一旦成功离开中枢,这个中枢将会变成支撑(压力).
同时他可以用作横盘位置识别
chanlun_penthe strong line call 'pen' in chanlun.it is build from the thin line,and the thin line is about kline trend. when you see the red line(strong or thin) ,that's mean down trend has been complete,at the same time,up trend has start.
缠论分笔.当你看到红色线段时,说明下跌的一笔已经完成(下跌趋势结束),同时是上涨的一笔开始(上涨趋势开始)
chanlun can Identify charpatterns,and not only that
zigzag+When the k-line is at the red line, it is a short trend, and the price breaking through the red cross pressure with a large volume is reversed, and vice versa