Color
Color Gradient Framework [PineCoders]█ OVERVIEW
This indicator shows how you can use the new color functions in Pine to generate color gradients. We provide functions that will help Pine coders generate gradients for multiple use cases using base colors for bull and bear states.
█ CONCEPTS
For coders interested in maximizing the use of color in their scripts, TradingView has added new color functions and new functionality to existing functions. For us coders, this translates in the ability to generate colors on the fly and use dynamic colors ("series color") in more places.
New functions allow us to:
• Generate colors dynamically from calculated RGBA components ("A" is the Alpha channel, known to Pine coders as the "transparency"). See color.rgb() .
• Extract RGBA components from existing colors. See color.r() , color.g() , color.b() and color.t() .
• Generate linear gradients between two colors. See color.from_gradient() .
Improvements to existing color/plotting functions allow more flexible use of color:
• plotcandle() now accepts a "series color" argument for its `wickcolor` and `bordercolor` parameters.
• plotarrow() now accepts a "series color" argument for its `colorup` and `colordown` parameters.
Gradients are not only useful to make script visuals prettier; they can be used to pack more information in your displays. Our gradient #4 goes overboard with the concept by using a different gradient for the source line, its fill, and the background.
█ OUR SCRIPT
The script presents four functions to generate gradients:
f_c_gradientRelative(_source, _min, _max, _c_bear, _c_bull)
f_c_gradientRelativePro(_source, _min, _max, _c_bearWeak, _c_bearStrong, _c_bullWeak, _c_bullStrong)
f_c_gradientAdvDec(_source, _center, _c_bear, _c_bull)
f_c_gradientAdvDecPro(_source, _center, _steps, _c_bearWeak, _c_bearStrong, _c_bullWeak, _c_bullStrong)
The relative gradient functions are useful to generate gradients on a source that oscillates between known upper/lower limits. They use the relative position of the source between the `_min` and `_max` levels to generate the color. A centerline is derived from the `_min` and `_max` levels. The source's position above/below that centerline determines if the bull/bear color is used, and the relative position of the source between the centerline and the max/min level determines the gradient of the bull/bear color.
The advance/decline gradient functions are useful to generate gradients on a source for which min/max levels are unknown. These functions use source advances and declines to determine a gradient level. The `f_c_gradientAdvDec()` version uses the historical maximum of advances/declines to determine how many correspond to the strongest bull/bear colors, making its gradients adaptive. The `f_c_gradientAdvDecPro()` version requires the explicit number of advances/declines that correspond to the strongest bull/bear colors. This is useful when coloring chart bars, for example, where too many gradient levels are difficult to distinguish. Using the Pro version of the function allows you to limit the number of gradient levels to 5, for example, so that transitions are fewer, but more obvious. The `_center` parameter of the advance/decline functions allows them to determine which of the bull/bear colors to use.
Note that the custom `f_colorNew(_color, _transp)` function we use in our script should soon no longer be necessary, as changes are under way to allow color.new() to accept series arguments.
Inputs
The script's inputs demonstrate one way you can allow users to choose base bull/bear colors. Because users can modify any of the colors, only two are technically needed: one for bull, one for bear, as we do for the configuration of the bull/bear colors for the background in the gradient #4 configuration. Providing a few presets from which users can choose can be useful for color-challenged script users, but that type of inputs has the disadvantage of not rendering optimally in all OS/Browser environments.
You can use the inputs to select one of eight gradient demonstrations to display.
█ THANKS
Thanks to the PineCoders team for validating the code and description of this publication.
Thanks also to the many TradingView devs from multiple teams who made these improvements to Pine colors possible.
Look first. Then leap.
Highlighter Strategy V2// Based on Normalized Smoothed MACD by Dreadblitz
Old one was just an oscillator, I changed a few things
1) It now paints the line green/orange
2) The trigger (green/red) is now based on a signal
3) The signal is basically isUp, but with some additional controls, e.g.
4) (new) There is an embedded stoploss. This is a growth/decay function that decays slower than it grows.
5) Signal is filtered additionally by the stoploss (no green under the decaying line)
Highlighter StrategyOG COINBASE:BTCUSD
Based on Normalized Smoothed MACD by Dreadblitz
Updated slightly the rules about when it'll take a signal, and made it an overlay so that you see "green" and "red" on the price bar.
Things you might want to do when using it.
- Add a stoploss/trailing stop probably a MA of your choosing.
- Check different time frames to confirm a strong entry
Trading View's Standard Color Palette, by @BlueJayBird- Simple color palette for Trading View.
- It works correctly on timeframes lower than 1h. Move it to the side so you can see the whole palette.
- All 17 standard TV colors are there, with fillers at 60 transparency (or 40 % opacity).
- You can custom the colors to your own colors, and use it as a palette color reference.
Additional information: kodify.net
Background Color Based on EMAHello Traders,
this is a very simple script. It paints the background color based on the close price in reference to an exponential moving average.
If the close is above the EMA the background color will be green.
If the close is under the EMA the background color will be red.
You can adjust colors and the EMA period by yourself.
This little indicator script is just to get a better overview, for example in combination with other indicators.
Hope you guys like this script. Wish you a great trading week.
RSI Colour OverlayApplies Blue or Pink colour overlay to candles when RSI is at or over the predefined parameters. These parameters are adjustable in the settings area of the indicator. Please note RSI does not guaranteed a pivot point in price action and the colour overlay should only be used as an indication or condition not a call to buy or sell alone. The colour overlay is a useful prompt to review price action. I hope this helps and good luck with your analysis and trading.
OBV Correlation [Fournier-Eaton]This is the On Balance Volume Correlation (And Price Correlation) Indicator. Directions of each has been encoded with color.
This Indicator is one of a series of scripts which I hope will aid in volume analysis.
The primary component is the histogram plot which represents the correlation between the direction of obv of your current equity and your chosen reference equity.
I have included the direction of OBV for your currently plotted equity encoded as color. (Thus you know that if the plot is negative and blue, that the correlation is negative but the OBV for your current equity is increasing.)
Furthermore, I included a supplementary price correlation line for the given equities. This line has had price direction encoded as color for quick reference.
Thus as a quick example: if you see a blue negative histogram and an accompanying red positive line you know that: 1. obv is increasing and anti-correlated with your reference equity and the price is decreasing and positively correlated with your reference equity. A lot of information encoded in one plot.
If you find this at all useful, I'd love to hear from you.
Bradford Fournier-Eaton, PhD
Weekly/Daily/Hourly/Minutes Colored Background IntervalsThis is my "Weekly/Daily/Hourly/Minutes Colored Background Intervals" assistant. I wouldn't describe it as an indicator, it just exhibits coloration of referenced periods of time with bgcolor() in Pine. With the arrival of 2021, I pondered the necessity of needing a visualization pre-2021 to visually recognize periodicity of market movements by the week, day, hour, or an adjustable period of minutes. While this script is simply generic, I hope you may find useful in your endeavors as a member on TradingView.
Explaining the script's usage, the "Minutes" input can be adjusted from anywhere between 5-55 minutes for only intraday. This can be modified to accommodate 90 minutes (1.5hrs) or any other minutes period desirable by tweaking certain numbers up to 1440. Minutes and Hourly backgrounds are disabled by default for most daily traders. Changing the input() code to `true` will provide them on by default when the script loads, if you choose that route. Each time periods background color is enable/disable capable. All of the colors are easily adjustable to any combination you can ponder for your visual acuity with the color swatch provided by input(type=input.color). The coloring can be "swapped" by input() depending on how you wish to start and end the day visually. I thought this would come in handy. The weekly background can have different starting points, whether it be Sunday, Monday, or any other day such as Friday for example.
The entire script's contents isn't intended for complete re-use as is for publicly published scripts. It's more along the lines of code that could be used to personally modify indicators you have, depending on the time frames you may actually be trading on. The code is basically modular, so you can use bits and pieces of it in your personally modified Pine Editor scripts that you wish to customize for yourself. I will say that the isXxx() functions are completely reusable in any script without any need for author permission inquiries from me, as easy as copy and paste. Those may come in handy for many folks. If you find them useful in certain circumstances, use isXxx() functions as you please. Day of the week detection by functions will have applications beyond my current intended use for them.
Of notable mention, this is a miniature lesson by example of how the new input(type=input.color) may be used. I'm also using `var` inside functions to aid in computational efficiency of the script runtime. The colors are permanently stored at the very beginning of the scripts operation inside the function and just reused from that point onward. Its a rare use case, but well suited for this scripts intention. Once again I have demonstrated the "Power of Pine" for developers of any experience level to learn from via code elegance.
When available time provides itself, I will consider your inquiries, thoughts, and concepts presented below in the comments section, should you have any questions or comments regarding this indicator. When my indicators achieve more prevalent use by TV members , I may implement more ideas when they present themselves as worthy additions. Have a profitable future everyone!
Bjorgum Triple EMA Strat-This script uses a triple EMA strategy to establish trend direction and reversal points
-Inputs are smoothed with Heiken Ashi values to reduce whipsaws, while providing timely execution
-Buy and sell indications are dictated by bar color
-Bar color is dictated by the candle close value in relation to the EMAs, specifically the faster of the 3
(If candle closes above or below the fast and intermediate averages, a buy or sell signal is indicated by bar color change)
-If the close falls between the two a cautionary signal is given. The viewer can hold, or take profit, or evaluate other indicators for clues
-Best results are obtained when coupled with Bjorgum TSI and Bjorgum RSI for confirmation of signals (see TradingView profile)
@Bjorgum on Stocktwits
Bjorgum RSIRSI output signals are displayed with color change to reflect the plotted value. This makes evaluating RSI conditions require but a glance.
RSI momentum buy signals are given on the cross of the 50 level, whereas sell signals are given on a fall below.
Default values a 5 period RSI which gives more timely entrances and exits for swing traders. This can be adjusted to the typical 14 period if the viewer desires slower signals.
Bullish and bearish area is shaded to accentuate the signal to the eye.
Excellent results can be found when coupling BJ RSI, with BJ TSI, and the reversal system using all 3 as a complete together simultaneously
Default color changes are plotted as a recorded value falls within the following levels:
RSI < 30 = green
RSI 30-50 = red
RSI 50-70 = blue
RSI 70-80 = yellow
RSI 80-90 = orange
RSI 90-100 = white hot
Bjorgum TSI-This script utilizes simple color changes of the TSI output signals to aid in interpretation of the classic TSI indicator.
-Crosses of the TSI value line and signal line are a bullish or bearish indication. TSI value line is colored green or yellow to help identify that the TSI value line is either dropping or rising, while over or under the signal line.
-This can help anticipate a cross, or significant points in the trend. TSI signal line changes color when rising or falling which can help to identify larger prevailing trends.
-Generally, a rising signal line can be an overall bullish move, while falling more bearish regardless of crosses.
*Resolution function enables multiple overlay for "Multi-timeframe analysis"*
Candle Color ChangeSimple code for change in Barcolor if the range (high-low) is bigger than the last 5 candles.
NSDT Institution Trading ZoneA simple script that adds background color to highlight the Institutional Trading Hours during the USA market (8am-4pm Eastern). Timeframes and colors can be modified as needed.
BearBull OrderBlock ColourSchemeThis is a simple label type indicator to help assist in creating a colour scheme for orderblocks which are created using technical analysis and the rectangle tool on TradingView.
It has a dark mode and a light mode. By default it is set for black backgrounds, if you have a white background, go into it's settings and untick the dark mode.
It has instructions for timeframes and colours to use.
It will default show to the right of current price, depending on zoom scale and timeframe, is how far away/close.
it is based around ROYGBIV colours.
Stochastic color PMF alert [PlungerMen]The Stochastic Oscillator is a range bound momentum oscillator.
The Stochastic indicator is designed to display the location of the close compared to the high/low range over a user defined number of periods.
Typically, the Stochastic Oscillator is used for three things: Identifying overbought and oversold levels, spotting divergences and identifying bull and bear set ups or signals.
RSI BAR COLOR (KETT)RSI BAR COLOR
1) White - looking for a long
2) Orange - looking for a short
3) Gray - think
//-----------
1) Белый - ищем вход в LONG
2) Оранжевый - ищем вход в SHORT
3) Серый - думаем
Volume Color Bar (KETT)Highlights important bars with increased volume during the selected period. It is convenient to use for building a trend line or strong levels.
TKP RSI BAR COLORThis script was influenced by Scilentor's- "RSI Bar Colors / Scilentor". I improved upon the Idea by adding the ability to change the full range of RSI (Between 0 through 100) to any color you want within 5 point increments.
Traditional use of RSI is to use it as an "Overbought" and "Oversold" indicator. A more uncommon/unknown use, especially among new traders, is to use is as a "Momentum" indicator. I personally like to look for stocks where RSI>50
Default settings are set to color all bars red when below 50, and white when above 50, but try for your self setting different colors above 70, and below 30 to better see overbought and oversold conditions. I got a lot of requests for this script and I hope it helps you in your trading journey :-)
Candle Color GeneratorCandle Color Generator:
This indicator is designed to highlight the candle colors based on the combinations of Parabolic SAR (PSAR) and 2 Hull Moving Averages (HMA).
Colors:
Yellow, Red, and Green colors are used to describe the candle colors depends on its position to PSAR and 2 HMAs.
PSAR:
PSAR position above or below candle position is differentiated by Red and Green colors
HMAs:
As default settings 20 HMA is considered as lower period and 50 HMA is considered period for the calculation
Trade What You See:
This indicator will help to see how the setup of particular instrument coming up. Users/Traders can use and trade based on what they see and interpret from it.
Disclaimer:
Idea of publishing this script is to identify the strength of the instrument using multiple confirmation.
Using this indicator, changing inputs (show/hide/change period), and trading decisions are up to the users/traders.
Courtesy:
Thanks to inventors of HMA (Alan Hull), PSAR(Welles Wilder) as these inputs are used to make some calculations
Kijun-Price DistanceThis script shows optional:
- distance between close price and Kijun-Sen
- distance btween Tenkan-Sen and Kijun-Sen
- Background color of current time frame
- Background color of the next higher time frame