Each has a color argument that accepts a standard colour, hexadecimal colour, or transparent colour: Function We can work with TradingView’s standard colours through the functions below. # TradingView functions that use standard colours
But it does make our plot or background invisible. Colour moving average crosses with fuchsia bgcolor(color =emaCross ? color.fuchsia : na)
TRADINGVIEW DARK THEME CODE
Here’s the TradingView code for that:ĮmaCross = cross( ema( close, 5), ema( close, 30)) Say we want to make a line plot with the 10-bar simple moving average. There are roughly two ways to use TradingView’s standard colours. # Quick examples: code with TradingView’s standard colours If your indicator or strategy uses version 3 or earlier, these are the colours you can use (TradingView, n.d. The fourth version of TradingView Pine Script changed the built-in colour variables. # Standard colours in TradingView Pine version 3 and earlier See changed colours in TradingView for more.īy the way, if you need more colour options than the 17 standard ones, check out hexadecimal colours in TradingView. This way we can tell one script apart from the others. When we add the same script repeatedly to the chart, TradingView shifts that script’s colours. Interestingly, the same colour (like color.teal) doesn’t always look the same. In TradingView’s Pine script language we can use these 17 standard colours (TradingView, n.d. # Overview: standard colours in TradingView Pine But what are the colour names we can use? Let’s see. And doesn’t require us to configure settings by hand each time. We can set colours by hand or use Pine code. When our script makes a plot or drawing, there are two ways to specify that object’s colour. # TradingView Pine colours for plots and drawings
TradingView Pine colours for plots and drawings.