プロット

plot #

チャート上に一連のデータを描写します。

plot(series, title, color, linewidth, style, trackprice, histbase, offset, join, editable, show_last, display)  plot
戻り値 #

fillで使用できる描写オブジェクト

引数 #
series (series int/float)描写されるデータ形式。 必須の引数。
title (const string)plotのタイトル。
color (series color)plotの色。‘color=color.red’ や ‘color=#ff001a’ といった定数や ‘color = close >= open ? color.green : color.red’ の様な複雑な式を利用できます。オプション引数。
linewidth (input int)プロットされた線の幅。デフォルト値は1です。すべてのスタイルに適用できるわけではありません。
style (plot_style)プロットの種類。利用可能な値は plot.style_line, plot.style_stepline, plot.style_stepline_diamond, plot.style_histogram, plot.style_cross, plot.style_area, plot.style_columns, plot.style_circles です。デフォルト値は plot.style_line です。
trackprice (input bool)If true then a horizontal price line will be shown at the level of the last indicator value. Default is false.
histbase (input int/float)plot.style_histogram, plot.style_columns または plot.style_area スタイルでプロットをレンダリングする時に、参照レベルとして使用される価格の値。デフォルトは 0.0 です。
offset (series int)与えられた数のバーで描写を左または右に移動します。 デフォルトは0です。
join (input bool)trueの場合、描画ポイントが線で結合されます。スタイル plot.style_cross と plot.style_circles にのみ適用可能です。デフォルトはfalseです。
editable (const bool)trueの場合、描写されたスタイルはフォーマットダイアログで編集可能です。 デフォルトはtrueです。
show_last (input int)設定されている場合は、チャートにプロットする (最後のバーから過去の時点までの) バーの数を定義します。
display (plot_display)plotの表示位置を制御します。可能な値は display.none, display.all です。デフォルトは display.all です。
#
plot(high+low, title='Title', color=color.new(#00ffaa, 70), linewidth=2, style=plot.style_area, offset=15, trackprice=true)

// You may fill the background between any two plots with a fill() function:
p1 = plot(open)
p2 = plot(close)
fill(p1, p2, color=color.new(color.green, 90))
関連 #

plotshape, plotchar, plotarrow, barcolor, bgcolor, fill

plotarrow #

チャート上に上下の矢印を描写します。 上向きの矢印はすべてのインジケータの正の値で描画され、下向きの矢印はすべての負の値で描画されます。インジケータが{@ var na}を返した場合、矢印は描画されません。 矢印は異なる高さを有しており、インジケーターの絶対値がより長くなれば、より長い矢印が描かれる。

plotarrow(series, title, colorup, colordown, offset, minheight, maxheight, editable, show_last, display)  void
引数 #
series (series int/float)矢印として描写されるデータ形式。 必須の引数。
title (const string)plotのタイトル。
colorup (series color)上矢印の色。オプション引数です。
colordown (series color)下矢印の色。オプション引数です。
offset (series int)与えられた数のバー上で、矢印を左または右に移動します。 デフォルトは0です。
minheight (input int)表示可能な最小の矢印の高さ(ピクセル単位)。 デフォルトは5です。
maxheight (input int)最大限可能な矢印のピクセルにおける高さ。 デフォルトは100です。
editable (const bool)trueの場合、描写された矢印ーの種類はフォーマットダイアログで編集可能です。 デフォルトはtrueです。
show_last (input int)設定されている場合は、チャートにプロットする (最後のバーから過去の時点までの) 矢印の数を定義します。
display (plot_display)plotの表示位置を制御します。可能な値は display.none, display.all です。デフォルトは display.all です。
#
indicator("plotarrow example", overlay=true)
codiff = close - open
plotarrow(codiff, colorup=color.new(color.teal,40), colordown=color.new(color.orange, 40))
備考 #

Use plotarrow function in conjunction with ‘overlay=true’ indicator parameter!

関連 #

plot, plotshape, plotchar, barcolor, bgcolor

plotbar #

チャート上にohlcバーを描写します。

plotbar(open, high, low, close, title, color, editable, show_last, display)  void
引数 #
open (series int/float)バーの始値として使用される始値データの系列。必須引数。
high (series int/float)バーの高値として使用される高値データの系列。必須引数。
low (series int/float)バーの安値として使用される安値データの系列。必須引数。
close (series int/float)バーの終値として使用される終値のデータ系列。必須引数。
title (const string)plotbarのタイトル。オプション引数です。
color (series color)OHLCバーの色。‘color=color.red’ や ‘color=#ff001a’ といった定数や ‘color = close >= open ? color.green : color.red’ の様な複雑な式を利用できます。オプション引数。
editable (const bool)trueの場合、描写されたバーの種類はフォーマットダイアログで編集可能です。 デフォルトはtrueです。
show_last (input int)設定されている場合は、チャートにプロットする (最後のバーから過去の時点までの) バーの数を定義します。
display (plot_display)plotの表示位置を制御します。可能な値は display.none, display.all です。デフォルトは display.all です。
#
plotbar(open, high, low, close, title='Title', color = open < close ? color.green : color.red)
備考 #

始値、高値、安値、終値のいずれかの値が NaN である場合には、バーは描画されません。
始値、高値、安値、終値の最大値は ‘high’ に設定され、最小値は ‘low’ に設定されます。

関連 #

plotcandle

plotcandle #

チャート上にローソク足を描写します。

plotcandle(open, high, low, close, title, color, wickcolor, editable, show_last, bordercolor, display)  void
引数 #
open (series int/float)ローソク足の始値として使用される始値データの系列。必須引数。
high (series int/float)ローソク足の高値として使用される高値データの系列。必須引数。
low (series int/float)ローソク足の安値として使用される安値データの系列。必須引数。
close (series int/float)ローソク足の終値として使用される終値データの系列。必須引数。
title (const string)plotcandlesのタイトル。オプション引数です。
color (series color)ローソク足の色。‘color=color.red’ や ‘color=#ff001a’ といった定数や ‘color = close >= open ? color.green : color.red’ の様な複雑な式を利用できます。オプション引数。
wickcolor (series color)ローソク足のヒゲの色。オプション引数です。
editable (const bool)trueの場合、描写されたローソク足の種類はフォーマットダイアログで編集可能です。 デフォルトはtrueです。
show_last (input int)設定されている場合は、チャートにプロットする (最後のバーから過去の時点までの) ローソク足の数を定義します。
bordercolor (series color)ローソク足の枠の色。オプション引数です。
display (plot_display)plotの表示位置を制御します。可能な値は display.none, display.all です。デフォルトは display.all です。
#
plotcandle(open, high, low, close, title='Title', color = open < close ? color.green : color.red, wickcolor=color.black)
備考 #

始値、高値、安値、終値のいずれかの値が NaN である場合には、バーは描画されません。
始値、高値、安値、終値の最大値は ‘high’ に設定され、最小値は ‘low’ に設定されます。

関連 #

plotbar

plotchar #

チャート上に任意の1つのUnicode文字を使用して図形を描画します。

plotchar(series, title, char, location, color, offset, text, textcolor, editable, size, show_last, display)  void
引数 #
series (series bool)形状として描写されるデータ形式。 形式は、location.absoluteを除くすべての場所の値に対してブーリアン値の形式として扱われます。 必須の引数。
title (const string)plotのタイトル。
char (input string)ビジュアルシェイプとして使用する文字。
location (input string)チャート上の図形の位置。可能な値は location.abovebar, location.belowbar, location.top, location.bottom, location.absolute です。デフォルト値は location.abovebar です。
color (series color)shapeの色。‘color=color.red’ や ‘color=#ff001a’ といった定数や ‘color = close >= open ? color.green : color.red’ の様な複雑な式を利用できます。オプション引数。
offset (series int)指定された数のバーで形状を左または右に移動します。 デフォルトは0です。
text (const string)Text to display with the shape. You can use multiline text, to separate lines use ‘\n’ escape sequence. Example: ‘line one\nline two’.
textcolor (series color)テキストの色。‘color=color.red’ や ‘color=#ff001a’ といった定数や ‘color = close >= open ? color.green : color.red’ の様な複雑な式を利用できます。オプション引数。
editable (const bool)trueの場合、描写されたチャートの種類はフォーマットダイアログで編集可能です。 デフォルトはtrueです。
show_last (input int)設定されている場合は、チャートにプロットする (最後のバーから過去の時点までの) 文字数を定義します。
size (const string)チャート上の文字サイズ。可能な値は size.auto, size.tiny, size.small, size.normal, size.large, size.huge です。デフォルトは size.auto です。
display (plot_display)plotの表示位置を制御します。可能な値は display.none, display.all です。デフォルトは display.all です。
#
indicator('plotchar example', overlay=true)
data = close >= open
plotchar(data, char='❄')
備考 #

Use plotchar function in conjunction with ‘overlay=true’ indicator parameter!

関連 #

plot, plotshape, plotarrow, barcolor, bgcolor

plotshape #

チャート上に視覚的な図形を描写する。

plotshape(series, title, style, location, color, offset, text, textcolor, editable, size, show_last, display)  void
引数 #
series (series bool)形状として描写されるデータ形式。 形式は、location.absoluteを除くすべての場所の値に対してブーリアン値の形式として扱われます。 必須の引数。
title (const string)plotのタイトル。
style (input string)描写のタイプ。可能な値は shape.xcross, shape.cross, shape.triangleup, shape.triangledown, shape.flag, shape.circle, shape.arrowup, shape.arrowdown, shape.labelup, shape.labeldown, shape.square, shape.diamond です。デフォルト値は shape.xcross です。
location (input string)チャート上の図形の位置。可能な値は location.abovebar, location.belowbar, location.top, location.bottom, location.absolute です。デフォルト値は location.abovebar です。
color (series color)shapeの色。‘color=color.red’ や ‘color=#ff001a’ といった定数や ‘color = close >= open ? color.green : color.red’ の様な複雑な式を利用できます。オプション引数。
offset (series int)指定された数のバーで形状を左または右に移動します。 デフォルトは0です。
text (const string)Text to display with the shape. You can use multiline text, to separate lines use ‘\n’ escape sequence. Example: ‘line one\nline two’.
textcolor (series color)テキストの色。‘color=color.red’ や ‘color=#ff001a’ といった定数や ‘color = close >= open ? color.green : color.red’ の様な複雑な式を利用できます。オプション引数。
editable (const bool)trueの場合、描写された形の種類はフォーマットダイアログで編集可能です。 デフォルトはtrueです。
show_last (input int)設定されている場合は、チャートにプロットする (最後のバーから過去の時点までの) シェイプの数を定義します。
size (const string)チャート上の図形のサイズ。可能な値は size.auto, size.tiny, size.small, size.normal, size.large, size.huge です。デフォルトは size.auto です。
display (plot_display)plotの表示位置を制御します。可能な値は display.none, display.all です。デフォルトは display.all です。
#
indicator('plotshape example 1', overlay=true)
data = close >= open
plotshape(data, style=shape.xcross)
備考 #

Use plotshape function in conjunction with ‘overlay=true’ indicator parameter!

関連 #

plot, plotchar, plotarrow, barcolor, bgcolor

© - 2021 - TradingViewの教科書