BigBitsIO

Scripting Tutorial 6 - Triple Many Moving Averages Forecasting

This script is for a triple moving average indicator where the user can select from different types of moving averages, price sources and lookback periods.

Features:
- 3 Moving Averages with variable MA types, periods, price sources and ability to disable each individually
- Crossovers are plotted on the chart with detailed information regarding the crossover (Ex: 50 SMA crossed over 200 SMA )
- Forecasting available for all three MAs. MA values are forecasted 5 values out and plotted as if a continuation to the MA.
- Forecast bias also applies to all forecasting. Bias means we can forecast based on an anticipated bullish , bearish or neutral direction in the market.
- To understand bias, please read the source code, or if you can't read the code just send me a message on here or Twitter . Twitter should be linked on my profile.


This script is meant as an educational script with well-formatted styling, and references for specific functions.
Notes de version: Added some more code comments to clarify what is happening in the script.
Notes de version: Added some validations, metadata.
Supprimer des scripts favoris Ajouter aux scripts favoris
Like and follow!

💻 Website: https://www.bigbits.io
📺 YouTube: https://www.youtube.com/bigbits
🎮 Discord: https://discord.gg/rapMn4z
🐦 Twitter: https://twitter.com/BigBitsIO
💸 Save $30 on TradingView Paid Plan: https://bit.ly/2CaRfjs

Commentaires

I guess there should be a correction for MA3Source, I guess it should be MA3Source and I guess you should change them all.
If i am incorrect please notify me. Regards and thanks for the development.

MA3Forecast2 = (ma(MA3Type, MA3Source, MA3Period - 2) * (MA3Period - 2) + ((MA1Source * 2) + (Bias * 2))) / MA3Period
+1 Répondre
Thank you for good script.

I don't see code for volume (i tried too), which i tried as well.

I am actually looking for what is shown in image in this article i.e. show volume besides candles and emas...also wish to add macd in separate pane. I couldn't find any such sample code.
Répondre
Is there a reason why i am getting an error when attempting to use an EMA of 5? The program is telling me that i cannot have a value of "0" in the EMA function. It will, however, display a result when i change the value to anything greater than 5. Any thoughts?
Répondre
surishashank Andrew_Fineman
@Andrew_Fineman, It is because when you make the 5th forecast in this example it causes the "MAPeriod - 5" part to be 5-5 = 0.
Répondre
Accueil Screener d'actions Screener Forex Screener Crypto Calendrier économique Comment ça marche Caractéristiques du graphique Prix Parrainer un ami Règles de conduite Centre d'aide Solutions site web & courtier Widgets Solutions de cartographie Bibliothèque de graphiques allégés Blog & News Twitter
Profil Paramètres du Profil Compte et Facturation Amis référés Coins Mes tickets au support Centre d'aide Idées Publiées Followers Suivi(e) Messages privés Chat Se Déconnecter