Optimal Length BackTester [YinYangAlgorithms]This Indicator allows for a ‘Optimal Length’ to be inputted within the Settings as a Source. Unlike most Indicators and/or Strategies that rely on either Static Lengths or Internal calculations for the length, this Indicator relies on the Length being derived from an external Indicator in the form of a Source Input.
This may not sound like much, but this application may allows limitless implementations of such an idea. By allowing the input of a Length within a Source Setting you may have an ‘Optimal Length’ that adjusts automatically without the need for manual intervention. This may allow for Traditional and Non-Traditional Indicators and/or Strategies to allow modifications within their settings as well to accommodate the idea of this ‘Optimal Length’ model to create an Indicator and/or Strategy that adjusts its length based on the top performing Length within the current Market Conditions.
This specific Indicator aims to allow backtesting with an ‘Optimal Length’ inputted as a ‘Source’ within the Settings.
This ‘Optimal Length’ may be used to display and potentially optimize multiple different Traditional Indicators within this BackTester. The following Traditional Indicators are included and available to be backtested with an ‘Optimal Length’ inputted as a Source in the Settings:
Moving Average; expressed as either a: Simple Moving Average, Exponential Moving Average or Volume Weighted Moving Average
Bollinger Bands; expressed based on the Moving Average Type
Donchian Channels; expressed based on the Moving Average Type
Envelopes; expressed based on the Moving Average Type
Envelopes Adjusted; expressed based on the Moving Average Type
All of these Traditional Indicators likewise may be displayed with multiple ‘Optimal Lengths’. They have the ability for multiple different ‘Optimal Lengths’ to be inputted and displayed, such as:
Fast Optimal Length
Slow Optimal Length
Neutral Optimal Length
By allowing for the input of multiple different ‘Optimal Lengths’ we may express the ‘Optimal Movement’ of such an expressed Indicator based on different Time Frames and potentially also movement based on Fast, Slow and Neutral (Inclusive) Lengths.
This in general is a simple Indicator that simply allows for the input of multiple different varieties of ‘Optimal Lengths’ to be displayed in different ways using Tradition Indicators. However, the idea and model of accepting a Length as a Source is unique and may be adopted in many different forms and endless ideas.
Tutorial:
You may add an ‘Optimal Length’ within the Settings as a ‘Source’ as followed in the example above. This Indicator allows for the input of a:
Neutral ‘Optimal Length’
Fast ‘Optimal Length’
Slow ‘Optimal Length’
It is important to account for all three as they generally encompass different min/max length values and therefore result in varying ‘Optimal Length’s’.
For instance, say you’re calculating the ‘Optimal Length’ and you use:
Min: 1
Max: 400
This would therefore be scanning for 400 (inclusive) lengths.
As a general way of calculating you may assume the following for which lengths are being used within an ‘Optimal Length’ calculation:
Fast: 1 - 199
Slow: 200 - 400
Neutral: 1 - 400
This allows for the calculation of a Fast and Slow length within the predetermined lengths allotted. However, it likewise allows for a Neutral length which is inclusive to all lengths alloted and may be deemed the ‘Most Accurate’ for these reasons. However, just because the Neutral is inclusive to all lengths, doesn’t mean the Fast and Slow lengths are irrelevant. The Fast and Slow length inputs may be useful for seeing how specifically zoned lengths may fair, and likewise when they cross over and/or under the Neutral ‘Optimal Length’.
This Indicator features the ability to display multiple different types of Traditional Indicators within the ‘Display Type’.
We will go over all of the different ‘Display Types’ with examples on how using a Fast, Slow and Neutral length would impact it:
Simple Moving Average:
In this example above have the Fast, Slow and Neutral Optimal Length formatted as a Slow Moving Average. The first example is on the 15 minute Time Frame and the second is on the 1 Day Time Frame, demonstrating how the length changes based on the Time Frame and the effects it may have.
Here we can see that by inputting ‘Optimal Lengths’ as a Simple Moving Average we may see moving averages that change over time with their ‘Optimal Lengths’. These lengths may help identify Support and/or Resistance locations. By using an 'Optimal Length' rather than a static length, we may create a Moving Average which may be more accurate as it attempts to be adaptive to current Market Conditions.
Bollinger Bands:
Bollinger Bands are a way to see a Simple Moving Average (SMA) that then uses Standard Deviation to identify how much deviation has occurred. This Deviation is then Added and Subtracted from the SMA to create the Bollinger Bands which help Identify possible movement zones that are ‘within range’. This may mean that the price may face Support / Resistance when it reaches the Outer / Inner bounds of the Bollinger Bands. Likewise, it may mean the Price is ‘Overbought’ when outside and above or ‘Underbought’ when outside and below the Bollinger Bands.
By applying All 3 different types of Optimal Lengths towards a Traditional Bollinger Band calculation we may hope to see different ranges of Bollinger Bands and how different lookback lengths may imply possible movement ranges on both a Short Term, Long Term and Neutral perspective. By seeing these possible ranges you may have the ability to identify more levels of Support and Resistance over different lengths and Trading Styles.
Donchian Channels:
Above you’ll see two examples of Machine Learning: Optimal Length applied to Donchian Channels. These are displayed with both the 15 Minute Time Frame and the 1 Day Time Frame.
Donchian Channels are a way of seeing potential Support and Resistance within a given lookback length. They are a way of withholding the High’s and Low’s of a specific lookback length and looking for deviation within this length. By applying a Fast, Slow and Neutral Machine Learning: Optimal Length to these Donchian Channels way may hope to achieve a viable range of High’s and Low’s that one may use to Identify Support and Resistance locations for different ranges of Optimal Lengths and likewise potentially different Trading Strategies.
Envelopes / Envelopes Adjusted:
Envelopes are an interesting one in the sense that they both may be perceived as useful; however we deem that with the use of an ‘Optimal Length’ that the ‘Envelopes Adjusted’ may work best. We will start with examples of the Traditional Envelope then showcase the Adjusted version.
Envelopes:
As you may see, a Traditional form of Envelopes even produced with a Machine Learning: Optimal Length may not produce optimal results. Unfortunately this may occur with some Traditional Indicators and they may need some adjustments as you’ll notice with the ‘Envelopes Adjusted’ version. However, even without the adjustments, these Envelopes may be useful for seeing ‘Overbought’ and ‘Oversold’ locations within a Machine Learning: Optimal Length standpoint.
Envelopes Adjusted:
By adding an adjustment to these Envelopes, we may hope to better reflect our Optimal Length within it. This is caused by adding a ratio reflection towards the current length of the Optimal Length and the max Length used. This allows for the Fast and Neutral (and potentially Slow if Neutral is greater) to achieve a potentially more accurate result.
Envelopes, much like Bollinger Bands are a way of seeing potential movement zones along with potential Support and Resistance. However, unlike Bollinger Bands which are based on Standard Deviation, Envelopes are based on percentages +/- from the Simple Moving Average.
We will conclude our Tutorial here. Hopefully this has given you some insight into how useful adding a ‘Optimal Length’ within an external (secondary) Indicator as a Source within the Settings may be. Likewise, how useful it may be for automation sake in the sense that when the ‘Optimal Length’ changes, it doesn’t rely on an alert where you need to manually update it yourself; instead it will update Automatically and you may reap the benefits of such with little manual input needed (aside from the initial setup).
If you have any questions, comments, ideas or concerns please don't hesitate to contact us.
HAPPY TRADING!
Скользящие средние
[KVA] Extremes ProfilerExtremes Profiler is a specialized indicator crafted for traders focusing on the relationship between price extremes and moving averages. This tool offers a comprehensive perspective on price dynamics by quantifying and visualizing significant distances of current prices from various moving averages. It effectively highlights the top extremes in market movements, providing key insights into price extremities relative to these averages. The indicator's ability to analyze and display these distances makes it a valuable tool for understanding market trends and potential turning points. Traders can leverage the Extremes Profiler to gain a deeper understanding of how prices behave in relation to commonly watched moving averages, thus aiding in making informed trading decisions
Key Features :
Extensive MA Analysis : Tracks the price distance from multiple moving averages including EMA, SMA, WMA, RMA, and HMA.
Top 50 (100) Distance Metrics : Highlights the 50 (100)greatest (highest or lowest) distances from each selected MA, pinpointing significant market deviations.
Customizable Periods : Offers flexibility with adjustable periods to align with diverse trading strategies.
Comprehensive View : Switch between timeframes for a well-rounded understanding of short-term fluctuations and long-term market trends.
Cross-Asset Comparison : Utilize the indicator to compare different assets, gaining insights into the relative dynamics and volatility of various markets. By analyzing multiple assets, traders can discern broader market trends and better understand asset-specific behaviors.
Customizable Display : Users can adjust the periods and number of results to suit their analytical needs.
Rainbow Fibonacci Momentum - SuperTrend🌈 "Rainbow Fibonacci Momentum - SuperTrend" Indicator 🌈
IMPORTANT: as this is a complex and elaborate TREND ANALYSIS on the graph, ALL INDICATORS REPAINT.
Experience the brilliance of "Rainbow Fibonacci Momentum - SuperTrend" for your technical analysis on TradingView! This versatile indicator allows you to visualize various types of Moving Averages, including Simple Moving Averages (SMA), Exponential Moving Averages (EMA), Weighted Moving Averages (WMA), Hull Moving Averages (HMA), and Volume Weighted Moving Averages (VWMA).
Each MA displayed in a unique color to create a stunning rainbow effect. This makes it easier for you to identify trends and potential trading opportunities.
Key Features:
📊 Multiple Moving Average Types - Choose from a range of moving average types to suit your analysis.
🎨 Stunning Color Gradient - Each moving average type is displayed in a unique color, creating a beautiful rainbow effect.
📉 Overlay Compatible - Use it as an overlay on your price chart for clear trend insights.
With the "Rainbow Fibonacci Momentum - SuperTrend" indicator, you'll add a burst of color to your trading routine and gain a deeper understanding of market trends.
HOW IT WORKS
MA Lines:
MA - 5: purple lines
MA - 8: blue lines
MA - 13: green lines
MA - 21: yellow lines
MA - 34: orange lines
MA - 55: red line
Header Color Indicators:
Purple: MA-5 is in uptrend on the chart
Blue: MA-5 and MA-8 are in the uptrend on the chart
Green: MA-5, MA-8 and MA-13 are in the uptrend on the chart
Yellow: MA-5, MA-8, MA-13 and MA-21 are in the uptrend on the chart
Orange: MA-5, MA-8, MA-13, MA-21 and MA-34 are in the uptrend on the chart
Red: MA-5, MA-8, MA-13, MA-21, MA-34 and MA-55 are in the uptrend on the chart
Red + White Arrow: All MAs are correctly aligned in the uptrend on the chart
Footer Color Indicators:
Purple: MA-5 is in downtrend on the chart
Blue: MA-5 and MA-8 are in the downtrend on the chart
Green: MA-5, MA-8 and MA-13 are in the downtrend on the chart
Yellow: MA-5, MA-8, MA-13 and MA-21 are in the downtrend on the chart
Orange: MA-5, MA-8, MA-13, MA-21 and MA-34 are in the downtrend on the chart
Red: MA-5, MA-8, MA-13, MA-21, MA-34 and MA-55 are in the downtrend on the chart
Red + White Arrow: All MAs are correctly aligned in the downtrend on the chart
Background Colors:
Light Red: All MAs are on the rise!
Red: All MAs are align correctly on the rise!
Light Green: All MAs are in freefall!
Green: All MAs are align correctly in freefall!
Tiny Arrows Indicators/Alerts:
Down Arrow: All MAs are in freefall!
Up Arrow: All MAs are on the rise!
Big Arrows Indicators/Alerts:
Down Arrow: All MAs are align correctly in freefall!
Up Arrow: All MAs are align correctly on the rise!
RS for VPAThis is a supporting Indicator for the Volume Price Analysis Script VPA 5.0.
Purpose
To indicate the performance of the stock compared to an Index or any other selected stock. It also provides an idea about the strength of the Reference Index as well.
Description
The indicator is an unbound oscillator moving around a zero line. If the stock is strong then the values are positive and if it is weak the values are negative. If the stock is performing better (Stronger) than the Index the indicator is positive and colored green. If the stock is weaker than the Index it is negative and is colored Red.
The background indicates the strength of the Reference Index/Stock. Bullishness/up trend of the Index/Stock is indicated by yellow colour. Short term uptrend, Mid term uptrend and Long term trends are indicated by different shades of yellow varying from light to Dark. The bearishness / down trend is indicated by blue back ground.
How it Works
The relative strength is calculated by using the formula
RS = Gain of the stock / (Gain of the Ref. Index -1)
= (Stock Price today / Stock Price (N period ago)) /
(Index Price today / Index price (N period ago)) – 1
The Index strength is calculated as below
Short term trend up = 5 ema > 22 ema
Mid Term trend up = 22 ema > 60 ema
Long term trend up = 60 ema > 130 ema
Trend down = 5 ema < 22 ema
How to use
Use this indicator to assist your Price Action Analysis using VPA 5.0. When the Price action and volume indicates Bullishness, you can check if the relative strength is also supporting (Positive and in green Territory). This adds credibility to the Price action. Also check if the index is also positive (the Back ground is yellow). This makes the Price action even stronger. Ideally both the stock and index should be strong. Many time you would find the that the stock is in green territory but the index is in blue territory. This calls for some caution in evaluating the Price Action.
When the price action is positive but the relative strength is negative then one should be cautious and wait for the relative strength to turn positive before any entry decision.
Option for the Indicator
One can select the following from the setting for the indicator
1. Index or reference stock – Default is CNX 500
2. Relative Strength Calculation period – Default is 22
3. The EMA periods for the Index/Reference stock strength calculation
TTP Big Whale ExplorerThe Big Whale Explorer is an indicator that looks into the ratio of large wallets deposits vs withdrawals.
Whales tend to sale their holding when they transfer their holdings into exchanges and they tend to hold when they withdraw.
In this overlay indicator you'll be able to see in an oscillator format the moves of large wallets.
The moves above 1.5 turn into red symbolising that they are starting to distribute. This can eventually have an impact in the price by causing anything from a mild pullback to a considerable crash depending on how much is being actually sold into the market.
Moves below 0.5 mean that the large whales are heavily accumulating and withdrawing. During these periods price could still pullback or even crash but eventually the accumulation can take prices to new highs.
Instructions:
1) Load INDEX:BTCUSD or BNC:BLX to get the most historic data as possible
2) use the daily timeframe
3) load the indicator into the chart
Multiple Moving Averages with OffsetUser Description:
This indicator is designed to provide insights into market trends based on multiple moving averages with customizable offsets. It combines short-term and long-term moving averages to offer a comprehensive view of price movements. The user can adjust various parameters to tailor the indicator to their preferred settings.
How the Strategy Works:
Short-Term Fast Moving Average:
Length: 47 (Adjustable by the user)
Offset: Adjustable (User-defined)
Color: Green
Line Thickness: 2 (Thicker green line for better visibility)
Long-Term Fast Moving Average:
Length: 203 (Adjustable by the user)
Offset: Adjustable (User-defined)
Color: Red
Line Thickness: 2 (Thicker red line for better visibility)
Long-Term Slow Moving Average:
Length: 100 (Adjustable by the user)
Offset: 77 (Adjustable by the user)
Color: Custom Red (RGB: 161, 5, 5)
Line Thickness: 2 (Thicker red line for better visibility)
Interpretation:
When the Short-Term Fast Moving Average (green line) is above the Long-Term Fast Moving Average (red line), it may signal a potential uptrend.
Conversely, when the Short-Term Fast Moving Average is below the Long-Term Fast Moving Average, it may indicate a potential downtrend.
The Long-Term Slow Moving Average provides additional context, allowing users to assess the strength and stability of trends.
Customization:
Users can experiment with different lengths and offsets to fine-tune the indicator based on their trading preferences and market conditions.
TIPS:
- When price action reaches upper RED moving average is probable that the price action is close to a pull back or change of direction.
- When price action falls and closes below the bottom RED moving average it can be a possible change of direction to the downside.
- You can use the green moving average as a filter and confluence to identify if the price action is moving towards the upside or downside.
Note: This indicator is for informational purposes only and should be used in conjunction with other analysis tools for comprehensive decision-making.
[KVA]nRSIThe nRSI stands as a groundbreaking enhancement of the traditional Relative Strength Index (RSI), specifically engineered for traders seeking a more refined and accurate tool in fast-moving markets.
Customizable Price Change Period (n): Unlike the traditional RSI which solely relies on a fixed period for average gains and losses, the nRSI introduces an additional parameter, n, to calculate price changes.
This adaptation focuses on minimizing market noise, sharpening the indicator's sensitivity to genuine trends and patterns.
Enhanced Signal Precision : By reducing the influence of short-term price spikes and fluctuations, the nRSI delivers a more precise signal. This precision is particularly crucial in volatile market conditions, where traditional indicators may be swayed by transient movements.
Ideal Usage
Strategic Trading Decisions : Ideal for traders who need to filter out insignificant price movements to make more strategic, informed trading decisions.
Reliable Divergence Spotting : Enhanced noise reduction aids in identifying more reliable divergences, key for predicting potential market reversals.
Trend Confirmation : The smoothed RSI, assisted by the moving average, becomes an invaluable tool for confirming the validity of market trends, minimizing false signals.
Anchored Relative StrengthThe Anchored Relative Strength (RS) Indicator is a tool designed for traders to compare the performance of a selected stock or security against a benchmark index or another security starting from a specific point in time.
Traditional Relative Strength
The traditional RS line is a popular tool used to compare the performance of a stock, typically calculated as the ratio of the stock's price to a benchmark index's price. It helps identify outperformers and underperformers relative to the market or a specific sector.
The Anchored Approach
The Anchored RS line enhances the traditional concept of the RS line by introducing an anchored approach, where calculations begin from a user-defined date. This feature provides the flexibility to start the comparison from a specific historical event, earnings, market peak, trough, or any date significant to the trader's analysis.
Calculating Relative Strength
The RS value is calculated by dividing the close price of the chosen stock by the close price of the comparative symbol (SPX by default). This calculation is performed for each bar since the Anchor Date.
Indicator Features
🔶Custom Start Date
🔶Custom Comparison Symbol
🔶RS Line Moving Average
🔶Comparison Symbol Line
🔶Customize Colors & Appearance
Users can change the anchor date simply by clicking on the indicator and dragging the anchor point.
Double Simple Moving AverageThe Double Simple moving average is an indicator developed to help traders identify dynamic levels of support and resistance as well as determine current trend direction.
This indicator shows both an SMA calculated on highs and one calculated on lows. In addition to that, it plots the deviation bands based on the space between the two main lines.
The gradient color between the two main lines can be used to determine the volumetric pressure and confirmation of the current trend.
Micro Dots with VMA line [Crypto_Chili_]In the chart photo is a quick description of each part of the indicator is.
The Micro Dots were hours of testing different combinations of indicators and settings to find what looked and worked best. This is what I came up with, use it as a rough draft as it could probably be added to or changed around.
One simple way to use the indicator is if price is above VMA with green dots, look to long. If price is below VMA with red dots look to short.
Variable Moving Average - Also known as VMA or Track Line, is an Exponential Moving Average. VMA adjusts its smoothing constant on the basis of Market Volatility. This can help to measure the macro trend.
Micro Trend Dots - A Supertrend with extras filters. Supertrend is a trend-following indicator based on ATR (In this indicator TrueRange instead). The extra filters on top of the Supertrend help add confluence to them to give more confidence in the micro trend.
Credit to @LazyBear for the Variable Moving Average
Credit to @KivancOzbilgic for his Supertrend
Send me a message if you create something with the Micro Dots I'd love it see it!
Thank you friends I hope you enjoy!
No Signal is 100% correct at what it's trying to do. Use caution when trading!
Practice Risk Management.
Heiken Ashi Colored Moving AverageThis indicator is meant to plot a moving average but the color of the moving average will change based on Heikin Ashi. Its seems to be slightly off, I would love any suggestions on improving this indicator.
Thanks
User Defined Range Selector and Color Changing EMA LineThe "User Defined Range Selector and Color Changing EMA Line," stands out in the crowded field of trading indicators due to its unique blend of visual clarity and customizable functionality. Unlike traditional indicators, this tool not only tracks the Exponential Moving Average (EMA) but enhances it with a user-defined mirrored line to visually denote a range based on a percentage distance from the EMA.
Key Features:
- Dynamic Color-Changing EMA: The EMA line changes color based on its slope, providing instant visual cues about the market trend. Blue signifies an upward trend, red indicates a downward trend, and gray represents a sideways market.
- Customizable Range Selector: A mirrored EMA line is plotted, which can be set at a user-defined percentage away from the primary EMA. This feature allows traders to visualize a potential price range or channel, adding an extra layer of analysis for potential support and resistance zones.
- User-Driven Inputs: With inputs like EMA length, slope length, source, and the percentage distance for the mirrored line, the indicator offers a high level of customization, catering to various trading styles and strategies.
- Enhanced Trading Strategy Development: This combination of trend visualization and range identification aids in refining entry and exit points, making it an invaluable tool for developing more nuanced trading strategies.
Why It's Unique:
- Dual Functionality: The combination of trend indication (via color changes) and range visualization (through the mirrored line) sets this indicator apart from traditional EMA-based tools.
- Customization and Flexibility: The ability to tailor key parameters like EMA length and the percentage away for the mirrored line empowers traders to adapt the tool to fit their specific trading approach and market conditions.
- Visual Simplicity: Despite its multifaceted capabilities, the indicator maintains a clean and intuitive visual presentation, ensuring ease of use and interpretation.
License: This source code is subject to the terms of the Mozilla Public License 2.0. More details can be found at (mozilla.org). However, the code is public so use it as you see fit.
DCA Simulator---- EN ----
OBJECTIVE:
The aim of this indicator is to simulate the average acquisition price during a DCA from any date, any asset, any amount.
Useful for realizing that short-term volatility is not a problem when taking a long-term view, as only the fundamentals of the asset matter.
USAGE:
The indicator does not seek to reproduce tools to give you the size of your bag or what your absolute profit is. It should be used agnostically to the DCA amount, it allows you to identify whether starting from a date what your average purchase price and therefore whether you are currently in profit or not in relation to the current price.
You can also use it to compare assets against each other, which offers the best ROI via DCA.
NOTES:
The average price of the DCA will always be lower than the simple average price.
---- FR ----
OBJECTIF :
L'objectif de cette indicateur est de simuler le prix moyen d'acquisition lors d'un DCA à partir de n'importe quelle date, n'importe quel actif, peu importe le montant.
Utile pour se rendre compte que la volatilité court terme n'est pas un problème lors d'une vision long terme, seul compte le fondamental de l'actif.
USAGE :
L'indicateur ne cherche pas à reproduire des outils pour vous donner la taille de votre bag ou quel est votre profit absolu. Il doit être utilisé de manière agnostique au montant du DCA, il permet d'identifier si en commençant d'une date quel votre prix moyen d'achat et donc si vous êtes actuellement en profit ou pas par rapport au prix actuel.
Vous pouvez aussi vous en servir pour comparer des actifs entre eux, lequel offre le meilleur ROI via DCA.
NOTES :
L'on peut constater que le prix moyen du DCA sera systématiquement plus bas que la moyenne simple du prix
RSI & Backed-Weighted MA StrategyRSI & MA Strategy :
INTRODUCTION :
This strategy is based on two well-known indicators that work best together: the Relative Strength Index (RSI) and the Moving Average (MA). We're going to use the RSI as a trend-follower indicator, rather than a reversal indicator as most are used to. To the signals sent by the RSI, we'll add a condition on the chart's MA, filtering out irrelevant signals and considerably increasing our winning rate. This is a medium/long-term strategy. There's also a money management method enabling us to reinvest part of the profits or reduce the size of orders in the event of substantial losses.
RSI :
The RSI is one of the best-known and most widely used indicators in trading. Its purpose is to warn traders when an asset is overbought or oversold. It was designed to send reversal signals, but we're going to use it as a trend indicator by increasing its length to 20. The RSI formula is as follows :
RSI (n) = 100 - (100 / (1 + (H (n)/L (n))))
With n the length of the RSI, H(n) the average of days closing above the open and L(n) the average of days closing below the open.
MA :
The Moving Average is also widely used in technical analysis, to smooth out variations in an asset. The SMA formula is as follows :
SMA (n) = (P1 + P2 + ... + Pn) / n
where n is the length of the MA.
However, an SMA does not weight any of its terms, which means that the price 10 days ago has the same importance as the price 2 days ago or today's price... That's why in this strategy we use a RWMA, i.e. a back-weighted moving average. It weights old prices more heavily than new ones. This will enable us to limit the impact of short-term variations and focus on the trend that was dominating. The RWMA used weights :
The 4 most recent terms by : 100 / (4+(n-4)*1.30)
The other oldest terms by : weight_4_first_term*1.30
So the older terms are weighted 1.30 more than the more recent ones. The moving average thus traces a trend that accentuates past values and limits the noise of short-term variations.
PARAMETERS :
RSI Length : Lenght of RSI. Default is 20.
MA Type : Choice between a SMA or a RWMA which permits to minimize the impact of short term reversal. Default is RWMA.
MA Length : Length of the selected MA. Default is 19.
RSI Long Signal : Minimum value of RSI to send a LONG signal. Default is 60.
RSI Short signal : Maximum value of RSI to send a SHORT signal. Default is 40.
ROC MA Long Signal : Maximum value of Rate of Change MA to send a LONG signal. Default is 0.
ROC MA Short signal : Minimum value of Rate of Change MA to send a SHORT signal. Default is 0.
TP activation in multiple of ATR : Threshold value to trigger trailing stop Take Profit. This threshold is calculated as multiple of the ATR (Average True Range). Default value is 5 meaning that to trigger the trailing TP the price need to move 5*ATR in the right direction.
Trailing TP in percentage : Percentage value of trailing Take Profit. This Trailing TP follows the profit if it increases, remaining selected percentage below it, but stops if the profit decreases. Default is 3%.
Fixed Ratio : This is the amount of gain or loss at which the order quantity is changed. Default is 400, which means that for each $400 gain or loss, the order size is increased or decreased by a user-selected amount.
Increasing Order Amount : This is the amount to be added to or subtracted from orders when the fixed ratio is reached. The default is $200, which means that for every $400 gain, $200 is reinvested in the strategy. On the other hand, for every $400 loss, the order size is reduced by $200.
Initial capital : $1000
Fees : Interactive Broker fees apply to this strategy. They are set at 0.18% of the trade value.
Slippage : 3 ticks or $0.03 per trade. Corresponds to the latency time between the moment the signal is received and the moment the order is executed by the broker.
Important : A bot has been used to test the different parameters and determine which ones maximize return while limiting drawdown. This strategy is the most optimal on BITSTAMP:ETHUSD with a timeframe set to 6h. Parameters are set as follows :
MA type: RWMA
MA Length: 19
RSI Long Signal: >60
RSI Short Signal : <40
ROC MA Long Signal : <0
ROC MA Short Signal : >0
TP Activation in multiple ATR : 5
Trailing TP in percentage : 3
ENTER RULES :
The principle is very simple:
If the asset is overbought after a bear market, we are LONG.
If the asset is oversold after a bull market, we are SHORT.
We have defined a bear market as follows : Rate of Change (20) RWMA < 0
We have defined a bull market as follows : Rate of Change (20) RWMA > 0
The Rate of Change is calculated using this formula : (RWMA/RWMA(20) - 1)*100
Overbought is defined as follows : RSI > 60
Oversold is defined as follows : RSI < 40
LONG CONDITION :
RSI > 60 and (RWMA/RWMA(20) - 1)*100 < -1
SHORT CONDITION :
RSI < 40 and (RWMA/RWMA(20) - 1)*100 > 1
EXIT RULES FOR WINNING TRADE :
We have a trailing TP allowing us to exit once the price has reached the "TP Activation in multiple ATR" parameter, i.e. 5*ATR by default in the profit direction. TP trailing is triggered at this point, not limiting our gains, and securing our profits at 3% below this trigger threshold.
Remember that the True Range is : maximum(H-L, H-C(1), C-L(1))
with C : Close, H : High, L : Low
The Average True Range is therefore the average of these TRs over a length defined by default in the strategy, i.e. 20.
RISK MANAGEMENT :
This strategy may incur losses. The method for limiting losses is to set a Stop Loss equal to 3*ATR. This means that if the price moves against our position and reaches three times the ATR, we exit with a loss.
Sometimes the ATR can result in a SL set below 10% of the trade value, which is not acceptable. In this case, we set the SL at 10%, limiting losses to a maximum of 10%.
MONEY MANAGEMENT :
The fixed ratio method was used to manage our gains and losses. For each gain of an amount equal to the value of the fixed ratio, we increase the order size by a value defined by the user in the "Increasing order amount" parameter. Similarly, each time we lose an amount equal to the value of the fixed ratio, we decrease the order size by the same user-defined value. This strategy increases both performance and drawdown.
Enjoy the strategy and don't forget to take the trade :)
hamster-bot MRS 2 (simplified version) MRS - Mean Reversion Strategy (Countertrend) (Envelope strategy)
This script does not claim to be unique and does not mislead anyone. Even the unattractive backtest result is attached. The source code is open. The idea has been described many times in various sources. But at the same time, their collection in one place provides unique opportunities.
Published by popular demand and for ease of use. so that users can track the development of the script and can offer their ideas in the comments. Otherwise, you have to communicate in several telegram chats.
Representative of the family of counter-trend strategies. The basis of the strategy is Mean reversion . You can also read about the Envelope strategy .
Mean reversion , or reversion to the mean, is a theory used in finance that suggests that asset price volatility and historical returns eventually will revert to the long-run mean or average level of the entire dataset.
The strategy is very simple. Has very few settings. Good for beginners to get acquainted with algorithmic trading. A simple adjustment will help avoid overfitting. There are many variations of this strategy, but for understanding it is better to start with this implementation.
Principle of operation.
1)
A conventional MA is being built. (fuchsia line). A limit order is placed on this line to close the position.
2)
(green line) A limit order is placed on this line to open a long position
3)
(red line) A limit order is placed on this line to open a short position
Attention!
Please note that a limit order is used. Conclude that the strategy has a limited capacity. And the results obtained on low-liquid instruments will be too high in the tester. On real auctions there will be a different result.
Note for testing the strategy in the spot market:
When testing in the spot market, do not include both long and short at the same time. It is recommended to test only the long mode on the spot. Short mode for more advanced users.
Settings:
Available types of moving averages:
SMA
EMA
TEMA - triple exponential moving average
DEMA - Double Exponential Moving Average
ZLEMA - Zero lag exponential moving average
WMA - weighted moving average
Hma - Hull Moving Average
Thma - Triple Exponential Hull Moving Average
Ehma - Exponential Hull Moving Average
H - MA built based on highs for n candles | ta.highest(len)
L - MA built based on lows for n candles | ta.lowest(len)
DMA - Donchian Moving Average
A Kalman filter can be applied to all MA
The peculiarity of the strategy is a large selection of MA and the possibility of shifting lines. You can set up a reverse trending strategy on the Donchian channel for example.
Use Long - enable/disable opening a Long position
Use Short - enable/disable opening a Short position
Lot Long, % - % allocated from the deposit for opening a Long position. In the spot market, do not use % greater than 100%
Lot Short, % - allocated % of the deposit for opening a Short position
Start date - the beginning of the testing period
End date - the end of the testing period (Example: only August 2020 can be tested)
Mul - multiplier. Used to offset lines. Example:
Mul = 0.99 is shift -1%
Mul = 1.01 is shift +1%
Non-strict recommendations:
1) Test the SPOT market on crypto exchanges. (The countertrend strategy has liquidation risk on futures)
2) Symbols altcoin/bitcoin or altcoin/altcoin. Example: ETH/BTC or DOGE/ETH
3) Timeframe is usually 1 hour
If the script passes moderation, I will supplement it by adding separate settings for closing long and short positions according to their MA
Volatility Exponential Moving AverageVEMA is a custom indicator that enhances the traditional moving average by incorporating market volatility. Unlike standard moving averages that rely solely on price, VEMA integrates both the Simple Moving Average (SMA) and the Exponential Moving Average (EMA) of the closing price, alongside a measure of market volatility.
The unique aspect of VEMA is its approach. It calculates the standard deviation of the closing price and also computes the simple moving average of this volatility. This dual approach to understanding market fluctuations allows for a more nuanced understanding of market dynamics.
Key to VEMA's functionality is the dynamic weighting factor, which adjusts the influence of SMA and EMA based on current market volatility. This factor increases the weight of the EMA, which is more responsive to recent price changes, during periods of high volatility. Conversely, during periods of lower volatility, the SMA, which offers a smoother view of price trends, becomes more prominent.
The resultant is a hybrid moving average that responds adaptively to changes in market volatility. This adaptability makes VEMA particularly useful in dynamic markets, potentially offering more insightful trend analysis and reversal signals compared to traditional moving averages.
Day Open,High,Low Fib LevelsDay Open,High,Low Fibonacci Levels indicator depicts Fibonacci levels from Highest to lowest price levels vis-à-vis Day Open Price. The indicator is structured based on default Intraday number of bars. Hence the indicator and Gray Zone concept is effective in lower time frames .The indicator has also “Regular” Check in Box option under “Input” with default 14 bars under “Regular Length” to switch over from default Intraday Length.
Green Zone represent area above Day Open Price when close is above Day Open Price.
Red Zone represent area below Day Open Price when close is below Day Open Price.
Gray Zone represent band within the Maximum and Minimum of Moving Averages of MA24,MA38,MA50,MA62,MA79 drawn with relevance to Fibonacci levels. The movement within this band is expected to be resistant prone on either direction.
Fibonacci levels between Highest and Lowest points during Green Zone and Red Zone are derived and reflected at 78.6,61.8,50.0,38.2 and 23.6 levels for users guidance.
Trades above Gray Zone are favored for Buy trades and below Gray Zone are favored for Sell trades. Trades within Gray Zone are resistant prone from either direction.
If number of bars in Gray Zone during Intraday are more than the combined number of bars above Green Zone and number of bras below Gray Zone then market may be assumed to be in Range bound state.
MA20 and MA200 are in default in display state. Position of MA 20 above and below Gray Zone and vis-à-vis MA Mid (Mid point in Gray Zone ) reflects the prevailing trend .MA 200 reflects the general Up trend or Down trend .
The Indicator reflects the Green Zone, Gray Zone ,Red Zone in the Table below the Chart depending on the position of Day Open Price below or above the Last Price .If the number of bars in the Gray Zone are more than the combined number of bars above and below Gray Zone the table reflect Range Bound Market.
Supplementing with other monitoring tools and Price Action dynamics the indicator assist the user to plan his entry and exit of trade based on the position of the market whether it is in Green Zone or Red Zone by taking into account the Fibonacci Levels.
DISCLAIMER : For educational and entertainment purpose only .Nothing in this content should be interpreted as financial advice or a recommendation to buy or sell any sort of security/ies or investment/s.
buy/sell signals with Support/Resistance (InvestYourAsset) 📣The present indicator is a MACD based buy/sell signals indicator with support and resistance, that can be used to identify potential buy and sell signals in a security's price.
📣It is based on the MACD (Moving Average Convergence Divergence) indicator, which is a momentum indicator that shows the relationship between two moving averages of a security's price.
📣 The indicator also plots support and resistance levels, which can be used to confirm buy and sell signals. The support and resistance can also be used as a stoploss for existing position.
👉 To use the indicator, simply add it to your trading chart. The indicator will plot three sections:
📈 Price and Signals: This section plots the security's price and the MACD buy and sell signals.
📈 MACD Oscillator: This section plots the MACD oscillator, which is a histogram that shows the difference between the two moving averages.
📈 Moving Averages: This section plots the two moving averages that the MACD oscillator is based on.
📈 Support and Resistance: This section plots support and resistance levels, which are calculated based on the security's recent price action.
👉 To identify buy and sell signals, you can look for the following:
📈 Buy signal: When shorter Moving Average crosses over longer Moving Average.
📈 Sell signal: When shorter moving average crosses under longer moving average.
📈 You can also look for divergences between the MACD oscillator and the security's price. A divergence occurs when the MACD oscillator is moving in one direction, but the security's price is moving in the opposite direction. Divergences can be a sign of a potential trend reversal.
👉 To confirm buy and sell signals, you can look for support and resistance levels take a look at below snapshot. If a buy signal occurs at a support level, it is a stronger signal than if it occurs at a random price level. Similarly, if a sell signal occurs at a resistance level, it is a stronger signal than if it occurs at a random price level.
⚡ Here is a example of how to use the indicator to identify buy signal:
☑ Add the indicator to your trading chart.
☑Look for a buy signal when short MA crosses over Long MA.
☑Look for the buy signal to occur at a support level.
☑Enter a long position at the next candle.
☑Place a stop loss order below the support level.
☑Take profit when the MACD line crosses below the signal line, or when the security reaches a resistance level.
⚡ Here is an example of how to use the indicator to identify a sell signal:
☑Add the indicator to your trading chart.
☑Look for a sell signal, when shorter moving average crosses under longer moving average.
☑Look for the sell signal to occur at a resistance level.
☑Enter a short position at the next candle.
☑Place a stop loss order above the resistance level.
☑Take profit when the MACD line crosses above the signal line, or when the security reaches a support level.
✅Things to consider while using the indicator:
📈Look for buy signals in an uptrend and sell signals in a downtrend. This will increase the likelihood of your trades being successful.
📈Place your stop losses below the previous swing low or support for buy signals and above the previous swing high or resistance for sell signals. This will help to limit your losses if the trade goes against you.
📈Consider taking profits at key resistance and support levels. This will help you to lock in your profits and avoid giving them back to the market.
Follow us for timely updates regarding indicators that we may publish in future and give it a like if you appreciate the indicator.
Glowing RSI Candlesticks (With Buy and Sell helpers)This is not your average, boring RSI indicator.
This indicator is still an RSI (momentum) indicator, but I have converted the line into candlesticks.
It has an option to make it glow neon blue to make it look cooler (dark background recommended for full effect).
There is a red zone at 70, because of course, and a green zone at 30 for the same reason.
On top of that, it has triple moving averages, two of which it uses to create some simple buy and sell indications (the vertical green and red lines).
Enjoy! :)
Dynamic 5-Day Moving AverageThe Dynamic 5-Day Moving Average (MA) indicator is designed to provide traders with a consistent, time-adjusted moving average line across various timeframes. This indicator is especially useful for traders who switch between multiple timeframes and want a moving average that represents a fixed 5-day period, ensuring that the MA reflects a consistent lookback period relative to the amount of trading time each candle represents.
Features:
Timeframe Adaptability: Automatically adjusts the MA period to correspond to a 5-day lookback, regardless of the selected timeframe.
Intraday Precision: For intraday charts (5m, 15m, 30m, 1h, 2h, 4h), the indicator calculates the number of periods within the 5-day span based on the chart's timeframe.
Daily and Weekly Timeframe Compatibility: Sets the period to 5 for daily charts to maintain the 5-day MA, and to 1 for weekly charts, where each candlestick represents a week's worth of trading days.
Calculation Logic:
The indicator begins by defining the total number of trading minutes in 5 days, based on a standard 6.5-hour trading day.
A dynamic period calculation function then determines the number of those intervals that fit into the 5-day minute total for the selected timeframe.
For daily charts, the period is a straightforward 5, while for weekly charts, the period is set to 1, reflecting the average of the past 5 trading days.
Averaged Moving Average Ribbon with Bollinger BandsThis indicator provides a visual representation of an averaged weighted moving average (WMA) ribbon (default setting) along with Bollinger Bands on a price chart. Pay attention to how the moving average and band expand and contract, as well as where price crosses the Bollinger bands (Green and red) or the basis line (blue). Look for patterns, and exploit them to your advantage to give you another edge in trading.
>> Feel free to suggest changes or other additions in the comments :)
Here's a brief explanation of how this indicator works:
1. **Moving Average Type:** You can select the type of moving average (MA) to use from the dropdown menu. The available options are Weighted Moving Average (WMA), Simple Moving Average (SMA), and Exponential Moving Average (EMA).
2. **Bollinger Bands Deviation:** This input allows you to adjust the deviation for the Bollinger Bands. Higher values increase the width of the bands, while lower values decrease it.
3. **Moving Average Lengths:** The script calculates various moving averages (WMA, SMA, or EMA) with different lengths, ranging from 5 to 100, in increments of 5. These moving averages are used to create the ribbon.
4. **Ribbon Calculation:** The indicator calculates the selected moving average (WMA, SMA, or EMA) for each of the specified lengths. It then averages these moving averages to create a ribbon of MAs. This ribbon represents a smoother and more encompassing view of the underlying price action.
5. **Bollinger Bands:** The script also calculates and plots Bollinger Bands based on the ribbon's average. The upper Bollinger Band (green) and lower Bollinger Band (red) are plotted around the ribbon average. These bands provide insights into potential overbought and oversold conditions.
In summary, this indicator allows traders and analysts to visualize a weighted moving average ribbon with Bollinger Bands to gain a better understanding of price trends, volatility, and potential reversal points in the market. The combination of different moving average lengths and Bollinger Bands can help in making informed trading decisions.
What RSI? Weighted Heiken Ashi Triple RSIWhat You're Looking At:
The indicator presents a few key elements on its pane which is separate from the price chart:
Smoothed RSI Average Line: This line represents an average of three different RSI calculations, each weighted differently. It's been smoothed out to reduce noise and help you see the trend more clearly.
Moving Average Line: This is a line that smooths out the average RSI line even further and helps you identify the overall trend.
Bollinger Bands: These are two lines that create a channel around the RSI average line. The upper band typically represents an overbought condition, and the lower band represents an oversold condition.
Background Color: The background of the indicator pane will change colors to indicate buy (green) or sell (red) signals.
Horizontal Lines: There are horizontal lines drawn at levels 70, 50, and 30. These represent overbought, midpoint, and oversold levels, respectively.
How to Operate and Interpret:
Trend Identification: Look at the moving average line. If it's trending upwards, the overall momentum may be considered bullish. If it's trending downwards, the momentum may be bearish.
Buy Signals: You may consider a buy signal when:
The smoothed RSI average crosses above the moving average line.
The smoothed RSI average is below 30 and starts to rise, crossing the oversold line.
The background color turns green, signifying favorable conditions to buy according to the indicator's logic.
Sell Signals: You may consider a sell signal when:
The smoothed RSI average crosses below the moving average line.
The smoothed RSI average is above 70 and starts to fall, crossing the overbought line.
The background color turns red, signifying favorable conditions to sell according to the indicator's logic.
Overbought/Oversold Conditions: When the smoothed RSI line touches or crosses the Bollinger Bands, it could be indicating that the asset is overbought (upper band) or oversold (lower band). Some traders use these conditions to look for potential reversals.
Cautions for Trading:
If the smoothed RSI average is between the bands and near the middle line (50), the market might be considered neutral, and some traders may choose to wait for clearer signals.
Just because the indicator gives a buy or sell signal, it doesn't mean the price will immediately move in that direction. It's important to consider other factors in your trading strategy.
Final Notes:
Always use this indicator in conjunction with other analysis methods. No indicator is perfect, and they should be used to supplement your trading strategy, not replace it.
It's important to set stop losses according to your risk tolerance when entering any trades based on these signals.
Practice with the indicator in a demo account to become familiar with its behavior before using it with real money.
By following the movements and signals of this indicator, you can get a sense of the momentum and potential entry or exit points in the markets you are trading.
SMA Crossover Support & Resistance [Rami_LB]This indicator draws a horizontal line on the price chart at the point where two pre-defined SMA (Simple Moving Average) lines intersect. It is most useful for identifying crossed SMA lines on the 1-hour chart and then trading on smaller chart intervals.
For optimal performance, it is recommended to customize the values of the SMA lines individually for each currency pair, as these values can vary from one pair to another. To do this, switch to the 1-hour chart and adjust the SMA parameters until you visually observe that these settings would yield favorable results based on historical data. Certainly, you can also adjust the length of the lines accordingly when you switch from the 1-hour chart to smaller timeframes.
Please note that this indicator allows traders to visually identify potential trend changes and crossovers between short-term and long-term moving averages, aiding in decision-making for trading strategies.