Added alert function to "Linear regression" of built-in indicator. I use Pine script version 4.
The basic behavior is the same as the built-in indicator, The following points are different.
1. Fills between line objects are only lines because they do not correspond in Version 4. 2. The "Use Deviation" switch can not be reproduced, so it is displayed or hidden. 3. Line color and line width can not be changed. 4. You can use 3 types of alerts: "upper and lower channel line", "center line" and "all lines". I get a warning of repainting, but I think there is no problem.
【Additional function】 I was able to change the line color and line width. Set "Line Edit" in the lower half of the setting dialog, You can specify the line color and line width of the channel line, and the line color and line width of the center line. The line width is 1 to 4 and the line color is 17 built-in types. Unfortunately, color code input is not supported.
【Additional function】 -Made Pearson's R visible. Up to 3 significant digits are displayed. You can switch using the checkbox of "Pearson's R".
・ We made it possible to change to the channel which does not use the deviation (the channel minus the high price low farthest from the linear regression line). You can use the checkboxes for "Use Upper Deviation" and "Use Lower Deviation".
【Change】 "Show Upper Deviation"-> "Show Upper Channel" "Show Lower Deviation"-> "Show Lower Channel" Changed to and moved into "Line Edit".
[Additional functions] The line color can now be selected from the color palette.
Please contact us if you have any problems. (Google Translate)
スクリプトを更新しました。version1.4です。
【追加機能】 線色がカラーパレットから選択できるようになりました。
何が不具合があればご連絡ください。
リリースノート
⋅
Updated the script. It is version 1.5.
[Additional functions] Added alert types. "When closed outside the upper line" "When closed outside the lower line" "When closed outside either the top or bottom" There are three types.
Please contact us if you have any problems. (Google Translate)
Would it please be possible to open source this script? It's amazing to have alerts with this and I would love to play with some of my own adjustments.
Thanks for a great script anyway!
AIZEN_MT
⋅
@arechamp,
Thank you for watching.
Unfortunately, I haven't written it for publication so there is no plan for now.
(Google Translate)
tracya6d33
⋅
Hi Could you pls Add 3 more linear channel? I need to use them according to my strategy.
morejunkmailhuh
⋅
Can you PLEASE make this into a stock screener so we can scan for stocks that, as an example, have penetrated the top regression line within the last 1 minute ? I would very much appreciate it.
-Touch Top Linear Regression
-Touch Bottom Linear Regression
-Crossunder Middle Linear Regression
-Crossover Middle Linear Regression
Thanks