OPEN-SOURCE SCRIPT

Market Pulse

Updated
BTCUSDT

This is the "Market Pulse" indicator from TOS Indicators.

The scope of this indicator is to identify which one of the four market stages we're in


WHAT ARE THE 4 STAGES?

  • ACCELERATION (or uptrend)
  • DECELERATION (or downtrend)
  • ACCUMULATION (occurs after the market has presumably found a bottom and buyers are coming in)
  • DISTRIBUTION (occurs after the market has presumably found a top and sellers are coming in)



WHAT ARE THE TOOLS THAT IT USES TO IDENTIFY THEM?

  • 3 VWMA (Volume Weighted Moving Average)
  • 1 VMA (Variable Moving Average)


VWMA = is a moving average which takes volume into account, and gives closes with higher volume an higher weight

vwma(src, len) => ta.sma(src * volume, len) / ta.sma(volume, len)


VMA = is a moving average which automatically adjusts the smoothing constant using Market Volatility

vma(src, len) =>
vi = ta.cmo(src, len) / 100
alpha = 2 / (len + 1) * math.abs(vi)
vma = 0.0
vma := alpha * src + nz(vma[1]) * (1 - alpha)


HOW CAN I INTERPRET THE INDICATOR?

1) On the top right you can see a box which tells you the Market Stage of the chart you are currently using:
  • If VWMA8 > VWMA21 > VWMA34 it signals ACCELERATION, color coded in green
  • If VWMA8 < VWMA21 < VWMA34 it signals DECELERATION, color coded in red
  • If neither of the previous two conditions are met it signals ACCUMULATION (yellow) if price closes above the VMA and DISTRIBUTION (orange) if price closes below the VMA


2) Next you have the actual VMA which is the line plotted on the chart and color coded in green, red or gray accordingly to the Market Stage with a filter applied:
  • for a bullish signal (green label) the market needs to be in ACCELERATION and price must be above the VMA
  • for a bearish signal (red label) the market needs to be in DECELERATION and price must be below the VMA


This characteristic makes it sometimes slower at giving direction indications, but also makes it more suitable to be considered as actual signals for buying and selling

ACCUMULATION and DISTRIBUTION are both rapresented with color gray, if you want you can consider:
  • the line going from green to gray as ACCUMULATION, your bias is bullish until the line turns red
  • the line going from red to gray as DISTRIBUTION, your bias is bearish until the line turns green


3) Then you can choose to plot the 3 VWMA to indentify pullbacks and entries for your trades

4) Finally you have the Market Screener, which you can choose to plot and gives a fast look to the markets you are interested on

It basically gives you the Market Stage for every Symbol you choose using the timeframes you input

The maximum number of Symbols you can set is 20, and for all of them you have 2 different timeframes you can choose to analyse.
By default the Symbols are set to the top 20 Cryptocurrency by Market Cap, and the timeframes to 4h and D

There is an option which is on by default and color codes ACCUMULATION and DISTRIBUTION the same as the box on the top right, you can turn it off to make them gray

As I've written in the tooltip inside the indicator you should only use the screener to analyse timeframes which are equal or higher than the one you are currently on your chart.

If you don't plan to use the screener you can delete every symbol from the input boxes to make the indicator update faster when changing timeframe or market.

Be aware that the screener is on BETA and may give repainting signals!
Release Notes
2 NEW FEATURES

1) ONE NEW BASELINE TO CHOOSE FROM:

Added the possibility to choose between two different baselines, the VMA (Variable Moving Average) and the VIDYA (Variable Index Dynamic Average).
Both use Volatility to dynamically change their smoothing factor, VMA uses Chande Momentum Oscillator and VIDYA uses the ratio between 2 Standard Deviations (one applied to a short period and the other to long period).
Because of this difference VMA reacts slower to price movements and tends to be more straight during ranges which makes it easier to identify future price movements watching his slope and direction, VIDYA reacts faster to
price movements and this can lead to more false signals and multiple direction changes during ranges.


2) A NEW SWITCH TO ENABLE CUSTOM COLORS FOR CANDLES

If you choose to enable this option the candles on your chart will be colored based on two indicators:
  • for LONG-TERM trends I choose to use the DMI (Directional Movement Index) indicator but using a different moving average from TradingView's default, the WWMA (Welles Wilder Moving Average)
  • for SHORT-TERM trends I choose to use the CAM (Coordinated ADX and MACD) indicator which uses MACD to identify the trend and ADX to confirm the strength of the move, both of them use the WWMA

    By default the candles will only be colored green or red to show bullish or bearish power, in addition you can tick a checkbox named "CHOP Filter" which will add a third color yellow to try and signal moments of choppiness
Release Notes
UPDATED THE MARKET SCREENER

1) MARKET SCREENER OUT OF BETA

Fixed the issues with Market Screener, now every value you see is correct and up-to-date in realtime as long as you stay on a lower timeframe chart.


2) LAYOUT CHANGES AND RSI ADDED

The layout of the Market Screener has been changed to be able to contain RSI values and future add-ons.
You can change RSI length, OS (Oversold) and OB (Overbought) levels in the indicator's settings.
RSI gets green if under OS level and gets red if over OB level, else is gray.
Release Notes
NEW MARKET SCREENER UPDATING OPTIONS

1) UPDATING VALUES IN REALTIME OR ON LAST CONFIRMED CLOSE

You can now choose to update Market Screener values in 'REALTIME' (once every tick) or on 'LAST CONFIRMED CLOSE' (once every candle's close of the Timeframes you chosen).
Release Notes
MARKET SCREENER IMPROVEMENTS, ADD-ONS & RVOL

1) EMPTY SYMBOLS ARE NOW DELETED FROM THE SCREENER

In the symbols section the boxes you leave blank are now going to be deleted from the screener.
No need to put the assets you need consecutively, e.g. symbols 3, 8, 17 in the settings are going to be 1, 2, 3 on your chart.


2) NEW ADD-ONS SECTION

Other than the Market Pulse indication on the screener now you can choose what add-ons you want to enable inside the ADD-ONS section.
To enable the ones you want you just need to tick the adjacent check box, the settings for each add-on are on the same line.
If you choose to untick an add-on the screener is going to delete its columns automatically.
For now are available:
  • RSI (Relative Strength Index)
  • RVol (Relative Volume)



3) RVOL ADDED TO THE ADD-ONS AND NEAR THE MARKET STAGE BOX

Description:
RVol or Relative Volume is the ratio between the current volume and the average volume given a defined time session which is multiplied with a "Length" input value.
What this means is that the volume of the current bar is going to be compared with the average of the values the volume had throughout the same time periods in the past.

Why using this indicator?
Unlike using a simple average to determine high or low volume periods the RVol takes into account the volume patterns a certain asset might have during a given time session and gives you more precise informations.

What is the time session used for calculations?
The time sessions used to calculate the volume average are automatically detected as follows:
  • if TimeFrame = 1s ------------> Session = 1m
  • if 1s < TimeFrame < 1m -----> Session = 1h
  • if 1m < TimeFrame < 1D -----> Session = 1D
  • if 1D < TimeFrame < 1W -----> Session = 1W
  • if 1W < TimeFrame < 1M -----> Session = 1M
  • if TimeFrame > 1M ------------> Session = 12M


How to read the indicator:
As I've said RVol is a ratio so if it displays a value of 1 means the volume is exactly the same as the average, a value of 2 means is double, a value of 0.5 means is half and so on.
Also the background is color coded as follows:
  • if RVol < 0.5 -------------> gray
  • if 0.5 < RVol < 0.8 ------> red
  • if 0.8 < RVol < 1.25 -----> orange
  • if 1.25 < RVol < 2 -------> yellow
  • if RVol > 2 ---------------> green


RVol can help to identify increasing or decreasing trading activity in the market and so distinguish trending or ranging periods and confirm breakouts.


Be aware that is not possible to use values higher than 5 as "Length" because of the excessive amount of data needed, and that until a new fix timeframes 3m and 5m wil not work.
If you need to view those timeframes you can switch to the previous version of this indicator by clicking on the "Source Code" button near "Settings", changing the number beside the name to 4.0 and clicking "Add to Chart".
marketpulseMoving AveragesstageanalysisTrend AnalysisvmaVolatility

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?


Also on:

Disclaimer