TradingView
allanster
24 Th06 2020 00:40

VAMA Volume Adjusted Moving Average Function 

Bitcoin / United States DollarCoinbase

Mô tả

This indicator is a live analysis adaptation of Richard Arms' Volume Adjusted Moving Average coded as a single function. VAMA utilizes a period length that is based on volume increments rather than time. Settings are provided for using as a pair of fast and slow moving averages.

SampleN - N volume bars used as sample to calculate average volume , 0 equals all bars.

VAMA Source - Price used for volume weighted calculations.

VAMA Length - Specified number of volume ratio buckets to be reached.

VAMA VI Fct - Size of volume ratio buckets.

VAMA Strict - Must meet desired volume requirements, even if number of bars has to exceed VAMA Length to do it.

Please see previous published example here for more details on VAMA's usage and inability to redraw the past on time based charts.

NOTICE: This is an example script and not meant to be used as an actual strategy. By using this script or any portion thereof, you acknowledge that you have read and understood that this is for research purposes only and I am not responsible for any financial losses you may incur by using this script!

Phát hành các Ghi chú

Revision 1

Removed function's local ‎reliance on global input nvb by changing it to use local _nvb instead, added cosmetic space, revised comment, no calculations are affected from previous version.

Previous lines:
tvb = 0, tvb := _nvb == 0 ? ‎nz(tvb[1]) + 1 : nvb // total ‎volume bars in sample tvs = nvb == 0 ? cum(‎volume) : sum(‎volume,nvb) // total ‎volume in sample


Revised lines:
tvb = 0, tvb := _nvb == 0 ? ‎nz(tvb[1]) + 1 : _nvb // total ‎volume bars used in sample tvs = _nvb == 0 ? cum(‎volume) : sum(‎volume, _nvb) // total ‎volume in sample

Phát hành các Ghi chú

Revision 2

Updated for Pine Script v5.
Bình luận
PineCoders
allanster
@PineCoders, thank you, very much appreciated!
justnifty
a very good trading tool. thanks for sharing.
1. Can we use it for intraday...like 5min t/f?
2. Is it backtestable version available on TV?
Thanks again.
allanster
@justnifty, thanks for your interest. The script will function on any timeframe. I believe the default settings that Richard Arms chose were for much higher timeframes. As a rule I never give trading advice so I would encourage you to do your own research. I have only done cursory backtests at this point and have not published a strategy version, but conversion from study script to strategy script is fairly simple to do.
damavandi98
The best moving Averages I have ever seen. Thank you
allanster
@damavandi98, very nice to hear, thanks for your feedback!
raja74sekhar
Wonderful indicator
allanster
@raja74sekhar, thanks for your comment, appreciated.
UnknownUnicorn1409796
As a freshman,I am so happpy and appreciative.
allanster
@LuckyCat, thanks for your interest.
Thêm nữa