Daniel_Ge

Average Trend with Deviation Bands v2

Daniel_Ge Cập nhật   
TL;DR: An average based trend incl. micro trend spotting and multiple display options.

This script is basically an update of my "Average Trend with Deviation Bands" script. I made the following changes:

  • Not an overlay anymore - The amount of drawn lines makes the chart pretty messy. That's why I moved it to a pane. If you preferred the overlay you can use my "Average Trend with Deviation Bands" script. *This is also the reason why I publish this script instead of updating the existing one.
  • I added an EMA to represent the price movement instead of candles
  • I added a signal (SMA) to spot micro trends and early entry/exit signals
  • I added the option to switch between a "line view" which shows the average trend and deviation bands and an "oscillator view" which shows an oscillator and histogram (MACD style)

General usage:
1. The white line is the average trend (which is an average of the last N bars open, close, high, low price).
2. Bands around the average trend are standard deviations which can be adjusted in the options menu and are only visible in "lines view". Basically they are like the clouds in the Ichimoku Cloud indicator - In big deviation bands the price movement needs more "power" to break through the average trend and vice versa.
3. Indicator line (blue line) - This is the EMA which represents the price. Crossing the average trend from below indicates an uptrend and vice versa (crossing from above indicates a down trend).
4. Signal line (red line) - This is a smoothed version of the indicator line which can be used to predict the movement of the price when crossed by the indicator line (like at MACD and many other indicators).


Oscillator usage:
When switched to "oscillator view" the indicator line oscillates around a zero line which can be seen as the average trend. The usage is basically the same as described above. However there is also the histogram which shows the difference between the indicator and signal. Of course the histogram can be deactivated. Additionally a color filling can be added to easily spot entry/exit signals.



As always: Code is free do whatever you like. If you have any questions/comments/etc. just drop it in the comment section.




Phát hành các Ghi chú:
Update notes:

  • Added ATR Bands. Switch between ATR and deviation bands in the settings menu.
  • ATR/Deviation color coding (to easily see out of bands moves). Values inside a band uses darker. Color coding can be deactivated by entering "0" in the band factor setting.
  • Bars in oscillator mode can be switched to hollow bars
  • Added "Signal Bars" -> Signal Bars show how much the price differs from the signal (fast MA). I use them as a momentum indicators
  • Signal Bars can be used without additional bars or combined with regular or hollow bars. Signal bars can be deactivated in the settings menu
  • Some minor tweaks

Except ATR bands; all changes aim to provide a better visibility of micro and macro moves.
Mã nguồn mở

Với tinh thần TradingView, tác giả của tập lệnh này đã xuất bản nó dưới dạng mã nguồn mở, vì vậy các nhà giao dịch có thể hiểu và xác minh nó. Chúc mừng tác giả! Bạn có thể sử dụng mã này miễn phí, nhưng việc sử dụng lại mã này trong một ấn phẩm chịu sự điều chỉnh của Nội quy nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?