math

math.e #

ネイピア数の名前付き定数です。これは、2.7182818284590452 に相当します。

関連 #

math.phi, math.pi, math.rphi

math.phi #

黄金比の名前付き定数です。1.6180339887498948 に相当します。

関連 #

math.e, math.pi, math.rphi

math.pi #

円周率の名前付き定数です。これは、3.1415926535897932 に相当します。

関連 #

math.e, math.phi, math.rphi

math.rphi #

黄金比の逆数の名前付き定数です。0.6180339887498948 に相当します。

関連 #

math.e, math.pi, math.phi

math.abs #

Absolute value of number is number if number >= 0, or -number otherwise.

math.abs(number)  simple int
math.abs(number)  input int
math.abs(number)  const int
math.abs(number)  series int
math.abs(number)  simple float
math.abs(number)  input float
math.abs(number)  const float
math.abs(number)  series float
戻り値 #

The absolute value of number.

math.acos #

acos関数は、範囲[-1、1]のyに対してcos(acos(y))= yとなるarc cosineンの数値(ラジアンに基づく)を返します。

math.acos(angle)  simple float
math.acos(angle)  input float
math.acos(angle)  const float
math.acos(angle)  series float
戻り値 #

arc cosineの値;yが範囲[-1、1]の外にある場合、返される角度は[0、Pi]の範囲、または{@ var na}になります。

math.asin #

asin関数は、範囲[-1,1]内のyに対してsin(asin(y))= yとなるような数のarcsine(ラジアンに基づく)を返します。

math.asin(angle)  simple float
math.asin(angle)  input float
math.asin(angle)  const float
math.asin(angle)  series float
戻り値 #

arcsineの値; yが範囲[-1,1]の外にある場合、返される角度は[-Pi / 2、Pi / 2]、またはnaの範囲になります。

math.atan #

atan関数は任意のyに対してtan(atan(y))= yとなる数のarctangent(ラジアンに基づく)を返します。

math.atan(angle)  simple float
math.atan(angle)  input float
math.atan(angle)  const float
math.atan(angle)  series float
戻り値 #

arc tangentの値; 返される角度は[-Pi / 2、Pi / 2]の範囲です。

math.avg #

全てのシリーズ(各要素毎)の平均を計算します。

math.avg(number0, number1, ...)  simple float
math.avg(number0, number1, ...)  series float
戻り値 #

平均。

関連 #

math.sum, ta.cum, ta.sma

math.ceil #

ceil関数は引数に等しいかそれ以上の最小の(負に最も近い)整数を返します。

math.ceil(number)  simple int
math.ceil(number)  input int
math.ceil(number)  const int
math.ceil(number)  series int
戻り値 #

指定された数値以上の最小の整数。

関連 #

math.floor, math.round

math.cos #

cos関数は角度のコサインを返します。

math.cos(angle)  simple float
math.cos(angle)  input float
math.cos(angle)  const float
math.cos(angle)  series float
戻り値 #

角度の三角関数コサイン。

引数 #
angle (series int/float)角度、ラジアン

math.exp #

The exp function of number is e raised to the power of number, where e is Euler’s number.

math.exp(number)  simple float
math.exp(number)  input float
math.exp(number)  const float
math.exp(number)  series float
戻り値 #

A value representing e raised to the power of number.

関連 #

math.pow

math.floor #

指定された数値以下の最大の整数。

math.floor(number)  simple int
math.floor(number)  input int
math.floor(number)  const int
math.floor(number)  series int
戻り値 #

指定された数値以下の最大の整数。

関連 #

math.ceil, math.round

math.log #

Natural logarithm of any number > 0 is the unique y such that e^y = number.

math.log(number)  simple float
math.log(number)  input float
math.log(number)  const float
math.log(number)  series float
戻り値 #

The natural logarithm of number.

関連 #

math.log10

math.log10 #

The common (or base 10) logarithm of number is the power to which 10 must be raised to obtain the number. 10^y = number.

math.log10(number)  simple float
math.log10(number)  input float
math.log10(number)  const float
math.log10(number)  series float
戻り値 #

The base 10 logarithm of number.

関連 #

math.log

math.max #

複数の値のうち一番大きいものを返します

math.max(number0, number1, ...)  simple int
math.max(number0, number1, ...)  simple float
math.max(number0, number1, ...)  input int
math.max(number0, number1, ...)  input float
math.max(number0, number1, ...)  series int
math.max(number0, number1, ...)  series float
戻り値 #

指定された複数の値で一番大きいもの

#
math.max(close, open)
math.max(close, math.max(open, 42))
関連 #

math.min

math.min #

複数の値のうち一番小さいものを返します

math.min(number0, number1, ...)  simple int
math.min(number0, number1, ...)  simple float
math.min(number0, number1, ...)  input int
math.min(number0, number1, ...)  input float
math.min(number0, number1, ...)  series int
math.min(number0, number1, ...)  series float
戻り値 #

指定された複数の値で一番小さいもの

#
math.min(close, open)
math.min(close, math.min(open, 42))
関連 #

math.max

math.pow #

数学的な力関係。

math.pow(base, exponent)  simple float
math.pow(base, exponent)  input float
math.pow(base, exponent)  const float
math.pow(base, exponent)  series float
戻り値 #

base raised to the power of exponent. If base is a series, it is calculated elementwise.

引数 #
base (series int/float)使用するベースを指定する。
exponent (series int/float)指数を指定する。
#
math.pow(close, 2)
関連 #

math.sqrt, math.exp

math.random #

疑似乱数値を返します。この関数は、スクリプトを実行するたびに、異なる値のシーケンスを生成します。オプションの seed 引数に同じ値を使用すると、繰り返しのシーケンスが生成されます。

math.random(min, max, seed)  series float
戻り値 #

正のランダムな値。

引数 #
min (series int/float)ランダムな値の範囲の下限値です。この値は範囲に含まれません。デフォルトは 0 です。
max (series int/float)ランダムな値の範囲の上限値です。この値は範囲に含まれません。デフォルトは 1 です。
seed (input int)オプション引数。同じ seed を使用した場合、この関数を連続して呼び出すことで繰り返しの値のセットを生成することができます。

math.round #

Returns the value of number rounded to the nearest integer, with ties rounding up. If the precision parameter is used, returns a float value rounded to that amount of decimal places.

math.round(number)  simple int
math.round(number)  input int
math.round(number)  const int
math.round(number)  series int
math.round(number, precision)  simple float
math.round(number, precision)  input float
math.round(number, precision)  const float
math.round(number, precision)  series float
戻り値 #

The value of number rounded to the nearest integer, or according to precision.

引数 #
number (series int/float)丸められる値。
precision (series int)Optional argument. Decimal places to which number will be rounded. When no argument is supplied, rounding is to the nearest integer.
関連 #

math.ceil, math.floor

math.round_to_mintick #

シンボルの mintick に丸められた値、つまり syminfo.mintick で割り切れる最も近い値を、余りを取り除いて四捨五入して返します。

math.round_to_mintick(number)  simple float
math.round_to_mintick(number)  series float
戻り値 #

The number rounded to tick precision.

引数 #
number (series int/float)丸められる値。
関連 #

math.ceil, math.floor

math.sign #

Sign (signum) of number is zero if number is zero, 1.0 if number is greater than zero, -1.0 if number is less than zero.

math.sign(number)  simple float
math.sign(number)  input float
math.sign(number)  const float
math.sign(number)  series float
戻り値 #

引数のサイン。

math.sin #

sin関数は、角度の三角関数sineを返します。

math.sin(angle)  simple float
math.sin(angle)  input float
math.sin(angle)  const float
math.sin(angle)  series float
戻り値 #

角度の三角関数サイン。

引数 #
angle (series int/float)角度、ラジアン

math.sqrt #

Square root of any number >= 0 is the unique y >= 0 such that y^2 = number.

math.sqrt(number)  simple float
math.sqrt(number)  input float
math.sqrt(number)  const float
math.sqrt(number)  series float
戻り値 #

The square root of number.

関連 #

math.pow

math.sum #

sum関数は、xの最後のy値のスライド合計を返します。

math.sum(source, length)  series float
戻り値 #

Sum of source for length bars back.

引数 #
source (series int/float)処理する値の系列。
length (series int)バーの数 (期間)。
関連 #

ta.cum, for

math.tan #

tan関数は、ある角度の三角関数のタンジェントを返します。

math.tan(angle)  simple float
math.tan(angle)  input float
math.tan(angle)  const float
math.tan(angle)  series float
戻り値 #

角度の三角関数タンジェント。

引数 #
angle (series int/float)角度、ラジアン

math.todegrees #

ラジアンで測定された角度から、ほぼ同等の角度を度で返します。

math.todegrees(radians)  series float
戻り値 #

The angle value in degrees.

引数 #
radians (series int/float)ラジアンの角度。

math.toradians #

度で測定された角度から、ほぼ同等の角度をラジアンで返します。

math.toradians(degrees)  series float
戻り値 #

ラジアン単位の角度の値。

引数 #
degrees (series int/float)度単位の角度。

© - 2021 - TradingViewの教科書