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
ZEN
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线回放功能,让交易者能够回顾和分析历史市场数据,提高对市场趋势的研究和理解,增强市场洞察力和决策能力。
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面积。
ZenLibraryLibrary "ZenLibrary"
A collection of custom tools & utility functions commonly used with my scripts.
getDecimals() Calculates how many decimals are on the quote price of the current market
Returns: The current decimal places on the market quote price
truncate(float, float) Truncates (cuts) excess decimal places
Parameters:
float : _number The number to truncate
float : _decimalPlaces (default=2) The number of decimal places to truncate to
Returns: The given _number truncated to the given _decimalPlaces
toWhole(float) Converts pips into whole numbers
Parameters:
float : _number The pip number to convert into a whole number
Returns: The converted number
toPips(float) Converts whole numbers back into pips
Parameters:
float : _number The whole number to convert into pips
Returns: The converted number
av_getPositionSize(float, float, float, float) Calculates OANDA forex position size for AutoView based on the given parameters
Parameters:
float : _balance The account balance to use
float : _risk The risk percentage amount (as a whole number - eg. 1 = 1% risk)
float : _stopPoints The stop loss distance in POINTS (not pips)
float : _conversionRate The conversion rate of our account balance currency
Returns: The calculated position size (in units - only compatible with OANDA)
getMA(int, string) Gets a Moving Average based on type
Parameters:
int : _length The MA period
string : _maType The type of MA
Returns: A moving average with the given parameters
getEAP(float) Performs EAP stop loss size calculation (eg. ATR >= 20.0 and ATR < 30, returns 20)
Parameters:
float : _atr The given ATR to base the EAP SL calculation on
Returns: The EAP SL converted ATR size
barsAboveMA(int, float) Counts how many candles are above the MA
Parameters:
int : _lookback The lookback period to look back over
float : _ma The moving average to check
Returns: The bar count of how many recent bars are above the MA
barsBelowMA(int, float) Counts how many candles are below the MA
Parameters:
int : _lookback The lookback period to look back over
float : _ma The moving average to reference
Returns: The bar count of how many recent bars are below the EMA
barsCrossedMA(int, float) Counts how many times the EMA was crossed recently
Parameters:
int : _lookback The lookback period to look back over
float : _ma The moving average to reference
Returns: The bar count of how many times price recently crossed the EMA
getPullbackBarCount(int, int) Counts how many green & red bars have printed recently (ie. pullback count)
Parameters:
int : _lookback The lookback period to look back over
int : _direction The color of the bar to count (1 = Green, -1 = Red)
Returns: The bar count of how many candles have retraced over the given lookback & direction
getBodySize() Gets the current candle's body size (in POINTS, divide by 10 to get pips)
Returns: The current candle's body size in POINTS
getTopWickSize() Gets the current candle's top wick size (in POINTS, divide by 10 to get pips)
Returns: The current candle's top wick size in POINTS
getBottomWickSize() Gets the current candle's bottom wick size (in POINTS, divide by 10 to get pips)
Returns: The current candle's bottom wick size in POINTS
getBodyPercent() Gets the current candle's body size as a percentage of its entire size including its wicks
Returns: The current candle's body size percentage
isHammer(float, bool) Checks if the current bar is a hammer candle based on the given parameters
Parameters:
float : _fib (default=0.382) The fib to base candle body on
bool : _colorMatch (default=false) Does the candle need to be green? (true/false)
Returns: A boolean - true if the current bar matches the requirements of a hammer candle
isStar(float, bool) Checks if the current bar is a shooting star candle based on the given parameters
Parameters:
float : _fib (default=0.382) The fib to base candle body on
bool : _colorMatch (default=false) Does the candle need to be red? (true/false)
Returns: A boolean - true if the current bar matches the requirements of a shooting star candle
isDoji(float, bool) Checks if the current bar is a doji candle based on the given parameters
Parameters:
float : _wickSize (default=2) The maximum top wick size compared to the bottom (and vice versa)
bool : _bodySize (default=0.05) The maximum body size as a percentage compared to the entire candle size
Returns: A boolean - true if the current bar matches the requirements of a doji candle
isBullishEC(float, float, bool) Checks if the current bar is a bullish engulfing candle
Parameters:
float : _allowance (default=0) How many POINTS to allow the open to be off by (useful for markets with micro gaps)
float : _rejectionWickSize (default=disabled) The maximum rejection wick size compared to the body as a percentage
bool : _engulfWick (default=false) Does the engulfing candle require the wick to be engulfed as well?
Returns: A boolean - true if the current bar matches the requirements of a bullish engulfing candle
isBearishEC(float, float, bool) Checks if the current bar is a bearish engulfing candle
Parameters:
float : _allowance (default=0) How many POINTS to allow the open to be off by (useful for markets with micro gaps)
float : _rejectionWickSize (default=disabled) The maximum rejection wick size compared to the body as a percentage
bool : _engulfWick (default=false) Does the engulfing candle require the wick to be engulfed as well?
Returns: A boolean - true if the current bar matches the requirements of a bearish engulfing candle
timeFilter(string, bool) Determines if the current price bar falls inside the specified session
Parameters:
string : _sess The session to check
bool : _useFilter (default=false) Whether or not to actually use this filter
Returns: A boolean - true if the current bar falls within the given time session
dateFilter(int, int) Determines if this bar's time falls within date filter range
Parameters:
int : _startTime The UNIX date timestamp to begin searching from
int : _endTime the UNIX date timestamp to stop searching from
Returns: A boolean - true if the current bar falls within the given dates
dayFilter(bool, bool, bool, bool, bool, bool, bool) Checks if the current bar's day is in the list of given days to analyze
Parameters:
bool : _monday Should the script analyze this day? (true/false)
bool : _tuesday Should the script analyze this day? (true/false)
bool : _wednesday Should the script analyze this day? (true/false)
bool : _thursday Should the script analyze this day? (true/false)
bool : _friday Should the script analyze this day? (true/false)
bool : _saturday Should the script analyze this day? (true/false)
bool : _sunday Should the script analyze this day? (true/false)
Returns: A boolean - true if the current bar's day is one of the given days
atrFilter(float, float) Checks the current bar's size against the given ATR and max size
Parameters:
float : _atr (default=ATR 14 period) The given ATR to check
float : _maxSize The maximum ATR multiplier of the current candle
Returns: A boolean - true if the current bar's size is less than or equal to _atr x _maxSize
fillCell(table, int, int, string, string, color, color) This updates the given table's cell with the given values
Parameters:
table : _table The table ID to update
int : _column The column to update
int : _row The row to update
string : _title The title of this cell
string : _value The value of this cell
color : _bgcolor The background color of this cell
color : _txtcolor The text color of this cell
Returns: A boolean - true if the current bar falls within the given dates
[blackcat] L5 Zen MasterLevel: 5
Background
L5 Zen Master is my favorite main chart indicator. I have been studying Zen Theory for long and keeping improving related home-baked private indicators. Zen Theory is less known out side of China. This situation is very similar to when Nilson did not introduce Japanese candlesticks worldwide. At that time, traders in other parts of the world rarely heard of Japanese candlesticks. This situation occurs again. When most Chinese bookstores and libraries are full of books on Zen Theory trading techniques, the rest of the world may not know this trading technique based on mathematical derivation axioms.
As for the author of the theory, he/she is as mysterious as Satoshi Nakamoto who created Bitcoin. People don't even know his/her gender, because he/she likes to call himself/herself a "woman" when he/she publishes original trading techniques on his/her blog. No one knows his/her name, only his/her nickname: "Preaching Zen in Tangles" (缠中说禅). People respectfully call him/her "Zen Master" (缠师). Zen Theory is based on geometric structures like Bill Williams' Fractals and ZigZag, but it is very host to MTF applications. In addition, there are unique insights on moving averages, this moving average technology is called Zen Kiss (缠论吻).
Function
It combine several novel indicators together but mainly focus on Zen Theory(缠论主图), including Zen Strokes (自动画笔) 和 Zen Kiss (缠论均线) Moving Averages. To Better understand the market geometry structure, I developped featured Fibonacci Space Indicator which is based on Semi-LOG and Fibonacci Time Window Indicator to help juge trend movements independently. Also, I integrated Better Volume Indicator(BVI) and Range Action Verification Index (RAVI) as well for volume and bias monitoring.
Indicator Set
Zen Stroke (Auto ZigZag, 自动画缠论笔)
Zen Kiss Moving Averages (缠论均线)
Fibonacci Space Indicator with Golden Ratios based on Semi-LOG (黄崇半对数)
Fibnacci Time Window Indicator with red/green background colors
Dynamic Fibnacci Space Arrows to indicate support and resistance immediately
Better Volume Indicator (BVI) with painted bars to juge trend strength
Range Action Verfication Index (RAVI) for large time frame for exetreme conditions warning
Inputs
BVI lookback period --> 5 as default
EnableBVIBarColors --> True as default
Show Zen Stroke --> True as default
Show Fib Space based on Semi-LOG --> True as default
Zen Fractals Lookback Period --> 377 as default
Key Signal
Zen Stroke
Yellow line section for up stroke
Blue line section for down stroke
Zen Kiss MA
Yellow MA for fast line (Cowgirl line)
Fuchsia MA for slow line (Cowboy line)
Fib Space w/ Golden Ratios
Low, 11.4%, 23.6%, 38.2%, 50%, 61.8%, 78.6%, 88.6%, High
Fib Time Window
Green background color for top indicator based on time window
Red background color for bottom indicator based on time window
Dynamic Fib Space Arrows
Green arrows for support
Red arrows for resistance
Better Volume Indicator
Yellow bar color --> low volume --> trend ends, commonly before trend reversals
Red bar color --> climax up volume --> very bullish and next bar may continue to be bullish
White bar color --> climax down volume --> very bearish and next bar may continue to be bearish
Green bar color --> churn volume --> Long and short forces play fierce games within a small price range
Fuchisia bar color --> climax churn volume --> Long and short forces play fierce games within a large price range
Range Action Verfication Index
Yellow background color for extremely negative bias, indicating bottom zone
Fuchsia background color for extremely positive bias, indiacting top zone
Pros and Cons
ONLY suitable for discretionary trading, and does NOT support automatic trading system/bots with alerts.
Intuitive and effective, the output signal is more reliable after multi-indicator resonance
Remarks
My second L5 indicator published
Closed-source
Invite-only
Redeem Fee Life Lock Guarantee
Although I take the efforts to inform the script requesters that the best way to promote trading skills is to learn from the open source scripts I released by themself and to improve their PNIE script programming skills, there are still many people asking how to obtain or pay to use BLACKCAT L4/L5 private scripts. In fact, I do not encourage people to use Tradingview Coins ( TVC ) / Cryptocurrency to redeem the right to use BLACKCAT L4/L5 scripts. However, redeeming private script usage rights through TV Coins/ Cryptocurrency may be an effective way to force more people to learn PINE script programming seriously. And then I can concentrate on answering more valuable community questions instead of being overwhelmed by L4/L5 scripting permission reqeusts.
I would like to announce a ‘Redeem Fee Lock Guarantee’ program to further simplify the L4/L5 indicator/strategy utility offering and distinguish itself from the competition. ‘Redeem Fee lock guarantee’ is one of the major initiatives by BLACKCAT as a part of overall value packaging designed to guard BLACKCAT’s followers’ against cost-overruns and operational risks usually borne by them when it comes to PINE script innovation ecosystem. The TVCs redeemed for L4/L5 a follower signs up for with BLACKCAT is their guaranteed lifetime locked in TVC Quantity/ cryptocurrency, with no special conditions, exclusions and fine print whatsoever. Based on this scheme, I can constantly refine, expand, upgrade and improve PINE script publishing to ensure the very best experiences for my followers. The 'Redeem Fee Lock Guarantee' is a step in the direction of rewarding the valuable followers. NOTE: Every L4/L5 script redeeming service is ONLY limited to TVC or Cryptocurrency ("Win$ & Donate w/ This" Addresses displayed on script page) redeeming which the 1st signed up TVC Qty/ equivalent cryptocurrency is the lifetime offered TVC Qty/ equivalent crypto.
How to subscrible this indicator?
The script subscription period only has two options of one month or one year, and its price is floating. The latest price of the script subscription is proportional to the number of likes/agrees this script has already received. Therefore, the price of subscribing to this script shows an increasing trend, and the earliest subscribers can enjoy the price of lifetime lock to this script. As the number of likes / agrees of this script increases, the subscription fee for one month and one year will also increase linearly. Whatever, the first subscription price of the use will be locked for life.
Monthly subscription and annual subscription can be done either by tradingview coins ( TVC ) or by converting into equivalent cryptocurrency at the exchange rate (1TVC=0.01USD) for redeem.
TVC payment needs to pay TVC directly in the comments under this script. Every time I authorize a new user, I will update the latest number of subscribed users and latest price for next subscription under the script comment. If there are any conflicting scenario happened to the rules and my update. My updated price based on the rule will be the final price for next subscription. The following subscribers need to pay the corresponding amount of TVC or cryptocurrency in accordance with the latest number of users and price announced by me in accordance with the rules published.
TVC redemption is the method I strongly recommend, and I hope you can complete the redemption in the comment area of this script. This is like a blockchain structure, each comment is a block, each subscription is a chain, which is conducive to open and transparent publicity and traceability to avoid unnecessary disputes.
Monthly Subscription Charges
500TVC <50 Agrees (A)
50A<850TVC<100A
100A<1000TVC<150A
150A<1350TVC<200A
200A<1500TVC<250A
250A<1850TVC<300A
300A<2000TVC<350A
350A<2350TVC<400A
400A<2500TVC<450A
450A<2850TVC<500A
500A<3000TVC<550A
550A<3350TVC<600A
600A<3500TVC<650A
650A<3850TVC<700A
700A<4000TVC<750A
750A<4350TVC<800A
800A<4500TVC<850A
850A<4850TVC<900A
900A<5000TVC<950A
950A<5350TVC<1000A
1000A<5500TVC<1050A
And so on...
Annual Subscription Charges
5000TVC <50 Agrees (A)
50A<8500TVC<100A
100A<10000TVC<150A
150A<13500TVC<200A
200A<15000TVC<250A
250A<18500TVC<300A
300A<20000TVC<300A
350A<23500TVC<400A
400A<25000TVC<450A
500A<28500TVC<550A
500A<30000TVC<550A
550A<33500TVC<600A
600A<35000TVC<650A
650A<38500TVC<700A
700A<40000TVC<750A
750A<43500TVC<800A
800A<45000TVC<850A
850A<48500TVC<900A
900A<50000TVC<950A
950A<53500TVC<1000A
1000A<55000TVC<1050A
And so on...
Assassin Zenzen about top fractal and bottom fractal
show top fractal and bottom fractal
---
TODO
Contain Kline , Tradingview pine not support yet.