OPEN-SOURCE SCRIPT
DAILY AND WEEKLY MID LINES

DAILY AND WEEKLY MID LINES INDICATOR
Description:
This indicator calculates and visualizes the dynamic midpoint (mid) of the current day and week in real-time. It provides traders with key reference levels based on developing price action.
Features:
Daily Mid Line:
Color: Orange
Thickness: 3 pixels
Style: Solid line
Updates: Automatically recalculates with each new candle
Calculation: Average of the day's highest high and lowest low from market open
Weekly Mid Line:
Color: Blue
Thickness: 3 pixels
Style: Dashed line
Updates: Continuously recalculates throughout the week
Calculation: Average of the week's highest high and lowest low from week start
How It Works:
At the start of each new trading day (00:00), the daily mid line resets and begins calculating from the first candle
At the start of each new trading week (typically Monday), the weekly mid line resets and begins fresh calculations
Both lines extend automatically to the right as new candles form
The lines are dynamic - they adjust as new highs/lows are made during the day/week
Trading Applications:
Support/Resistance Levels:
The mid lines act as natural equilibrium points where price may find temporary support or resistance
Daily mid can serve as intraday pivot, weekly mid as broader market balance point
Trend Analysis:
Price consistently above mid lines suggests bullish momentum
Price consistently below mid lines suggests bearish momentum
Relationship between daily and weekly mid lines shows multi-timeframe alignment
Entry/Exit Signals:
Price crossing above daily mid may indicate short-term bullish momentum
Price crossing below daily mid may indicate short-term bearish momentum
Weekly mid breaks can signal more significant trend changes
Market Context:
Distance between price and mid lines indicates market extremity
Steeper mid line slopes suggest stronger directional momentum
Flat mid lines suggest range-bound or consolidating markets
Confluence Trading:
Combine with other indicators (RSI, MACD, moving averages) for confirmation
Use as dynamic levels for stop-loss placement or take-profit targets
Best Practices:
More effective on higher timeframes (1H, 4H, Daily) for clearer signals
Works well in trending markets where mid lines act as moving support/resistance
Monitor for price rejection or acceptance at mid levels for trading decisions
Use in conjunction with volume analysis for confirmation
Psychological Significance:
Mid points often represent fair value areas where buyers and sellers find temporary equilibrium, making them natural decision points for market participants.
This indicator is particularly useful for day traders, swing traders, and position traders looking for dynamic, real-time reference points that adapt to current market conditions rather than relying on static historical levels.
Description:
This indicator calculates and visualizes the dynamic midpoint (mid) of the current day and week in real-time. It provides traders with key reference levels based on developing price action.
Features:
Daily Mid Line:
Color: Orange
Thickness: 3 pixels
Style: Solid line
Updates: Automatically recalculates with each new candle
Calculation: Average of the day's highest high and lowest low from market open
Weekly Mid Line:
Color: Blue
Thickness: 3 pixels
Style: Dashed line
Updates: Continuously recalculates throughout the week
Calculation: Average of the week's highest high and lowest low from week start
How It Works:
At the start of each new trading day (00:00), the daily mid line resets and begins calculating from the first candle
At the start of each new trading week (typically Monday), the weekly mid line resets and begins fresh calculations
Both lines extend automatically to the right as new candles form
The lines are dynamic - they adjust as new highs/lows are made during the day/week
Trading Applications:
Support/Resistance Levels:
The mid lines act as natural equilibrium points where price may find temporary support or resistance
Daily mid can serve as intraday pivot, weekly mid as broader market balance point
Trend Analysis:
Price consistently above mid lines suggests bullish momentum
Price consistently below mid lines suggests bearish momentum
Relationship between daily and weekly mid lines shows multi-timeframe alignment
Entry/Exit Signals:
Price crossing above daily mid may indicate short-term bullish momentum
Price crossing below daily mid may indicate short-term bearish momentum
Weekly mid breaks can signal more significant trend changes
Market Context:
Distance between price and mid lines indicates market extremity
Steeper mid line slopes suggest stronger directional momentum
Flat mid lines suggest range-bound or consolidating markets
Confluence Trading:
Combine with other indicators (RSI, MACD, moving averages) for confirmation
Use as dynamic levels for stop-loss placement or take-profit targets
Best Practices:
More effective on higher timeframes (1H, 4H, Daily) for clearer signals
Works well in trending markets where mid lines act as moving support/resistance
Monitor for price rejection or acceptance at mid levels for trading decisions
Use in conjunction with volume analysis for confirmation
Psychological Significance:
Mid points often represent fair value areas where buyers and sellers find temporary equilibrium, making them natural decision points for market participants.
This indicator is particularly useful for day traders, swing traders, and position traders looking for dynamic, real-time reference points that adapt to current market conditions rather than relying on static historical levels.
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。