plot_candle
Syntax Format
plot_candle(open, high, low, close, name="Candles", up_color=color.green, down_color=color.red)
Overview
The plot_candle
function creates a candle chart, where you can customize the values, taken into the calculation. The main values of a candle are:
- Opening price;
- Closing price;
- Highest price;
- Lowest price.
Parameters
The parameters describe all the price values of the candle as well as its appearance.
Parameter | Type | Purpose | Default Value |
---|---|---|---|
open | series or numeric | Candle open value | - |
high | series or numeric | Candle highest value | - |
low | series or numeric | Candle lowest value | - |
close | series or numeric | Candle close value | - |
name | string | Plot name | "plot_candle(open,high,low,close)" |
candle_color | color | Candle color | - |
Example
plot_candle {
open = o,
high = h,
low = l,
close = c,
color = iff (c > o, "green", "red")
}