VAcc (Velocity & Acceleration)VAcc (Velocity & Acceleration) is a momentum indicator published by Scott Cong in Stocks & Commodities V. 41:09 (8–15). It applies concepts from physics, namely velocity and acceleration, to financial markets. VAcc functions similarly to the popular MACD (Moving Average Convergence Divergence) indicator when using a longer lookback period, but produces more responsive results. With shorter periods, VAcc exhibits characteristics reminiscent of the stochastic oscillator.
🟠 Algorithm
The average velocity over the past n periods is defined as
((C - C_n) / n + (C - C_{n-1}) / (n - 1) + … + (C - C_i) / i + (C - C_1) / 1) / n
At its core, the velocity is a weighted average of the rate of change over the past n periods.
The calculation of the acceleration follows a similar process, where it’s defined as
((V - V_n) / n + (V - V_{n - 1}) / (n - 1) + … + (V - V_i) / i + (V - V_1) / 1) / n
🟠 Comparison with MACD
A comparison of VAcc and MACD on the daily Nasdaq 100 (NDX) chart from August 2022 helps demonstrate VAcc's improved sensitivity. Both indicators utilized a lookback period of 26 days and smoothing of 9 periods.
The VAcc histogram clearly shows a divergence forming, with momentum weakening as prices reached new highs. In contrast, the corresponding MACD histogram significantly lagged in confirming the divergence, highlighting VAcc's ability to identify subtle shifts in trend momentum more immediately than the traditional MACD.
Średnie kroczące
Hull WavesThe Hull Waves indicator is based on the Hull Moving Averages (HMA), which are special moving averages that stand out for their ability to filter out market noise and offer a clearer view of price trends. Compared to traditional moving averages, HMAs are more responsive yet smoother, allowing traders to capture significant price movements without getting overwhelmed by short-term fluctuations.
The HMAs integrated into Hull Waves provide two distinct perspectives on the price trend:
8-period HMA: This short-term HMA is extremely reactive and closely follows price changes. It is ideal for capturing short-term trading signals while the medium-term 21-period HMA offers a more balanced view of price trends and identifies medium-term trends.
By crossing HMAs, traders can efficiently identify trend reversal points or strong market continuations.
Another feature of the indicator is the “fan” of dynamic lines, which acts as a visual float for price candles, allowing traders to quickly evaluate trading opportunities.
The "fan" or float of dynamic lines represents a visual representation of the candle's price movements. These lines extend from the start point to the end point, like an open fan. This visual approach makes the market dynamics immediately evident.
Strategy:
Long Entry Signal (Buy):
When the Hull Waves range shows a series of upward sloping lines and the Hull Moving Averages (e.g. 8-period HMA) crosses the 21-period HMA upwards, it is a long entry signal.
Confirmation of the signal can come from an increase in trader volume or other supporting indicators.
Place a buy order at the next closing price.
Short Entry Signal (Sell):
When the Hull Waves range shows a series of downward sloping lines and the Hull Moving Averages (e.g. 8-period HMA) crosses the 21-period HMA downward, it is a short entry signal.
Confirm the signal with an increase in trader volume or other relevant indicators.
Place a sell order at the next closing price.
Exit Signal (Closing a Position):
To close a long position, wait for a signal reversal, such as the Hull Moving Averages crossing downwards or a change in the Hull Waves range.
To close a short position, wait for a signal reversal, such as the Hull Moving Averages crossing higher or a change in the Hull Waves range.
[AIO] Multi Collection Moving Averages 140 MA TypesAll In One Multi Collection Moving Averages.
Since signing up 2 years ago, I have been collecting various Сollections.
I decided to get it into a decent shape and make it one of the biggest collections on TV, and maybe the entire internet.
And now I'm sharing my collection with you.
140 Different Types of Moving Averages are waiting for you.
Specifically :
"
AARMA | Adaptive Autonomous Recursive Moving Average
ADMA | Adjusted Moving Average
ADXMA | Average Directional Moving Average
ADXVMA | Average Directional Volatility Moving Average
AHMA | Ahrens Moving Average
ALF | Ehler Adaptive Laguerre Filter
ALMA | Arnaud Legoux Moving Average
ALSMA | Adaptive Least Squares
ALXMA | Alexander Moving Average
AMA | Adaptive Moving Average
ARI | Unknown
ARSI | Adaptive RSI Moving Average
AUF | Auto Filter
AUTL | Auto-Line
BAMA | Bryant Adaptive Moving Average
BFMA | Blackman Filter Moving Average
CMA | Corrected Moving Average
CORMA | Correlation Moving Average
COVEMA | Coefficient of Variation Weighted Exponential Moving Average
COVNA | Coefficient of Variation Weighted Moving Average
CTI | Coral Trend Indicator
DEC | Ehlers Simple Decycler
DEMA | Double EMA Moving Average
DEVS | Ehlers - Deviation Scaled Moving Average
DONEMA | Donchian Extremum Moving Average
DONMA | Donchian Moving Average
DSEMA | Double Smoothed Exponential Moving Average
DSWF | Damped Sine Wave Weighted Filter
DWMA | Double Weighted Moving Average
E2PBF | Ehlers 2-Pole Butterworth Filter
E2SSF | Ehlers 2-Pole Super Smoother Filter
E3PBF | Ehlers 3-Pole Butterworth Filter
E3SSF | Ehlers 3-Pole Super Smoother Filter
EDMA | Exponentially Deviating Moving Average (MZ EDMA)
EDSMA | Ehlers Dynamic Smoothed Moving Average
EEO | Ehlers Modified Elliptic Filter Optimum
EFRAMA | Ehlers Modified Fractal Adaptive Moving Average
EHMA | Exponential Hull Moving Average
EIT | Ehlers Instantaneous Trendline
ELF | Ehler Laguerre filter
EMA | Exponential Moving Average
EMARSI | EMARSI
EPF | Edge Preserving Filter
EPMA | End Point Moving Average
EREA | Ehlers Reverse Exponential Moving Average
ESSF | Ehlers Super Smoother Filter 2-pole
ETMA | Exponential Triangular Moving Average
EVMA | Elastic Volume Weighted Moving Average
FAMA | Following Adaptive Moving Average
FEMA | Fast Exponential Moving Average
FIBWMA | Fibonacci Weighted Moving Average
FLSMA | Fisher Least Squares Moving Average
FRAMA | Ehlers - Fractal Adaptive Moving Average
FX | Fibonacci X Level
GAUS | Ehlers - Gaussian Filter
GHL | Gann High Low
GMA | Gaussian Moving Average
GMMA | Geometric Mean Moving Average
HCF | Hybrid Convolution Filter
HEMA | Holt Exponential Moving Average
HKAMA | Hilbert based Kaufman Adaptive Moving Average
HMA | Harmonic Moving Average
HSMA | Hirashima Sugita Moving Average
HULL | Hull Moving Average
HULLT | Hull Triple Moving Average
HWMA | Henderson Weighted Moving Average
IE2 | Early T3 by Tim Tilson
IIRF | Infinite Impulse Response Filter
ILRS | Integral of Linear Regression Slope
JMA | Jurik Moving Average
KA | Unknown
KAMA | Kaufman Adaptive Moving Average & Apirine Adaptive MA
KIJUN | KIJUN
KIJUN2 | Kijun v2
LAG | Ehlers - Laguerre Filter
LCLSMA | 1LC-LSMA (1 line code lsma with 3 functions)
LEMA | Leader Exponential Moving Average
LLMA | Low-Lag Moving Average
LMA | Leo Moving Average
LP | Unknown
LRL | Linear Regression Line
LSMA | Least Squares Moving Average / Linear Regression Curve
LTB | Unknown
LWMA | Linear Weighted Moving Average
MAMA | MAMA - MESA Adaptive Moving Average
MAVW | Mavilim Weighted Moving Average
MCGD | McGinley Dynamic Moving Average
MF | Modular Filter
MID | Median Moving Average / Percentile Nearest Rank
MNMA | McNicholl Moving Average
MTMA | Unknown
MVSMA | Minimum Variance SMA
NLMA | Non-lag Moving Average
NWMA | Dürschner 3rd Generation Moving Average (New WMA)
PKF | Parametric Kalman Filter
PWMA | Parabolic Weighted Moving Average
QEMA | Quadruple Exponential Moving Average
QMA | Quick Moving Average
REMA | Regularized Exponential Moving Average
REPMA | Repulsion Moving Average
RGEMA | Range Exponential Moving Average
RMA | Welles Wilders Smoothing Moving Average
RMF | Recursive Median Filter
RMTA | Recursive Moving Trend Average
RSMA | Relative Strength Moving Average - based on RSI
RSRMA | Right Sided Ricker MA
RWMA | Regressively Weighted Moving Average
SAMA | Slope Adaptive Moving Average
SFMA | Smoother Filter Moving Average
SMA | Simple Moving Average
SSB | Senkou Span B
SSF | Ehlers - Super Smoother Filter P2
SSMA | Super Smooth Moving Average
STMA | Unknown
SWMA | Self-Weighted Moving Average
SW_MA | Sine-Weighted Moving Average
TEMA | Triple Exponential Moving Average
THMA | Triple Exponential Hull Moving Average
TL | Unknown
TMA | Triangular Moving Average
TPBF | Three-pole Ehlers Butterworth
TRAMA | Trend Regularity Adaptive Moving Average
TSF | True Strength Force
TT3 | Tilson (3rd Degree) Moving Average
VAMA | Volatility Adjusted Moving Average
VAMAF | Volume Adjusted Moving Average Function
VAR | Vector Autoregression Moving Average
VBMA | Variable Moving Average
VHMA | Vertical Horizontal Moving Average
VIDYA | Variable Index Dynamic Average
VMA | Volume Moving Average
VSO | Unknown
VWMA | Volume Weighted Moving Average
WCD | Unknown
WMA | Weighted Moving Average
XEMA | Optimized Exponential Moving Average
ZEMA | Zero Lag Moving Average
ZLDEMA | Zero-Lag Double Exponential Moving Average
ZLEMA | Ehlers - Zero Lag Exponential Moving Average
ZLTEMA | Zero-Lag Triple Exponential Moving Average
ZSMA | Zero-Lag Simple Moving Average
"
Don't forget that you can use any Moving Average not only for the chart but also for any of your indicators without affecting the code as in my example.
But remember that some MAs are not designed to work with anything other than a chart.
All MA and Code lists are sorted strictly alphabetically by short name (A-Z).
Each MA has its own number (ID) by which you can display the Moving Average you need.
Next to the ID selection there are tooltips with short names and their numbers. Use them.
The panel below will help you to read the Name of the selected MA.
Because of the size of the collection I think this is the optimal and most convenient use. Correct me if this is not the case.
Unknown - Some MAs I collected so long ago that I lost the full real name and couldn't find the authors. If you recognize them, please let me know.
I have deliberately simplified all MAs to input just Source and Length.
Because the collection is so large, it would be quite inconvenient and difficult to customize all MA functions (multipliers, offset, etc.).
If you need or like any MA you will still have to take it from my collection for your code.
I tried to leave the basic MA settings inside function in first strings.
I have tried to list most of the authors, but since the bulk of the collection was created a long time ago and was not intended for public publication I could not find all of them.
Some of the features were created from scratch or may have been slightly modified, so please be careful.
If you would like to improve this collection, please write to me in PM.
Also Credits, Likes, Awards, Loves and Thanks to :
@alexgrover
@allanster
@andre_007
@auroagwei
@blackcat1402
@bsharpe
@cheatcountry
@CrackingCryptocurrency
@Duyck
@ErwinBeckers
@everget
@glaz
@gotbeatz26107
@HPotter
@io72signals
@JacobAmos
@JoshuaMcGowan
@KivancOzbilgic
@LazyBear
@loxx
@LuxAlgo
@MightyZinger
@nemozny
@NGBaltic
@peacefulLizard50262
@RicardoSantos
@StalexBot
@ThiagoSchmitz
@TradingView
— 𝐀𝐧𝐝 𝐎𝐭𝐡𝐞𝐫𝐬 !
So just a Big Thank You to everyone who has ever and anywhere shared their codes.
G Channel with Arrows
1. Channel Calculation:
- The indicator calculates an upper channel ( `UpperBuffer` ) and a lower channel ( `LowerBuffer `) based on the input parameters `ChannelPeriod` .
- The channels are determined by a dynamic calculation that considers the current price ( `src` ) and the previous values of the upper and lower channels (` aBuffer` and `bBuffer` ).
2. Middle Channel:
- The middle channel ( `MiddleBuffer` ) is the average of the upper and lower channels, providing a central reference line.
3. Exponential Moving Average (EMA):
- The script calculates an Exponential Moving Average (`EMAValue`) based on the closing prices with a specified period (`EMAPeriod`).
4. Channel Plots:
- Plots for the upper, lower, and middle channels are displayed on the chart, each with a distinctive color and style.
5. Fill Between Channels:
- The space between the upper and middle channels is filled with a blue color (`#1900ff`), and the space between the lower and middle channels is filled with a red color (`#f70a0a`).
6. EMA Line:
- The EMA line is plotted on the chart in green.
7. Buy and Sell Signals:
- Buy signals ( `buySignal` ) are generated when the EMA crosses above the middle channel.
- Sell signals ( `sellSignal` ) are generated when the EMA crosses below the middle channel.
- Arrows are plotted at the respective locations of buy and sell signals.
8. Breakout Arrows:
- Additional arrows are plotted when the closing price breaks out above the upper channel (green arrow) or below the lower channel (red arrow).
9. User Input Parameters:
- Traders can customize the input parameters such as `ChannelPeriod` and `EMAPeriod` to adjust the sensitivity of the channels and the EMA.
Overall, the indicator provides traders with a visual representation of price channels, an EMA trend reference, and signals for potential buy/sell opportunities and breakout points. It can be used as part of a trading strategy to identify trends, reversals, and potential entry/exit points in the market.
Moving averages & clouds
Hi all!
This is a script that lets you have 3 moving averages (of a user defined type) and maybe have an alternative cloud (fill) between them. The cloud can be customized and turned on/off in the "style" tab for the indicator.
Alerts can be configured to fire on up/down/all crosses and are activated when the whole candle has crossed the morning average.
A higher time frame can be configured for the moving averages.
You can hide the moving average, but show the cloud:
You can have multiple clouds:
You can have moving averages from a higher time frame (here from weekly time frame on a daily chart):
Best of trading luck!
Fiboborsa+BistTitle: "Fiboborsa+Bist Indicator for TradingView"
Description: The "Fiboborsa+Bist" indicator is a powerful tool designed for TradingView users. This indicator offers a comprehensive set of technical indicators to assist you in your technical analysis and trading decisions.
Features:
Simple Moving Averages (SMA): You can enable or disable SMA with different periods (20, 50, 100, 200) to observe different timeframes and trends.
SMA Strategy: Use SMA crossovers to determine trends. Watch for the 20-period SMA crossing above the 50-period SMA for a bullish signal. For a bearish signal, observe the 50-period SMA crossing below the 100-period SMA.
Exponential Moving Averages (EMA): Similar to SMA, you can enable or disable EMA with different periods (5, 8, 14, 21, 34, 55, 89, 144, 233) for more precise trend analysis.
EMA Strategy: Use EMA crossovers and crossunders for short-term trend changes. A buy signal may occur when the 5-period EMA crosses above the 14-period EMA, while a crossunder suggests a selling opportunity.
Weighted Moving Averages (WMA): Customize WMA settings with various periods (5, 13, 21, 34, 89, 144, 233, 377, 610, 987) to suit your trading style.
WMA Strategy: Use WMA crossovers to verify trends. When the 13-period WMA crosses above the 34-period WMA, it may indicate an uptrend.
Buy and Sell Signals: The indicator provides buy and sell signals based on EMA crossovers and crossunders. Strong signals are also highlighted.
EMA Buy and Sell Strategy: Make informed trading decisions using buy and sell signals generated by EMA crossovers and crossunders.
Ichimoku Cloud: You can enable the Ichimoku Cloud for a clear visual representation of support and resistance levels.
Ichimoku Strategy: Use the Ichimoku Cloud to determine trend direction. Entering long positions is common when the price is above the cloud and considering short positions when it's below the cloud. Verify the trend with the Chikou Span.
Bollinger Bands: Easily visualize price volatility by enabling the Bollinger Bands feature.
Bollinger Bands Strategy: Bollinger Bands help you visualize price volatility. Look for potential reversal points when the price touches or crosses the upper or lower bands.
Use the "Fiboborsa+Bist" indicator to enhance your trading strategies and make informed decisions in the dynamic world of financial markets.
Additional Information:
Bollinger Bands: Bollinger Bands are a technical analysis tool used to monitor price volatility and determine overbought or oversold conditions. This indicator consists of three components:
Middle Moving Average (SMA): Typically, a 20-day SMA is used.
Upper Band: Calculated by adding two times the standard deviation to the SMA.
Lower Band: Calculated by subtracting two times the standard deviation from the SMA.
As the price moves between these two bands, it becomes possible to identify potential buying or selling points by comparing its height or low with these bands.
Ichimoku Cloud: The Ichimoku Cloud is a comprehensive indicator used for trend identification, defining support and resistance levels, and measuring trend strength. The Ichimoku Cloud comprises five key components:
Tenkan Sen (Conversion Line): Used to identify short-term trends.
Kijun Sen (Base Line): Used to identify medium-term trends.
Senkou Span A (Leading Span A): Calculated as (Tenkan Sen + Kijun Sen) / 2 and shows future support and resistance levels.
Senkou Span B (Leading Span B): Calculated as (highest high + lowest low) / 2 and indicates future support and resistance levels.
Chikou Span (Lagging Line): Enables tracking the price backward.
The Ichimoku Cloud interprets a price above the cloud as an uptrend and below the cloud as a downtrend. The Chikou Span assists in verifying the current trend.
ADDITIONAL STRATEGY WITH RSI AND MACD INDICATORS
**Strategy: Two-Stage Trading Strategy Using RSI, MACD, and Fiboborsa+Bist Indicators**
**Stage 1: Determining the Trend and Selecting the Trading Direction**
1. **Trend Identification with Fiboborsa+Bist Indicator:**
- Analyze the simple moving averages (SMA), exponential moving averages (EMA), and weighted moving averages (WMA) used with the Fiboborsa+Bist indicator. These indicators will provide information about the direction of the market trend.
2. **Identifying Overbought and Oversold Conditions with RSI:**
- Use the RSI indicator to identify overbought (70 and above) and oversold (30 and below) conditions. This helps in measuring the strength of the trend. If RSI enters the overbought zone, a downward correction is likely. If RSI enters the oversold zone, an upward correction is probable.
3. **Evaluating Momentum with MACD:**
- Examine price momentum using the MACD indicator. When the MACD line crosses above the signal line, it may indicate an increasing upward momentum. Conversely, a downward cross can suggest an increasing downward momentum.
**Stage 2: Generating Buy and Sell Signals**
4. **Combining RSI, MACD, and Fiboborsa+Bist Indicators:**
- To generate a buy signal, wait for RSI to move out of the oversold region into an uptrend and for the MACD line to cross above the signal line.
- To generate a sell signal, wait for RSI to move out of the overbought region into a downtrend and for the MACD line to cross below the signal line.
5. **Confirmation with Fiboborsa+Bist Indicator:**
- When you receive a buy or sell signal, use the Fiboborsa+Bist indicator to confirm the market trend. Confirming the trend can strengthen your trade signals.
6. **Setting Stop-Loss and Take-Profit Levels:**
- Remember to manage risk when opening buy or sell positions. Set stop-loss and take-profit levels to limit your risk.
7. **Monitor and Adjust Your Trades:**
- Continuously monitor your trade positions and adjust your strategy as per market conditions.
This two-stage trading strategy offers the ability to determine trends and generate trade signals using different indicators. However, every trading strategy involves risks, so risk management and practical application are essential. Also, it's recommended to test this strategy in a demo account before using it in a real trading account.
TMA Bands with Break Arrow @ClearTradingMind
The "TMA Bands with Break Arrow" indicator, developed by ClearTradingMind, is designed to provide traders with insights into potential trend reversals based on the movement of price within a channel defined by the Triangular Moving Average (TMA) and its bands. The TMA is a smoothed moving average, and this indicator adds upper and lower bands to visualize potential breakouts.
Key Components:
1. TMA Bands: The indicator plots the upper and lower bands of the TMA channel. These bands represent potential overbought (upper band) and oversold (lower band) conditions.
2. Break Arrows: The indicator generates buy (green triangle up) and sell (red triangle down) arrows when the closing price breaks above the upper band or below the lower band, indicating a potential trend reversal.
3. Background Color: The background color dynamically changes based on the last generated signal. A blue background suggests a recent buy signal, while a red background indicates a recent sell signal. This provides a quick visual reference for the prevailing market sentiment.
Usage:
1. Trend Reversals: Traders can use the buy and sell arrows as signals for potential trend reversals. A buy signal suggests a possible upward trend, while a sell signal suggests a potential downward trend.
2. Channel Breakouts: Watch for price breaking above the upper band (buy signal) or below the lower band (sell signal). These breakouts may indicate the start of a new trend.
3. Volatility Analysis: The width of the TMA channel represents volatility. A widening channel suggests increased volatility, while a narrowing channel suggests decreasing volatility.
4. Background Color: The background color provides additional context. A blue background indicates recent bullish sentiment, while a red background suggests recent bearish sentiment.
Parameters:
- TMA Period: The number of bars used to calculate the Triangular Moving Average.
- ATR Period: The number of bars used to calculate the Average True Range (ATR) for determining the width of the TMA channel.
- ATR Multiplier: A multiplier applied to the ATR to determine the width of the TMA channel.
Note: This indicator is a tool to assist traders in their analysis, and it is recommended to use it in conjunction with other technical and fundamental analysis methods for more comprehensive decision-making.
Disclaimer: Trading involves risk, and this indicator does not guarantee profit. Users should conduct thorough analysis and risk management before making trading decisions.
Crossover EMMMCrossover EMMM is an indicator that displays the Madrid Moving Averages (EMMM) and detects crossovers (upward crossings) and crossunders (downward crossings) between two moving averages. It uses two input parameters to define the fast and slow EMMM lengths. The script calculates the EMMM values, their changes, and assigns colors based on the change direction. The fast EMMM is plotted in green or red, and the slow EMMM is plotted in blue or red, depending on the change direction. The script also displays triangle shapes below or above the bars to indicate crossovers and crossunders.
The "Madrid Moving Average" (EMMMM) is a type of moving average used in technical analysis to smooth price fluctuations of financial assets, such as stocks or currency pairs. Unlike the Simple Moving Average (SMA), which treats all data equally, the EMMM gives more weight to recent data. This results in the EMMM responding more swiftly to price changes, making it well-suited for identifying short-term trends.
TTP Pair Slope/HedgePair slope/hedge uses linear regression to calculate the hedge ratio (slope) between the two assets within a period.
It allows you to specify a "from" and a "to" candle.
Example:
"A regression from 1000 candles back in time and ignore the last 100 candles. This would result in making a regression of 900 candles in total."
The formula used to perform the regression with the assts X and Y is:
Hedge =
mean( (X-mean(X))^2 )
——————————————————
mean( (X-mean(X)) * (Y-mean(Y)) )
You can later use the hedge in a chart of X - Hedge * Y
(Confirm with 1 / hedge )
If the plot is stationary the period tested should look like stationary.
If you cross an imaginary horizontal line across all the values in the period used it should look like a flat channel with values crossing above and below the line.
The purpose of this indicator is to help finding the linear regression test used for conintegration analysis. Conintegration assets is one of the requirements to consider assets for pair and hedge trading.
Highlight BarHighlight bars in the past. I use this to show the start of moving average calculations - very helpful to anticipate the change in slope of moving averages. You can change color as well as how far back in time to highlight. The defaults are 20, 50 and 200.
I learned of the idea from Brian Shannon - thanks!
9-20 sma multi timeframe indicatorThis is an indicator to help visualizing the 9 and the 20 sma on 3 different timeframes.
When they cross, you will see a cross on the band representing the timeframe.
When a trade is favorable the band will color in green for up trend and in red for downtrend:
- Conditions in uptrend: Start after the first green candle closed above the 9 sma, Stop after the first red candle closed under the 9 sma
- Conditions in downtrend: Start after the first red candle closed below the 9 sma, Stop after the first green candle closed above the 9 sma
Machine Learning: Trend Lines [YinYangAlgorithms]Trend lines have always been a key indicator that may help predict many different types of price movements. They have been well known to create different types of formations such as: Pennants, Channels, Flags and Wedges. The type of formation they create is based on how the formation was created and the angle it was created. For instance, if there was a strong price increase and then there is a Wedge where both end points meet, this is considered a Bull Pennant. The formations Trend Lines create may be powerful tools that can help predict current Support and Resistance and also Future Momentum changes. However, not all Trend Lines will create formations, and alone they may stand as strong Support and Resistance locations on the Vertical.
The purpose of this Indicator is to apply Machine Learning logic to a Traditional Trend Line Calculation, and therefore allowing a new approach to a modern indicator of high usage. The results of such are quite interesting and goes to show the impacts a simple KNN Machine Learning model can have on Traditional Indicators.
Tutorial:
There are a few different settings within this Indicator. Many will greatly impact the results and if any are changed, lots will need ‘Fine Tuning’. So let's discuss the main toggles that have great effects and what they do before discussing the lengths. Currently in this example above we have the Indicator at its Default Settings. In this example, you can see how the Trend Lines act as key Support and Resistance locations. Due note, Support and Resistance are a relative term, as is their color. What starts off as Support or Resistance may change when the price crosses over / under them.
In the example above we have zoomed in and circled locations that exhibited markers of Support and Resistance along the Trend Lines. These Trend Lines are all created using the Default Settings. As you can see from the example above; just because it is a Green Upwards Trend Line, doesn’t mean it’s a Support Line. Support and Resistance is always shifting on Trend Lines based on the prices location relative to them.
We won’t go through all the Formations Trend Lines make, but the example above, we can see the Trend Lines formed a Downward Channel. Channels are when there are two parallel downwards Trend Lines that are at a relatively similar angle. This means that they won’t ever meet. What may happen when the price is within these channels, is it may bounce between the upper and lower bounds. These Channels may drive the price upwards or downwards, depending on if it is in an Upwards or Downwards Channel.
If you refer to the example above, you’ll notice that the Trend Lines are formed like traditional Trend Lines. They don’t stem from current Highs and Lows but rather Machine Learning Highs and Lows. More often than not, the Machine Learning approach to Trend Lines cause their start point and angle to be quite different than a Traditional Trend Line. Due to this, it may help predict Support and Resistance locations at are more uncommon and therefore can be quite useful.
In the example above we have turned off the toggle in Settings ‘Use Exponential Data Average’. This Settings uses a custom Exponential Data Average of the KNN rather than simply averaging the KNN. By Default it is enabled, but as you can see when it is disabled it may create some pretty strong lasting Trend Lines. This is why we advise you ZOOM OUT AS FAR AS YOU CAN. Trend Lines are only displayed when you’ve zoomed out far enough that their Start Point is visible.
As you can see in this example above, there were 3 major Upward Trend Lines created in 2020 that have had a major impact on Support and Resistance Locations within the last year. Lets zoom in and get a closer look.
We have zoomed in for this example above, and circled some of the major Support and Resistance locations that these Upward Trend Lines may have had a major impact on.
Please note, these Machine Learning Trend Lines aren’t a ‘One Size Fits All’ kind of thing. They are completely customizable within the Settings, so that you can get a tailored experience based on what Pair and Time Frame you are trading on.
When any values are changed within the Settings, you’ll likely need to ‘Fine Tune’ the rest of the settings until your desired result is met. By default the modifiable lengths within the Settings are:
Machine Learning Length: 50
KNN Length:5
Fast ML Data Length: 5
Slow ML Data Length: 30
For example, let's toggle ‘Use Exponential Data Averages’ back on and change ‘Fast ML Data Length’ from 5 to 20 and ‘Slow ML Data Length’ from 30 to 50.
As you can in the example above, all of the lines have changed. Although there are still some strong Support Locations created by the Upwards Trend Lines.
We will conclude our Tutorial here. Hopefully you’ve learned how to use Machine Learning Trend Lines and will be able to now see some more unorthodox Support and Resistance locations on the Vertical.
Settings:
Use Machine Learning Sources: If disabled Traditional Trend line sources (High and Low) will be used rather than Rational Quadratics.
Use KNN Distance Sorting: You can disable this if you wish to not have the Machine Learning Data sorted using KNN. If disabled trend line logic will be Traditional.
Use Exponential Data Average: This Settings uses a custom Exponential Data Average of the KNN rather than simply averaging the KNN.
Machine Learning Length: How strong is our Machine Learning Memory? Please note, when this value is too high the data is almost 'too' much and can lead to poor results.
K-Nearest Neighbour (KNN) Length: How many K-Nearest Neighbours are allowed with our Distance Clustering? Please note, too high or too low may lead to poor results.
Fast ML Data Length: Fast and Slow speed needs to be adjusted properly to see results. 3/5/7 all seem to work well for Fast.
Slow ML Data Length: Fast and Slow speed needs to be adjusted properly to see results. 20 - 50 all seem to work well for Slow.
If you have any questions, comments, ideas or concerns please don't hesitate to contact us.
HAPPY TRADING!
LBR-Volatility Breakout BarsThe originator of this script is Linda Raschke of LBR Group.
This Pine Script code is the version 5 of LBR Paintbars for TradingView, called "LBR-Bars." It was originally coded for TradingView in version 3 by LazyBear. It is a complex indicator that combines various features such as coloring bars based on different conditions, displaying Keltner channels, and showing volatility lines.
Let me break down the key components and explain how it works:
1. Inputs Section: This section defines various input parameters that users can adjust when adding the indicator to their charts. These parameters allow users to customize the behavior and appearance of the indicator. Here are some of the key input parameters:
- Users can control whether to color bars under different conditions. For example,
they can choose to color LBR bars, color bars above/below Kelts, or color non-LBR
bars.
- Users can choose whether to show volatility lines or shade Keltner channels' area
with the Mid being the moving average on the chart.
- In the calculation of Keltner channels, users can set the length of the moving
average that the Keltner channels use as the mid and then set the Keltner multiplier.
If users want to use "True Range" to determine calculations, they can turn it on or
off; it defaults to off.
- Users can change the calculation of volatility lines and set the length for finding the
lowest and highest prices. The user sets the ATR length and multiplier for the ATR.
2. Calculation Section: This section defines the calculation of the upper and lower standard deviation bands based on the input parameters. It uses Exponential Moving Averages (EMAs) and optionally True Range to calculate these bands if turned on. These bands are used in the Keltner channel calculation.
3. Keltner Channel Section: This section calculates the upper, middle, and lower lines of the Keltner channels. It also plots these lines on the chart. The colors and visibility of these lines are controlled by user inputs.
4. Volatility Lines Section: This section calculates the upper and lower volatility lines based on the lowest and highest prices over a specified period and the ATR. It also checks whether the current close price is above or below these lines accordingly. The colors and visibility of these lines are controlled by user inputs.
5. Bar Colors Section: This section determines the color of the bars on the chart based on various conditions. It checks whether the current bar meets conditions like being an LBR bar, being above or below volatility lines, or being in "No Man's Land." The color of the bars is set accordingly based on user inputs.
This Pine Script creates an indicator that provides visual cues on the chart based on Keltner channels, volatility lines, and other customizable conditions. Users can adjust the input parameters to tailor the indicator's behavior and appearance to their trading preferences.
Grospector DCA V.4This is system for DCA with strategy and can trade on trend technique "CDC Action Zone".
We upgrade Grospector DCA V.3 by minimizing unnecessary components and it is not error price predictions.
This has 5 zone Extreme high , high , normal , low , Extreme low. You can dynamic set min - max percent every zone.
Extreme zone is derivative short and long which It change Extreme zone to Normal zone all position will be closed.
Every Zone is splitted 10 channel. and this strategy calculate contribution.
and now can predict price in future.
Idea : Everything has average in its life. For bitcoin use 4 years for halving. I think it will be interesting price.
Default : I set MA is 365*4 days and average it again with 365 days.
Input :
len: This input represents the length of the moving average.
strongLen: This input represents the length of the moving average used to calculate the strong buy and strong sell zone.
shortMulti: This input represents the multiplier * moveing average used to calculate the short zone.
strongSellMulti: This input represents the multiplier used to calculate the strong sell signal.
sellMulti: This input represents the multiplier * moveing average used to calculate the sell zone.
strongBuyMulti: This input represents the multiplier used to calculate the strong sell signal.
longMulti: This input represents the multiplier * moveing average used to calculate the long zone.
*Diff sellMulti and strongBuyMulti which is normal zone.
useDerivative: This input is a boolean flag that determines whether to use the derivative display zone. If set to true, the derivative display zone will be used, otherwise it will be hidden.
zoneSwitch: This input determines where to display the channel signals. A value of 1 will display the signals in all zones, a value of 2 will display the signals in the chart pane, a value of 3 will display the signals in the data window, and a value of 4 will hide the signals.
price: Defines the price source used for the indicator calculations. The user can select from various options, with the default being the closing price.
labelSwitch: Defines whether to display assistive text on the chart. The user can select a boolean value (true/false), with the default being true.
zoneSwitch: Defines which areas of the chart to display assistive zones. The user can select from four options: 1 = all, 2 = chart only, 3 = data only, 4 = none. The default value is 2.
predictFuturePrice: Defines whether to display predicted future prices on the chart. The user can select a boolean value (true/false), with the default being true.
DCA: Defines the dollar amount to use for dollar-cost averaging (DCA) trades. The user can input an integer value, with a default value of 5.
WaitingDCA: Defines the amount of time to wait before executing a DCA trade. The user can input a float value, with a default value of 0.
Invested: Defines the amount of money invested in the asset. The user can input an integer value, with a default value of 0.
strategySwitch: Defines whether to turn on the trading strategy. The user can select a boolean value (true/false), with the default being true.
seperateDayOfMonth: Defines a specific day of the month on which to execute trades. The user can input an integer value from 1-31, with the default being 28.
useReserve: Defines whether to use a reserve amount for trading. The user can select a boolean value (true/false), with the default being true.
useDerivative: Defines whether to use derivative data for the indicator calculations. The user can select a boolean value (true/false), with the default being true.
useHalving: Defines whether to use halving data for the indicator calculations. The user can select a boolean value (true/false), with the default being true.
extendHalfOfHalving: Defines the amount of time to extend the halving date. The user can input an integer value, with the default being 200.
Every Zone: It calculate percent from top to bottom which every zone will be splited 10 step.
To effectively make the DCA plan, I recommend adopting a comprehensive strategy that takes into consideration your mindset as the best indicator of the optimal approach. By leveraging your mindset, the task can be made more manageable and adaptable to any market
Dollar-cost averaging (DCA) is a suitable investment strategy for sound money and growth assets which It is Bitcoin, as it allows for consistent and disciplined investment over time, minimizing the impact of market volatility and potential risks associated with market timing
[blackcat] L1 MartinGale Scalping Strategy**MartinGale Strategy** is a popular money management strategy used in trading. It is commonly applied in situations where the trader aims to recover from a losing streak by increasing the position size after each loss.
In the MartinGale Strategy, after a losing trade, the trader doubles the position size for the next trade. This is done in the hopes that a winning trade will eventually occur, which will not only recover the previous losses but also generate a profit.
The idea behind the MartinGale Strategy is to take advantage of the law of averages. By increasing the position size after each loss, the strategy assumes that eventually, a winning trade will occur, which will not only cover the previous losses but also generate a profit. This can be especially appealing for traders looking for a quick recovery from a losing streak.
However, it is important to note that the MartinGale Strategy carries significant risks. If a trader experiences a prolonged losing streak or lacks sufficient capital, the strategy can lead to substantial losses. The strategy's reliance on the assumption of a winning trade can be dangerous, as there is no guarantee that a winning trade will occur within a certain timeframe.
Traders considering implementing the MartinGale Strategy should carefully assess their risk tolerance and thoroughly understand the potential drawbacks. It is crucial to have a solid risk management plan in place to mitigate potential losses. Additionally, traders should be aware that the strategy may not be suitable for all market conditions and may require adjustments based on market volatility.
In summary, the MartinGale Strategy is a money management strategy that involves increasing the position size after each loss in an attempt to recover from a losing streak. While it can offer the potential for quick recovery, it also comes with significant risks that traders should carefully consider before implementing it in their trading approach.
The MartinGale Scalping Strategy is a trading strategy designed to generate profits through frequent trades. It utilizes a combination of moving average crossovers and crossunders to generate entry and exit signals. The strategy is implemented in TradingView's Pine Script language.
The strategy begins by defining input variables such as take profit and stop loss levels, as well as the trading mode (long, short, or bidirectional). It then sets a rule to allow only long entries if the trading mode is set to "Long".
The strategy logic is defined using SMA (Simple Moving Average) crossover and crossunder signals. It calculates a short-term SMA (SMA3) and a longer-term SMA (SMA8), and plots them on the chart. The crossoverSignal and crossunderSignal variables are used to track the occurrence of the crossover and crossunder events, while the crossoverState and crossunderState variables determine the state of the crossover and crossunder conditions.
The strategy execution is based on the current position size. If the position size is zero (no open positions), the strategy checks for crossover and crossunder events. If a crossover event occurs and the trading mode allows long entries, a long position is entered. The entry price, stop price, take profit price, and stop loss price are calculated based on the current close price and the SMA8 value. Similarly, if a crossunder event occurs and the trading mode allows short entries, a short position is entered with the corresponding price calculations.
If there is an existing long position and the current close price reaches either the take profit price or the stop loss price, and a crossunder event occurs, the long position is closed. The entry price, stop price, take profit price, and stop loss price are reset to zero.
Likewise, if there is an existing short position and the current close price reaches either the take profit price or the stop loss price, and a crossover event occurs, the short position is closed and the price variables are reset.
The strategy also plots entry and exit points on the chart using plotshape function. It displays a triangle pointing up for a buy entry, a triangle pointing down for a buy exit, a triangle pointing down for a sell entry, and a triangle pointing up for a sell exit.
Overall, the MartinGale Scalping Strategy aims to capture small profits by taking advantage of short-term moving average crossovers and crossunders. It incorporates risk management through take profit and stop loss levels, and allows for different trading modes to accommodate different market conditions.
Double AI Super Trend Trading - Strategy [PresentTrading]█ Introduction and How It is Different
The Double AI Super Trend Trading Strategy is a cutting-edge approach that leverages the power of not one, but two AI algorithms, in tandem with the SuperTrend technical indicator. The strategy aims to provide traders with enhanced precision in market entry and exit points. It is designed to adapt to market conditions dynamically, offering the flexibility to trade in both bullish and bearish markets.
*The KNN part is mainly referred from @Zeiierman.
BTCUSD 8hr performance
ETHUSD 8hr performance
█ Strategy, How It Works: Detailed Explanation
1. SuperTrend Calculation
The SuperTrend is a popular indicator that captures market trends through a combination of the Volume-Weighted Moving Average (VWMA) and the Average True Range (ATR). This strategy utilizes two sets of SuperTrend calculations with varying lengths and factors to capture both short-term and long-term market trends.
2. KNN Algorithm
The strategy employs k-Nearest Neighbors (KNN) algorithms, which are supervised machine learning models. Two sets of KNN algorithms are used, each focused on different lengths of historical data and number of neighbors. The KNN algorithms classify the current SuperTrend data point as bullish or bearish based on the weighted sum of the labels of the k closest historical data points.
3. Signal Generation
Based on the KNN classifications and the SuperTrend indicator, the strategy generates signals for the start of a new trend and the continuation of an existing trend.
4. Trading Logic
The strategy uses these signals to enter long or short positions. It also incorporates dynamic trailing stops for exit conditions.
Local picture
█ Trade Direction
The strategy allows traders to specify their trading direction: long, short, or both. This enables the strategy to be versatile and adapt to various market conditions.
█ Usage
ToolTips: Comprehensive tooltips are provided for each parameter to guide the user through the customization process.
Inputs: Traders can customize numerous parameters including the number of neighbors in KNN, ATR multiplier, and types of moving averages.
Plotting: The strategy also provides visual cues on the chart to indicate bullish or bearish trends.
Order Execution: Based on the generated signals, the strategy will execute buy or sell orders automatically.
█ Default Settings
The default settings are configured to offer a balanced approach suitable for most scenarios:
Initial Capital: $10,000
Default Quantity Type: 10% of equity
Commission: 0.1%
Slippage: 1
Currency: USD
These settings can be modified to suit various trading styles and asset classes.
Interactive MA Stop Loss [TANHEF]This indicator is "Interactive." Once added to the chart, you need to click the start point for the moving average stoploss. Dragging it afterward will modify its position.
Why choose this indicator over a traditional Moving Average?
To accurately determine that a wick has crossed a moving average, you must examine the moving average's range on that bar (blue area on this indicator) and ensure the wick fully traverses this area.
When the price moves away from a moving average, the average also shifts towards the price. This can make it look like the wick crossed the average, even if it didn't.
How is the moving average area calculated?
For each bar, the moving average calculation is standard, but when the current bar is involved, its high or low is used instead of the close. For precise results, simply setting the source in a typical moving average calculation to 'Low' or 'High' is not sufficient in calculating the moving average area on a current bar.
Moving Average Options:
Simple Moving Average
Exponential Moving Average
Relative Moving Average
Weighted Moving Average
Indicator Explanation
After adding indicator to chart, you must click on a location to begin an entry.
The moving average type can be set and length modified to adjust the stoploss. An optional profit target may be added.
A symbol is display when the stoploss and profit target are hit. If a position is create that is not valid, "Overlapping MA and Bar" is displayed.
Alerts
'Check' alerts to use within indicator settings (stop hit and/or profit target hit).
Select 'Create Alert'
Set the condition to 'Interactive MA''
Select create.
Alert messages can have additional details using these words in between two Curly (Brace) Brackets:
{{stop}} = MA stop-loss (price)
{{upper}} = Upper MA band (price)
{{lower}} = Lower MA band (price)
{{band}} = Lower or Upper stoploss (word)
{{type}} = Long or Short stop-loss (word)
{{stopdistance}} = Stoploss Distance (%)
{{targetdistance}} = Target Distance (%)
{{starttime}} = Start time of stoploss (day:hour:minute)
{{maLength}} = MA Length (input)
{{maType}} = MA Type (input)
{{target}} = Price target (price)
{{trigger}} = Wick or Close Trigger input (input)
{{ticker}} = Ticker of chart (word)
{{exchange}} = Exchange of chart (word)
{{description}} = Description of ticker (words)
{{close}} = Bar close (price)
{{open}} = Bar open (price)
{{high}} = Bar high (price)
{{low}} = Bar low (price)
{{hl2}} = Bar HL2 (price)
{{volume}} = Bar volume (value)
{{time}} = Current time (day:hour:minute)
{{interval}} = Chart timeframe
{{newline}} = New line for text
I will add further moving averages types in the future. If you suggestions post them below.
Market Performance TableThe Market Performance Table displays the performance of multiple tickers (up to 5) in a table format. The tickers can be customized by selecting them through the indicator settings.
The indicator calculates various metrics for each ticker, including the 1-day change percentage, whether the price is above the 50, 20, and 10-day simple moving averages (SMA), as well as the relative strength compared to the 10/20 SMA and 20/50 SMA crossovers. It also calculates the price deviation from the 50-day SMA.
The table is displayed on the chart and can be positioned in different locations.
Credits for the idea to @Alex_PrimeTrading ;)
Donchian MA Bands [LuxAlgo]The Donchian MA Bands script is a complete trend indicator derived from the popular Donchian channel indicator as well as various customizable moving averages to estimate trend direction and build support/resistance levels & zones.
🔶 USAGE
The indicator outputs various elements, the main ones being a lower dynamic zone (blue by default), an upper dynamic zone (in orange by default), and one support and resistance level/zones (red/green by default).
A prominent lower zone is indicative of an uptrend, while a prominent upper zone is indicative of a downtrend. These zones can be used as support/resistance as well.
Support/resistance zones and levels can be used using a breakout methodology or to determine price bounced if a level was tested multiple times.
The indicator contains various modes affecting the output of the indicator, described below.
🔹 Clouds
Clouds return one upper/lower dynamic zone and look/act similarly to a trailing stop. Price over the lower zone is indicative of an uptrend, and price under the upper zone is indicative of a downtrend.
🔹 Upper Band
The upper band mode returns a dynamic zone closer to prices during an uptrend, and farther away during a downtrend.
This band can act as a support during uptrends.
🔹 Lower Band
The lower band mode returns a dynamic zone closer to prices during an uptrend, and farther away during a downtrend.
This band can act as a resistance during downtrends.
🔹 Bands
Bands return both upper and lower zones, the zones are more apparent depending on the price trend direction, with uptrends being indicated by a more visible lower zone, and downtrends being indicated by a more visible upper zone.
Breakout dots are highlighted when price breakout the indicator displayed extremities, and can be indicative of a confirmed trend reversal.
These breakouts can be more effective for trend following during trending markets. Ranging markets might return breakouts highlighting the top/bottom.
🔶 DETAILS
The core of this script is the highest / lowest mean average (MA) value for a given number of bars back ( Donchian lines).
This is repeated a few times with the obtained values.
When Bands are chosen ( Style ) this will be repeated 1 more time.
The type of mean average can be customized ( Type MA ), as well as the number of bars back ( Length ).
Depending on the choice of bands ( Style ) the script will focus on certain area's of interest.
When the option Clouds , Upper band or Lower band is chosen, an extra feature, support/resistance (S/R), will be shown.
These color-filled areas are visible when there is a difference between the 2nd and 3rd highest/lowest values.
The lines/areas can be used for stop loss, entry, exit,...
You can set the type of MA and Length separately ( Settings -> S/R ).
If you don't need this feature, simply set Type ( Settings -> S/R ) -> NONE
The shape sometimes resembles triangles, indicating a potential direction
Default the average of the highest and lowest values is plotted (Style -> Mid Donchian)
This can act as potential support/resistance or visualization of the trend, the mean average is not plotted but can be (Style -> MA)
🔹 Note
When the option Bands is chosen, an indication is plotted when the closing price breaks above the highest band or breaks below the lower band. This isn't necessarily a buy/sell signal, it is merely a signal that these lines are broken.
Users should decide on their own how they use the bands/lines/areas as entry, exit, trailing stop, stop loss, profit taking,...
🔶 SETTINGS
🔹 Bands
Style: Clouds (default), Upper band, Lower band, Bands
Type MA: choose between SMA, EMA, RMA, HullMA, WMA, VWMA (default), DEMA, TEMA, NONE (off)
Length: Length of moving average and Donchian calculations (default 20)
Colour Bands
🔹 S/R (Support/Resistance, visible with Clouds, Upper band or Lower band)
Type MA: choose between SMA, EMA, RMA, HullMA, WMA, VWMA (default), DEMA, TEMA, NONE (off)
Length: Length of moving average and Donchian calculations (default 20)
Colour S/R
RSI + Fibonacci HH LL Support Resistance I have integrated my past scripts and brushed them up further.
This tool allows for support/resistance, stop loss, take profit, and trend analysis using RSI and Fibonacci ratios.
For example, the Fibonacci ratio is used as follows
l1 = m - dist * 0.618
l2 = m - dist * 1.618
l3 = m - dist * 2.618
l4 = m - dist * 4.235
l5 = m - dist * 6.857
l6 = m - dist * 11.089
When the Fibonacci ratio reaches 2.618 or higher and the RSI smoothed by the 5-day EMA is oversold/overbought, the bar color is changed by a gradation.
We have tried to make the design as beautiful and good-looking as possible. You can also hide the lines to suit your own preference.
Example usages are here:
BTCUSDT 1Hour Chart
Using Fibonacci numbers
BTCUSDT 15min Chart, for Scalping
Here, to set the highest and lowest prices one hour ago, "4" is substituted as the calculation: 15 minutes x 4 = 60
BTCUSDT 15min Chart, for Scalping
To set the highest and lowest prices 4 hours ago , "4" is substituted as the calculation: 15 minutes x 16 = 240
BTCUSDT 15min Chart, for Scalping
To draw yesterday's high and low as support/resistance lines, I substituted the number "96" as 1440/15=96.
BTCUSDT 1min Chart, for Scalping
Substituted "60" to trail the highest and lowest prices over a 60-minute period on a 1-minute chart, and removed lines to beautify
BTCUSDT 1day Chart, for Long-Term Investers
This is an example of using "90" because it is a 1-day chart and assumes that 3 months = 90 days in order to trail the highest and lowest prices over a 3-month period and no lines.
My past scripts are here:
RSI + FIB HH LL StopLoss Finder/Contrarian Trades
Fibonacci HH LL TRAMA Band
MA RSI @KINGThis Pine Script is designed to create a trading indicator with moving averages (MA) and relative strength index (RSI), along with arrow signals and background color changes based on those signals. Here's a description of its functions:
1. Moving Averages and RSI Calculation:
- Two moving averages (`fastMA` and `slowMA`) are calculated based on user-input lengths.
- The Relative Strength Index (`rsi`) is calculated based on a user-defined length.
2. Crossover Conditions:
- `crossoverUp` is true when the fastMA crosses above the slowMA and RSI is above an overbought level.
- `crossoverDown` is true when the fastMA crosses below the slowMA and RSI is below an oversold level.
3. Arrow Signals:
- Triangle-shaped arrows (`arrowUp` and `arrowDown`) are plotted below and above bars, indicating buy (green) and sell (red) signals, respectively.
4. Background Color Changes:
- The background color (`bgColor`) changes based on buy and sell signals.
- If there's a buy signal (`crossoverUp`), the background color is set to a light blue with 40% transparency.
- If there's a sell signal (`crossoverDown`), the background color is set to a light red with 40% transparency.
- On the next opposite signal, the background color is scaled up (transparency set to 80%) to indicate a stronger signal.
In summary, this script provides visual cues through arrows and background color changes to assist traders in identifying potential buy and sell signals based on moving average crossovers and RSI conditions. The background color variations aim to highlight the strength of the signal, with scaling based on consecutive signals in the same direction.
********************************************************************************
1. Buy Signal:
- Condition: The arrow points up (green) with a background color indicating a buy signal.
- Confirmation: Ensure that there is a strong upward crossover (fastMA above slowMA) and RSI is above the overbought level.
2. Sell Signal:
- Condition: The arrow points down (red) with a background color indicating a sell signal.
- Confirmation: Ensure that there is a strong downward crossover (fastMA below slowMA) and RSI is below the oversold level.
3. Exit Signal:
- Condition: No arrow is present, and the background color is reset.
- Confirmation: Confirm that there is no active buy or sell signal.
Example Trading Rules:
Opening a Long Position (Buy):
- Enter a long (buy) position when:
- The green arrow appears with a light blue background.
- Confirm that the fastMA is above the slowMA.
- Confirm that RSI is above the overbought level.
Opening a Short Position (Sell):
- Enter a short (sell) position when:
- The red arrow appears with a light red background.
- Confirm that the fastMA is below the slowMA.
- Confirm that RSI is below the oversold level.
Exiting a Position:
- Close the position when:
- There is no arrow present (neither green nor red).
- The background color is reset, indicating no active signal.
Risk Management:
Position Sizing: Determine the size of your positions based on your risk tolerance and the size of your trading account.
Stop-Loss and Take-Profit: Set stop-loss orders to limit potential losses and take-profit orders to secure profits.
Risk-Reward Ratio: Consider maintaining a favorable risk-reward ratio in your trades.
Notes:
Backtesting: Before applying this strategy in a live market, it's crucial to backtest it using historical data to assess its performance.
Market Conditions: Adapt the strategy to different market conditions, and be aware that no strategy is guaranteed to be profitable.
Continuous Monitoring: Regularly monitor the performance of the strategy and make adjustments as needed.
Educational Purpose: This strategy is for educational purposes only. Always consult with financial professionals and use your judgment when making trading decisions.
Remember that trading involves risk, and past performance is not indicative of future results. It's recommended to paper trade or use a demo account to test the strategy before risking real capital.
Best wishes on your trading journey! May your strategies be profitable, your risks well-managed, and your decisions guided by wisdom and success. Happy trading!
2Mars strategy [OKX]The strategy is based on the intersection of two moving averages, which requires adjusting the parameters (ratio and multiplier) for the moving average.
Basis MA length: multiplier * ratio
Signal MA length: multiplier
The SuperTrend indicator is used for additional confirmation of entry into a position.
Bollinger Bands and position reversal are used for take-profit.
About stop loss:
If activated, the stop loss price will be updated on every entry.
Basic setup:
Additional:
Alerts for OKX:
Yearly and 12-Week Percentage Difference with EMAThe indicator "Yearly and 12-Week Percentage Difference with EMA" is designed to display the annual and 12-week difference in the percentage variability of asset prices, as well as their exponential moving averages (EMA) on the TradingView chart.
EMA Period (EMA Period): This is a configurable parameter that allows you to select a period for calculating the EMA.
Yearly % Difference (Annual percentage difference): This indicator shows the percentage difference between the current price and the asset price a year ago on weekly bars. The graph is displayed in blue.
12-Week % Difference (12 weeks difference as a percentage): This indicator shows the percentage difference between the current price and the asset price 12 weeks ago on weekly bars. The graph is displayed in green.
Zero Line (Zero Line): This black line on the chart shows the zero level.
EMA of Yearly % Difference (EMA of annual percentage difference): This line represents the exponential moving average (EMA) of the annual percentage difference. The graph is displayed in red.
EMA of 12-Week % Difference (EMA of the difference over 12 weeks as a percentage): This line represents the exponential moving average (EMA) of the difference over 12 weeks as a percentage. The graph is displayed in orange.
Use this indicator to analyze the percentage variability of asset prices on an annual and 12-week basis, as well as to track their EMA, which can help in making trading decisions.
Русская версия \\\\\
Индикатор "Разница в процентах за год и за 12 недель с EMA" предназначен для отображения цены от год к году, и за 12 недель процентной изменчивости цен актива, а также их экспоненциальных скользящих средних (EMA) на графике TradingView.
- EMA Period (Период EMA): Это настраиваемый параметр, который позволяет выбрать период для расчета EMA.
- Yearly % Difference (Годовая разница в процентах): Этот индикатор показывает процентную разницу между текущей ценой и ценой актива год назад на недельных барах. График отображается синим цветом.
- 12-Week % Difference (Разница за 12 недель в процентах): Этот индикатор показывает процентную разницу между текущей ценой и ценой актива 12 недель назад на недельных барах. График отображается зеленым цветом.
- Zero Line (Линия нуля): Эта черная линия на графике показывает нулевой уровень.
- EMA of Yearly % Difference (EMA годовой разницы в процентах): Эта линия представляет собой экспоненциальное скользящее среднее (EMA) годовой разницы в процентах. График отображается красным цветом.
- EMA of 12-Week % Difference (EMA разницы за 12 недель в процентах): Эта линия представляет собой экспоненциальное скользящее среднее (EMA) разницы за 12 недель в процентах. График отображается оранжевым цветом.
Используйте этот индикатор для анализа процентной изменчивости цен актива на годовой и 12-недельной основе, а также для отслеживания их EMA, что может помочь в принятии торговых решений.