Color
HarmonicSwitches█ OVERVIEW
This library is complementary for XABCD Harmonic Pattern Custom Range Interactive
TupleSwitchHL()
: Tuple Switch for High Low
Parameters:
: : _bool, low_X, high_X, low_A, high_A, low_B, high_B, low_C, high_C
Returns: : price_X, price_A, price_B, price_C
TupleSwitchStyleColor()
: Tuple switch for style and color
Parameters:
: : _bool
Returns: : style0, style1, col_dir
TupleSwitchString()
: Tuple switch for string
Parameters:
: : _bool
Returns: : str_dir, str_X, str_A
TupleSwitchValid()
: Tuple switch for valid
Parameters:
: : _str
Returns: : str_invalid, str_valid
TupleSwitchTime()
: Tuple switch for time
Parameters:
: : _str, time_1, time_2, time_3
Returns: : E1, E2
SwitchColor()
: Switch color
Parameters:
: : _str
Returns: : col_valid
SwitchExtend()
: Extend line
Parameters:
: : _str
Returns: : _extend
ColorArrayLibrary "ColorArray"
Simple color array gradient tool.
makeGradient(size, _col1, _col2, _col3, _col4, _col5) Color Gradient Array from 5 colors.
Parameters:
size : : default 10
_col1 : : default #ff0000
_col2 : : default #ffff00
_col3 : : default #00ff00
_col4 : : default #00ffff
_col5 : : default #0000ff
Returns: array of colors to specified size.
Multiple Indicator 50EMA Cross AlertsHere’s a screener including Symbol, Price, TSI, and 50 ema cross in a table output.
The 50 Exponential Moving Average is a trend indicator
You can find bullish momentum when the 50 ema crossed over or a bearish momentum when the 50 ema crossed under we are looking to take advantage by trading the reversion of these trends.
True strength index (TSI) is a trend momentum indicator
Readings are bullish when the True Strength Index shows positive values
Readings are bearish when the indicator displays negative values.
When a value is above 20, we look for selling overbought opportunity and when the value is under 20, we look for buying oversold opportunity.
You can select the pair of your choice in the settings.
Make sure to create an alert and choose any alerts then an alert will trigger when a price cross under or cross over the 50 ema for every pair separately.
This allow the user to verify if there is a trade set up or not.
Disclaimer
This post and the script don’t provide any financial advice.
Candle Colored by Volume Z-score [Morty]This indicator colors the candles according to the z-score of the trading volume. You can easily see the imbalance on the chart. You can use it at any timeframe.
In statistics, the standard score (Z-score) is the number of standard deviations by which the value of a raw score (i.e., an observed value or data point) is above or below the mean value of what is being observed or measured. Raw scores above the mean have positive standard scores, while those below the mean have negative standard scores.
This script uses trading volume as source of z-score by default.
Due to the lack of volume data for some index tickers, you can also choose candle body size as source of z-score.
features:
- custom source of z-score
- volume
- candle body size
- any of above two
- all of above two
- custom threshold of z-score
- custom color chemes
- custom chart type
- alerts
default color schemes:
- green -> excheme bullish imbalance
- blue -> large bullish imbalance
- red -> excheme bearish imbalance
- purple -> large bearish imbalance
- yellow -> low volume bars, indicates "balance", after which volatility usually increases and tends to continue the previous trend
Examples:
* Personally, I use dark theme and changed the candle colors to black/white for down/up.
Volume as Z-score source
Any as Z-score source, more imbalances are showed
4c ATR ThresholdThe 4C ATR Threshold is a simple indicator that paints the chart background red when the ATR goes below the user defined ATR minimum.
Some trading setups have specific criteria that require a minimum ATR on a certain timeframe for the instrument to be playable.
The painting of the chart background based on the ATR value is useful as a quick visual reference.
The minimum ATR value can be adjusted to any specific level for any timeframe.
If the ATR dips below the user defined minimum, the trader can quickly see that the ATR is below the minimum criteria, and should not trade that instrument (based on their personal trade criteria).
If the background is not painted by the indicator, then the ATR is above the user defined minimum.
Parts of this script used the default/stock Tradingview ATR indicator to build from.
Candle Color by VolumeA simple but effective indicator that paints candles with different shades of colors based on the volume transacted.
-> Supports 6 levels of sensitivity at present. Might enhance the granularity later.
-> Darkest indicates the most volume transacted. Lightest, the least. Change it around however you see fit and based on your theme.
-> Use it for your Volume Spread Analysis and/or in conjunction with any other strategies that you employ.
-> Note that the volume ratio is calculated relative to the average volume of the last n candles ( EMA 20 by default).
SuperJump Multi Time Frame Heiken Ashi ColorThis is my first public simple script.
It expresses the color of Heiken ashi Candle on a different time chart.
As you already know about it, If you change your chart directly to Heiken ashi, the value of candle changes.
For eaxmple, moving average lines change little by little from Non Heiken ashi Candle.
I was very uncomfortable with this.
If you use this, you can check the Heiken ashi color while using a Non Heiken ashi Candle.
[HELPER] Table Color For Pairing Black And White█ OVERVIEW
This helper intend to simplify which color pair better with black or white color, may help some pine coders.
█ INSPIRATION
This color choice was inspired during plot especially user enable dark color theme.
Color displayed at table and label are based on Indicator name label and Indicator last value label displayed at Scales.
█ FEATURES
Color can be tick to be inverted color.
Display table by changing table position and font size.
4-Way EMA Trend4 separate EMAs that are used to determine trend, colored appropriately to reflect the trend to make it easy to tell what the trend is. All 4 EMAs are not needed, you can turn each one on and off individually and the indicator will adjust itself accordingly. Having a single EMA will use the closing price to determine the trend. There are 2 different types of trend detection; EMA Flip and EMA Confluence. EMA Flip is dependent on all active EMAs rising or falling in the correct hierarchical order. The EMA Confluence option is if all EMAs are moving in the same direction. I've found that this second option, EMA Confluence, is more accurate in getting in early before strong movements because the EMAs will more often move in the same direction before they "flip".
RGB Color FiddlerKEEP YOUR COINS FOLKS! I DON'T NEED THEM, DON'T WANT THEM. Many other talented authors on TV deserve them.
INTRODUCTION:
This is my "RGB Color Fiddler", intended as a toy to play with. This colorcator is rated 'E' for every TV member. With this you can quickly generate about 1.67 million potential colors from color.rgb(). While I have a few preferred colors that are ideal for use, this allows you to finely tune colors to anything that pleases your eye on your canvas.
TIPS:
The overlay chart can be peppered with colors of all varieties, so it's necessary to have properly distinguished coloring and contrast separation. If you employ light charts, you can tweak colors to just the right shade you desire on your display. Not all LCDs are created equal, even when color calibrated. With specific discovered colors tailored to your liking, you may uniquely color code ALL of your indicators.
UTILITY:
The input()s in Settings allow up to 4 different colors to tinker with and compare. After selecting focus of an input, you can easily use the up/down keyboard keys to make swift adjustments numerically or with options. The color combos you are creating will be displayed in color hex or a RGB representation within the labels.
Also of great benefit, is the ability to cycle through the currently available plot() styles. Some styles will require you to zoom in closeup to observe their behaviors. There is a few other ways to finagle plot() parameters to also achieve other acrobatic effects that are not demonstrated here. Closer study of plot() parameters in the reference can reveal those. Anyhow, I won't bother you with more elaborate technical jargon, now is the time to fiddle with this toy to your benefit!
CODE REUSE:
Any member has the freedom to use any of the code in this script any way they see fit. It's specifically intended for all. There is absolutely no need for accreditation for any of this code reuse ever, in the present case. Don't worry about, I'm certainly not.
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!
PSv5 Color Magic and Chart Theme SimulatorKEEP YOUR COINS FOLKS! I DON'T NEED THEM, DON'T WANT THEM. Many other talented authors on TV deserve them.
INTRODUCTION:
This is my "PSv5 Color Magic and Chart Theme Simulator" displayed using Pine Script version 5.0. The purpose of this PSv5 colorcator is to show vivid colors that are most suitable in my opinion for modifying or developing Pine scripts. Whether you are new to Pine or an experienced Pine poet, this should aid you in developing indicators with stunning color from the provided color list that is easily copied and pasted into any novel script you should possess. Whichever colors you choose, and how, is up to your imagination's capacity.
COMMENTARY:
I have a thesis. Pine essentially is a gigantor calculator with a lot of programmable bells and whistles to perform intense analytics. Zillions of numbers per day are blended up into another cornucopia of numbers to analyze. The thing is, ALL of those numbers are moot unless we can informatively portray them in various colorized forms with unique methods to point out significant numeric events. By graphically displaying them with specific modes of operation, only then do these numbers truly make any sense to us and become quantitatively beneficial.
I have to admit... I hate numbers. I never really liked them, even before I knew what an ema() was. Some days I almost can't stand them, and on occasion I feel they deserve to be flushed down the toilet at times. However, I'm a stickler for a proper gauge of measurements. Numbers are a mental burden, but they do have "purpose and meaning". That's where COLOR comes in! By applying color in specific ways in varying dynamic forms, we can generate smarter visual aids from these numerics. Numbers can be "transformed" into something colorful it wasn't before, into a tool, like a hammer. But we don't need a hammer, we need an impressive jack hammer for BIG problem solving that we could never achieve in the not to distant past.
As time goes on, we analytically measure more, and more, and more each year. It's necessary to our continual evolution. That's one significant difference between us and cave men, and the pertinent reason why we are quickly evolving as a species, while animals haven't. Humankind is gifted to enumerate very well AND blessed to see in color. We use it for innumerable things in the technological present for purpose and pleasure. Day in and day out, we take color for granted, because it's every where we can look. The fact is, color is the most important apparatus in humankind's existence EVER. We wouldn't have survived this far without it.
By utilizing color to it's grand potential, greater advancements can be attained while simultaneously being enjoyed visually. Once color is transformed from it's numeric origins into applicable tools, we can enjoy the style, elegance, and QUALITATIVE nature of the indication that can be forged. Quantities can't reveal all. Color on the other hand has a handy "quality" factor to it, often revealing things we can't ordinarily recognize. When high quality tools provide us with obtained goals, that's when we will realize how magical color truly is, always has been, and shall always be.
The future emerging economies and future financial vessels of people around the globe are going to be dependent on the secured construction of intelligent applications with a rock solid color foundation, not just math alone. I have no doubt about that. I can envision that with my eyes closed. To make an informed choice, it should be charted or graphed somehow prior to a final executive decision to trade. Going back to abysmal black and white with double decimal points placed next to cartoons within extinction doomed newspapers is not a viable option any more.
OBSERVATIONS AND UTILITY:
One thing you will notice is the code is very dense. Looks almost hideous right? Well, the variable naming is lengthy, but it's purpose is to be self explanatory, even for those who don't know how to program, YET. I'm simply not a notation enthusiast. My main intention was to provide clearly identifiable variables from their origin of assignment to their intended destination of use, clearly visible for anyone visiting. The empowerment of well versed words that are easier to understand, is a close rival to the prominent influence color has.
Secondly, I'm displaying hline() and label.new() as prime candidates to exemplify by demonstration how the "Power of Color" can be embraced with the "Power of Pine". Color in Pine has been extensively upgraded to serve novel purposes to accomplish next generation indicators that do and WILL come to exist. New functions included with PSv5 are color.rgb(), color.from_gradient(), color.r(), color.g(), color.b(), and color.t() to accompany color.new() in our mutual TV adventures. Keep in mind, the extreme agility of color also extends to line.new(), the "entirely new" linefill.new(), table.new(), bgcolor() and every other function that may utilize color.
There's a wide range of adjustability in Settings to make selections to see how they perform on different backgrounds, with their size and form. As you curiously toy with those, you're going to notice how some jump out like laser beams while others don't. Things that aren't visually appealing, still have very viable purposes, even if they don't stand out in the crowd. Often, that's preferable. The important thing is that when pertinent information relative to indication is crucial, you can program it with distinction from an assortment of a potential 1.67 million colors that can be created in Pine. "These" are my chosen favorite few, and I hope you adopt them.
PURPOSES:
For those of you who are new to Pine Script, this also may help you understand color hex/rgb and how it is utilized in Pine in a most effective manner. The most skilled of programmers can garner perks as well. There is countless examples of code diversity present here that are applicable in other scripts with adequate mutation. Any member has the freedom use any of this code in this script any way they see fit. It's specifically intended for all. There is absolutely no need for accreditation for any of this code reuse ever, in the present case. Don't worry about, I'm not.
The color_tostring() will be most valuable in troubleshooting color when using color.rgb() and becoming adept with it. I'm not going to be able to use color.rgb() without it. Chameleon indicators of the polychromatic variety are most likely going to be fine tuned with color_tostring() divulging it's results to label.new() or even table.new() maybe. One the best virtues of this script in chart, is when you hover over the generated labels, there's a hidden gift for those who truly wish to learn the intricate mechanics of diverse color in Pine. Settings has informative tooltips too.
AFTERTHOUGHTS:
Colors are most vibrant on the "Black Chart" which is the default, but it doesn't currently exist as a chart theme. With the extreme luminous intensity of LCDs in millicandela( mcd ), you may notice "Light" charts may saturate the colors making charts challenging to analyze. Because of this, I personally use "Dark Charts" and design my indicators specifically for these. I hope this provides inspiration for the future developers who are contemplating the creation of next generation indicators and how color may enhance their usefulness.
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!
RSI Divergences + Bollinger Bands█ OVERVIEW
Here's the RSI divergences with Bollingers bands.
█ CONCEPTS
5 features
1 — RSI
2 — Bollinger bands
3 — RSI signal is in another color when above 70 or below 30
4 — Looking for previous Divergences, Bullish, Bearish and Hidden Bullish and Bearish but I don't like Hidden divergences
5 — Color fill when overbuy or oversold
█ OTHER SECTIONS
I like to see it like a moutain, with snow on top and lake on bottom. I think you don't want to start walking at the top, nor sink to the bottom of the lake for ever and ever.
It is an idea of sjoerd , tip him if you like it.
An oscillator is good to know where we are in the trends, but it's not enough to run a small business of trading, you need to learn how to use it.
What is a divergence ?
Thanks to The rational investor for teaching me how to use this indicator.
Seasonality: Month HighlightMany Assets, especially Commodities , have patterns of seasonality: Periods in the year when they have shown a greater tendency to rise or a greater tendency to fall.
The Seasonality of an asset is based on historical data (20yrs+): Specific asset seasonality charts can be found via an online search.
This is a simple tool that allows users to highlight and color code each of the 12 months of the year; depending on the seasonality of the specific asset.
The above chart shows Sugar Futures ; which are a seasonal 'sell' in February , and a seasonal 'buy' in May and August.
Seasonality should only be used to compliment a trading setup, NOT as a single reason in itself to buy or sell. Simply put: if you find a good setup, AND you have seasonality on your side; your odds of success are increased.
Moving Average with Dynamic Color Gradient (WaveTrend Momentum)Similar scripts exist but I haven't seen one using WaveTrend and I haven't seen one that hand picks evenly divided colors between GREEN-YELLOW-RED.
The green is exact green, the yellow is exact yellow, and the red is exact red.
Not complicated, just useful.
Green to Red Gradient for Dynamic / Color Changing IndicatorsI have evenly divided every color between green and red.
This gradient is useful for pine coders who are creating color changing, dynamic, or gradient indicators.
RGB color check tool with RSI [DM]Greetings colleagues.
Here I share a tool that uses the color gradient provided by PineCoders and lucf.
This tool was made for the reason that whenever we start with an idea for a script, we end up consuming a lot of time in selecting suitable colors.
An RSI was taken as a reference for the signal
You have multiple switches for axes, fill, background and colors
You can also change the background so that you can check the contrast with the signals.
The mix of colors with 8 boxes (4 channels for each color as detailed below) for each color since RGB has been defined
Red= 0 a 255
Green= 0 a 255
Blue= 0 a 255
Transparency= 0 a 100
I hope you enjoy it. [ ;-)
Timeweighted Colored VWAP with SlopeHey, traders!
This script calculates the VWAP's change rate against ATR in a number of k-lines. It controls the VWAP line's color based on the average change rate, and it changes its color in a time-weighted way.
1. Calculating vwapValue's rate of change
2. Controlling Line's color based on the average change rate against ATR
3. Calculating average change rate in the past k-lines
K线的数量:计算多少根K线的VWAP值的变化率的平均值,相当于用K线的数量来时间加权
变化率阈值:线条颜色变化的阈值,VWAP值的变化率比这个大或者小时改变颜色,否则延续原来的颜色
Good luck with your trading!
Day and Time HighlightYet another sweet little tool that highlights only specific days and time.
For example, you can highlight only Tuesday's and Friday's from 0930-1600
You can adjust to any day of the week and any time of the day.
You can request more improvements upon this version. Cheers!
Like if you Like and Follow me for upcoming indicators/strategies: www.tradingview.com
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)