Murreys_Math_Oscillator_v1
Download scriptThis script functions as a specialized technical analysis tool designed to help traders visualize price action through a unique "Oscillator" format. Instead of just showing price movement, it translates market volatility and range into a visual histogram that highlights specific zones of strength and weakness.
Here is a breakdown of the logic used by this tool:
Core Concept
The indicator operates by analyzing the highest and lowest price points reached within a user-defined period (the "Period" setting). By identifying these boundaries, the script establishes a mathematical range for the market. It then calculates a central "midpoint" based on that range to determine where the current price sits in relation to the historical extremes of that timeframe.
How the Data is Processed
- Range Identification: For every point on the chart, the script looks back at a specific number of candles to find the absolute highest high and the lowest low.
- Midpoint Calculation: It takes the distance between those two points (the range) and applies a "Multiplier." This multiplier allows you to adjust how aggressively the indicator reacts to price movements.
- Oscillation Mapping: The script measures how far the current closing price is from the calculated midpoint. It then converts this distance into a numerical value:
- If the price is significantly above the midpoint, the result is a positive number.
- If the price is significantly below the midpoint, the result is a negative number.
Visual Representation (The Histogram)
The most distinct feature of this script is its dynamic coloring system. The histogram changes color based on how "extreme" the price movement is compared to the calculated levels:
- Bullish Momentum (Positive Values): As the price moves higher above the midpoint, the histogram displays various shades of green. The specific shade changes as the price crosses through predefined intensity levels (e.g., moving from a "soft" green to a "strong" green).
- Bearish Momentum (Negative Values): As the price drops lower below the midpoint, the histogram shifts into red tones. Similar to the bullish side, the shade of red intensifies as the price reaches deeper extreme levels.
- Neutrality: When the price is closer to the calculated midpoint, it uses more muted colors to signify less conviction in the current trend.
User Customization
The logic provides two main ways for a visitor to interact with the data:
- Period: Allows you to decide how much "history" the tool should look at (e.g., looking back 100 candles vs. 500).
- Multiplier: This scales the intensity of the levels, effectively making the indicator more or less sensitive to price fluctuations.
In summary, this is a momentum and range oscillator. It helps traders identify when a price is reaching an "overextended" state by visually transitioning through colors as price moves toward the edges of its recent historical range.
ÿþ/ / + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
/ / | M u r r e y s _ M a t h _ O s c i l l a t o r . m q 5 |
/ / | C o p y r i g h t 2 0 1 8 , M e t a Q u o t e s S o f t w a r e C o r p . |
/ / | h t t p s : / / m q l 5 . c o m |
/ / + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
# p r o p e r t y c o p y r i g h t "