reees

Algebra

reees Zaktualizowano   
Library "Algebra"

Algebra functions.

line_fromXy(x1, y1, x2, y2)
  Get line slope and y-intercept from coordinates
  Parameters:
    x1: x coordinate 1 (int - bar index)
    y1: y coordinate 1 (float - price/value)
    x2: x coordinate 2 (int - bar index)
    y2: y coordinate 2 (float - price/value)
  Returns: of line

line_getPrice(x, slope, yInt)
  Get line slope and y-intercept from coordinates
  Parameters:
    x: x coordinate to solve for y (int - bar index)
    slope: slope of line (float)
    yInt: y-intercept of line (float)
  Returns: y (price/value)
Informacje o Wersji:
v2

New functions:
line_getRightTriSides() - Get length of sides of a right triangle formed by a given line
line_length() - Get length of line, given a line object or two sets of coordinates

Added:
line_getRTriSides(x1, y1, x2, y2, l)
  Get length of sides of a right triangle formed by a given line
  Parameters:
    x1: x coordinate 1 (int - optional, required if argument l is not specified)
    y1: y coordinate 1 (float - optional, required if argument l is not specified)
    x2: x coordinate 2 (int - optional, required if argument l is not specified)
    y2: y coordinate 2 (float - optional, required if argument l is not specified)
    l: line object (line - optional, required if x1, y1, x2, y2 agruments are not specified)
  Returns:

line_length(x1, y1, x2, y2, l)
  Get length of line, given a line object or two sets of coordinates
  Parameters:
    x1: x coordinate 1 (int - optional, required if argument l is not specified)
    y1: y coordinate 1 (float - optional, required if argument l is not specified)
    x2: x coordinate 2 (int - optional, required if argument l is not specified)
    y2: y coordinate 2 (float - optional, required if argument l is not specified)
    l: line object (line - optional, required if x1, y1, x2, y2 agruments are not specified)
  Returns: length of line (float)
Informacje o Wersji:
v3
Renamed line_getRTriSides() to line_getRtSides()

Added:
line_getRtSides(x1, y1, x2, y2, l)
  Get length of sides of a right triangle formed by a given line
  Parameters:
    x1: x coordinate 1 (int - optional, required if argument l is not specified)
    y1: y coordinate 1 (float - optional, required if argument l is not specified)
    x2: x coordinate 2 (int - optional, required if argument l is not specified)
    y2: y coordinate 2 (float - optional, required if argument l is not specified)
    l: line object (line - optional, required if x1, y1, x2, y2 agruments are not specified)
  Returns:

Removed:
line_getRTriSides(x1, y1, x2, y2, l)
  Get length of sides of a right triangle formed by a given line
Informacje o Wersji:
v4

Added:
line_getPrice_fromXy(x, x1, y1, x2, y2)
  Get price at X coordinate, given two points on a line
  Parameters:
    x: x coordinate to solve for y (int - bar index)
    x1: x coordinate 1 (int - bar index)
    y1: y coordinate 1 (float - price/value)
    x2: x coordinate 2 (int - bar index)
    y2: y coordinate 2 (float - price/value)
  Returns: y (price/value)

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.