allanster

VAMA Volume Adjusted Moving Average Function

allanster Wizard 已更新   
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!
版本注释:
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
版本注释:
Revision 2

Updated for Pine Script v5.

Telegram: t.me/allanster • Website: www.allanster.com

If you wish to buy me a refreshing beverage :)...

LTC (preferred): LTDaAe7nPzbpBhZVT9o5f9f8M3aZSPa46Y

BTC: 13LhkeXBYrRomVAqbXcoLXHuqMk6Mf7G6N
开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?