ma_bbands
Download scriptThis script is designed as a technical analysis tool for MetaTrader platforms, specifically engineered to help traders identify potential price reversal zones by blending two distinct types of moving averages and volatility bands.
Core Logic Overview
The logic operates by calculating "upper" and "lower" boundaries of the market. Instead of simply using standard indicators in isolation, it compares different moving average types (Simple Moving Averages and Linear Weighted Moving Averages) against Bollinger Bands to create a dynamic "trading envelope."
Here is the step-by-step breakdown of how the script processes data:
1. Boundary Establishment
- Upper Boundaries: The script looks at high price points and calculates a specific moving average. It compares this against the upper Bollinger Band. Depending on which value is higher, it sets a "ceiling" for the market, applying a slight offset (distance) to ensure the line doesn't stick directly to the price action.
- Lower Boundaries: Similarly, it looks at low price points and calculates a moving average to compare against the lower Bollinger Band. It establishes a "floor" for the market using these results, again applying an offset to create a buffer zone.
2. The Equilibrium Line
- The script automatically generates a middle line (the fifth buffer). This is calculated by taking the mathematical average of the upper and lower boundaries established in the first step. This represents the "fair value" or center point of the current price volatility.
3. Signal Identification (Arrows) The most critical part of the logic is the generation of visual signals (arrows), which occur when specific three-part conditions are met simultaneously:
- Bullish Signal (Buy): An arrow is triggered if a specialized Oscillator (OsMA) crosses from negative to positive values, while the market price simultaneously drops below the calculated "floor" boundary. This suggests that the downward momentum has reached an extreme and may be ready to bounce back up.
- Bearish Signal (Sell): An arrow is triggered if the OsMA Oscillator crosses from positive to negative values, while the market price simultaneously breaks above the calculated "ceiling" boundary. This suggests that upward momentum has exhausted and a reversal downward may be imminent.
Summary for Traders
Essentially, this script filters out "noise" by creating a custom price corridor. It ignores standard movements and only alerts the user when the price interacts with these extreme boundaries in a way that is confirmed by an independent oscillator. It seeks to identify "overextended" market conditions where a price correction is statistically more likely to occur.
ÿþ/ / + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
/ / | M A _ B B a n d s . m q 4 |
/ / | C o p y r i g h t 2 0 0 5 - 2 0 1 4 , 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 : / / w w w . m q l 4 . c o m |
/ / | E - M A I L : 4 0 4 6 8 9 6 2 @ q q . c o m |
/ / + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
# p r o p e r t y c o p y r i g h t "