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
Related users ' posts
okeus Ivan, riesci a creare un indicatore per le "evolventi paraboliche" ? grazie
groelandes Impagable tu trabajo cada semana. ¡Gracias!
Iván de nada! :)
P. Marlowe Muy bueno. ¿Podría hacerse para señalar extremos por el lado bajista? Lo mismo a la inversa....
Miro Esta es una versión del indicador, para ambos extremos. //-------------------------------...
P. Marlowe Muchas gracias ¡¡
MaoRai54 dear Ivan, it seems to be very interesting but please clarify what are all the lines I see i...
Iván Hi! you have the answer in the last line of code... MacdMiddle as "histo" style(histogra...
kats Le Top , a utiliser avec le nuage violet et alerte TN pour plus de précision.
jordan //---settings MAmode=0 Period=150 NumberOfMA=100 //---end of settings MA2=undefined ...
jordan dites moi si cela correspond à ce que vous cherchez
kats bonjour merci de ta reponse mais non ca fonctionne pas sympa quand même d'avoir essayé cdlt
Jean2139 Bonjour Yvan, Merci pour ton indicateur que je trouve très intéressant. Je suppose que tu ...
Suffi Hier eine kleine Korrektur: //-----Inputs-----------------------------------------// MALengt...
Stenozar Ciao IVAN , mi da errore per la riga 49 "print tema low"; puoi suggerirmi la modifica da met...
Iván Avete provato a scaricare il file .itf?
AndyB72 Caricato ora sulla V12, nessun errore.
jacquesgermain Bonjour non pas de soucis car src=customclose donc dans le menu configuration/propriété me...
geroniman Merci Jacques , indic tres utile. J'ai un indic à programmer avec du price action. es tu dis...
jacquesgermain ok pour regarder ...
Bateson
1 year ago
MACD Reloaded
MACD Reloaded
2
Indicators
NEOMKEY Nada nuevo
Carlose I love your version of the MACD, if you use it you can get a lot of use out of it, for me ma...
bousalahane hello, thank you for sharing, I’m not top strong in the programation part, there is a way to...
Fgats Hi, With this indicator I just wanted to show the interest that can exist to synthesize th...
davidguerreir how to adapt nbStdSig values ?
Matriciel Very nice job ! Is it possible to do the opposite because what interests me is to have the ...
YvesRobert Hi Matriciel, how can we do this, because stochastic is limited between 0 and 100 but price ...
Traderfox06 Dear zeiiermantrading, I really like your approach combining adaptive averages with MACD in...
jacquesgermain Hello IASD it's normal , when this occurs, uncheck RSI and MFI line and click then the MAC...
emiliobercial Thank you very much for sharing!
Carlose estoy de acuerdo con IASD Esta muy bien el MAD y el indicador en el precio no se ven bien...
Gianluca Amazing, thank You for your contribution!
Alex Spioglou Thank you for featuring my work, and I hope you found it useful. Mind the paper was publ...
FXtonio @RICOU en 1 minutes avec un filtre de tendance ZLSMA 200 et eventuellement un rsi 7 , 69% de...
JC_Bywan For people interested in the screener: https://www.prorealcode.com/topic/screener-buy-sell-m...
octum Gracias NJicolas. Las lineas 35 y 36 dan fallo. (¿Es adrede para iniciados?) Puedes co...
Nicolas
2 years ago
FXtonio Bonjour Nicolas, merci pour cette merveille, je l'utilise en compl2ment du "magical buy sell...
xpe74 Bonjour Nicolas, quelle est la valeur de MA que l'on doit prendre en compte pour intégration...
Nicolas Il faut faire un CALL de l'indicateur et y placé en paramètre les valeurs des périodes souha...
supertiti Bel outil si on ne se tape pas sur les doigts avec ! Comment ajoute-on une image avec le co...
Alfy
2 years ago
geroniman bonjour si je comprends bien, qaund els points sont verts on regarde pour un long, le blanc ...
Alfy No, the dots only show the compression of the volatility. There are 3 levels of "squeeze" wh...
ted.hulsman Hi Alfy, I'm trying to understand your indicator, so I made the Bollinger Bands and the Kelt...

Top