Correlation prix [SP500, TESLA, BTCBefore you see this post I want to thank all the TradingView team. Every day that passes I learn better and better to use Pine script and I owe this to all those who publish and to the philosophy of TradingView. Thanks from Amos
This trading indicator compares the prices of the S&P 500 Index (SP500), Tesla (TSLA), and Bitcoin (BTC) to find correlations between them. To make the prices of SP500 and Tesla comparable to the price of Bitcoin, the indicator multiplies the closing price of Tesla by 114 and the closing price of the S&P 500 Index by 5.6.
In this way we can superimpose the prices on the BTC chart and see what happens.
Average BTC price/ tesla price = 114, so if we multiply the tesla price by 114 times we can superimpose it on the BTC price
At average BTC/SPX price = 5.6, also in this case we multiply the price of SPX by 5.6 to overlay the graph and see any correlations.
The indicator then calculates the average price between SP500 and Tesla, using the formula (SP500 + Tesla) / 2. This calculation creates a new line on the chart that represents the average price between these two assets.
The BTC_SP_TE variable is then calculated as the average of the closing price of Bitcoin and the previously calculated average price of SP500 and Tesla, using the formula (Btc + SP_TE) / 2. This calculation creates another line on the chart that represents the average price between Bitcoin and the previously calculated average between SP500 and Tesla.
The idea behind calculating these averages is to find correlations and patterns between the prices of these assets, which can help identify potential trading opportunities. By comparing the average prices of different assets, the trader can look for trends and patterns that might not be apparent when looking at each asset individually.
The indicator plots these prices on a chart and fills the area between them with either green or fuchsia, depending on which one is higher. The strategy suggests buying Bitcoin when the average price of SP500 and Tesla is higher than the current price of Bitcoin, and selling when it is lower.
To add visual cues to the trading strategy, the indicator uses the plotchar function to display a small triangle below the chart when it detects a potential buying opportunity. This is done with the following parameters:
Value: BTC_SP_TE < Btc and Btc > Btc1 and Btc1 > Btc , which is a logical expression that checks whether the average price of SP500 and Tesla is less than the current price of Bitcoin (BTC_SP_TE < Btc), and whether the current price of Bitcoin is higher than the price 10 bars ago (Btc > Btc1 ) and higher than the price on the previous bar (Btc1 > Btc ).
Text: "Moyen BTC_SP_Te", which is the text to display inside the marker.
Symbol: "▲", which is the symbol to use for the marker. In this case, it is a small triangle pointing upwards.
Location: location.belowbar, which specifies that the marker should be placed below the bar.
I hope this is an example of how to create an indicator on TradingView, remember that correlations do not always last, it is possible that when you see the graph this correspondence no longer exists, do your studies and get inspired.
Скользящие средние
Trendlines 2x ver. 5 plus GMMA modifiedthis is a copy of "Trendlines 2x +" Script by Lij_MC (but converted to Version 5 of Pine script), which draws trendlines from the pivot points in the price chart and also add some arrows from "Guppy Multiple Moving Averages" Indicator by optictropic for trend confirmation.
I Change this code from Pine script 4 to 5 to add some functionalities to it.
Some adjustments of parameters have been made by me to easy recognition of Trendline breaks.
These parameters are in the original code, but I make them default for nicer look of the indicator and easier recognition of Trendline breaks.
for example, breaking the primary trendlines are shown by color change of the candles and in the same time by a Break symbol as a label.
breaking the secondary trendlines are shown only by candle color. Extension of the secondary trendlines are set to 50 candles to better recognize the past trendlines .
color candles are set to default to easily see the trend direction of the chart.
I have also added some arrows by the help of "Guppy Multiple Moving Averages" indicator by optictropic, that can be used for confirmation of trend direction.
I think this can represent good looking trend direction and trendline breaks can help traders for a better trade decision.
for better trading with this indicator, buy when you have green or lime color for candles, and GMMA gives UP long arrow signals, check higher time frames, and at last, this is only a help but not a final decision making indicator. you must have your own price action analysis.
best wishes
(Very promising) [Abdullah Ahmed] Momentum indicator V.1Description: MOM-LRC is a powerful technical analysis indicator designed to provide traders with signals based on the momentum of an asset's price and its deviation from its mean value. The indicator calculates the exponential RSI and uses a custom function to determine the percentage change from the mean. The upper and lower bands of the momentum channel are then calculated using linear regression of the rate of change from the mean. The channel multiplier can be adjusted to increase or decrease the sensitivity of the indicator.
How to use :
1 - Using MOM-LRC , look for buy signals when the price of the asset is below the lower border of the channel and retracing up. The opposite is true in the case of sell signals.
2 - It is also used in the case of negative and positive divergences, just as you use RSI
The indicator can be used on any time frame and any asset, making it a versatile tool for traders of all levels.
features:
Calculates exponential RSI and percentage change from the mean
Uses linear regression to calculate upper and lower bands of momentum channel
Adjustable channel multiplier for increased sensitivity
Suitable for any time frame and any asset
Happy trading!
MARS - Moving Average Relative StrengthThe original idea from this script is from the script " Percentage Relative Strength " by dman103 . The original script compared a symbol to an index by their everyday percentage change. The symbol percentage was subtracted from percentage change of the index, & the results were then smoothed by moving averages.
Instead of daily percentage changes, this script directly calculates relative strength via a moving average. We call this simpler approach as MARS (Moving Average Relative Strength) .
MARS compares a symbol to the index by making use of the price's distance from a moving average. By default, we compare the distance from the 50-day simple moving average of the stock vs that of the index. Both the type & the length of the moving average is customisable.
Background color indicates the index being above or below its moving average.
Blue background: index is above its moving average
Pink background: index is below its moving average
The histogram indicates whether the stock is under-performing or out-performing the index.
Up-bars : stock is out-performing the index i.e. between the stock & the index, the difference between the distance to/from the 50-day moving average is a positive value.
Down-bars : stock is under-performing the index i.e. between the stock & the index, the difference between the distance to/from the 50-day moving average is a negative value.
The color of the histogram indicates the type of out-performance or under-performance. There can be a total of 6 such colors:
Relative out-performance : both index & stock are bearish, but stock is less bearish. The script prints light green up-bars on a pink background.
Gross out-performance : both index & stock are bullish, but stock is more bullish. The script prints green up-bars on a blue background.
Absolute out-performance : index is bearish, but stock is bullish! The script prints blue up-bars on a pink background.
Relative under-performance : both index & stock are bullish, but stock is less bullish. The script prints light red bars on a blue background.
Gross under-performance : both index & stock are bearish, but stock is more bearish. The script prints dark red bars on a pink background.
Absolute under-performance : index is bullish, but stock is bearish! The script prints black down-bars on a blue background.
Additional customisation options:
Paint bars option changes the bar colors to mirror the histogram colors.
Easy colors option just changes the histogram colors to either blue or pink, indicating out-performance or under-performance, respectively. This is when the trader does not wish to demarcate between the above-mentioned 6 conditions.
TASC 2023.04 Undersampled Double MA█ OVERVIEW
TASC's April 2023 edition of Traders' Tips features an article entitled "Just Ignore Them: Undersampling The Data As A Smoothing Technique" by John Ehlers, which explores a method for reducing noise through data sampling. This script implements the article's proposed Undersampled Double MA indicator.
█ CONCEPTS
The conventional approach to reducing the impact of noise in the market data on trading rules is to use smoothing filters like moving averages. However, John Ehlers suggests that changing the sample rate of the datastream is a simple and effective way to smooth the data and reduce noise. Specifically, he argues that undersampling the data removes high-frequency components contributing to noisiness. Notably, the elimination of these components produces less lag than that of conventional smoothing filters.
The Undersampled Double MA indicator implemented in this script represents a practical application of smoothing with undersampling. It samples the data at a given rate (for instance, once every five bars, as suggested by Ehlers), then processes the resulting data using a Hann window filter with two different periods, producing two smooth data streams that traders can use in the same way as the combination of two conventional moving averages of different lengths (i.e., fast and slow MAs).
█ CALCULATIONS
The script samples data once every N th bar (by default, N = 5) and smooths the undersampled data with 6-period and 12-period Hann filters, which it plots on the main chart. Users can adjust the sampling period and the periods of each Hann filter to their liking from the inputs in the script settings.
Simple Dominance Momentum IndicatorThe Simple Dominance Momentum Indicator is a powerful tool for tracking market trends in the world of cryptocurrency. By analyzing the relationship between dominance and market movement, this indicator helps traders identify when money is flowing into or out of the market.
Using the pane structure on TradingView, the Dominance Momentum Indicator makes it easy to visualize and track data from CryptoCap charts. Whether you're a seasoned investor or starting out, this indicator can help you make more informed trading decisions.
All this indicator does is create the pane with a line chart using the Dominance charts to allow you to see the data with one button instead of doing it all manually. However with the addition to allow it to toggle between crypto and stables, so if you are using a /BTC pair, you don't have to add a new pane on, it automatically converts. If you are looking at USDT pairs for example, it will highlight that one for you.
While it can work under any conditions, the Dominance Momentum Indicator is particularly effective on higher timeframes, providing valuable insight into the overall plot of the market trend. With a 55EMA and a faster-moving average of 21EMA, this indicator is designed to help you stay ahead of the curve and make smarter trading decisions.
Remember the golden rule for stablecoin dominance. Down = good, and up = bad; however, you can just invert the indicator, so it flows with the market.
When it comes to the dominance of individual cryptocurrencies, for example, DOT.D, you might find that it going up = increasing dominance is STRENGTH. If the dominance of that is increasing it means it's growing.
Creator Credit: Jamie Goodland
5 Minute TF 200 EMA Retest by Grantwww.tradingview.com
This indicator is a simple script meant to find retests on the 200 period moving average. It's current state is optimized for the 5 minute timeframe.
This works in all markets and all timeframes as long as you adjust certain rules for higher timeframes.
It's strengths and weaknesses
- Good at trend continuation in strong markets
- Bad in ranging markets (not surprising)
How does it work?
- It first identifies an overall trend by using the 200 ema.
- For long positions, it waits for price to close below the 200 ema, and then shortly closing back above the ema. For short positions its the opposite.
- For lower timeframes there are some other factors that help filter out bad signals that include:
- Makes sure that volume is increasing.
- Makes sure that volume is higher than average volume.
- For higher timeframes, the more specific factors aren't required.
How to use this indicator:
- Green triangles mean long positions
- Red triangles mean short positions
- Always trade with stoplosses and never risk too much of your account, please practice proper risk managment.
DISCLAIMER: Trading is inherently dangerous and carries lot's of risk. What you decide to do with my script has nothing to do with me. I am not responsible for any financial gains or losses made using this script. It is important to recognize other factors in the market to make better decisions.
SLSMA - Smooth LSMASLSMA - Smooth Least Squares Moving Average is an attempt to smooth out the ZLSMA line.
The SLSMA formula calculates the difference between between the LSMA and the LSMA minus the LSMA of itself.
SLSMA follows all the same rules of LSMA and ZLSMA but provides a much more stable regression and stronger pivots.
Moving Average Lab - by InFinitoThe Moving Average Lab allows to create any possible combination of up to 3 given MAs. It is meant to help you find the perfect MA that fits your style, strategy and market type.
This script allows to average, weight, double and triple multiple types and lengths of Moving Averages
Currently supported MA types are:
SMA
EMA
VWMA
WMA
SMMA (RMA)
HMA
LSMA
DEMA
TEMA
Features:
- Double or Triple any type of Moving Average using the same logic used for calculating DEMAs and TEMAs:
In the following example you can see a normal, double and triple 200 VWMA
- Average 2 or 3 different types and lengths of Moving Average:
In the example you can see the average between a Double LSMA and a SMA
- Weight each MA manually:
The example shows the average of an HMA and a VWMA with the HMA having a weight of 2 and the VWMA having a weight of 1
- Average up to 3 personalized MAs:
The example shows the average of an EMA + a Double WMA + a Triple SMA with a 3:2:1 weighting
- Average different Moving Averages with different length each:
The example shows the average of an 800 SMA + a 400 VWMA + a 200 EMA
DojiCandle body size RSI-SMMA filter MTF
DojiCandle body size RSI-SMMA filter MTF
Hi. I was inspired by a public script written by @ahmedirshad419, .
I thank him for his idea and hard work.
His script is the combination of RSI and Engulfing Pattern.
//------------------------------------------------------------
I decided to tweak it a bit with Open IA.
I have changed:
1) candle pattern to DojiCandle Pattern;
2) I added the ability for the user to change the size of the candlestick body;
3) Added SMMA 200;
4) Changed the colour of SMMA 200 depending on price direction;
5) Added a change in the colour of candlesticks, depending on the colour of the SMMA 200;
6) Added buy and sell signals with indicator name, ticker and close price;
7) Added ability to use indicator on multi time frame.
How it works
1. when RSI > 70 > SMMA 200 and form the bullish DojiCandle Pattern. It gives sell signal
2. when RSI < 30 < SMMA 200 and form the bearish DojiCandle Pattern. It gives buy signal
settings:
basic setting for RSI, SMMA 200 has been enabled in the script to set the levels accordingly to your trades
Enjoy
Trend Indicator with RSI and Fibbonacci Band 0.702 crossingsToday we have a new Indicator set, which I created using inspiration from the Trend Magic Indicator from KivancOzbilgic and adding several new aspects to it and a slightly modified calculation of the trend indicator itself.
You can change the inputs by changing the pre set values in the settings, but I found the current settings quite accurate. Feel free to experiment to fine tune the indicators.
Here are the details of the script:
Trend indicated within candles and as a line
- bullish and bearish trends are now also indicated within the candle based on the CCI calculation.
- Bullish is indicated by a green circle below the candle or as one may call it a "dot"
- bearish trend is indicated by a red circle above the candle
Entry Signal based on RSI crossing its EMA
- my motivation was to have a clearer entry signal besides highlighting a trend, which can not really be used to identify a good entry but to give confidence or when loosing trend to give an exit signal.
- after studiying the RSI and how it works together with its EMA it looks quite interesting as an entry or exit signal. But be cautios if the EMA and RSI values are moving in a narrow area we get a lot of crosses and therefore signals which should rather be ignored rather to be act on. So the the range where the cross happens is also quite important. But this aspect is not yet reflected as a rule/ logic.
But I am thinking of adding something.. or alternativly best to switch to another timeframe to get some better data
RSI overbought and oversold as Diamonds
- I also added key indications of oversold or overbought as Blue and Pink diamonds, can be considered as additional information to maybe identify a short term top or bottom.. but its not very accurate.
Entry signal based on crossing Fibbonachi Band 0.702
- So far the 0.702 seems to be quite an interesting retracement level which seems to be met a lot of times
- based on the assumption the price will evantually hit the 0.702 either direction I wanted to get a signal when this happens
- BUT! a big but, unfortunalty the Fibbonachi bands tend to bloat up in case of high volatility so it is not easy to find the crossing on higher timeframes
Here are the standard value which I found quite accurate for the assets I use this indicator set:
CCI Period = 5
ATR Multiplier = 1
ATR Period = 1
Source = High Low Close (hlc3 average value of the candle
Here the inputs used for the RSI Crossing signal (here you should play around a little to see which entry would have been best..)
RSI Length = 14
RSI Oversold = 25 (to be used for the "golden" entry signal based on the FBB crossing)
RSI Overbought = 80 (to be used for the "golden" entry signal based on the FBB crossing)
RSI Moving Average Length
In future versions I will add options to activate or deactive some of the plotting and espacially this golden dot when the fibbonachi band is being crossed needs some fine tuning..
And lets see if there is a way to fix the bloating of those bands..
Blocky's EMA RibbonA classic EMA ribbon setup.
The script uses eight EMAs, with default lengths ranging from 21 to 55 periods, with an additional EMA with a default length of 200 periods.
The lengths of the EMAs can be customized, when customizing, the shortest time frame should be first and the longest time frame last.
The ribbons gradient strength is calculated based on the EMA's sequence, and their separation.
The color and transparency are set based on the calculated strength. The bolder the color, the stronger the strength.
Use the opacity multiplier to increase/decrease the strength of the gradient. BITSTAMP:BTCUSD
7 Week RuleThe 7 week rule was shared by Gil Morales in his book “Trade Like an O’Neil Disciple”. The rule is described as: Stocks that have shown a tendency to “obey” or “respect” the 10-day moving average for at least 7 weeks in an uptrend should often be sold once the stock violates the 10-day line. A “violation” is defined as a close below the 10-day moving average followed by a move on the next day below the intraday low of the first day.
This indicator makes using the 7 week rule easy. Once a stock has closed above its selected moving average (10SMA by default) for 35 days the 7 week rule is triggered. Once the stock then “violates” the moving average, a sell signal is printed on the chart.
Indicator Customizations
Moving Average Length & Type
Show or Hide Moving Average
Show Running Count of Days Above Selected MA
Highlight When 7 Week Rule Triggers
Option to Show First Day Above MA
Indicator is dynamic and will continue the count if no violation occurs.
Stx Ma-Trend Findermeasures the inclination of the average slope and allows to relate it to a comparison value, which depends on the asset, and can be set in the settings.
In this way the average will be represented in red when it is inclined downwards and in green upward.
The blue zones will be considered as flat markets.
Hurst Exponent Trend filterHello Traders !!
Hurst Exponent Trend filter utalises the Hurst Exponent and VAWMA (one of my other unique indicators - check my script publishings to use) to categorise the market and decide whether its Trending, H > 0.5, In random Geometric Brownian Motion (GBM) H = 0.5 or Mean reverting (Contrarian), H < 0.5, When Trending a Trend following indicator -The VAWMA- is color highlighted, By doing so, theoreticaly price noise is eleimnated leaving statsitcaly true zones of price action Trend.
What is The Hurst Exponent ?
Developed by The Hydrologist Edwin Harlod Hurst, The Hurst Exponent measures auto correlation in time series sets, Its first applicartions were in the natural world, e.g. in measureing the volume of water in a river.
Although since then it has had applications in Finance, this may be largly due to autocorrelation functions being usefull tools in univaritae time series anaylyis.
The Hurst Exponent (H) aims to segment the market into three differnet states, Trending (H > 0.5), Random Geometric Brownian Motion (H = 0.5) and Mean Reverting / Contrarian (H < 0.5). In my interpritation this can be used as a trend filter that iliminates market noise, which may be achived by only focusing on trending zones.
How to Interprit the Indicator :
Focusing on the Above image, When H > 0.5 A trend is presnet, to decide the directional bias, both VAWMA`s position is checked, given the fast VAWMA > slow VAWMA and the current close > the fast VAWMA a bulish bias is present, signafied by a vibrant green fill between the fast VAWMA and price action. note the exact opposite logic for a bearish bias and H > 0.5 (signafied by a vibrant red fill). .
I will continue to update this Trading Indicator.
PS : Thats given I can hopfully remmember
Happy Trading !!
Market Condition DetectorThis script allows to change the background color of the main chart to green or red depending on the following factors:
Based on the QQQ graph whatever ticker you are watching
- Price > EMA20 Da
- Net New Highs > 0
- 10EMA Da > 20 EMA Da
When you are trading Break-Out, EP or other similar trades you will need the market at your back to improve both the winrate and the risk reward ratio.
This is a very useful tool if you struggle with the FOMO biais. It will help you detect the trend at a glance.
Remember that the top best trader are waiting for their trade to work and only after getting some traction, and only then will they take the next trade.
I also proceeded to find a formula that make the indicator be the smoother possible with the less possible amount of noise.
/!\ This indicator is intended for use on daily charts . /!\