LonesomeTheBlue

Support Resistance Channels

LonesomeTheBlue Wizard מעודכן   
Hello All,

For Long time I was planning to make Support/Resistance Channels script, finally I had time and here it is.

How this script works?
- it finds and keeps Pivot Points
- when it found a new Pivot Point it clears older S/R channels then;
- for each pivot point it searches all pivot points in its own channel with dynamic width
- while creating the S/R channel it calculates its strength
- then sorts all S/R channels by strength
- it shows the strongest S/R channels, before doing this it checks old location in the list and adjust them for better visibility
- if any S/R channel was broken on last move then it gives alert and put shape below/above the candle
- The colors of the S/R channels are adjusted automatically


You can set/change following settings:
- Pivot Period
- Source: High/Low or Close/Open can be used
- Maximum Channel Width %: this is the maximum channel width rate, this is calculated using Highest/Lowest levels in last 300 bars
- Number of S/R to show: this is the number of Strongest S/R to show
- Loopback Period: While calculating S/R levels it checks Pivot Points in LoopBack Period
- Show S/R on last # Bars: To see S/R levels only on last N bars
- Start Date: the script starts calculating Pivot Point from this date, the reason I put this option is for visuality. Explained below
- You can set colors/transparency
- and You can enable/disable shapes for broken S/R levels

Examples:

You can change colors as you wish:

here "Show S/R on last # Bars" set 100:

Sometimes visuality may corrupt because of old S/R levels, to solve it you need to set "Start Date" in the options to start the script in visual part (last 292 bars)
here in first screenshot it doesn't look good (shrink), then on second screenshot I set the "Start Date" it looks better, if you change time frame don't forget to set it again :)


Enjoy!
הערות שחרור:
typo fixed in the options
הערות שחרור:
"Check the Date or Bars to Start" option added. it has two options under it: "Bars", "Date". so you can start the script on a specified date or on last Nth bar (ex: last 400 bars). "Bars" option only works on 1min or higher time frames.

"Show Weak S/R levels" option added. by default it's enabled. if you disable it then only the S/R channels/zones that contains at least 2 Pivot Points are shown.
הערות שחרור:
The algorithm improved and renewed.
new box() feature used instead of fill() and plot().
2 moving averages added. you can change types and lengths.

if you see anything to improve and a bug in it then let me know please.
הערות שחרור:
updated

סקריפט קוד פתוח

ברוח TradingView אמיתית, מחבר הסקריפט הזה פרסם אותו בקוד פתוח, כך שסוחרים יכולים להבין ולאמת אותו. כל הכבוד למחבר! אתה יכול להשתמש בו בחינם, אך שימוש חוזר בקוד זה בפרסום כפוף לכללי הבית. אתה יכול להכניס אותו למועדפים כדי להשתמש בו בגרף.

כתב ויתור

המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.

רוצה להשתמש בסקריפ זה בגרף?