JohnBaron

Volume, Momentum and Volatility weighted moving average

JohnBaron 已更新   
Moving averages are filters on price data. This moving average creates a filter which factors in:
- the price RSI or it's Momentum
- the volume RSI
- the RVI or Volatility

Each factor is put through a least squares filter to smooth them first.

Then the factors are used to build a coefficient for an exponentially weighted average.

The chart above shows a comparison of standard average types with this script.

This is useful if you are looking for a moving average based trigger and do not wish to react to candle noise price action.

版本注释:
Minor updates
- reverted to traditional RVI calculation
- pulled apart the momentum for high and low separately
版本注释:
- Some important revisions - feel free to alter the source

- Addressed some initialization conditions
- Added another filter using normalized ratios for relative value filter
- Changed RSI to CMO, CMO is more responsive than RSI and reduces lag
- Added one of my favorite moving average, the Vidya MA

I think it's important to use this moving average with another average or even a supertrend, where the input to the trend is the VMV average. Perhaps a later modification.

I hope you enjoy how these two MA's work together.
版本注释:
Quick fix of scaling issue, CMO ranges -100 to 100, RVI ranges 0 to 100 . All factors now produce a range of 0 to 100.
版本注释:
_ Allow the script to run in a time frame different from the chart
_ Produce a dynamic length based on stochastic oscillator
_ Vidya_ma now runs on dynamic length
_ two more of my favorite ma's are included - parameter-less price and vwap
版本注释:
  • Removed dynamic length selections
  • Addressed more initialization problems, if you use a recursive formula it's important the first 100 bars in a data set are not NA and are reasonable values, so need to fix some borrowed pine
  • Switched from using stochastic to pick up on trend to using two different inputs, tema and parameterless ma - averaging their best fit length
  • Dynamic length applied to the Vidya ma only
版本注释:
  • added gap fill if used in a higher time frame than the chart
  • removed the least squares method and replaced with simple ema for speed of execution, the outcomes are close enough so it doesn't warrant the tax on execution speed
  • smoothed over a fixed length and not variable
版本注释:
Updated to V5 Pine
- streamlined and simplified a few averages to speed up processing speed
- dynamic length calculations are done now in one loop vs 2
- removed normalization for Vidya and VMV

The script still generates warnings on compilation, but there is no easy way around them.
开源脚本

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

免责声明

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

想在图表上使用此脚本?