OPEN-SOURCE SCRIPT
MAX + Offset

This indicator plots the highest value over a configurable lookback period, using a selectable price source (High, Low, Open, or Close). It is designed to provide a clear and stable reference for dynamic resistance levels, with the ability to apply a vertical price offset directly on the chart.
The offset allows the line to be shifted upward or downward based on the user-defined value, making it useful for:
Fine-tuning resistance zones
Defining entry and exit margins
Adapting levels to different trading styles
The indicator uses a single buffer, is lightweight, non-repainting, and fully compatible with any market and timeframe.
🔧 Inputs
Price: High / Low / Open / Close
Period: number of bars used to calculate the high
Offset: vertical price displacement
Positive values move the line upward
Negative values move the line downward
✅ Features
Single buffer (single plotted line)
Clean and thin line
Stable period-high calculation
Works on Forex, indices, stocks, and cryptocurrencies
Ideal as a dynamic resistance or structural price reference
The offset allows the line to be shifted upward or downward based on the user-defined value, making it useful for:
Fine-tuning resistance zones
Defining entry and exit margins
Adapting levels to different trading styles
The indicator uses a single buffer, is lightweight, non-repainting, and fully compatible with any market and timeframe.
🔧 Inputs
Price: High / Low / Open / Close
Period: number of bars used to calculate the high
Offset: vertical price displacement
Positive values move the line upward
Negative values move the line downward
✅ Features
Single buffer (single plotted line)
Clean and thin line
Stable period-high calculation
Works on Forex, indices, stocks, and cryptocurrencies
Ideal as a dynamic resistance or structural price reference
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.