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.
즐겨찾기 스크립트에서 빼기 즐겨찾기 스크립트에 넣기
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.
응답
HPotter MarketAlpha
@MarketAlpha, I do not trading stocks. Sorry
응답
Thank you!
How can i change this to start backtesting from year 2015?
응답
How can I change this to long only trades?
응답
@Lars1, To change line 33 on strategy.close_all()
+1 응답
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 응답
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?
응답
홈으로 스탁 스크리너 포렉스 스크리너 크립토 스크리너 이코노믹 캘린더 사용안내 차트 특징 프라이싱 프렌드 리퍼하기 하우스룰(내부규정) 헬프 센터 웹사이트 & 브로커 솔루션 위젯 차팅 솔루션 라이트웨이트 차팅 라이브러리 블로그 & 뉴스 트위터
프로화일 프로화일설정 계정 및 빌링 프렌드 리퍼하기 나의 서포트 티켓 헬프 센터 공개아이디어 팔로어 팔로잉 비밀메시지 채팅 로그아웃