HPotter

Moving Average Envelopes Backtest

Moving Average Envelopes are percentage-based envelopes set above and
below a moving average. The moving average, which forms the base for
this indicator, can be a simple or exponential moving average . Each
envelope is then set the same percentage above or below the moving average.
This creates parallel bands that follow price action. With a moving average
as the base, Moving Average Envelopes can be used as a trend following indicator.
However, this indicator is not limited to just trend following. The envelopes
can also be used to identify overbought and oversold levels when the trend is
relatively flat.

You can change long to short in the Input Settings
WARNING:
- For purpose educate only
- This script to change bars colors.
Von Favorisierten Skripten entfernen Zu Favorisierten Skripten hinzufügen
DONATE/TIP

BTC: 3FKWwtaYrf5NHZzaCi1fyAfQj7XSgtyCqe
How do we select the stocks for trading MA envelope? High Beta or High Volatility stocks, which will go well? Please suggest.
Antworten
HPotter MarketAlpha
@MarketAlpha, I do not trading stocks. Sorry
Antworten
Thank you!
How can i change this to start backtesting from year 2015?
Antworten
How can I change this to long only trades?
Antworten
@Lars1, To change line 33 on strategy.close_all()
+1 Antworten
Thx for this work - I analysed this one - can you explain me these lines of code?
pos = iff(close > xHighBand, 1,
iff(close <xLowBand, -1, nz(pos, 0)))
possig = iff(reverse and pos == 1, -1,
iff(reverse and pos == -1, 1, pos))

Are you calculating the bearish or bullish?
+1 Antworten
TheBullCapital TheBullCapital
When he close higher then the Upperbnad the you draw a green line when the close LowBand than you draw a red one - but waht is the reason behind?
Antworten
Startseite Aktien-Screener Forex-Screener Krypto-Screener Wirtschaftskalender Shows So funktioniert es! Chartmerkmale Preise Hausregeln Moderatoren Webseite & Brokerlösungen Widgets Charting Lösungen Lightweight Charting Library Hilfe Center Einen Freund empfehlen Feature-Anfrage Blog & News FAQ - Häufige Fragen & Antworten Wiki Twitter
Profil Profileinstellungen Konto und Abrechnung Einen Freund empfehlen Meine Support Tickets Hilfe Center Veröffentlichte Ideen Followers Ich folge Private Nachrichten Chat Abmelden