PROTECTED SOURCE SCRIPT

Chan Theory - CHANLUN | CZSC

Updated
Chan 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面积。

Release Notes
Fixed Box Segment Visibility Bug.
Candlestick analysischanchanlunchan-theoryChart patternsczscZEN

Protected script

This script is published closed-source and you may privately use it freely.

Want to use this script on a chart?


开通PRO - 详见 one-quant.com/tradingview 在线开通获取授权码
脚本试用 - 搜索商品代码 SSE:000001 体验 限上证指数

{ PRO用户专享 }
缠论原文 - one-quant.com/book/缠中说禅-股市技术理论.pdf
思维导图 - 加🌏领取 缠论思维导图资料
币圈快讯 - 加🌏进群 7x24实时币圈快讯

{ 推荐有礼 }
推荐一位用户 即享9折续费

🌏 neil0pan0s (脚本定制可私聊)
Also on:

Disclaimer