common_sr
Download scriptThis script is designed for the MetaTrader platform to help traders visualize key price levels from higher timeframes directly on their current chart. It effectively "projects" historical data—such as the daily high, daily low, or closing prices—onto a smaller timeframe (like a 1-minute or 5-minute chart) so you can see where those significant boundaries were without constantly switching windows.
Core Functionality
The main purpose of the logic is to identify specific price points from larger periods (Daily, Weekly, or Monthly) and display them as visual markers. This allows for a better understanding of market structure and "price memory."
How the Logic Works:
1. Timeframe Synchronization The script identifies your current position in time and looks backward or forward to find the boundaries of a specific timeframe. For example, if you are trading on a 15-minute chart but want to see yesterday's data, the script calculates exactly when that day started and ended.
2. Intelligent Boundary Detection It scans the historical data of the target period (e.g., the previous day) to find three specific pieces of information:
- The highest price reached (High)
- The lowest price reached (Low)
- The final price at the end of that period (Close)
3. Dynamic Time Shifting and Correction The logic includes several "smart" features to ensure the data is accurate:
- Time Shifts: You can manually shift the hours or minutes to align the data with specific sessions or market behaviors.
- Weekend/Holiday Handling: It contains specific rules to ignore Sundays and Saturdays, ensuring that the script doesn't get confused by non-trading days when calculating periods.
- Precision Alignment: It ensures that the boundaries are mapped correctly to the exact minute of your current chart, preventing "drift" where the line appears slightly off from the actual price action.
4. Visual Presentation Once the script identifies these prices, it handles the visual output:
- Buffers & Probes: It creates dedicated visual lines or "probes" on your chart. You can choose which ones to see (e.g., only show the High and Low, but hide the Close).
- Customization: It allows for different colors and line widths for each price point, making it easy to distinguish between a daily high and a weekly high at a glance.
- Automatic Cleanup: The script is designed to manage your chart cleanly; it creates these visual objects dynamically and removes them when the indicator is detached or refreshed, keeping your workspace organized.
Summary for the User
Essentially, this tool acts as a historical reference overlay. It does the heavy lifting of looking back at "the big picture" (Days/Weeks/Months), extracting the most important price levels, and drawing them onto your current "small picture" (Live Trading Chart) so you can trade with a clearer sense of where the major market boundaries are located.
ÿþ/ / C o p y r i g h t © 2 0 1 5 A l e x a n d r e B o r e l a ( a l e x a n d r e . b o r e l a @ g m a i l . c o m )
/ /
/ / L i c e n s e d u n d e r t h e A p a c h e L i c e n s e , V e r s i o n 2 . 0 ( t h e "