TradingView
slmgtv1
20 lut 2022 04:42

Entanglement Pen 

S&P 500SP

Opis

script name: Entanglement Pen
For left traders, how to accurately find the bottom and top is very important, and there are various methods. I have shared the bottom type script composed of three bars before, but this type of bottom type is effective in a small range. So, this script is sharing " Entanglement Pen ", which can help us determine bottoms and tops on a global scale.
However, this script uses an approximate reduction method rather than the orthodox solution of entanglement.
After roughly finding the bottom and top, how to determine that these are the bottom and top that meet the definition of entanglement theory?
The main 2 methods of "approximate reduction" are:
(1) The price difference between the top and the bottom is large enough, that is: the lowest price at the top > the highest price at the bottom.
(2) The stock price before the top has continued to rise, that is: both the highest point and the lowest point are rising. In the same way, the stock price before the bottom has a continuous decline, that is: both the high and the low point are falling.
A big disadvantage of this script is that it needs to use future data. This is because:
When multiple bars meet the top definition in a short period of time, only the last bar is used, which is defined as a big top. So, when you see a top appear, you don't know it's not a real top, because it might be followed by a bar that also matches the definition of the top.
When displayed on the graph, bars that meet the top definition have a gray label, which is the small top. Each small top is a big top (with a blue label) at the beginning, and when another small top appears after it, it becomes a gray small top.
Regarding the limit on the number of bars by TradingView:
The logic of calculating the small top and the small bottom is relatively simple, it does not need to use future data, and the amount of calculation is small, so it is the default TradingView limit. (The limit is 2000 in the script, but in practice TradingView won't let us use such many bars)
The calculation logic of the big top and the big bottom is more complicated, and it needs to use future data. The calculation amount is very large, and only the most recent 150 bars can be calculated. The user can try to enter a larger value, but TradingView may report an error. If an error occurs, please enter a lower value. When loading for the first time, it takes a long time, which is indeed not common in general TradingView scripts, but please be patient.
The next version may add the alert function, that is: when the top and bottom appear, the alert function is called. But this only applies to small tops and bottoms, because when the alert is sent,, none of us know what data will be in the future.

Introduction in Chinese:
脚本名称:缠论笔
对于左侧交易者来说,如何准确地找到底部和顶部是非常重要的,方法也是多样的,之前已经分享了三根bar组成的底分型脚本,但这种底分型生效的范围较小,缺乏全局视野。所以,这次的脚本分享的是“缠论笔”,它能帮我们在全局尺度内确定底部和顶部。
不过,此脚本使用的是近似还原的方法,而非缠论的正统解法。
粗略找到底和顶之后,如何确定这就是符合缠论定义的底和顶呢?
“近似还原”的主要2个方法是:
(1)顶部与底部的价差足够大,即:顶部的最低价>底部的最高价。
(2)顶部之前的股价有持续的上涨,即:最高点和最低点都在上涨。同理,底部之前的股价有持续的下跌,即:最高点和最低点都在下跌。
这个脚本的一大缺点是:需要使用将来的数据。这是因为:
当短期内有多个bar都符合顶部定义时,只使用最后一个bar,定义为大顶。所以,当你看到一个顶部出现时,你不知道这不是真的顶部,因为它之后可能还会出现符合顶部定义的bar。
在图上显示时,符合顶部定义的bar有灰色的label,这是小顶。每一个小顶,刚开始时都是大顶(有蓝色的label),直到它之后又有小顶出现时,它就变成了灰色的小顶。
关于TradingView对bar数的限制:
计算小顶和小底的逻辑比较简单,不需要使用将来的数据,计算量较小,所以是默认的TradingView限制。(脚本中限制为2000,但实际上TradingView不会让我们使用那么多bar)
大顶和大底的计算逻辑比较复杂,需要使用将来的数据,计算量非常大,大约只能计算最近150根bar。用户可以尝试输入更大的数值,但TradingView可能会报错。若遇报错,则请输入更低的数值。初次加载时,需要等待较长时间,这确实在一般的TradingView脚本中并不常见,但还是请多些耐心。
下一版可能会增加alert功能,即:当顶部和底部出现时,调用alert函数。但这只适用于小顶和小底,因为警报发出时,我们谁也不知道将来的数据。


Informacje o Wersji

Add "Break-previous-low" label.

Informacje o Wersji

Significantly simplifies the calculation process, making rendering faster and covering more bars.

Informacje o Wersji

Correct the calculation logic of "pre-low" and make the "break pre-low" marker cover all bars.
Komentarze
guangming88
great scripts, thanks for sharing!
xinsheng
@guangming88, 为啥没有线条显示了?
guangming88
@xinsheng, there is, had to change the background to white somehow.
willyue
删除第六部分的内容即可正常显示
WZM808915915
作者你好,请问画笔逻辑是根据缠论的 严格笔的逻辑还是新笔逻辑 又或者是只是类似于缠论笔 呢?
slmgtv1
@WZM808915915, 我对缠论不太了解,只是看到我们群里有这么一个富途脚本,便尝试将其移植到TradingView上而已。
WZM808915915
@slmgtv1, 谢谢您的回答,
rl042488
非常感谢作者分享,再接再厉,财源广进哈
igork9096
It repaints?
Bocaqc
为啥没有线条显示了?
Więcej