Dynamic Trend Fusion (DTF)The "Dynamic Trend Fusion" (DTF) indicator is a powerful technical analysis tool for traders. It stands out from other indicators due to its adaptability and ability to provide insights into different trading styles. Users can choose from various trading options such as "Short-term Trading," "Long-term Trading," "Aggressive Short-term," "Conservative Long-term," "Balanced Approach," "High Sensitivity," "Low Sensitivity," "Day Trading," and "Swing Trading." These options allow traders to customize the indicator to suit their specific trading strategies.
DTF combines the Moving Average Convergence Divergence (MACD) and Relative Strength Index (RSI) indicators, normalizing them to a similar scale for a comprehensive view of market conditions. It then calculates a combined value and smoothes it using a moving average.
One of its standout features is the ability to identify bullish and bearish states, which is represented visually on the chart. When the indicator detects a transition from a bullish to a bearish state or vice versa, the color of the line changes.
Additionally, DTF offers alert conditions, notifying users when the market shifts into a bullish or bearish state, allowing for timely decision-making.
In summary, the DTF indicator sets itself apart by providing traders with a versatile tool that can be tailored to various trading styles and offers clear visual signals for trend changes, enhancing trading precision and efficiency.
Oscillators
Monthly Performance Table by Dr. MauryaWhat is this ?
This Strategy script is not aim to produce strategy results but It aim to produce monthly PnL performance Calendar table which is useful for TradingView community to generate a monthly performance table for Own strategy.
So make sure to read the disclaimer below.
Why it is required to publish?:
I am not satisfied with the monthly performance available on TV community script. Sometimes it is very lengthy in code and sometimes it showing the wrong PNL for current month.
So I have decided to develop new Monthly performance or return in value as well as in percentage with highly flexible to adjust row automatically.
Features :
Accuracy increased for current month PnL.
There are 14 columns and automatically adjusted rows according to available trade years/month.
First Column reflect the YEAR, from second column to 13 column reflect the month and 14 column reflect the yearly PnL.
In tabulated data reflects the monthly PnL (value and (%)) in month column and Yearly PnL (value and (%)) in Yearly column.
Various color input also added to change the table look like background color, text color, heading text color, border color.
In tabulated data, background color turn green for profit and red for loss.
Copy from line 54 to last line as it is in your strategy script.
Credit: This code is modified and top up of the open-source code originally written by QuantNomad. Thanks for their contribution towards to give base and lead to other developers. I have changed the way of determining past PnL to array form and keep separated current month and year PnL from array. Which avoid the false pnl in current month.
Strategy description:
As in first line I said This strategy is aim to provide monthly performance table not focused on the strategy. But it is necessary to explain strategy which I have used here. Strategy is simply based on ADX available on TV community script. Long entry is based on when the difference between DIPlus and ADX is reached on certain value (Set value in Long difference in Input Tab) while Short entry is based on when the difference between DIMinus and ADX is reached on certain value (Set value in Short difference in Input Tab).
Default Strategy Properties used on chart(Important)
This script backtest is done on 1 hour timeframe of NSE:Reliance Inds Future cahrt, using the following backtesting properties:
Balance (default): 500 000 (default base currency)
Order Size: 1 contract
Comission: 20 INR per Order
Slippage: 5 tick
Default setting in Input tab
Len (ADX length) : 14
Th (ADX Threshhold): 20
Long Difference (DIPlus - ADX) = 5
Short Difference (DIMinus - ADX) = 5
We use these properties to ensure a realistic preview of the backtesting system, do note that default properties can be different for various reasons described below:
Order Size: 1 contract by default, this is to allow the strategy to run properly on most instruments such as futures.
Comission: Comission can vary depending on the market and instrument, there is no default value that might return realistic results.
We strongly recommend all users to ensure they adjust the Properties within the script settings to be in line with their accounts & trading platforms of choice to ensure results from the strategies built are realistic.
Disclaimer:
This script not provide indicative of any future results.
This script don’t provide any financial advice.
This strategy is only for the readymade snippet code for monthly PnL performance calender table for any own strategy.
Multi-data oscillatorThe multi-data oscillator is a tool created to help traders visualize clearly how an oscillator works and moves considering different input parameters.
In this tool, you can choose to visualize the script as the RSI, the CCI, the LOC indicator, a custom-created formula that simply shows the location of the data considering X past values, or the average of all of these three indicators.
In the settings, you can choose both the length of the indicator and the smoothing factor.
Additionally, the indicator has a gradient color that changes considering the deviation and the variance of the different lines used to calculate the average line, displayed with more thickness.
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
[KVA]K Stochastic IndicatorOriginal Stochastic Oscillator Formula:
%K=(C−Lowest Low)/(Highest High−Lowest Low)×100
Lowest Low refers to the lowest low of the past n periods.
Highest High refers to the highest high of the past n periods.
K Stochastic Indicator Formula:
%K=(Source−Lowest Source)/(Highest Source−Lowest Source)×100
Lowest Source refers to the lowest value of the chosen source over the past length periods.
Highest Source refers to the highest value of the chosen source over the past length periods.
Key Difference :
The original formula calculates %K using the absolute highest high and lowest low of the price over the past n periods.
The K Stochastic formula calculates %K using the highest and lowest values of a chosen source (which could be the close, open, high, or low) over the specified length periods.
So, if _src is set to something other than the high for the Highest Source or something other than the low for the Lowest Source, the K Stochastic will yield different results compared to the original formula which strictly uses the highest high and the lowest low of the price.
Impact on Traders :
Flexibility in Price Source :
By allowing the source (_src) to be customizable, traders can apply the Stochastic calculation to different price points (e.g., open, high, low, close, or even an average of these). This could provide a different perspective on market momentum and potentially offer signals that are more aligned with a trader's specific strategy.
Sensitivity to Price Action :
Changing the source from high/low to potentially less extreme values (like close or open) could result in a less volatile oscillator, smoothing out some of the extreme peaks and troughs and possibly offering a more filtered view of market conditions.
Customization of Periods :
The ability to adjust the length period offers traders the opportunity to fine-tune the sensitivity of the indicator to match their trading horizon. Shorter periods may provide earlier signals, while longer periods could filter out market noise.
Possibility of Applying the Indicator on Other Indicators :
Layered Technical Analysis :
The K Stochastic can be applied to other indicators, not just price. For example, it could be applied to a moving average to analyze its momentum or to indicators like RSI or MACD, offering a meta-analysis that studies the oscillator's behavior of other technical tools.
Creation of Composite Indicator s:
By applying the K Stochastic logic to other indicators, traders could create composite indicators that blend the characteristics of multiple indicators, potentially leading to unique signals that could offer an edge in certain market conditions.
Enhanced Signal Interpretation :
When applied to other indicators, the K Stochastic can help in identifying overbought or oversold conditions within those indicators, offering a different dimension to the interpretation of their output.
Overall Implications :
The KStochastic Indicator's modifications could lead to a more tailored application, giving traders the ability to adapt the tool to their specific trading style and analysis preferences.
By being applicable to other indicators, it broadens the scope of stochastic analysis beyond price action, potentially offering innovative ways to interpret data and make trading decisions.
The changes might also influence the trading signals, either by smoothing the oscillator's output to reduce noise or by altering the sensitivity to generate more or fewer signal
Including the additional %F line, which is unique to the K Stochastic Indicator, further expands the potential impacts and applications for traders:
Impact on Traders with the %F Line:
Triple Smoothing :
The %F line introduces a third level of smoothing, which could help in identifying longer-term trends and filtering out short-term fluctuations. This could be particularly useful for traders looking to avoid whipsaws and focus on more sustained movements.
Potential for Enhanced Confirmation :
The %F line might be used as a confirmation signal. For instance, if all three lines (%K, %D, and %F) are in agreement, a trader might consider this as a stronger signal to buy or sell, as opposed to when only the traditional two lines (%K and %D) are used.
Risk Management:
The additional line could be utilized for more sophisticated risk management strategies, where a trader might decide to scale in or out of positions based on the convergence or divergence of these lines.
Possibility of Applying the Indicator on Other Indicators with the %F Line:
Depth of Analysis :
When applied to other indicators, the %F line can provide an even deeper layer of analysis, perhaps identifying macro trends within the indicator it is applied to, which could go unnoticed with just the traditional two-line approach.
Refined Signal Strength Assessment :
The strength of signals from other indicators could be assessed by the position and direction of the %F line, providing an additional filter to evaluate the robustness of buy or sell signals.
Overall Implications with the %F Line :
The inclusion of the %F line in the K Stochastic Indicator enhances its utility as a tool for trend analysis and signal confirmation. It allows traders to potentially identify and act on more reliable trading opportunities.
This feature can enrich the trader's toolkit by providing a nuanced view of momentum and trend strength, which can be particularly valuable in volatile or choppy markets.
For those applying the K Stochastic to other indicators, the %F line could be integral in creating a multi-tiered analysis strategy, potentially leading to more sophisticated interpretations and decisions.
The presence of the %F line adds a dimension of depth to the analysis possible with the K Stochastic Indicator, making it a versatile tool that could be tailored to a variety of trading styles and objectives. However, as with any indicator, the additional complexity requires careful study and back-testing to ensure its signals are understood and actionable within the context of a comprehensive trading plan.
[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.
Detrended Price Rate of ChangeThe Detrended Price Rate of Change is an oscillator developed to help traders identify potential conditions of overbought and oversold markets.
The formula of the oscillator includes both the Detrended price formula, useful to spot divergences, and the Rate of change simplified formula, which helps in identifying overextended markets and gives useful information on price momentum.
Harmonic Trend Fusion [kikfraben]📈 Harmonic Trend Fusion - Your Personal Trading Assistant
This versatile tool combines multiple indicators to provide a holistic view of market trends and potential signals.
🚀 Key Features:
Multi-Indicator Synergy: Benefit from the combined insights of Aroon, DMI, MACD, Parabolic SAR, RSI, Supertrend, and SMI Ergodic Oscillator, all in one powerful indicator.
Customizable Plot Options: Tailor your chart by choosing which signals to visualize. Whether you're interested in trendlines, histograms, or specific indicators, the choice is yours.
Color-Coded Trends: Quickly identify bullish and bearish trends with the color-coded visualizations. Stay ahead of market movements with clear and intuitive signals.
Table Display: Stay informed at a glance with the interactive table. It dynamically updates to reflect the current market sentiment, providing you with key information and trend direction.
Precision Control: Fine-tune your analysis with precision control over indicator parameters. Adjust lengths, colors, and other settings to align with your unique trading strategy.
🛠️ How to Use:
Customize Your View: Select which indicators to display and adjust plot options to suit your preferences.
Table Insights: Monitor the dynamic table for real-time updates on market sentiment and trend direction.
Indicator Parameters: Experiment with different lengths and settings to find the combination that aligns with your trading style.
Whether you're a seasoned trader or just starting, Harmonic Trend Fusion equips you with the tools you need to navigate the markets confidently. Take control of your trading journey and enhance your decision-making process with this comprehensive trading assistant.
ADX Speed DerivativeThe ADX Speed Derivative (ADXSD) is a cutting-edge trading indicator meticulously crafted for trend analysis. By harnessing the power of the Average Rate Of Change (AROC) method applied to the first and second derivatives (pictured in white and purple, respectively) of the ADX oscillator, this indicator transcends conventional tools, offering traders unparalleled insights into market dynamics.
Key Features and Analysis Capabilities:
The ADXSD stands out with its ability to detect shifts in market trend directions, precisely quantify the speed and intensity of those transitions, and gauge the weakening or strengthening of prevailing trends. This comprehensive toolkit is designed for traders who demand accuracy and nuance in their technical analysis.
AROC Differentiation:
Unlike traditional ADX-based indicators, the ADXSD incorporates the AROC method, offering a nuanced perspective on trend acceleration or deceleration. The first derivative provides insight into the simplest rate of change, while the second derivative unveils the acceleration or deceleration of the trend, empowering traders with a deeper understanding of market dynamics.
Signal Precision:
This indicator excels at pinpointing potential trend reversals and transitions. Utilizing AROC on the ADX oscillator, it generates precise signals marked on the chart, giving traders timely and actionable information to make informed decisions.
Customization and Adaptability:
The ADXSD offers a range of customization options to cater to diverse trading strategies. Traders can adjust the lookback parameters to align with their risk tolerance and preferences, ensuring a personalized and adaptive approach to technical analysis.
Trend Visualization:
Incorporating a visual approach, this indicator enhances the interpretation of market trends. Traders can quickly identify shifts in trend strength and direction by observing midline crossovers, providing a visual guide for strategic decision-making.
Comprehensive Analysis:
The ADXSD serves as a comprehensive tool for traders seeking in-depth insights into market trends. It complements existing technical indicators, offering a holistic approach to market analysis.
ATH Drawdown Indicator by Atilla YurtsevenThe ATH (All-Time High) Drawdown Indicator, developed by Atilla Yurtseven, is an essential tool for traders and investors who seek to understand the current price position in relation to historical peaks. This indicator is especially useful in volatile markets like cryptocurrencies and stocks, offering insights into potential buy or sell opportunities based on historical price action.
This indicator is suitable for long-term investors. It shows the average value loss of a price. However, it's important to remember that this indicator only displays statistics based on past price movements. The price of a stock can remain cheap for many years.
1. Utility of the Indicator:
The ATH Drawdown Indicator provides a clear view of how far the current price is from its all-time high. This is particularly beneficial in assessing the magnitude of a pullback or retracement from peak levels. By understanding these levels, traders can gauge market sentiment and make informed decisions about entry and exit points.
2. Risk Management:
This indicator aids in risk management by highlighting significant drawdowns from the ATH. Traders can use this information to adjust their position sizes or set stop-loss orders more effectively. For instance, entering trades when the price is significantly below the ATH could indicate a higher potential for recovery, while a minimal drawdown from the ATH may suggest caution due to potential overvaluation.
3. Indicator Functionality:
The indicator calculates the percentage drawdown from the ATH for each trading period. It can display this data either as a line graph or overlaid on candles, based on user preference. Horizontal lines at -25%, -50%, -75%, and -100% drawdown levels offer quick visual cues for significant price levels. The color-coding of candles further aids in visualizing bullish or bearish trends in the context of ATH drawdowns.
4. ATH Level Indicator (0 Level):
A unique feature of this indicator is the 0 level, which signifies that the price is currently at its all-time high. This level is a critical reference point for understanding the market's peak performance.
5. Mean Line Indicator:
Additionally, this indicator includes a 'Mean Line', representing the average percentage drawdown from the ATH. This average is calculated over more than a thousand past bars, leveraging the law of large numbers to provide a reliable mean value. This mean line is instrumental in understanding the typical market behavior in relation to the ATH.
Disclaimer:
Please note that this ATH Drawdown Indicator by Atilla Yurtseven is provided as an open-source tool for educational purposes only. It should not be construed as investment advice. Users should conduct their own research and consult a financial advisor before making any investment decisions. The creator of this indicator bears no responsibility for any trading losses incurred using this tool.
Please remember to follow and comment!
Trade smart, stay safe
Atilla Yurtseven
Easy To Trade indicatorAbstract
This script evaluates how easy for traders to trade.
This script computes the level that the gains were distributed in many trading days.
We can use this indicator to decide the instruments and the time we trade.
Introduction
Why we think the trading markets are boring?
It is because most of the gains were concentrated in a few trading days.
We look for instruments we can buy at support and sell at resistance frequently and repeatedly.
However, it does not happen usually because it is difficult to find sellers sell at support and buyers buy at resistance.
This script is a method to measure if an instrument is difficult to trade.
If most of the gains were concentrated in a few trading days, this script says it is difficult to trade.
If gains were distributed in many trading days and we can buy low and sell high repeatedly, this script says it is easy to trade.
Therefore, this script measure how difficult for us to trade by the ratio between the area of value and the total gain.
How it works
1. Determine the instruments and time frames we are interested in.
2. Determine how many days this script evaluate the result. This number may depend on how many days from you buy in to you sell out.
3. If the instrument you choose is easy to trade, this script reports higher values.
4. If the instrument is long term bullish, the number "easy to invest" is usually higher than the number "easy to short" .
5. We can consider trade instruments which are easier to trade than others.
6. We can consider wait until the period that it is difficult to trade has past or keep believing that some instruments are easier to trade than others.
Parameters
x_src = The price for each trading day this script use. It may be open , high , low , close or their combination.
x_is_exp = Whether this script evaluate the price movement in exponential or logarithm. You are advised to answer yes if the price changes drastically.
x_period = How many days this script evaluate the result.
Conclusion
With this indicator , we have data to explain how easy or difficult an instrument is for traders . In other words , if we hear some people say the trading markets are boring or difficult for traders , we can use this indicator to verify how accurate their comments are.
With this explainable analysis , we have more knowledge about which instruments and which sessions are relative easy for us to buy low and sell high repeatedly and frequently , we can have better proceeding than buy and hold simply.
MACD_RSI_trend_followingINFO:
This indicator can be used to build-up a strategy for trading of assets which are currently in trending phase.
My preference is to use it on slowly moving assets like GOLD and on higher timeframes, but practice may show that we find more usefull cases.
This script uses two indicators - MACD and RSI, as the timeframe that those are extracted for is configurable (defaults with the Chart TF, but can be any other selected by the user).
The strategy has the following simple idea - buy if any if the conditions below is true:
The selected TF MACD line crosses above the signal line and the TF RSI is above the user selected trigger value
The selected TF MACD line is above the signal line and the TF RSI crosses above the user selected trigger value
Once we're in position we wait for the selected TF MACD line to cross below the signal line, and then we set a SL at the low of that bar
DETAILS and USAGE:
In the current implementation I find two possible use cases for the indicator:
as a stand-alone indicator on the chart which can also fire alerts that can help to determine if we want to manually enter/exit trades based on them
can be used to connect to the Signal input of the TTS (TempalteTradingStrategy) by jason5480 in order to backtest it, thus effectively turning it into a strategy (instructions below in TTS CONNECTIVITY section)
In the example below we see a position opened at the bar after the buy indicator from the script has been triggered, and then later after the SL indicator from the script has been triggered a SL has been set on the lower wick of the closing candle, and the position eventually got closed once the price hit that level. Note that most of the drawing on the example snapshot below are from the TTS indicator following the buy/sell/SL conditions themseves:
Trading period can be selected from the indicator itself to limit to more interesting periods.
Arrow indications are drawn on the chart to indicate the trading conditions met in the script - green arrow for a buy signal indication and orange for LTF crossunder to indicate setting of SL.
SETTINGS:
Leaving all of the settings as in vanilla use case, as both the MACD and RSI indicator's settings follow the default ones for the stand-alone indicators themselves.
The start-end date is a time filter that can be extermely usefull when backtesting different time periods.
Pesonal preference is using the script on a D/W timeframe, while the indicator is configured to use Monthly chart.
The default value of the RSI filter is left to 50, which can be changed. I.e. if the RSI is above 50 we have a regime filter based on the MACD criteria.
EXTERNAL LIBRARIES:
The script uses a couple of external libraries:
HeWhoMustNotBeNamed/enhanced_ta/14 - collection of TA indicators
jason5480/tts_convention/3 - more details about the Template Trading Strategy below
I would like to highly appreciate and credit the work of both HeWhoMustNotBeNamed and jason5480 for providing them to the community.
TTS SETTINGS (NEEDED IF USED TO BACKTEST WITH TTS):
The TempalteTradingStrategy is a strategy script developed in Pine by jason5480, which I recommend for quick turn-around of testing different ideas on a proven and tested framework
I cannot give enough credit to the developer for the efforts put in building of the infrastructure, so I advice everyone that wants to use it first to get familiar with the concept and by checking
by checking jason5480's profile www.tradingview.com
The TTS itself is extremely functional and have a lot of properties, so its functionality is beyond the scope of the current script -
Again, I strongly recommend to be thoroughly epxlored by everyone that plans on using it.
In the nutshell it is a script that can be feed with buy/sell signals from an external indicator script and based on many configuration options it can determine how to execute the trades.
The TTS has many settings that can be applied, so below I will cover only the ones that differ from the default ones, at least according to my testing - do your own research, you may find something even better :)
The current/latest version that I've been using as of writing and testing this script is TTSv48
Settings which differ from the default ones:
from - False (time filter is from the indicator script itself)
Deal Conditions Mode - External (take enter/exit conditions from an external script)
🔌Signal 🛈➡ - MACD_RSI_trend_following: 🔌Signal to TTSv48 (this is the output from the indicator script, according to the TTS convention)
Sat/Sun - true (for crypto, in order to trade 24/7)
Order Type - STOP (perform stop order)
Distance Method - HHLL (HigherHighLowerLow - in order to set the SL according to the strategy definition from above)
The next are just personal preferenes, you can feel free to experiment according to your trading style
Take Profit Targets - 0 (either 100% in or out, no incremental stepping in or out of positions)
Dist Mul|Len Long/Short- 10 (make sure that we don't close on profitable trades by any reason)
Quantity Method - EQUITY (personal backtesting preference is to consider each backtest as a separate portfolio, so determine the position size by 100% of the allocated equity size)
Equity % - 100 (note above)
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 :)
Dope DPOThe "Dope DPO" (DDPO) indicator is a technical analysis tool designed for traders to identify trends and potential trend changes in the market. It's based on the concept of the Detrended Price Oscillator (DPO), but with several enhancements for greater versatility and user customization.
Key Features of the Dope DPO Indicator:
Averaging Multiple Periods: The indicator averages the DPO calculations over ten different time periods. This averaging helps in smoothing out the volatility and providing a more comprehensive view of the market trend.
Customizable Smoothing: Users can choose the length of the smoothing as well as the type of moving average (SMA, EMA, WMA, or RMA) for smoothing. This allows for flexibility in how the indicator responds to price changes.
Trend Change Detection: The indicator includes a feature to detect changes in the market trend. It does this by comparing the current value of the smoothed DPO to its value a specified number of bars back. This helps in identifying potential reversals or shifts in momentum.
Dynamic Color Coding: The indicator uses color coding (green and red) to visually represent the trend direction. If the smoothed DPO is trending upwards compared to a previous value, the color will be green, indicating bullish momentum. Conversely, a red color signifies bearish momentum.
Horizontal Reference Lines: It includes horizontal lines at specific levels (overbought, zero, and oversold) to provide reference points for interpreting the indicator's values.
Usage:
Traders can use the Dope DPO to gauge the overall market trend and to look for potential entry and exit points based on trend changes.
The color-coded histogram makes it easy to spot when the trend might be reversing, which can be particularly useful in conjunction with other technical analysis tools.
The flexibility in choosing the smoothing method and length allows traders to tailor the indicator to different trading styles and timeframes.
Pullback and Throwback Candle [TrendX_]Pullback and Throwback candles can help traders determine the the potential reversal points
USAGE
The indicator identifies pullback and throwback in overbought and oversold zones by measuring the distance between the price and its relative strength index.
A Pullback is an expected rebound in a downtrend (painted in green area), while a Throwback is a bounceback from an uptrend (painted in red area).
The strategy is useful for valuing reversal points. Accordingly, it can also be helpful for traders to use alongside other Technical Analysis indicators.
DISCLAIMER
This indicator is not financial advice, it can only help traders make better decisions.
There are many factors and uncertainties that can affect the outcome of any endeavor, and no one can guarantee or predict with certainty what will occur.
Therefore, one should always exercise caution and judgment when making decisions based on past performance.
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! :)
Standardized SuperTrend Oscillator
The Standardized SuperTrend Oscillator (SSO) is a versatile tool that transforms the SuperTrend indicator into an oscillator, offering both trend-following and mean reversion capabilities. It provides deeper insights into trends by standardizing the SuperTrend with respect to its upper and lower bounds, allowing traders to identify potential reversals and contrarian signals.
Methodology:
Lets begin with describing the SuperTrend indicator, which is the fundamental tool this script is based on.
SuperTrend:
The SuperTrend is calculated based on the average true range (ATR) and multiplier. It identifies the trend direction by placing a line above or below the price. In an uptrend, the line is below the price; in a downtrend, it's above the price.
pine_st(float src = hl2, float factor = 3., simple int len = 10) =>
float atr = ta.atr(len)
float up = src + factor * atr
up := up < nz(up ) or close > nz(up ) ? up : nz(up )
float lo = src - factor * atr
lo := lo > nz(lo ) or close < nz(lo ) ? lo : nz(lo )
int dir = na
float st = na
if na(atr )
dir := 1
else if st == nz(up )
dir := close > up ? -1 : 1
else
dir := close < lo ? 1 : -1
st := dir == -1 ? lo : up
SSO Oscillator:
The SSO is derived from the SuperTrend and the source price. It calculates the standardized difference between the SuperTrend and the source price. The standardization is achieved by dividing this difference by the distance between the upper and lower bounds of the SuperTrend.
float sso = (src - st) / (up - lo)
Components and Features:
SuperTrend of Oscillator - An additional SuperTrend based on the direction and volatility of the oscillator, behaving as the SuperTrend OF the SuperTrend. This provides further trend analysis of the underlying broad trend regime.
Reversion Tracer - The RSI of the direction of the original SuperTrend, providing a dynamic threshold for premium and discount price areas.
float rvt = ta.rsi(dir, len)
Heikin Ashi Transform - An option to apply the Heikin Ashi transform to the source price of the oscillator, providing a smoother visual representation of trends.
Display Modes - Choose between Line mode for a standard oscillator view or Candle mode, displaying the oscillator as Heikin Ashi candles for more in-depth trend analysis.
Contrarian and Reversion Signals:
Contrarian Signals - Based on the SuperTrend of the oscillator, these signals can act as potential buy or sell indications, highlighting potential trend exhaustion or premature reversals.
Reversion Signals - Generated when the oscillator crosses above or below the Reversion Tracer, signaling potential mean reversion opportunities or trend breakouts.
Utility and Use Cases:
Trend Analysis - Utilize the SSO as a trend-following tool with the added benefits of the oscillator's SuperTrend and Heikin Ashi transform.
Valuation Analysis - Leverage the oscillator's reversion signals for identifying potential mean reversion opportunities in the market.
The Standardized SuperTrend Oscillator enhances the capabilities of the SuperTrend indicator, offering a balanced approach to both trend-following and mean reversion strategies. Its customizable options and contrarian signals make it a valuable instrument for traders seeking comprehensive trend analysis and potential reversal signals.
EUR/USD 45 MIN Strategy - FinexBOTThis strategy uses three indicators:
RSI (Relative Strength Index) - It indicates if a stock is potentially overbought or oversold.
CCI (Commodity Channel Index) - It measures the current price level relative to an average price level over a certain period of time.
Williams %R - It is a momentum indicator that shows whether a stock is at the high or low end of its trading range.
Long (Buy) Trades Open:
When all three indicators suggest that the stock is oversold (RSI is below 25, CCI is below -130, and Williams %R is below -85), the strategy will open a buy position, assuming there is no current open trade.
Short (Sell) Trades Open:
When all three indicators suggest the stock is overbought (RSI is above 75, CCI is above 130, and Williams %R is above -15), the strategy will open a sell position, assuming there is no current open trade.
SL (Stop Loss) and TP (Take Profit):
SL (Stop Loss) is 0.45%.
TP (Take Profit) is 1.2%.
The strategy automatically sets these exit points as a percentage of the entry price for both long and short positions to manage risks and secure profits. You can easily adopt these inputs according to your strategy. However, default settings are recommended.
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.
RSI Bands + Levels (Miu)This indicator was designed to plot lines from prices of overbought (OB) and oversold (OS) RSI levels in chart. It will also create a visible band between these levels.
It's main utility is to show in chart current and past prices for OB/OS RSI levels. Traditionally the RSI is considered overbought when above 70 and oversold when below 30 but you can customize these values in settings. The RSI oscillates between zero and 100.
Users can easily identify overbought and oversold prices using this indicator and then it is expected to help users to make better strategic decisions with their trades.
There are some extra options available in settings:
- Customizable RSI levels
- Customizable RSI length
- RSI Levels: if activated, it will draw lines above OB line and below OS line according to the multiplier, so it will plot sequential lines that goes in different RSI levels (e.g: RSI 72, 74, 76, 78 and 80).
- Backgroud only: it will remove these lines and keep only a backgroung color instead
- RSI 50: it will draw a line as RSI 50
- Customizable multiplier
Enjoy!
Ultimate RSIThis indicator is a customized version of the RSI indicator that by default utilizes Bollinger Bands. It have included two layers of bands, with separate standard deviations. The indicator is fully customizable.
The indicator displays bullish and bearish divergence from price.
You are able to change the moving average that is used to calculate both the RSI itself, as well as the moving average used for the Bollinger Bands.
I have included fills that color the background to indicate various zones of RSI values.
Price tends to either reject or move quickly at these levels.
I have a yellow RSI zone that indicates a sideways market with little to no momentum with default values of 45 to 55. These are areas where trading is stagnant and you should likely avoid placing trades.
There is now an ATR feature to adjust the Bollinger Bands with ATR (Average True Range).
In order to trade with this indicator, you should watch for the white line (RSI) to cross into the Bollinger Bands, then cross over the yellow moving average (Basis line), where you would enter a BUY or SELL.
Watch this indicator in action and look for patterns. Draw vertical lines on the chart where you would have wanted to buy or sell and study this to understand how to make better trading decisions.
NOTE:
While not required in order to use this indicator, it was designed to visually work with another indicator of mine called The Ultimate Buy and Sell Indicator. I recommend using both together as they are a strong pair of indicators that share the same settings. This indicator while it can be used independently can also help you visualize the settings changes made to the other one which are unable to be displayed on the main chart by that indicator.
Oscillator Volume Profile [Trendoscope®]The Oscillator Volume Profile indicator is designed to construct a volume profile based on predefined oscillator levels. It integrates volume data with oscillator readings to offer a unique perspective on market dynamics.
🎲 Selectable Oscillators:
Users can select from an array of oscillator options for the basis of the volume profile, including:
Relative Strength Index (RSI)
Chande Momentum Oscillator (CMO)
Center of Gravity (COG)
Money Flow Index (MFI)
Rate of Change (ROC)
Commodity Channel Index (CCI)
Stochastic Oscillator (Stoch)
True Strength Index (TSI)
Williams %R (WPR)
The length parameters - Length, Fast Length, Slow Length allows users to define the period over which the chosen oscillator is calculated, tailoring the sensitivity of the indicator to their trading strategy.
🎲 Dynamic Overbought/Oversold Ranges:
This indicator enhances traditional concepts by introducing dynamic overbought and oversold levels. These adaptable thresholds are calculated using various methods, including:
🎯 Highest/Lowest Range Method : This method establishes the range based on the highest and lowest values of the oscillator within the last N bars.
🎯 Moving Average Range Method : The range is derived from a moving average of the oscillator, providing a smoothed threshold that reflects more recent market conditions.
In addition to these methods, the indicator incorporates a unique 'Sticky Border' feature:
🎯 Sticky Border: With this option enabled, the dynamic ranges maintain their levels until the oscillator breaks out of the range. Once a breakout occurs, the levels are recalculated and updated. This mechanism ensures that the borders remain consistent and relevant, only adjusting to significant market movements that warrant a recalculation.
Users can select their preferred method for determining dynamic ranges, allowing for a customized approach that aligns with their analysis and trading strategy. The sticky border feature further refines this functionality, offering continuity until a decisive market move occurs.
🎲 Volume Profile Calculation Parameters:
🎯 Trend Filter: The indicator provides a versatile trend filter with four selectable options:
Uptrend: The volume profile is calculated when the oscillator indicates an uptrend.
Downtrend: The volume profile is calculated when the oscillator indicates a downtrend.
Any: The volume profile is calculated regardless of the trend.
External: Users can input values from an external indicator. The volume profile is then calculated only when the external indicator's value is non-zero, integrating external analysis into the volume profile construction.
🎯 Precision: Users have the option to define the precision for calculating the volume profile, which is crucial due to the varying scales of different oscillators (e.g., some oscillators range from 0 to 100, while others from -1 to 1). Selecting an appropriate precision ensures that the volume profile is accurately aligned with the minimal price range significant to the chosen oscillator. This setting requires user intervention for optimal configuration, as automatic calculation is not feasible due to the diverse nature of oscillator ranges.
🎯 Number of Bars: Users can select a specific number of bars for volume profile calculation, or opt to include all available historical bars for a comprehensive profile.
🎲 Selecting the right precision:
Users must select the right precision based on their choice of indicator. For example, RSI values range from 0-100. Hence, the default precision of 1 work fine on RSI as the volume profiles are plotted from 0 to 100 at the interval of 0.1
But, the default precision of 1 will not be ok on TSI because TSI values range from -1 to 1. Hence, using 1 as precision will result in very less volume profile lines as shown below.
Due to this, it is necessary to increase the precision for oscillators such as TSI where the range between highest and lowest value is far less. Once we set the precision to 2, we can see more appropriate volume profile division.
🎲 Note of thanks:
This publication uses polyline feature for drawing volume profiles. The advantage of using polyline is that we can overcome max 500 lines issue that we face by using the regular line objects. More details of polyline can be found in the tradingview blog post
Further, using polyline for display of volume profiles is inspired by the publications of fikira and KioseffTrading
K`s Extreme DurationExtreme duration uses a special combination of the RSI and its relative position to deliver a reversal signal.
The following are the conditions to generate signals:
* Bullish signal: The current 8-period RSI is below 50 and above 35 while the previous 5 RSI's are below 35.
* Bearish signal: The current 8-period RSI is above 50 and below 65 while the previous 5 RSI's are above 65.