TheKaoticS

[VWMA] Net Volume Library

TheKaoticS Aktualisiert   
Library " Net Volume Library"
TODO: The underlying logic and function that calculates the net volume for the Net Volume indicator. Exposes the nv function and nvPoint fields for use.

nv(src, length, useVwma, offset, sigma, multHigh, multMed, multLow)
  Parameters:
    src: (float) The source price value
    length: (int) The lookback length
    useVwma: (bool) To use VWMA in the calculation or not
    offset: (float) The ALMA offset value
    sigma: (int) The ALMA sigma value
    multHigh: (float) The multiplier high band
    multMed: (float) The multiplier medium band
    multLow: (float) The multiplier low band
  Returns: Returns the calculated net volume for each band in an nvPoint object

nvPoint
  Fields:
    h2
    h1
    h
    n
    l
    l1
    l2
Versionshinweise:
Publish #2

  • Exposed getBandColor to allow same band coloring as Indicator
  • Added nvPoint type documentation

Added:
getBandColor(value, transp, negative, positive)
  Gets the band color based on a positive or negative alma value
  Parameters:
    value: (float) The value to pass in to check against
    transp: (int) The transparency value. Ex: 0 = solid, 100 = fully opaque
    negative: (color) The color to show when result is below but not equal to 0
    positive: (color) The color to show when result is above but not equal to 0
  Returns: (color) The color that matches the result of being above or below 0

Updated:
nvPoint
  Contains 7 bands of net volume data points
  Fields:
    h2
    h1
    h
    n
    l
    l1
    l2
Versionshinweise:
v3

Updated exported method positions in code
Versionshinweise:
Updated formatting for library method parameters
Versionshinweise:
Revision: 5

Small formatting fix
Versionshinweise:
Revision: 6

Formatting got out of whack again. Fixed.
Versionshinweise:
v7

Added:
method getNv(src, length, useVwma)
  Namespace types: series float, simple float, input float, const float
  Parameters:
    src (float)
    length (int)
    useVwma (bool)

Pine Bibliothek

In echter TradingView-Manier hat der Autor diesen Pine-Code als Open-Source-Bibliothek veröffentlicht, so dass andere Pine-Programmierer aus unserer Community ihn weiterverwenden können. Ein Hoch auf den Autor! Sie können diese Bibliothek privat oder in anderen Open-Source-Publikationen verwenden, aber die Wiederverwendung dieses Codes in einer Publikation unterliegt den Hausregeln.

Haftungsausschluss

Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.

Möchten Sie diese Bibliothek nutzen?

Kopieren Sie die folgende Zeile und fügen Sie sie in Ihr Skript ein.