[blackcat] L1 Blackcat Customized CCI IndicatorLevel: 1
Background
This CCI indicator is blackcat customized version with enhanced features.
Function
This CCI use green line to indicate strong long trend with cci values > 0 and red line to indicate weak long trend with cci values <0. It also use yellow and fuchsia candles to present the strong and weak long trend. A green candle is used to indicate long entry, while a red candle is usded to indicate long flatten signal.
Key Signal
green line --> strong long trend
red line --> weak long trend
blue line --> trend strength indicator
SELL label --> flatten long or short entry
BUY label --> long entry
TOPDIV label --> top divergence indicator
BOTDIV label --> bottom divergence indicator
Remarks
Feedbacks are appreciated.
Readme
In real life, I am a prolific inventor. I have successfully applied for more than 60 international and regional patents in the past 12 years. But in the past two years or so, I have tried to transfer my creativity to the development of trading strategies. Tradingview is the ideal platform for me. I am selecting and contributing some of the hundreds of scripts to publish in Tradingview community. Welcome everyone to interact with me to discuss these interesting pine scripts.
The scripts posted are categorized into 5 levels according to my efforts or manhours put into these works.
Level 1 : interesting script snippets or distinctive improvement from classic indicators or strategy. Level 1 scripts can usually appear in more complex indicators as a function module or element.
Level 2 : composite indicator/strategy. By selecting or combining several independent or dependent functions or sub indicators in proper way, the composite script exhibits a resonance phenomenon which can filter out noise or fake trading signal to enhance trading confidence level.
Level 3 : comprehensive indicator/strategy. They are simple trading systems based on my strategies. They are commonly containing several or all of entry signal, close signal, stop loss, take profit, re-entry, risk management, and position sizing techniques. Even some interesting fundamental and mass psychological aspects are incorporated.
Level 4 : script snippets or functions that do not disclose source code. Interesting element that can reveal market laws and work as raw material for indicators and strategies. If you find Level 1~2 scripts are helpful, Level 4 is a private version that took me far more efforts to develop.
Level 5 : indicator/strategy that do not disclose source code. private version of Level 3 script with my accumulated script processing skills or a large number of custom functions. I had a private function library built in past two years. Level 5 scripts use many of them to achieve private trading strategy.
다이버전스
MOVE/VXTLT CorrelationMany know of the VIX for equity trading. Yet, many are unaware that there is the same kind of volatility measure for trading bonds, called the MOVE Index.
"The Merrill Lynch Option Volatility Estimate (MOVE) Index is a yield curve weighted index of the normalized implied volatility on 1-month Treasury options which are weighted on the 2, 5, 10, and 30 year contracts."
With this script one can see the the correlation and divergences between bonds and its volatility measure to make educated decisions in trading or hedging.
The idea of this script comes from NicTheMajestic.
+ BB %B: MA selection, bar coloring, multi-timeframe, and alerts+ %B is, at its simplest, the classic Bollinger Bands %B indicator with a few added bells and whistles.
However, the right combination of bells and whistles will often improve and make a more adaptable indicator.
Classically, Bollinger Bands %B is an indicator that measures volatility, and the momentum and strength of a trend, and/or price movements.
It shows "overbought" and "oversold" spots on a chart, and is also useful for identifying divergences between price and trend (similar to RSI).
With + %B I've added the options to select one or two moving averages, candle coloring, and a host of others.
Let's start with the moving averages:
There are options for two: one faster and one slower. Or combine them how you will, or omit one or both of them entirely.
Here you will find options for SMA, EMA (as well as double and triple), Hull MA, Jurik MA, Least Squares MA, Triangular MA, Volatility Adjusted MA, and Weighted MA.
A moving average essentially helps to define trend by smoothing the noise of movements of the underlying asset, or, in this case, the output of the indicator.
All of these MAs available track this in a different way, and it's up to the trader to figure out which makes most sense to him/her.
MA's, in my opinion, improve the basic %B by providing a clearer picture of what the indicator is actually "seeing", and may be useful for providing entries and exits.
Next up is candle coloring:
I've added the option for this indicator to color candles on the chart based on where the %B is in relation to its upper and lower bounds, and median line.
If the %B is above the median but below the upper bound, candles will be green (showing bullish market structure). If %B is below the median but above the lower bound, candles will be red (denoting bearish market structure).
Overbought and oversold candles will also be colored on the chart, so that a quick glance will tell you whether price action is bullish/bearish or "oversold"/"overbought".
I've also added functionality that enables candles to be colored based on if the %B has crossed up or crossed down the primary moving average.
One example as a way to potentially use these features is if the candles are showing oversold coloration followed by the %B crossing up your moving average coloration. You might consider a long there (or exit a short position if you are short).
And the last couple of tweaks:
You may set the timeframe to whatever you wish, so maybe you're trading on the hourly, but you want to know where the %B is on the 4h chart. You can do that.
The background fill for the indicator is split into bullish and bearish halves. Obviously you may turn the background off, or make it all one color as well.
I've also added alerts, so you may set alerts for "overbought" and "oversold" conditions.
You may also set alerts for %B crossing over or under the primary moving average, or for crossing the median line.
All of these things may be turned on and off. You can pretty much customize this to your heart's delight. I see no reason why anyone would use the standard %B after playing with this.
I am no coder. I had this idea in my head, though, and I made it happen through referencing another indicator I was familiar with, and watching tutorials on YouTube.
Credits:
Firstly, thanks to www.tradingview.com for his brilliant, free tutorials on YouTube.
Secondly, thanks to www.tradingview.com for his beautiful SSL Hybrid indicator (and his clean code) from which I obtained the MAs.
Please enjoy this indicator, and I hope that it serves you well. :)
TSI Strength Meter vs USD with divergenceThis indicator consists of two lines. One is a gray line (USD) and the asset indicator is green or red.
The basis of this indicator is the true strength indicator (TSI) with parameters 5,15. Both line sets are based on a TSI (5,15).
The lookback period is for new highs / new lows. Default value is 200 periods.
GREEN/RED LINE
The first that is green and red is whatever you choose to display ( BTC in this case).
The green and red lines indicate going up or going down.
GRAY LINE
The gray line is the US Dollar . So everything is relative to that by default.
ZERO LINE CROSSES
These are momentum shifts. If you see a crossover of both around the zero line, its a good indication there is a change in momentum and a reversal of trend.
NEW HIGHS NEW LOWS
There are 4 new colors added to this indicator. For the asset you are viewing, a lime color means new highs within the lookback period. A new low is indicated by a yellow line color.
The new lows for the USD are white for new lows within the lookback period and blue line for the new highs.
DIVERGENCE
You can also spot divergences easily. For example, if a lime color is seen on the indicator line, that means "new high" but if it occurs below the last "new high" it means the asset is going up to new highs but the indicator is showing us that the readings are below the previous new highs, indicating a negative divergence.
The same goes for the yellow colored lines. higher yellows mean positive divergence.
And with the US Dollar , blue lines dropping means a negative divergence in the US Dollar , while white lines moving up means a positive dollar divergence.
INTERPRETATION
Examples:
If you see a green and sometimes red line of the asset indicator and a gray line that drops below the zero line; it may mean the asset is rising and the trend is up.
If you see a green and red line below the zero line and with a gray line above the zero line , it indicates there is a negative trend. If you suddenly see blue lines on the USD, this means its hitting new lows. If these blue lines then start to slowly move downwards; then we have a positive divergence. If that were to be followed by the green line crossing the zero line, its a pretty good be that the trend is changing and its a very good buying oportunity.
Moving Average Periodical DivergenceUses the difference between two PMA (Moving Average Periodical) indicators to create an oscillator.
Useful for visualizing daily/weekly cycles, strength and potential momentum. The defaults are 2 days (fast) and 5 days (slow).
MA Divergences StrategyThis is the Strategy version of the Study I published. It is a Moving Average that can be applied to any plot to plot divergences on any oscillator, as well as perform backtesting. You'll need a REALLY good oscillator to perform live trades using this alone, but I think it is a valuable tool and had the Strategy hanging around and for some reason didn't upload it yet.
So here it is.
Turn Length to 1 to follow the oscillator without lag. Turn Length up if you are getting too many false signals or tweak the original oscillator settings.
Uber Oscillator with DivergencesThis is a simple mod of the Uber Oscillator with more periods added to the mix and combined with a the Tradingview Divergence spotter.
Compare it to the standard Ultimate Oscillator and see the difference. Good to even overlay them even.
It basically just adds more detail. You won't always need it but sometimes it can catch big drops/peaks earlier then the standard AO while still retaining relative relaxedness during other periods.
MA Divergences for any indicatorThis is a mod of Tistas mod of the default RSI divergences.
www.tradingview.com
This is a SMA that can be applied to any indicator for divergence seeking. This can be useful if you use a custom indicator script and want divergences added, or for any oscillator really. Set the length to 1 and it will mirror the oscillator in question.
Cyclic Smoothed RSI with Motive-Corrective Wave Indicator
This indicator uses the cyclic smoothed Relative Strength Index (cRSI) instead of the traditional Relative Strength Index (RSI). See below for more info on the benefits to the cRSI.
My key contributions
1) A Weighted Moving Average (WMA) to track the general trend of the cRSI signal. This is very helpful in determining when the equity switches from bullish to bearish, which can be used to determine buy/sell points. This is then is used to color the region between the upper and lower cRSI bands (green above, red below).
2) An attempt to detect the motive (impulse) and corrective and waves. Corrective waves are indicated A, B, C, D, E, F, G. F and G waves are not technically Elliot Waves, but the way I detect waves it is really hard to always get it right. Once and a while you could actually see G and F a second time. Motive waves are identified as s (strong) and w (weak). Strong waves have a peak above the cRSI upper band and weak waves have a peak below the upper band.
3) My own divergence indicator for bull, hidden bull, bear, and hidden bear. I was not able to replicate the TradingView style of drawing a line from peak to peak, but for this indicator I think in the end it makes the chart cleaner.
There is a latency issue with an indicator that is based on moving averages. That means they tend to trigger right after key events. Perfect timing is not possible strictly with these indicators, but they do work very well "on average." However, my implementation has minimal latency as peaks (tops/bottoms) only require one bar to detect.
As a bit of an Easter Egg, this code can be tweaked and run as a strategy to get buy/sell signals. I use this code for both my indicator and for trading strategy. Just copy and past it into a new strategy script and just change it from study to a strategy, something like this:
strategy("cRSI + Waves Strategy with VWMA overlay", overlay=overlay)
The buy/sell code is at the end and just needs to be uncommented. I make no promises or guarantees about how good it is as a strategy, but it gives you some code and ideas to work with.
Tuning
1) Volume Weighted Moving Average (VWMA): This is a “hidden strategy” feature implemented that will display the high-low bands of the VWMA on the price chart if run the code using “overlay = true”.
- If the equity does not have volume, then the VWMA will not show up. Uncheck this box and it will use the regular WMA (no volume).
- defines how far back the WMA averages price.
2) cRSI (Black line in the indicator)
- Increase to length that amount of time a band (upper/lower) stays high/low after a peak. Reduce the value to shorten the time. Just increment it up/down to see the effect.
- defines how far back the SMA averages the cRSI. This affects the purple line in the indicator.
- defines how many bars back the peak detector looks to determine if a peak has occurred. For example, a top is detected like this: current-bar down relative to the 1-bar-back, 1-bar-back up relative to 2-bars-back (look back = 1), c) 2-bars-back up relative to 3-bars-back (lookback = 2), and d) 3-bars-back up relative to 4-bars-back (lookback = 3). I hope that makes sense. There are only 2 options for this setting: 2 or 3 bars. 2 bars will be able to detect small peaks but create more “false” peaks that may not be meaningful. 3 bars will be more robust but can miss short duration peaks.
3) Waves
- The check boxes are self explanatory for which labels they turn on and off on the plot.
4) Divergence Indicators
- The check boxes are self explanatory for which labels they turn on and off on the plot.
Hints
- The most common parameter to change is the . Different stocks will have different levels of strength in their peaks. A setting of 2 may generate too many corrective waves.
- Different times scales will give you different wave counts. This is to be expected. A counter impulse wave inside a corrective wave may actually go above the cRSI WMA on a smaller time frame. You may need to increase it one or two levels to see large waves.
- Just because you see divergence (bear or hidden bear) does not mean a price is going to go down. Often price continues to rise through bears, so take note and that is normal. Bulls are usually pretty good indicators especially if you see them on C,E,G waves.
----------------------------------------------------------------------------------------------------------------------------
cyclic smoothed RSI (cRSI) indicator
----------------------------------------------------------------------------------------------------------------------------
The “core” code for the cyclic smoothed RSI (cRSI) indicator was written by Lars von Theinen and is subject to the terms of the Mozilla Public License 2.0 at mozilla.org Copyright (C) 2017 CC BY, whentotrade / Lars von Thienen. For more details on the cRSI Indicator:
The cyclic smoothed RSI indicator is an enhancement of the classic RSI, adding
1) additional smoothing according to the market vibration,
2) adaptive upper and lower bands according to the cyclic memory and
3) using the current dominant cycle length as input for the indicator.
It is much more responsive to market moves than the basic RSI. The indicator uses the dominant cycle as input to optimize signal, smoothing, and cyclic memory. To get more in-depth information on the cyclic-smoothed RSI indicator, please read Decoding The Hidden Market Rhythm - Part 1: Dynamic Cycles (2017), Chapter 4: "Fine-tuning technical indicators." You need to derive the dominant cycle as input parameter for the cycle length as described in chapter 4.
Hope this helps and good luck.
Divergence TemplateDivergence Template!
This public indicator helps you to find as many divergences with as many indicators you like, without the long hassle of knowing and coding the divergence yourself.
Just replace the "Divergence Condition" with your formula and give it a title in the second step, everything simply illustrated to someone without any coding experience!
This example is calculating A/D Divergences.
Let's make 2021 great!
With help of @madoqa.
Non-Rescaled RSI█ OVERVIEW
Relative Strength Index is a momentum oscillator developed by J. Wilder. The original version of RSI rescaled the relative strength measurement to range. While the rescaling is useful for readability, This non-rescaled version tells the exact average relative strength of the movement for the past period, and give another way to put the relative strength reading into context of current market condition.
█ Description & How To Use
1. The (+/-) in relative strength value indicates the direction
Example 1: Relative Strength of 2.33 means average gain is 2.33 bigger than average loss for the past period (Equivalent to RSI 70)
Example 2: Relative Strength of -2.33 means average loss is 2.33 bigger than average gain for the past period (Equivalent to RSI 30)
Example 3: Relative Strength of 0 means average gain is equal to average loss for the past period (Equivalent to RSI 50)
Look at comparison below:
2. You can use it exactly how you would use RSI: Overbought/Oversold state, Divergence, Trend identification, Failure Swings etc..
█ Features
- Overbought/Oversold line still maintainable as standard RSI level (70,30) in user input screen. The script will recalculate and plot the ob/os level accordingly
- Value Label to indicate the RSI and RS value
- Custom Gradient Color Scheme
█ Limitation
The Relative Strength absolute value is capped at 20 to avoid ratio value too big(or too small). This is enough to get accurate equivalent of RSI reading between 5-95
█ Disclaimer
Past performance is not an indicator of future results.
My opinions and research are my own and do not constitute financial advice in any way whatsoever.
Nothing published by me constitutes an investment/trading recommendation, nor should any data or Content published by me be relied upon for any investment/trading activities.
I strongly recommends that you perform your own independent research and/or speak with a qualified investment professional before making any financial decisions.
Divergence for Many Indicators v4Hello Traders,
Here is my new year gift for the community, Digergence for Many Indicators v4 . I tried to make it modular and readable as much as I can. Thanks to Pine Team for improving Pine Platform all the time!
How it works?
- On each candle it checks divergences between current and any of last 16 Pivot Points for the indicators.
- it search divergence on choisen indicators => RSI , MACD , MACD Histogram, Stochastic , CCI , Momentum, OBV, VWMACD, CMF and any External Indicator !
- it checks following divergences for 16 pivot points that is in last 100 bars for each Indicator.
--> Regular Positive Digergences
--> Regular Negative Digergences
--> Hidden Positive Digergences
--> Hidden Negative Digergences
- for positive divergences first it checks if closing price is higher than last closing price and indicator value is higher than perious value, then start searching divergence
- for negative divergences first it checks if closing price is lower than last closing price and indicator value is lower than perious value, then start searching divergence
Some Options:
Pivot Period: you set Pivot Period as you wish. you can see Pivot Points using "Show Pivot Points" option
Source for Pivot Points: you can use Close or High/Low as source
Divergence Type: you can choose Divergence type to be shown => "Regular", "Hidden", "Regular/Hidden"
Show Indicator Names: you have different options to show indicator names => "Full", "First Letter", "Don't Show"
Show Divergence Number: option to see number of indicators which has Divergence
Show Only Last Divergence : if you enable this option then it shows only last Positive and Negative Divergences
you can include any External Indicator to see if there is divergence
- enable "Check External Indicator"
- and then choose External indicator name in the list, "External Indicator"
- External indicator name is shown as Extrn
- related external indicator must be added before enabling this option
Coloring, line width and line style options for different type of divergences.
Following Alerts added:
- Positive Regular Divergence Detected
- Negative Regular Divergence Detected
- Positive Hidden Divergence Detected
- Negative Hidden Divergence Detected
Now lets see some examples:
Hidden Divergences:
Regular and Hidden Divergences together:
Showing first letters of indicators:
You can see only the number of indicators which has divergence:
You can see only divergence lines without indicators names and numbers:
option to used different label/line/text colors:
You have option to see only last divergences:
You can change Pivot Period, in following example Pivot Period = 15:
You can use Close or High/Low as Source for Divergence
You can include external indicators and get divergences on it:
Wish you all a happy new year!
Enjoy!
Composite Index Divergence IndicatorComposite Index by Constance Brown mixed with built-ins Divergence Indicator
useful indicator to find divergence
this script find divergence automatically for you
Composite Index [TipsChain]This is a formula Ms Brown developed to identify divergence failures with in the RSI . This also highlights the horizontal support levels with in the indicator area.
The Composite Index study comprises 2 momentum indicators on the RSI which are smoothed using a moving average. Control of the upper and lower indicators can be used to adjust the periods represented by each through the Object Properties dialog box for the study.
The Composite Index is an oscillator that will warn when the RSI is failing to detect a price trend reversal by forming divergences with the RSI. It can be used in any time frame or market.
Usage:
1. Check hidden and regular divergences on RSI+COMPOSITE_INDEX and PRICE+COMPOSITE_INDEX.
2. After finding divergence wait for COMPOSITE_INDEX to cross under/over it's moving averages to trigger.
[RS]MACD Divergence V1This oscilator was created by Ricardo Santos using MACD's histogram as the series to find low and high fractals and from there find and plot divergences.
I just modified it a little bit to make it to look more like the MACD public library indicator and use the actual MACD series (instead of the histogram) to find the fractals and from there plot divergences.
I did this to make it easier for me and other fellow students of a Forex school where we use these type of divergences to find patterns.
Divergent Bars[Salty]Updated an existing Divergent Bar script to be able to show all divergent bars. There are 2 set of divergent bars that can be turned on. The original one based on price and alligator lines, and a new second one that shows ALL divergent bars. The second set has lighter lines and colors to differentiate them from the filtered alligator divergent bars.
Time Divergence - TDV [SHK]A truly time based indicator to check the strength of the asset based on "Time". The main idea came to my mind about 2 years ago, When i was counting the candles in an impulse move and comparing it to number of retracement candles .
So i got a period (13 for example) and checked the price change between the 13 candles, Then the space between those two points (the price!) is divided to 13 (the time!).
The result can be analyzed by checking the Divergence, or checking the Linear Regression, or bollinger band, or trend lines and channels, or ...
You can also test different periods.
I'm price action trader and i don't use indicators, But i publish my past works for other users.
Hope you find new usage methods and share them in comments.
Triangular Momentum Oscillator & Real Time Divergences [LuxAlgo]Oscillators are widely used in technical analysis and can return a large amount of information to the trader depending on their design. It is common to use oscillators to detect divergences with the price, divergences occur when the tops/bottoms made by the oscillator and price are negatively correlated.
The following oscillator is based on the momentum of a triangular moving average, hence the name "triangular momentum" because of the very smooth property of the triangular moving average, we aimed at a real-time detection of divergences instead of using more common methods such as relying on pivot high/low detection which are suitable for more noisy oscillators.
The oscillator can also be colored based on a gradient derived from the correlation between its output and the price which can be useful to detect when the oscillator is out of phase (significantly lagging or leading the price).
Settings
length : Period of the oscillator, higher values return a smoother output.
src : Input source of the indicator.
Show Lines : Show lines connecting the current top/bottom with the previous one made by the oscillator when a divergence is detected. True by default.
Color Based On Price/Oscillator Correlation : Allows the color of the oscillator to change based on its correlation with the price, with red colors suggesting a negative correlation.
Usages
The advantage of having a smoother oscillator for divergences detection is that it can be done in real-time since a top or bottom is present when the oscillator first difference cross 0. Smoother oscillators are also easier to interpret, however, they will still suffer from lag.
The divergences detected by the oscillator are regular divergences, where the oscillator leads price variations.
Using higher values of length allows the oscillator to filter out longer-term variations thus being smoother as a result.
By using the color mode based on the price/oscillator correlation we can see where the oscillator leads or lag the price, and since divergences are based on the price and oscillator going in the opposite direction we can have information where price might reverse.
It is also possible to interpret the oscillator without relying on the divergence detection, with a decreasing value of the oscillator indicating a downtrend and an increasing value indicating an uptrend.
TRY Me - Turkish Lira Quote Currency DivergencesThis is a conceptual indicator that converts the main chart series' quote currency from U.S. dollar to Turkish Lira. Should only be used with USD pairs unless you change the 'Pair' input.
Divergences are created by the difference in price due to the incredible changes in TRY value. The candle colors turn to grey when the forex exchange is closed; this is done to show you that the quote currency value won't change.
Support and resistance levels are also possible to be drawn.
Options to configure are changing the quote pair, colors, and turning the divergences on or off.
RSI Tops and BottomsHello Traders
This script finds Tops when RSI is in overbought area or Bottoms when RSI is in oversold area and checks the divergence between them. it checks divergence at tops/bottoms after RSI exited from OB/OS areas.
You can change overbought / oversold levels.
You can limit the time that RSI is in OB/OS area with the option "Max Number of Bars in OB/OS"
you can set the minimum/maximum distances between Tops/Bottoms with the options "Min Number of Bars between Tops/Bottoms" and "Max Number of Bars between Topss/Bottoms"
and you can set the color and line widths as you wish.
These tops or bottom must be sequential, means there mustn't be another top while checking tops or bottom while checking bottoms between them.
in next example you can see valid and invalid bottoms:
After you got signal then you better use Stop Order, a few pips higher than the high of colored candle for long positions, ( vise versa in short positions ). so you may escape from traps. ("Stop order" is filled when the price reached a pre-specified price. for example the price is now 10.0 and you set Buy Stop Order at 11.0 then if price reaches 11.0 then your buy order get filled. you can put stoploss a few pips lower than the low of colored candle or you can use ATR to decice stoploss level. how you wish)
For example in following screenshot you can see that buy stop order was not filled and you didn't take long position.
Enjoy!
MA MTF Momentum HistogramMy own interpretation indicator which i call multi time frame moving averages momentum with NO LAG EMA support (Optional).
The indicator is calculated by subtracting the long-term EMA from the short-term EMA .
This pretty much resembles the MACD moving averages calculation but without the smoothing of the histogram.
Can also be used to find divergences.
The background shows the main trend with higher time frame which can be set in the settings.
Aimed to use with Higher time frame (Double or more) but can also work with lower time frame.
How to use the indicator?
==Histogram==
Green: Momentum of asset is positive and increasing.
Lighter Green: Momentum of asset is still positive but decreasing and can revert to negative momentum.
Red: Momentum of asset is negative and increasing.
Lighter Red: Momentum of asset is still negative but increasing and revert to positive momentum.
==Background Color - Main Trend==
Green: HTF (Higher time frame) momentum is positive.
RED: HTF momentum is negative.
Feel free to comment and Follow to stay updated with upcoming scripts: www.tradingview.com
NOTE: BARS ARE COLORED BY DEFAULT WITH HISTOGRAM COLORS! (Can be changed in settings)
CSRS v2Candlesticked RSI v2 for price action traders!
See the True Momentum.
6 chart type, smooth RSI , add signal lines, find divergences, special alerts
This is 2nd version with major upgrade
Improved and more powerful
fully customizable.
features:
See RSI in 6 type of chart(Candles, Hollow Candles, Siwi Candles, Heikin Ashi, HL Bar, Line)
Monitor Up to 3 RSI , each one at desired resolution, source and length
Smooth each one of chart separately to remove noises
Add up to 3 signal line to primary chart in your desired source and type( SMA , EMA , WMA , HMA )
Find divergences which has special parameters
Gradient color adjustment of line chart
Add alert for reaching to important levels and detected divergences
ArcTan Oscillator [LuxAlgo]The following indicator is a normalized oscillator making use of the arc tangent sigmoid function (ArcTan), this allows to "squarify" the output result, thus visually filtering out certain variations originally in the oscillator. The magnitude of this effect can be controlled by the user. The indicator contains a gradient that shows the possibility of a reversal, with red colors indicating that a reversal might occur.
Settings
Length : Period of the oscillator
Pre-Gain : Changes the amplitude of the oscillator before passing through the ArcTan function, this allows to amplify/reduce the "squarification" effect introduced by this function. In order to make it easier for the user, the setting is in a (-10,10) range, with negative values reducing the amplitude and positive one increasing it.
Src : Source input of the indicator
Usage
The oscillator can be used to determine the direction of the trend by looking at its sign, if the oscillator is positive, market is up-trending, else down-trending, based on this usage the user might not be interested to look at every variations produced by the oscillator, this is where the hyperbolic tangent function and pre-gain setting can be useful, by using an high value of pre-gain the user will be able to only focus on the sign of the oscillator.
Here pre-gain is set to 5, we can see that the oscillator is now easier to visualize. However, the use of sigmoid functions remove useful information for a trader that needs to find divergences, this is where using a negative value of the pre-gain setting will result useful.
Here pre-gain is set to -5.
The indicator makes use of a gradient to show potential reversals, this gradient is determined by the correlation between the oscillator and the price (this is a way to measure potential divergences). If the color is closer to red it means that a potential reversal might occur, it is possible to say in which direction price might go by looking at the sign of the oscillator, so if the gradient is red and the oscillator is negative price might rise. The gradient is not affected by the pre-gain setting.