RSI Reborn [New Formula]A unique non-standard RSI formula with my extensions.
The indicator is displayed without delays and repaints, immediately after the close of the candle.
This formula allows me to correctly include the moving average in the calculation. The calculation allows me to display RSI with any type of MA.
By default I use EMA, with this type of MA my RSI is not visually different from a regular RSI.
I have 11 types of RSI to choose from:
'EMA'
'ALMA'
'RMF'
'TilsonT3'
'ARSI'
'RMA'
'SMA'
'VWMA'
'WMA'
'WWMA'
'ZEMA'
You also have a choice of RSI display:
As candlesticks and as a simple line.
You can adjust the colors in the Style tab.
When you select 'Candles' type, you can make the wicks transparent if they bother you.
I also added a source selection. By default, any RSI uses the Close source.
But you can choose any of 15:
VWAP, Close, Open, HL2, HLC3, OHLC4, Volume, High, Low, vwap(Close), vwap(Open), vwap(High), vwap(Low), AVG(vwap(H,L)), AVG(vwap(O,C)).
Additional extensions:
Additional RSI added.
By default, the extra RSI is twice as long as the regular RSI. Despite the value of 14. The "Multiple of Current TF" function allows calling RSI from a timeframe twice as long as the current one, if it is equal to 2. If it is equal to 3, then it will be 3 times longer than the current timeframe. And so on.
An additional moving average has been added.
You can use it as an ordinary additional line. Or leave it as Cloud by default.
A unique oversold/oversold formula in the form of small red/green dots has been added.
Bolinger Bands feature has also been added.
Formula
Money Velocity Population Adjusted (MVPA)MVPA=GDPPC/( M2 /POP). An adaptation to normal Money Velocity, taking into account populations for more volatile plots/different perspective. Major world economy's money supply velocity. Compare how each country's monetary policy has played out and current trajectory in comparison to others. The velocity of money is a measure of the number of times that the average unit of currency is used to purchase goods and services within a given time period. The concept relates the size of economic activity to a given money supply, and the speed of money exchange is one of the variables that determine inflation .
How To Calculate Symbol's UTC NumberVarious methods to calculate a symbol's timezone offset as a numerical value in hours and decimal minutes. This value may be useful to script authors in certain situations where timezone information needs to be available in a numerical format while using intraday charts. Special thanks to @LucF and TradingView Support for their efficiency advisements!
NOTICE: This is an example script and not meant to be used as an actual strategy. By using this script or any portion thereof, you acknowledge that you have read and understood that this is for research purposes only and I am not responsible for any financial losses you may incur by using this script!
Trend Strategy by zdmreThis Strategy is a trend following indicator. It is plotted on price and the current trend can be determined by its placement vis-a-vis price. It is constructed with just three parameters: Period, Multiplier and Entry/Exit Point with Superformula.
The default parameters are 14 for Average True Range (ATR) and 4 for its multiplier. The average true range (ATR) plays a key role in ‘Trend’ as the indicator uses ATR to compute its value and it signals the degree of price volatility. You should note that any changes to these numbers can affect the use of the Trend indicator.
While you using this indicator, you should not avoid putting your stop loss.
For a long position, you can put stop loss right at the red indicator line. For a short position, you can put it at the green indicator line. You can insert your own settings as well.
Using Trend Strategy along with a stop loss pattern is the best way for earning the best wealth in trading.
There is no best setting for any trading indicator.
Buy/Sell Alert EMA with SuperFormula by zdmre*** Use it at your own risk
This indicator has 3 indicators and gives a buy/sell signal depending on the EMA.
3 indicators:
- Ichimoku
- Bollinger Band
- EMA
It also shows the value on the candle as a warning in the Buy and Sell signals. This value is calculated with a special formula I have created.
On the other hand Bollinger Band and Ichimoku Cloud are also included to check the accuracy of the signals.
For this indicator, I recommend a minimum of 4 hours chart.
Graham FormulaThis is an Tradingview implementation of the Grahams Formula as described in Benjamin Grahams book "The Intelligent Investor".
In theory this can be used to screen for over- and undervalued stocks, however as Graham himself notes, you should look into other fundamentals when using them in conjunction with Grahams formula.
Coding ema in pinescriptWhat is EMA ?
Ema is known as exponential moving average, it comes from the class of weighted moving average. It gives more weightage to the recent price changes, thus making it much more relevant to the current market analysis. Also it provides a dynamic way of calculating support and resistances in a trend following setup.
The most common way to mint profit out from the market is to use trend following setups which can be easily achieved by using a group of EMA’s
So how’s this EMA calculated ?
Before understanding the calculation of EMA let’s look into a much wider topic:
“The Law of Averages”
It states : If you do something often enough a ratio will appear, simply put, any time series data, tend to deviate from its average.
EMA provides a way to statistically calculate the exponential moving average for a provided time series data giving much more emphasis on the most recent data in the series.
So in the 17th century, when the people were playing with numbers in their free time, they came up with a statistical strategy to envelop any time series data to detect the direction of the data flow , they called it exponential moving average.
Later in 1940’s with the increase in signal processing requirements in the field of electronic devices scientists started using Exponential moving average onto the electronic signal followers, just to classify the signals as above or below a moving/dynamic threshold.
So EMA is a smoothed time-series data.
The simplest form of EMA Smoothing can be given by the formula:
S(t) = alpha * X(t) + (1 - alpha) * X(t - 1).
The value of alpha must lie between 0 and 1
Where
alpha , is the smoothing factor
X(t) , is the current observation data point
X(t - 1), is the past observational data point.
t , is the current time
Generally,
In current day trading setups for EMA the alpha is calculated by
alpha = 2 / (time period window + 1)
Things to note here is that the alpha calculated above is the most generally used factor calculation method for EMA ,
You can tweak the alpha function above until it gives value between 0 and 1 for example alpha can also be written as
alpha = ln ( current price / past price )
Note it’s just a weighing scheme,
But for Our Case of EMA
We will be using
alpha = 2 / (time period window + 1)
Please refer to the script code below