# chanlun

Description
"Chan Lun" is a kind of investment in the market made by Internet celebrities "Chan Zhong Shuo Zen". Chan Lun is suitable for the investment market of stock securities theory, such as stocks, securities warrants and futures . "Chan Shi" June 7, 2006 From the beginning of writing the first "Teaching You How to Invest in Stocks" series of articles, this theory of investment "entanglement theory" has officially appeared. The gradual derivation of the trend structure, scientific and accurate classification of various trends in the market, so as to guide actual operations.

I used the pine script of tradeview to construct the type, pen, and center in the chanlun. Through these icons, you can find the buying and selling points.

Refactor the code, use pointer movement to avoid redrawing line objects and box objects, and realize the extension of pen, zhongshu, and extension zhongshu to draw only once
Fix the problem that the latest pen and zhongshu cannot be displayed after the latest bar appears

Solve the problem that the last expansion zhongshu will not be displayed under special circumstances

Solve the problem that the last pen is not displayed in some scenes

Add option, support pen display and close

As the bar is updated, the last pen can also be displayed

In order to support the display of pens in some special situations, the mode configuration of special pens has been added. There are three configurations in total:
1. Standard configuration, using the pen definition in the chanlun theory
2. The former includes the configuration, allowing the former sub-type to include the latter sub-type
3. The latter includes the configuration, allowing the latter type to include the previous type

1. 标准配置，使用缠论中的笔定义
2. 前包含配置，允许前一个分型包含后一个分型
3. 后包含配置，允许后一个分型包含前一个分型

The following figure uses the former inclusion, so even if the previous part is higher than the latter, it can be displayed

The following figure uses the standard mode, the former part includes the latter part and cannot form a pen

The configuration method is shown in the figure below

https://photos.app.goo.gl/QEbH4skYpWoLJh...

Support k-line playback function

Fix some pen division problems

Fix the problem of inaccurate depiction of some pens

https://photos.app.goo.gl/AErtvxJMjhmVQeqp9
https://photos.app.goo.gl/aNWLcaUiB9sH3W2P8

Choice of pen style support

https://photos.app.goo.gl/sznuQEYRzNHSGkWc7

remove invalid options

The line width support setting of the privot, optimizing the display of the buy and sell marks of the privot

Optimize display