gliderfund

Common Functions

gliderfund Zaktualizowano   
Library "CommonFunctions"
This Library provides some handy functions commonly used in Pine Script.

crosses(source1, offset1, source2, offset2) Checks the existance of crosses between the series
  Parameters:
    source1: First series
    offset1: (Optional) Offset of First series. By default 0
    source2: (Optional) Second series. By default 'close' price
    offset2: (Optional) Offset of Second series. By default 0
  Returns:

marketState(source1, offset1, source2, offset2) Determines Bullish/Bearish state according to the relative position between the series.
  Parameters:
    source1: Active series used to determine bullish/bearish states.
    offset1: (Optional) Offset of First series. By default 0.
    source2: (Optional) Second series. By default 'close' price.
    offset2: (Optional) Offset of Second series. By default 0.
  Returns:

histProfile(source) Histogram profiling
  Parameters:
    source: Histogram series
  Returns:

srcSelect(showSrc1, src1, showSrc2, src2) Selects the appropiate source. If multiple sources are activated simultaneously, the order within the switch clause prevails. The first one activated is the one being output.
  Parameters:
    showSrc1: Boolean controlling the activation of Source #1.
    src1: Source #1.
    showSrc2: Boolean controlling the activation of Sources #2-10. By default 'false'.
    src2: Sources #2-10. By default 'number'.
  Returns: Selected source.
Informacje o Wersji:
v2

Updated:
histProfile(hist, ref) Histogram profiling
  Parameters:
    hist: Histogram series
    ref: Reference value. By default '0'
  Returns:
Informacje o Wersji:
v3

Added:
floatSelect(showSrc1, src1, showSrc2, src2) Selects the appropiate float variable based on a boolean condition. If multiple sources are activated simultaneously, the order within the switch clause prevails. The first one activated is the one being output.
  Parameters:
    showSrc1: Boolean controlling the activation of Source #1.
    src1: Source #1.
    showSrc2: Boolean controlling the activation of Sources #2-10. By default 'false'.
    src2: Sources #2-10. By default 'number'.
  Returns: Selected source.

intSelect(showSrc1, src1, showSrc2, src2) Selects the appropiate integer variable based on a boolean condition. If multiple sources are activated simultaneously, the order within the switch clause prevails. The first one activated is the one being output.
  Parameters:
    showSrc1: Boolean controlling the activation of Source #1.
    src1: Source #1.
    showSrc2: Boolean controlling the activation of Sources #2-10. By default 'false'.
    src2: Sources #2-10. By default 'number'.
  Returns: Selected source.

boolSelect(showSrc1, src1, showSrc2, src2) Selects the appropiate bool variable based on a boolean condition. If multiple sources are activated simultaneously, the order within the switch clause prevails. The first one activated is the one being output.
  Parameters:
    showSrc1: Boolean controlling the activation of Source #1.
    src1: Source #1.
    showSrc2: Boolean controlling the activation of Sources #2-10. By default 'false'.
    src2: Sources #2-10. By default 'false'.
  Returns: Selected source.

Removed:
srcSelect(showSrc1, src1, showSrc2, src2) Selects the appropiate source based on a boolean variable. If multiple sources are activated simultaneously, the order within the switch clause prevails. The first one activated is the one being output.

I develop indicators meant to be useful, profitable and good looking.

Please send me a Private Message if you intend to subscribe to an Invite-Only indicator or to hire me to develop some custom work.
Biblioteka Pine

Działając zgodnie z prawdziwym duchem TradingView, autor opublikował ten kod Pine jako bibliotekę o otwartym kodzie źródłowym, aby inni programiści Pine z naszej społeczności mogli go ponownie wykorzystać. Brawa dla niego! Możesz korzystać z tej biblioteki prywatnie lub w innych publikacjach typu open source, ale ponowne wykorzystanie tego kodu w publikacji podlega Regulaminowi.

Wyłączenie odpowiedzialności

Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.

Chcesz skorzystać z tej biblioteki?

Skopiuj poniższy wiersz i wklej go w swoim skrypcie.