時間

dayofmonth #

タイムゾーンの切り替えにおける現在の足の時間の日付。

備考 #

この変数はバーの開始時刻に基づく日を返す事にご注意下さい。オーバーナイトセッションでは(例.月曜のセッションが日曜日の17:00 UTC-4に始まるEURUSD)、この値は取引日よりも1つ少なくなる可能性があります。

関連 #

dayofmonth, time, year, month, weekofyear, dayofweek, hour, minute, second

dayofweek #

タイムゾーンの切り替えにおける現在の足の時間の曜日。

備考 #

この変数はバーの開始時刻に基づく日を返す事にご注意下さい。オーバーナイトセッションでは(例.月曜のセッションが日曜日の17:00 UTC-4に始まるEURUSD)、この値は取引日よりも1つ少なくなる可能性があります。
dayofweek.sunday, dayofweek.monday, dayofweek.tuesday, dayofweek.wednesday, dayofweek.thursday, dayofweek.friday, dayofweek.saturday変数を比較に利用できます。

関連 #

dayofweek, time, year, month, weekofyear, dayofmonth, hour, minute, second

hour #

タイムゾーンが変わる際の現在のバーの時間。

関連 #

hour, time, year, month, weekofyear, dayofmonth, dayofweek, minute, second

minute #

タイムゾーンが変わる際の現在のバーの分。

関連 #

minute, time, year, month, weekofyear, dayofmonth, dayofweek, hour, second

month #

タイムゾーンの切り替えにおける現在の足の月。

備考 #

この変数はバーの開始時刻に基づく月を返す事にご注意下さい。オーバーナイトセッションでは(例.月曜のセッションが日曜日の17:00 UTC-4に始まるEURUSD)、この値は取引日の月よりも1つ少なくなる可能性があります。

関連 #

month, time, year, weekofyear, dayofmonth, dayofweek, hour, minute, second

second #

タイムゾーンの切り替えにおける現在の足の2番目。

関連 #

second, time, year, month, weekofyear, dayofmonth, dayofweek, hour, minute

time #

UNIX形式の現在の足の時間。1970年1月1日00:00:00 UTC以来経過したミリ秒数です。

備考 #

この変数はバーの開始時刻に基づくタイムスタンプを返す事にご注意下さい。その為、オーバーナイトセッションでは(例.月曜のセッションが日曜日の17:00 UTC-4に始まるEURUSD)、この変数は指定した取引日の日付より前の時間を返す場合があります。例えばEURUSDでは、当日のバーが実際には1日前に開くため、dayofmonth(time) は取引日の日付よりも1つ少なくなる可能性があります。

関連 #

time, time_close, timenow, year, month, weekofyear, dayofmonth, dayofweek, hour, minute, second

time_close #

UNIX形式の現在のバーのクローズ時間。1970年1月1日00:00:00 (UTC) からのミリ秒での経過時間です。価格ベースのチャートではこの変数の値は na です。

関連 #

time, timenow, year, month, weekofyear, dayofmonth, dayofweek, hour, minute, second

time_tradingday #

現在のバーが属する取引日の開始時刻。UNIX形式(1970年1月1日00時00分00秒(UTC) からの経過ミリ秒数)です。

備考 #

この変数は、現在日のセッションが前の暦日に始まる可能性があるオーバーナイトセッションに便利です(例.EURUSDは月曜日のセッションが日曜日の17:00に始まります)。月曜日の日足のバーで日曜日の17:00のタイムスタンプを返す time とは異なり time_tradingday は月曜日の00:00のタイムスタンプを返します。
1D以上のタイムフレームで使用した場合、time_tradingday は、バー内の最後の取引日を返します(例: 1Wの場合、週の最終取引日を返します)。

関連 #

time, time_close

timenow #

現在のUNIX形式の時刻。 1970年1月1日00:00:00 UTC以来経過したミリ秒数です。

備考 #

この変数/関数を使用すると、インジケーターのリペイントが発生する可能性がある事にご注意下さい。

関連 #

timestamp, time, time_close, year, month, weekofyear, dayofmonth, dayofweek, hour, minute, second

weekofyear #

時間帯の変化における現在のバー時間の週番号。

備考 #

この変数はバーの開始時刻に基づく週を返す事にご注意下さい。オーバーナイトセッションでは(例.月曜のセッションが日曜日の17:00 UTC-4に始まるEURUSD)、この値は取引日の週よりも1つ少なくなる可能性があります。

関連 #

weekofyear, time, year, month, dayofmonth, dayofweek, hour, minute, second

year #

タイムゾーンの切り替えにおける現在の足の年。

備考 #

この変数はバーの開始時刻に基づく年を返す事にご注意下さい。オーバーナイトセッションでは(例.月曜のセッションが日曜日の17:00 UTC-4に始まるEURUSD)、この値は取引日の年よりも1つ少なくなる可能性があります。

関連 #

year, time, month, weekofyear, dayofmonth, dayofweek, hour, minute, second

dayofmonth #

指定されたUNIX時間の月の日(変換時間帯)。

dayofmonth(time)  series int
dayofmonth(time, timezone)  series int
戻り値 #

指定されたUNIX時間の月の日(変換時間帯)。

引数 #
time (series int)ミリ秒におけるUNIX時間。
timezone (series string)オプションパラメーター。タイムゾーンです。
備考 #

UNIXタイムは、1970年1月1日00:00:00 UTCから経過したミリ秒数です。デフォルトでは、タイムゾーンは syminfo.timezone です。可能な値は、timestamp で確認できます。
この関数はバーの開始時刻に基づく日を返す事にご注意下さい。オーバーナイトセッションでは(例.月曜のセッションが日曜日の17:00 UTC-4に始まるEURUSD)、この値は取引日よりも1つ少なくなる可能性があります。

関連 #

dayofmonth, time, year, month, dayofweek, hour, minute, second

dayofweek #

指定されたUNIX時間の曜日(変換時間帯)。

dayofweek(time)  series int
dayofweek(time, timezone)  series int
戻り値 #

指定されたUNIX時間の曜日(変換時間帯)。

引数 #
time (series int)ミリ秒におけるUNIX時間。
timezone (series string)オプションパラメーター。タイムゾーンです。
備考 #

この関数はバーの開始時間に基づく日を返す事にご注意下さい。オーバーナイトセッションでは(例.月曜のセッションが日曜日の17:00に始まるEURUSD)、この値は取引日よりも1つ少なくなる可能性があります。
UNIXタイムは、1970年1月1日00:00:00 UTCから経過したミリ秒数です。デフォルトでは、タイムゾーンは syminfo.timezone です。可能な値は、timestamp で確認できます。

関連 #

dayofweek, time, year, month, dayofmonth, hour, minute, second

hour #

指定されたUNIX時間の時間(タイムゾーンの交換時)。

hour(time)  series int
hour(time, timezone)  series int
戻り値 #

指定されたUNIX時間の時間(タイムゾーンの交換時)。

引数 #
time (series int)ミリ秒におけるUNIX時間。
timezone (series string)オプションパラメーター。タイムゾーンです。
備考 #

UNIXタイムは、1970年1月1日00:00:00 UTCから経過したミリ秒数です。デフォルトでは、タイムゾーンは syminfo.timezone です。可能な値は、timestamp で確認できます。

関連 #

hour, time, year, month, dayofmonth, dayofweek, minute, second

minute #

指定されたUNIX時間の分(タイムゾーンの変更時)。

minute(time)  series int
minute(time, timezone)  series int
戻り値 #

指定されたUNIX時間の分(タイムゾーンの変更時)。

引数 #
time (series int)ミリ秒におけるUNIX時間。
timezone (series string)オプションパラメーター。タイムゾーンです。
備考 #

UNIXタイムは、1970年1月1日00:00:00 UTCから経過したミリ秒数です。デフォルトでは、タイムゾーンは syminfo.timezone です。可能な値は、timestamp で確認できます。

関連 #

minute, time, year, month, dayofmonth, dayofweek, hour, second

month #

指定されたUNIX時間の月(タイムゾーンの変換時)。

month(time)  series int
month(time, timezone)  series int
戻り値 #

指定されたUNIX時間の月(タイムゾーンの変換時)。

引数 #
time (series int)ミリ秒におけるUNIX時間。
timezone (series string)オプションパラメーター。タイムゾーンです。
備考 #

UNIXタイムは、1970年1月1日00:00:00 UTCから経過したミリ秒数です。デフォルトでは、タイムゾーンは syminfo.timezone です。可能な値は、timestamp で確認できます。
この関数はバーの開始時刻に基づく月を返す事にご注意下さい。オーバーナイトセッションでは(例.月曜のセッションが日曜日の17:00 UTC-4に始まるEURUSD)、この値は取引日の月よりも1つ少なくなる可能性があります。

関連 #

month, time, year, dayofmonth, dayofweek, hour, minute, second

second #

提供されたUNIX時間の2番目(タイムゾーン変換時)。

second(time)  series int
second(time, timezone)  series int
戻り値 #

提供されたUNIX時間の2番目(タイムゾーン変換時)。

引数 #
time (series int)ミリ秒におけるUNIX時間。
timezone (series string)オプションパラメーター。タイムゾーンです。
備考 #

UNIXタイムは、1970年1月1日00:00:00 UTCから経過したミリ秒数です。デフォルトでは、タイムゾーンは syminfo.timezone です。可能な値は、timestamp で確認できます。

関連 #

second, time, year, month, dayofmonth, dayofweek, hour, minute

time #

The time function returns the UNIX time of the current bar for the specified timeframe and session or NaN if the time point is out of session.

time(timeframe, session, timezone)  series int
time(timeframe, session)  series int
time(timeframe)  series int
戻り値 #

UNIX時間。

引数 #
timeframe (simple string)Timeframe. An empty string is interpreted as the current timeframe of the chart.
session (simple string)セッションの指定。オプションの引数で、デフォルトではシンボルのセッションが使用されます。空の文字列はシンボルのセッションとして解釈されます。
timezone (simple string)session引数のタイムゾーン。sessionを指定した場合にのみ使用できます。オプション引数で、デフォルトは syminfo.timezone です。GMT表記 (例. “GMT-5”) またはIANAのタイムゾーンデータベース名 (例. “America/New_York”) で指定可能です。
#
//@version=5
indicator("Time", overlay=true)
// Try this on chart AAPL,1
timeinrange(res, sess) => not na(time(res, sess, "America/New_York")) ? 1 : 0
plot(timeinrange("1", "1300-1400"), color=color.red)

// This plots 1.0 at every start of 10 minute bar on a 1 minute chart:
newbar(res) => ta.change(time(res)) == 0 ? 0 : 1
plot(newbar("10"))
//@version=5
indicator("Time", overlay=true)
t1 = time(timeframe.period, "0000-0000:23456")
bgcolor(t1 ? color.new(color.blue, 90) : na)
//@version=5
indicator("Time", overlay=true)
t1 = time(timeframe.period, "1000-1100,1400-1500:23456")
bgcolor(t1 ? color.new(color.blue, 90) : na)
備考 #

UNIX時間は1970年1月1日00:00:00 (UTC) から経過したミリ秒数です。

関連 #

time

time_close #

time_close関数は、指定した時間足とセッションの現在のバーの終値のUNIX時間(またはセッション外の場合は NaN)を返します。

time_close(timeframe, session, timezone)  series int
time_close(timeframe, session)  series int
time_close(timeframe)  series int
戻り値 #

UNIX時間。

引数 #
timeframe (simple string)時間足。空の文字列はチャートの現在の時間足として解釈されます。
session (simple string)セッションの指定。オプションの引数で、デフォルトではシンボルのセッションが使用されます。空の文字列はシンボルのセッションとして解釈されます。
timezone (simple string)session引数のタイムゾーン。sessionを指定した場合にのみ使用できます。オプション引数で、デフォルトは syminfo.timezone です。GMT表記 (例. “GMT-5”) またはIANAのタイムゾーンデータベース名 (例. “America/New_York”) で指定可能です。
#
//@version=5
indicator("Time", overlay=true)
t1 = time_close(timeframe.period, "1200-1300", "America/New_York")
bgcolor(t1 ? color.new(color.blue, 90) : na)
備考 #

UNIX時間は1970年1月1日00:00:00 (UTC) から経過したミリ秒数です。

関連 #

time_close

timestamp #

関数timestampは指定された日時のUNIX時刻を返します。

timestamp(dateString)  const int
timestamp(year, month, day, hour, minute, second)  simple int
timestamp(timezone, year, month, day, hour, minute, second)  simple int
timestamp(year, month, day, hour, minute, second)  series int
timestamp(timezone, year, month, day, hour, minute, second)  series int
戻り値 #

UNIX時間。

引数 #
timezone (series string)タイムゾーン。オプション引数で、デフォルトは syminfo.timezone です。GMT表記 (例. “GMT-5”) またはIANAのタイムゾーンデータベース名 (例. “America/New_York”) で指定可能です。
year (series int)
month (series int)
day (series int)
hour (series int)(オプション引数) 時間。デフォルトは 0 です。
minute (series int)(オプション引数) 分。デフォルトは 0 です。
second (series int)秒(オプション引数)。デフォルトは0です。
dateString (const string)日付と、オプションで時刻とタイムゾーンを含む文字列。フォーマットは、IETF RFC 2822、またはISO 8601標準 (“DD MMM YYYY hh:mm:ss ±hhmm” または “YYYY-MM-DDThh:mm:ss±hh:mm”。例.“20 Feb 2020” または “2020-02-20”) に準拠している必要があります。時刻が指定されない場合は “00:00” が使用され、タイムゾーンが指定されない場合は GMT+0 が使用されます。これは、取引所のタイムゾーンで時刻を返す通常の関数の動作とは異なることにご注意ください。
#
//@version=5
indicator("My Script")
plot(timestamp(2016, 01, 19, 09, 30), linewidth=3, color=color.green)
plot(timestamp(syminfo.timezone, 2016, 01, 19, 09, 30), color=color.blue)
plot(timestamp(2016, 01, 19, 09, 30), color=color.yellow)
plot(timestamp("GMT+6", 2016, 01, 19, 09, 30))
plot(timestamp(2019, 06, 19, 09, 30, 15), color=color.lime)
plot(timestamp("GMT+3", 2019, 06, 19, 09, 30, 15), color=color.fuchsia)
plot(timestamp("Feb 01 2020 22:10:05"))
plot(timestamp("2011-10-10T14:48:00"))
plot(timestamp("04 Dec 1995 00:12:00 GMT+5"))
備考 #

UNIX時間は1970年1月1日00:00:00 (UTC) から経過したミリ秒数です。

関連 #

time, time, timenow, syminfo.timezone

weekofyear #

提供されたUNIX時間の週(タイムゾーン変換内)。

weekofyear(time)  series int
weekofyear(time, timezone)  series int
戻り値 #

提供されたUNIX時間の週(タイムゾーン変換内)。

引数 #
time (series int)ミリ秒におけるUNIX時間。
timezone (series string)オプションパラメーター。タイムゾーンです。
備考 #

UNIXタイムは、1970年1月1日00:00:00 UTCから経過したミリ秒数です。デフォルトでは、タイムゾーンは syminfo.timezone です。可能な値は、timestamp で確認できます。
この関数はバーの開始時刻に基づく週を返す事にご注意下さい。オーバーナイトセッションでは(例.月曜のセッションが日曜日の17:00 UTC-4に始まるEURUSD)、この値は取引日の週よりも1つ少なくなる可能性があります。

関連 #

weekofyear, time, year, month, dayofmonth, dayofweek, hour, minute, second

year #

提供されたUNIX時間の年(タイムゾーン変換内)。

year(time)  series int
year(time, timezone)  series int
戻り値 #

提供されたUNIX時間の年(タイムゾーン変換内)。

引数 #
time (series int)ミリ秒におけるUNIX時間。
timezone (series string)オプションパラメーター。タイムゾーンです。
備考 #

UNIXタイムは、1970年1月1日00:00:00 UTCから経過したミリ秒数です。デフォルトでは、タイムゾーンは syminfo.timezone です。可能な値は、timestamp で確認できます。
この関数はバーの開始時刻に基づく年を返す事にご注意下さい。オーバーナイトセッションでは(例.月曜のセッションが日曜日の17:00 UTC-4に始まるEURUSD)、この値は取引日の年よりも1つ少なくなる可能性があります。

関連 #

year, time, month, dayofmonth, dayofweek, hour, minute, second

© - 2021 - TradingViewの教科書