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
Nicolas Il faut l'ajouter sur le prix avec l'icône de la clé situé en haut à gauche du graphique du ...
jerome777 merci de ta réponse
jerome777 bonjour c est bon il fonctionne parfaitement merci beaucoup
imonix Have been trying this on demo since Monday before deciding whether to go live with it. Using...
Roberto Blázquez I'm sorry, I've tried it since November 2012 and it's bad results.
Dunstan I would like to get guidance_ How do I access and attach this indicator to my MT5 platform...
Nicolas You can't, use prorealtime, it's way better
jc84 Thank you very much for this indicator , not provided by PRT I was actually working at thi...
larouedegann It doesn't work
ggolfet it seems it's not working on prorealtime 11. I changed MACDSignal to MACDSign in order to av...
juanj Please note that the indicator is meant for PRT 10.3
Pierreco1991 Hello Can you confirm this configuration for FRANCE ? //Time in UTC+8 Rest0Minutes =...
Nicolas Ask on an Excel website?!
JJMR HOLA NICOLAS, TENGO LA ULTIMA VERSION ACTUALIZADA DEL INDICADOR TTM SQUEEZE PRO EN LA VERSIO...
imokdesign @nicolas ,if in want to "call" this indicator, which values i have to write down?
supertiti Bonjour Nicolas, Je ne comprend pas bien , le trend change de couleur quand les prix sont a...
Nicolas Oui ce serait possible, cependant l'indicateur est bien prévu pour conserver la couleur de l...
supertiti Quand tu pourras si tu peux nous coder la troisième couleur cela améliorerait les trades cou...
Ciccarelli Franco Per lasciare che la strategia venga eseguita (dopo aver importato il file): Basta eliminare...
JADINVEST Hello Jan, hello everyone, Thanks Jan for this strategy! Since 2020, have any of you found a...
Alessandro Furlani Hi Ian, hope you still use PRT and so you can read this post. I have tested a lot your work ...
Zigo Normaly it do work in version 11.
bertrandpinoy Hello to all, please does a coder can bring the indication of the price level on the chart o...
Zigo @bertrandpinoy add between line 50 and 51 : drawtext("#dnh#",barindex,low-2.618*AverageTrue...
FXmike hey my friends, thank you for this great code. my problem is he make no trade open. backtest...
FXmike Can i put a Action that my start contract is smaller than 1 ? 0.3 or 0.5 ? In wich Position...
phoentzs I wrote the code for M15 back then and also variants in H1 and M1. Everything works so far....
stephane2.0
5 years ago
stephane2.0 c=exponentialaverage[9](MACDLine[12,26,9](close))
Forexcheckup Hi I down loaded the ITF file, it paints red for a down trend but for all up trends the can...
stephane2.0 line 22: r = 195 by r = 0 line 23: g = 195 by g = 0 line 24: b = 195 by b = 255 ;)
Alps007 Hi Nicolas. Happy New Year. Can you please program me several MACD divergence screeners ...
Arlei Zanin Hello Nicolas, would it be possible to convert the Cloud to Pascal language? Thank you.
ashee i want it in MT4
Marie-Eve Vergoz Bonsoir - Voici l'erreur qui est signalée lorsque je souhaite utiliser cet indicateur : il...
Franro Hi, this looks very good is this something you worked towards a strategy?
hua hin Bonjour comment mettre ce programme sur un graphique le lien est en JPG et sur crewation i...
Dron Hola! El archivo itf donde esta?
Vonasi Sure that is possible. I will code it and make a post in the English ProBuilder forum and pu...
Vonasi Vama v2 with Hull moving average included can be found here: https://www.prorealcode.com/top...
JMat45 Thank you, Vonasi.
Nicolas
6 years ago
LRMA
LRMA
0
Indicators
manchokcity can we have it in mql4 platform? or how or which platform do we use it?
camporan I don't use MetaTrader so I won't be able to do the translation myself. Sorry!
Alexander9 This can for amibroker ? . Thanks
Bard I've also just noticed that changing the "Bands Deviation" setting from 1.25 to eg 3 doesn't...
bartekz Hi @Nicolas, Really impressed by your work. I am trying to replicate the Wave-PM indicator t...
Nicolas You don't have to replicate it, download the file and import it into your platform.
Marie-Eve Vergoz lorsque je copie les codes, le système me signale des erreurs à la ligne 12 et suivantes
Marie-Eve Vergoz sorry - tout est ok -

Top