MA BBands Indicator

MA BBands Indicator

1. Introduction

The MA BBands indicator combines Simple Moving Averages (SMA) and Bollinger Bands to provide a comprehensive analysis of price movements. This hybrid approach helps identify overbought and oversold zones, as well as potential trend breakouts. Additionally, it includes buy and sell signals based on OsMA crossovers, making decision-making more precise.

2. Key Concepts

  • Simple Moving Average (SMA):
    The SMA is calculated by averaging prices over a defined number of periods. It provides a smoothed line that reflects the general market direction.
  • Bollinger Bands:
    These consist of a central line (moving average) and two outer lines that represent a standard deviation range of prices. Bollinger Bands help measure market volatility.
  • OsMA (Moving Average Oscillator):
    It measures the difference between the MACD and its signal line. OsMA sign changes indicate possible trend reversals.
  • Time Shifts:
    Shifts allow observing past values of moving averages and bands to analyze their recent behavior.

3. Indicator Configuration

  • MAPeriod (20): Period for the SMA.
  • BBPeriod (30): Period for the Bollinger Bands.
  • StdDev (1.5): Standard deviation factor for calculating the upper and lower bands.
  • MoveShift (22): Number of bars to shift the SMA.
  • OsMAFastPeriod (5) and OsMASlowPeriod (25): Parameters for calculating the OsMA.
  • shortMAPeriod (10): Period for the short SMA used for quick entry and exit signals.
  • ShowSignals (1): Parameter to enable/disable arrow signals display.

4. Indicator Logic

  • Moving Average Calculation:
    SMAs are calculated based on high and low prices, shifted according to the MoveShift value.
  • Shifted Bollinger Bands:
    An upper and lower range is derived based on a defined period and the standard deviation of prices. Then, a 7-bar shift is applied for more precise analysis.
  • OsMA Evaluation:
    The OsMA is used to confirm the trend direction based on its sign changes.
  • Reference Bands Selection:
    The upperBand and lowerBand lines dynamically adjust by selecting the most relevant value between the shifted SMA and Bollinger Bands, providing an adaptive framework for price evaluation.

5. Buy and Sell Signals

  • Sell Signal (Red Arrow):
    A sell signal is generated when:

    • The short SMA crosses above the upper band of the indicator.
    • The OsMA changes from positive to negative.
    • The current price closes above the upper band.
  • Buy Signal (Green Arrow):
    A buy signal is generated when:

    • The short SMA is below the lower band.
    • The OsMA changes from negative to positive.
    • The current price closes below the lower band.

6. Advantages of the MA BBands Indicator

  • Provides clear and easy-to-interpret visual signals to detect overbought and oversold zones.
  • Combines multiple technical approaches, improving signal accuracy and avoiding false breakouts.
  • Allows customization of periods and standard deviations to suit different trading styles.
  • The inclusion of the OsMA as a confirmation filter reduces market noise.

7. ProBuilder Code for the Indicator

Share this

Risk disclosure:

No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.

ProRealTime ITF files and other attachments : How to import ITF files into ProRealTime platform?

PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials

avatar
Register or

Likes

avatar avatar avatar avatar
Related users ' posts
Alberto Aguilera Hi! Thanks for your strategy Anyone can check it with 200 bars?
TempusFugit Hi, this simple system for DOW and only shorts has worked quite well, maybe because of its q...
phoentzs Unfortunately, I never pursued this strategy further. Maybe I should take a look with what ...
jobswaps Sube como trazar lineas de tendencias a tantas barras
Frankiesc interesting indicator !! Thanks for sharing!!!
robertogozzi Thank you :)
robertogozzi It surely CHANGES even when currently outside time range, as the lookback periods change as ...
SkippyTrader Thanks Roberto, but shouldnt the values in the outside time range not be different? As it sh...
robertogozzi Actually it is a constant (I tested them on a 1-hour TF, 9am to 5pm) and outside that time r...
JJ Tec Hola Las condiciones de entrada / salida vienen en el libro de J. Carter Mastering the trad...
Pixeldd Ich bekomme beim einfügen des Indikators einen Fehler angezeigt. Was bitte muss ich genau än...
HarryPro Hello, Firtly there appears to be a typo on line 6 "lenghkc=20" should this be "lengthkc=...
Nicolas En effet merci, erreur corrigée, la variable Risk affecte désormais comme il se doit les cal...
nader003 How can we get this indicator on MT4
Nicolas You can ask for private custom coding to our programming services: https://www.prorealcode.c...
Gianluca THANK YOU!!!!!
JOSEBA que relaccion tiene la numeración de las barras del 1 al 10 que tiene cada número Tengo dos...
marcov66 Hi, it seems a very useful indicator. Unfortunately the link here for the full explanation d...
TACBOLSA Discontinued indicator. we are sorry.
Azzuerus Bonjour, je teste et j'utilise vos indicateurs depuis plusieurs années, et ils me sont dev...
funkystuff Salut Balmora, Ton indicateur est plutôt intéressant :) Penses-tu qu'il soit possible de l'...
brian gilbert Hello, can you explain to me what are "pipsize" and "ATAN"? What functions do they have and ...
Bodaris Bonjour, Je suis débutant 1 mois :p pipsize ressemble à la fonction pointsize et ATAN...
darbes Hi How does it go on live ? JC
antonio73 Balmora74, io vedo che funziona anche su timeframe ad 1 minuto con piccole ottimizzazioni, t...
Juananantoniorodriguez hola buenas, a este sistema automático, Cómo se le podría poner un stoploss de beneficio sim...
Janfi Hello, I'm new to ProRealCode and I do not understand the following summation[n](indicator...
Kaci It seems he's just checking that the previous MACD is < 0 for maximum one period ? I'...
Daniel Martin Hi do you know how have and entry after the second cross? There is crosses below 0 and cross...
Leo I don't know, I just copy paste the strategy. The optimisation of the values I wrote them in...
bertrandpinoy hello Leo I'm spending time on your strategy code. do you agree to try to include this code ...
bertrandpinoy //version a: ajout filtre MM defparam cumulateorders=false // --- paramètres taille =...
capgros Bonjour @Nicolas, Thanks a lot for this tool, it is very useful for me. I would like to s...
Hans63 Would you add the possibility to color also the Heikin Ashi and bar chart?
Nicolas That's possible, please open a new topic in the indicator forum explaining what you need exa...
Nicolas Change line 62 with: drawcandle(flup,fldn,flup,fldn) coloured(169,169,169,80) bordercolor(16...
DimKar Thank you very much from Greece sir , have a nice day ....!!!! Really i do not have words...
mit_ose Bonjour, J'ai d'excellents résultats avec cet indicateur simple et efficace; Merci beaucoup;
ottimo Thank you Nicolas, great indicator, N. 1
tikigai Merci Nicolas! First Happy new Year 2020. Very good indicator BUT (yes the french "oui, m...
Nicolas Whats prorealtime version? Did you try in version prior to v11? indicator's call and loop ca...
Nicolas Yes, that's how it goes when using loops..
JosephFelix Hi, Could I please have help with adding these indicators 'on price'? Every indicator that I...
Nicolas Just add it on price by clicking the wrench on the left upper side of the price chart.
lokbuscas is it possible to make a screener with this conditions??? thank you
achel I believe so but I leave it to Nicolas to decide if it is possible
Nicolas Please open a new topic in the screeners forum
jpm380 Merci pour ce super indicateur. Comment puis-je mettre une alerte dès changement dès croisem...
leoulve Hello, I uploaded correctly the screener and it is not selecting any. Is it normal? cheers
Oliviertrader2020 Hello, where do you find the ZeroLagMACDWeek indicator? You only posted the mtf-macd-diverge...
MJZTrader Good morning! I was trying to tweek the code in the way as to set it for intraday (1 Min to ...
Nicolas Apply it on the price chart. The indicator plot just one single line. There are two in the...
jamesoc Hi Nicolas, do you happen to know if there is an indicator that can be applied to charts, to...
gustavobp Buenos dias Nicolas, al agregar tu indicador no me reconoce la variable Price ni en la linea...

Top