描画

barcolor #

バーの色をセットする。

barcolor(color, offset, editable, show_last, title)  void
引数 #
color (color)バーの色。‘color=color.red’ や ‘color=#ff001a’ といった定数や ‘color = close >= open ? color.green : color.red’ の様な複雑な式を利用できます。必須引数。
offset (integer)指定された数のバーでカラー形式を左または右に移動します。 デフォルトは0です。
editable (const bool)trueの場合、足の色の種類は書式ダイアログで編集可能です。デフォルトはtrueです。
show_last (input integer)設定されている場合は、チャートに記入する (最後のバーから過去の時点までの) バーの数を定義します。
title (const string)barcolorのタイトル。オプション引数です。
#
barcolor(close < open ? color.black : color.white)
関連 #

bgcolor, plot, fill

bgcolor #

指定した色でバーの背景を塗りつぶす。

bgcolor(color, transp, offset, editable, show_last, title)  void
引数 #
color (color)塗りつぶしの背景色。‘color=color.red’ や ‘color=#ff001a’ といった定数や ‘color = close >= open ? color.green : color.red’ の様な複雑な式を利用できます。必須引数。
transp (input integer)背景の塗りつぶしの透明度。可能な値は 0 (不透明) から100 (不可視) までです。オプション引数。
offset (integer)指定された数のバーでカラー形式を左または右に移動します。 デフォルトは0です。
editable (const bool)trueの場合、書式ダイアログで背景色の種類を編集できます。デフォルトはtrueです。
show_last (input integer)設定されている場合は、チャートに記入する (最後のバーから過去の時点までの) バーの数を定義します。
title (const string)bgcolorのタイトル。オプション引数です。
#
bgcolor(close < open ? color.red : color.green, transp=70)
関連 #

barcolor, plot, fill

fill #

2つのプロットまたはラインの間の背景を指定された色で塗りつぶす。

fill(hline1, hline2, color, transp, title, editable, fillgaps)  void
fill(plot1, plot2, color, transp, title, editable, show_last, fillgaps)  void
引数 #
hline1 (hline)最初のhlineオブジェクト。 必須の引数。
hline2 (hline)2番目のhlineオブジェクト。 必須の引数。
plot1 (plot)最初の描写オブジェクト。 必須の引数。
plot2 (plot)2番目の描写オブジェクト。 必須の引数。
color (color)plotの色。‘color=color.red’ や ‘color=#ff001a’ といった定数や ‘color = close >= open ? color.green : color.red’ の様な複雑な式を利用できます。オプション引数。
transp (input integer)背景の塗りつぶしの透明度。可能な値は 0 (不透明) から100 (不可視) までです。オプション引数。
title (const string)作成された塗りつぶしオブジェクトのタイトル。オプション引数です。
editable (const bool)trueの場合、書式ダイアログで塗りつぶしの種類を編集できます。デフォルトはtrueです。
show_last (input integer)設定されている場合は、チャートに記入する (最後のバーから過去の時点までの) バーの数を定義します。
fillgaps (const bool)いずれかの plot() の呼び出しが na の値を返した場合などギャップがある場合の塗りつぶしの継続を制御します。true の場合、最後の塗りつぶしがギャップでも継続されます。デフォルトは false です。
#
h1 = hline(20)
h2 = hline(10)
fill(h1, h2)

p1 = plot(open)
p2 = plot(close)
fill(p1, p2, color=color.green)
関連 #

plot, barcolor, bgcolor, hline

hline #

一定の固定価格レベルで水平線を描画します。

hline(price, title, color, linestyle, linewidth, editable)  hline
戻り値 #

fillで使用されるのは、hlineオブジェクト

引数 #
price (input float)オブジェクトがレンダリングされる価格の値。必須の引数です。
title (const string)オブジェクトのタイトル。
color (input color)レダリングされた線の色。定数値でなければなりません(式ではない)。選択因数。
linestyle (input integer)レンダリングされる線のスタイル。可能な値は hline.style_solid, hline.style_dotted, hline.style_dashed です。オプション引数。
linewidth (input integer)レンダリングされる線の幅。デフォルトは1です。
editable (const bool)trueの場合、書式ダイアログでhilineの種類を編集できます。デフォルトはtrueです。
#
hline(3.14, title='Pi', color=color.blue, linestyle=hline.style_dotted, linewidth=2)

// You may fill the background between any two hlines with a fill() function:
h1 = hline(20)
h2 = hline(10)
fill(h1, h2)
関連 #

fill

© - 2021 - TradingViewの教科書