Bimmeresty's MACDImproved MACD with labels on histogram and color change feature on signal line.
Labels on histogram help gauge how strong the change is rather than visually comparing heights.
example: "histogram just put in its first rising candle, but its only rising by 0.01 therefore i should be suspicious of it and possibly wait for a second rising candle for further confirmation of reversal"
Color change on signal slope is better for gauging the directional bias and spotting reversals.
example: "slope is red, so negative, so i should prioritize shorts"
example: "slope just turned green, so positive, so we might be reversing bias here"
מתנדים ממורכזים
Dynamic Volume-Volatility Adjusted MomentumThis Indicator in a refinement of my earlier script PC*VC Moving average Old with easier to follow color codes, overbought and oversold zones. This script has converted the previous script into a standardized measure by converting it into Z-scores and also incorporated a volatility based dynamic length option. Below is a detailed Explanation.
The "Dynamic Volume-Volatility Adjusted Momentum" or "Nasan Momentum Oscillator" is designed to capture market momentum while accounting for volume and volatility fluctuations. It leverages the Typical Price (TP), calculated as the average of high, low, and close prices, and introduces the Price Coefficient (PC) based on deviations from the simple moving average (SMA) across various time frames. Additionally, the Volume Coefficient (VC) compares current volume to SMA, and calculates Intraday Volatility (IDV) which gauges the daily price range relative to the close. Then intraday volatility ratio is calculated ( IDV Ratio) as the ratio of current Intraday Volatility (IDV) to the average of IDV for three different length periods, which provides a relative measure of current intraday volatility compared to its recent historical average. An inter-day ATR based Relative Volatility (RV) is calculated to adjusts for changing market volatility based on which the dynamic length adjustment adapts the moving average (standard length is 14). The PC *VC/IDV Ratio integrates price, volume, and volatility information which provides a volume and volatility adjusted momentum. This volume and volatility adjusted momentum is converted into a standardized Z-Score. The Z-Score measures deviations from the mean. Color-coded plots visually represent momentum, and thresholds aid in identifying overbought or oversold conditions.
The indicator incorporates a nuanced approach to emphasize the joint impact of price and volume while considering the stabilizing effect of lower intraday volatility. Placing the volume ratio (VC) in the numerator means that higher volume positively contributes to the overall ratio, aligning with the observation that increased volumes often accompany robust price movements. Simultaneously, the decision to include the inverse of intraday volatility (1/IDV) in the denominator acts as a dampener, reducing the impact of extreme intraday volatility on the momentum indicator. This design choice aims to filter out noise, giving more weight to significant price changes supported by substantial trading activity. In essence, the indicator's design seeks to provide a more robust momentum measure that balances the influence of price, volume, and volatility in the analysis of market dynamics.
OneThingToRuleThemAll [v1.4]This script was created because I wanted to be able to display a contextual chart of commonly used indicators for scalping and swing traders, with the ability to control the visual representation on the charts as their cross-overs, cross-unders, or changes of state happen in real time. Additionally, I wanted the ability to control how or when they are displayed. While looking through other community projects, I found they lacked the ability to full customize the output controls and values used for these indicators.
The script leverages standard RSI/MACD/VWAP/MVWAP/EMA calculations to help a trader visually make more informed decisions on entering or exiting a trade, depending on their understanding on what the indicators represent. Paired with a table directly on the chart, it allows a trader to quickly reference values to make more informed decisions without having to look away from the price action or look through multiple indicator outputs.
The main functionality of the indicator is controlled within the settings directly on the chart. There a user can enable the visual representations, or disable, and configure how they are displayed on the charts by altering their values or style types.
Users have the ability to enable/disable visual representations of:
The indicator chart
RSI Cross-over and RSI Reversals
MACD Uptrends and Downtrends
VWAP Cross-overs and Cross-unders
VWAP Line
MVWAP Cross-overs and Cross-unders
MVWAP Line
EMA Cross-overs and Cross-unders
EMA Line
Some traders like to use these visual indications as thresholds to enter or exit trades. Its best to find out which ones work the best with the security you are trying to trade. Personally, I use the table as a reference in conjunction with the RSI chart indicators to help me decide a logical trailing stop if I am scalping. Some users might like the track EMA200 crossovers, and have visual representations on the chart for when that happens. However, users may use the other indicators in other methods, and this script provides the ability to be able to configure those both visually and by value.
The pine script code is open source and itself is fairly straightforward, it is mostly written to provide the ultimate level of control the the user of the various indicators. Please reach out to me directly if you would like a further understanding of the code and an explanation on anything that may be unclear.
Enjoy :)
-dead1.
TSI Market Timer + Volatility MeterThis is the TSI Market Timer. It is years in the making and it is comprised of four indicators in one. The stock (or source) is run through an indicator called the True Strength Indicator with settings(5,15) , then the TSI is run on both the Index(SPY) by default and what I call a Trigger line which is basically the TSI applied to the DXY (US Dollar Index).
Midline Volatility Indicator:
Lastly, we have a volatility indicator on the midline. The colors of the midline indicate levels of volatility. For the lowest volatility in the last 100 days, the dot turns dark blue. For the lowest volatility in 30 days, the dot turns aqua. For regular volatility, it remains orange. And last, for higher volatility of the last 100 days, it turns red. These are more or less arbitrary but they do come in handy.
Settings for Green/Red Shading:
Next on the indicator are the settings. You can toggle a color change between the stock/source and the index(spy). If the stock/source is greater than the index, it will color the area in between a green and if it is below the index, it will be red.
There is also a toggle for the stock/source and the trigger/DXY. This will also show green when the stock is above the trigger and red if it is below the trigger.
By turning on both of these, you get light green and dark green areas as well as red and darker red areas. The lighter green represent when the stock is above both the index and the trigger and conversely for the red areas.
Settings for vertical line crossings:
When the stock crosses the trigger/dxy line, it shows a green vertical line signal. When the stock crosses below the trigger/dxy, a red vertical line is shown.
You can turn these off by toggling them in the settings.
Stacked Condition:
Lastly, we have a "stacked condition" which shows up as a white triangle at the bottom when the condition of the stock being above the index and the trigger below the zero line.
New Highs:
If you see the stock line turn lime green, this indicates a new high was reached for the last 255 days/periods. This is like a new 52 week high signal.
Note:
This indicator is made mostly for the stock market. It may work ok during the week for crypto but using the trigger/dxy and index lines on the weekends doesn't work too well as they will be flat.
Also note that this indicator is not a recommendation to buy or sell any stock/instrument. It is only a study of market conditions. Any analysis should be followed up with volume analysis or other confirming indicators.
Fisher Transform RevisitedFisher Transform developped by Ehlers is used mostly to detect peaks and troughs, which it does with little lag, but there are many false signals. Looking at its formula and construction, we can revisit it for the purpose of detecting trends and flat market.
How do we want to do that? There are 3 different actions:
Increase the default value from usual 9 or 10 to 30
Show the indicator as seen from upper time frame with synthetic rolling candles
Change the weights in first formula in order to saturate the input signal, push the trend data to the limits, so therefore leaving a good view when market is flat
As can be seen from the chart above, the revisited Fisher is above 2 for uptrend markets, below -2 for downtrending markets and in-between when the market is flat.
Notes
Weights for Fisher transform formula can be changed as parameters. Recommended valeus are 0.6 and 0.6 to saturate signal. You may come back to original formula by setting 0.33 and 0.66.
Parameter n allows view from upper time, a multiple of current time frame. n = 1 for current chart, n = 5 for 5 minutes view on the 1 min chart
Usage
Of course, it should be not be used in standalone mode. Indicator is for trend traders who can stay away when market is flat. Trend start when indicator goes above 2 but like all trade indicators, it will be late; it is therefore a good idea to change n back to 1 to get a timely entry, to be confirmed of course with other elements of technical analysis.
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.
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.
Binary Fisher [Orderflowing]Binary Fisher | Adaptive Fisher Transform | Adaptive Bands | Smoothing (+) | Customizable (+)
Built using Pine Script V5.
Introduction
The Binary Fisher is a tool that transforms your traditional market analysis.
This indicator is for traders seeking a dynamic and responsive view of market turning points.
Innovation and Inspiration
Drawing inspiration from John Ehlers, the Binary Fisher represents a step forward.
It redefines the Fisher Transform with more features and customization, which gives traders a unique lens for analysis.
Core Features
Adaptive Length Calculation: Binary Fisher can operate in both fixed and automatic length modes.
Smoothing Options: Choose from EMA, HMA, SMA, Fourier, or no smoothing for the Fisher values, the indicator bends to your analytical preference.
Adaptive Bands: Visualize market extremes with adaptive bands, smoothed using EMA, HMA, SMA, or Fourier methods.
Trend Shift Detection: The indicator identifies bullish, bearish, and neutral shifts in market trends, providing early signals for potential reversals.
Experimental Divergence Analysis: Detect divergences between price and Fisher values, a key indicator of potential trend changes.
Band Lines: Projects band lines around the Fisher values, offering a way to analyze the interaction between the Fisher line and these bands to project the trend of the fisher transform.
Functionality
Input Source: Choose from various price data inputs like close, open, high, low, and more for Fisher calculations.
Hilbert Transform for Dominant Cycle Period: Utilizes Hilbert Transform to dynamically adjust to the dominant market cycle.
Custom Thresholds and Bands: Set your thresholds for trend shifts and adjust band multipliers for personalized sensitivity.
Visualization: The indicator has a color system for easy understanding of the trend according to the fisher transform.
Multi-Timeframe: Apply the Binary Fisher across different timeframes, and chart them from another. Great for different timeframe strategies.
Example of Band Lines:
Example of Multi-Timeframe (1D Calculation / 4H Chart):
Analysis and Interpretation
The Binary Fisher helps the trader get a simpler view of market pivots.
The flexibility allows for better identification of overbought and oversold conditions, trend shifts, and potential reversal points.
The color system and visual markers make it easy to interpret quickly.
Usage and Applications
Instrument Trend Analysis: Understand the direction and strength of market trends.
Reversal Prediction: Identify potential reversal points with trend shift dots and divergence detection.
Trading Strategy: Adapt the indicator settings to align with your unique trading style and risk tolerance.
Conclusion
The Binary Fisher indicator stands out as innovative trading technology.
It is a powerful tool for traders born by enhancing the Fisher Transform with adaptive features and modern analysis methods, with lots of customization options.
The Binary Fisher should be used as part of a larger trading strategy.
Never make trading decisions based on the signals of the Binary Fisher alone.
[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.
Enhanced McClellan Summation Index
The Enhanced McClellan Summation Index (MSI) is a comprehensive tool that transforms the MSI indicator with Heikin-Ashi visualization, offering improved trend analysis and momentum insights. This indicator includes MACD and it's histogram calculations to refine trend signals, minimize false positives and offer additional momentum analysis.
Methodology:
McClellan Summation Index (MSI) -
The MSI begins by calculating the ratio between advancing and declining issues in the specified index.
float decl = 𝘐𝘯𝘥𝘪𝘤𝘦 𝘥𝘦𝘤𝘭𝘪𝘯𝘪𝘯𝘨 𝘪𝘴𝘴𝘶𝘦𝘴
float adv = 𝘐𝘯𝘥𝘪𝘤𝘦 𝘢𝘥𝘷𝘢𝘯𝘤𝘪𝘯𝘨 𝘪𝘴𝘴𝘶𝘦𝘴
float ratio = (adv - decl) / (adv + decl)
It then computes a cumulative sum of the MACD (the difference between a 19-period EMA and a 39-period EMA) of this ratio. The result is a smoothed indicator reflecting market breadth and momentum.
macd(float r) =>
ta.ema(r, 19) - ta.ema(r, 39)
float msi = ta.cum(macd(ratio))
Heikin-Ashi Transformation -
Heikin-Ashi is a technique that uses a modified candlestick formula to create a smoother representation of price action. It averages the open, close, high, and low prices of the current and previous periods. This transformation reduces noise and provides a clearer view of trends.
type bar
float o = open
float h = high
float l = low
float c = close
bar b = bar.new()
float ha_close = math.avg(b.o, b.h, b.l, b.c)
MACD and Histogram -
The Enhanced MSI incorporates MACD and histogram calculations to provide additional momentum analysis and refine trend signals. The MACD represents the difference between the 12-period EMA and the 26-period EMA of the MSI. The histogram is the visual representation of the difference between the MACD and its signal line.
Options:
Index Selection - Choose from TVC:NYA , NASDAQ:NDX , or TVC:XAX to tailor the MSI-HA to the desired market index.
MACD Settings - Adjust the parameters for the MACD calculation to fine-tune the indicator's responsiveness.
Ratio Multiplier - Apply scaling to the MSI to suit different market conditions and indices.
Benefits of Heikin-Ashi -
Smoothed Trends - Heikin-Ashi reduces market noise, providing a more apparent and smoothed representation of trends.
Clearer Patterns - Candlestick patterns are more distinct, aiding in the identification of trend reversals and continuations.
Utility and Use Cases:
Trend & Momentum Analysis - Utilize the tool's Heikin-Ashi visualization for clearer trend identification in confluence with it's MACD and histogram to gain additional insights into the strength and direction of trends, while filtering out potential false positives.
Breadth Analysis - Explore market breadth through the MSI's cumulative breadth indicator, gauging the overall health and strength of the underlying market.
- Alerts Setup Guide -
The Enhanced MSI is a robust indicator that combines the breadth analysis of the McClellan Summation Index with the clarity of Heikin-Ashi visualization and additional momentum insights from MACD and histogram calculations. Its customization options make it adaptable to various indices and market conditions, offering traders a comprehensive tool for trend and momentum analysis.
MACD Pulse CheckThis custom script, titled " MACD Pulse Check ," is a modified and enhanced version of the traditional Moving Average Convergence Divergence (MACD) indicator, commonly used in trading for trend-following and momentum strategies. Here's a breakdown of its features and benefits over the traditional MACD:
Multiple MACD Lines with Different Parameters:
The script calculates six different MACD lines using various combinations of fast, slow, and signal lengths. This diverse range allows for a more comprehensive analysis of the market momentum and trend across different time scales and sensitivities.
Average of MACD Lines:
By averaging these six MACD lines, the script creates a more smoothed and potentially less noisy signal. This can help in reducing false signals and improving the reliability of trend indications.
Sideways Market Detection:
A unique feature of this script is its ability to identify sideways or range-bound markets using a user-defined threshold. This is calculated by comparing the current price to the price five candles ago and seeing if the change is within a certain percentage threshold. Identifying sideways markets is crucial as trend-following strategies like MACD typically perform poorly in these conditions.
Visual and Color-Coded Signals:
The script plots shapes (circles) on the chart, where the color (green for bullish, red for bearish, sideways price action will display as either a dull green or a dull red) quickly indicates the market condition. This visual representation makes it easier to interpret the signals at a glance, and spot sideways price action while still having a general idea of trend.
Benefits for Traders:
Versatility: By averaging multiple MACD lines, traders get a more nuanced view of the market momentum, potentially leading to more informed trading decisions.
Reduced False Signals:
The averaging process and sideways market detection can help in filtering out false or weak signals, which is a common issue with the traditional MACD.
Ease of Use:
The color-coded visual signals simplify the process of identifying market trends and conditions, making the tool accessible even for less experienced traders.
In summary, "MACD Pulse Check" enhances the traditional MACD by providing a more comprehensive, and visually intuitive tool, potentially leading to better trading decisions in varying market conditions. However, it's important to note that no indicator is foolproof and should always be used in conjunction with other analysis methods and sound risk management practices.
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)
Dual_MACD_trendingINFO:
This indicator is useful for trending assets, as my preference is for low-frequency trading, thus using BTCUSD on 1D/1W chart
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 the signals from it (1D/1W is good for non-automated trading)
- 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)
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 - light green for HTF crossover, dark green for LTF crossover and orange for LTF crossunder.
Note that the indicator performs best in trending assets and markets, and it is advisable to use additional indicators to filter the trading conditions when market/asset is expected to move sideways.
DETAILS:
It uses a couple of MACD indicators - one from the current timeframe and one from a higher timeframe, as the crossover/crossunder cases of the MACD line and the signal line indicate the potential entry/exit points.
The strategy has the following flow:
- If the weekly MACD is positive (MACD line is over the signal line) we have a trading window.
- If we have a trading window, we buy when the daily macd line crosses AND closes above the signal line.
- If we are in a position, we await the daily MACD to cross AND close under the signal line, and only then place a stop loss under the wick of that closing candle.
The user can select both the higher (HTF) and lower (LTF) timeframes. Preferably the lower timeframe should be the one that the Chart is on for better visualization.
If one to decide to use the indicator as a strategy, it implements the following buy and sell criterias, which are feed to the TTS, but can be also manually managed via adding alerts from this indicator.
Since usually the LTF is preceeding the crossover compared to the HTF, then my interpretation of the strategy and flow that it follows is allowing two different ways to enter a trade:
- crossover (and bar close) of the macd over the signal line in the HIGH TIMEFRAME (no need to look at the LOWER TIMEFRMAE)
- crossover (and bar close) of the macd over the signal line in the LOW TIMEFRAME, as in this case we need to check also that the macd line is over the signal line for the HIGH TIMEFRAME as well (like a regime filter)
The exit of the trade is based on the lower timeframe MACD only, as we create a stop loss equal to the lower wick of the bar, once the macd line crosses below the signal line on that timeframe
SETTINGS:
All of the indicator's settings are for the vanilla/general case.
User can set all of the MACD parameters for both the higher and lower (current) timeframes, currently left to default of the MACD stand-alone indicator itself.
The start-end date is a time filter that can be extermely usefull when backtesting different time periods.
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 🛈➡ - Dual_MACD: 🔌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)
EXAMPLES:
If used as a stand-alone indicator, the green arrows on the bottom will represent:
- light green - MACD line crossover signal line in the HTF
- darker green - MACD line crossover signal line in the LTF
- orange - MACD line crossunder signal line in the LTF
I recommend enabling the alerts from the script to cover those cases.
If used as an input to the TTS, we'll get more decorations on the chart from the TTS itself.
In the example below we open a trade on the next day of LTF crossover, then a few days later a crossunder in the LTF occurs, so we set a SL at the low of the wick of this day. Few days later the price doesn't recover and hits that SL, so the position is closed.
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.
MACD_base_and_reference_TF//====================================================================================================================
The "MACD_with_reference" indicator aims to illustrate the MACD (Moving Average Convergence Divergence) on two distinct timeframes: the base timeframe (typically the chart's timeframe, e.g., 1D) and the reference timeframe (defaulted to 1W). This tool provides a means to determine momentum shifts within the stock, potentially guiding traders in adjusting or trimming positions.
// ================================================== INFO ==================================================
Key Features of the Indicator:
- Dual Timeframe MACD: Displays MACD on both the primary (base) and higher (reference) timeframes - transparent.
- Momentum Analysis: indication of MACD crossdown of the signal line on the refenence TF to indicate momentum loss on the higher timeframe, guiding decisions to manage positions.
- MACD Line Status: Beneath the chart, a red/green bar line signifies the MACD line's position relative to the signal line on the higher timeframe.
- Alert Creation: Allows for alerts on the MACD and signal line crossdown on the higher timeframe, aiding in planning stop-loss settings for owned stocks.
// ================================================== NOTES ==================================================
The "MACD_with_reference" indicator finds optimal usage in several scenarios:
- Chart Analysis: Replacing the MACD indicator during chart reviews.
- Alert Setup: Setting alerts for owned stocks to plan ahead for stop-loss placements or position closures.
// ================================================== TODO ==================================================
//#endregion ========================================================================================================
// Continue the script code...
FxCanli PanelEN - FxCanli TradingView Panel Indicator shows the status of RSI, Stochastic, MACD and AO indicators in many TradingView symbols at the same time.
You can follow the market by geting an alarm instantly or at candle close about these indicators.
AT THE DEMO VERSION, YOU CAN FOLLOW ONLY 2 SYMBOL AT THE SAME TIME
TR - FxCanli TradingView Panel Göstergesi aynı anda birçok TradingView sembolünde RSI, Stokastik, MACD ve AO göstergelerinin durumunu gösterir.
Bu göstergeler hakkında anlık veya mum kapanışında alarm alarak piyasayı takip edebilirsiniz.
DEMO VERSİYONUNDA AYNI ANDA SADECE 2 SEMBOLÜ TAKİP EDEBİLİRSİNİZ
RSI Indicator details / RSI İndikatörü detayları
Green box / Yeşil Kutu
EN - At Over Sold Zone
TR - Aşırı Satım Bölgesinde
Pink box / Pembe Kutu
EN - At Over Bought Zone
TR - Aşırı Alım Bölgesinde
Yellow box / Sarı Kutu
EN - Exit from Over Bought/Sold Zone
TR - Aşırı Alım/Satım Bölgesinden Çıkınca
Stochastic Indicator details / Stochastic İndikatörü detayları
Green box / Yeşil Kutu
EN - At Over Sold Zone
TR - Aşırı Satım Bölgesinde
Pink box / Pembe Kutu
EN - At Over Bought Zone
TR - Aşırı Alım Bölgesinde
Yellow box / Sarı Kutu
EN - Exit from Over Bought/Sold Zone
TR - Aşırı Alım/Satım Bölgesinden Çıkınca
MACD Indicator details / MACD İndikatörü detayları
Green box / Yeşil Kutu
EN - MACD Line crossing UP SIGNAL Line
TR - MACD Çizgisi, SİNYAL Çizgisini YUKARI Keser
Pink box / Pembe Kutu
EN - MACD Line crossing DOWN SIGNAL Line
TR - MACD Çizgisi, SİNYAL Çizgisini AŞAĞI Keser
AO Indicator details / AO İndikatörü detayları
Green box / Yeşil Kutu
EN - AO crossing UP ZERO Level
TR - AO Sıfır Seviyesini YUKARI Keser
Pink box / Pembe Kutu
EN - AO crossing DOWN ZERO Level
TR - AO Sıfır Seviyesini ASAGI Keser
Alerts and Notifications / Alarm ve Bildirimler
EN - You can get ALL or ANY of these Alerts
TR - Herhangi birinin veya tamamının alarmlarını alabilirsiniz
DEMO - FxCanli PanelEN - FxCanli TradingView Panel Indicator shows the status of RSI, Stochastic, MACD and AO indicators in many TradingView symbols at the same time.
You can follow the market by geting an alarm instantly or at candle close about these indicators.
AT THE DEMO VERSION, YOU CAN FOLLOW ONLY 2 SYMBOL AT THE SAME TIME
TR - FxCanli TradingView Panel Göstergesi aynı anda birçok TradingView sembolünde RSI, Stokastik, MACD ve AO göstergelerinin durumunu gösterir.
Bu göstergeler hakkında anlık veya mum kapanışında alarm alarak piyasayı takip edebilirsiniz.
DEMO VERSİYONUNDA AYNI ANDA SADECE 2 SEMBOLÜ TAKİP EDEBİLİRSİNİZ
RSI Indicator details / RSI İndikatörü detayları
Green box / Yeşil Kutu
EN - At Over Sold Zone
TR - Aşırı Satım Bölgesinde
Pink box / Pembe Kutu
EN - At Over Bought Zone
TR - Aşırı Alım Bölgesinde
Yellow box / Sarı Kutu
EN - Exit from Over Bought/Sold Zone
TR - Aşırı Alım/Satım Bölgesinden Çıkınca
Stochastic Indicator details / Stochastic İndikatörü detayları
Green box / Yeşil Kutu
EN - At Over Sold Zone
TR - Aşırı Satım Bölgesinde
Pink box / Pembe Kutu
EN - At Over Bought Zone
TR - Aşırı Alım Bölgesinde
Yellow box / Sarı Kutu
EN - Exit from Over Bought/Sold Zone
TR - Aşırı Alım/Satım Bölgesinden Çıkınca
MACD Indicator details / MACD İndikatörü detayları
Green box / Yeşil Kutu
EN - MACD Line crossing UP SIGNAL Line
TR - MACD Çizgisi, SİNYAL Çizgisini YUKARI Keser
Pink box / Pembe Kutu
EN - MACD Line crossing DOWN SIGNAL Line
TR - MACD Çizgisi, SİNYAL Çizgisini AŞAĞI Keser
AO Indicator details / AO İndikatörü detayları
Green box / Yeşil Kutu
EN - AO crossing UP ZERO Level
TR - AO Sıfır Seviyesini YUKARI Keser
Pink box / Pembe Kutu
EN - AO crossing DOWN ZERO Level
TR - AO Sıfır Seviyesini ASAGI Keser
Alerts and Notifications / Alarm ve Bildirimler
EN - You can get ALL or ANY of these Alerts
TR - Herhangi birinin veya tamamının alarmlarını alabilirsiniz
Fisher+ [OSC]The Fisher Transform Indicator is classified as an oscillator, meaning that its value swings above and below a central point. This characteristic allows traders to identify overbought and oversold conditions, providing potential clues about market reversals. As mentioned previously, it is an oscillator so the strength of the move is displayed by how long the fisher line stays above/below zero. Indicator can be used to aid in confluence near supply/demand zones.
White Line = Fisher
Red/Blue Line = Moving Average
--Changes color whether fisher line is above/below the MA
Red/Blue Shaded Line = Moving Average
--Changes color based on a smoothing factor
Red/Blue Shaded Fill = Asset in Overbought/Oversold Conditions
Red/Blue Circles = Asset in Extreme Overbought/Oversold Conditions
Red/Blue Triangles = MACD Signals Below/Above "0"
Divergence Labels = Asset Signaling Divergence
The moving average line will turn red/blue as long as the fisher line is below/above the moving average. The shaded MA line will switch colors based on if it is moving in an up/down trend. The MA can also be used as a signal and treated similar to an oscillator. Market trending conditions will either keep the MA below/above the dashed zero line.
MACD code credited to LazyBear's MACD Leader indicator. It is used to filter out/confirm any signals such as divergences. As long as the MACD Leader line is above both the MACD line and signal lines then it'll signal with with a triangle. MACD divergences will be added at a later time.
Omega MacroThe Omega Macro is an indicator part of the Omega Toolkit. The purpose of this tool is to provide a clear vision and a lot of useful indicators to analyze the market in the long term with more macro analysis.
The script has different features:
- Rating evaluator: this feature allow traders to have an overview of all the indicator inside of this script at once giving the asset you’re on a rating above or below zero.
- Option to select the chosen indicator to display
- Option to insert a benchmark symbol to analyze the correlation between the two assets. By default, if you enable the compared symbol, you’ll get a modification on the rating evaluator, the detrended spread, the value at risk, and on the sentiment oscillator. The benchmark can even be used in reverse, allowing for example traders to change the asset from USDJPY to JPYUSD.
- Option to activate the only long rating, useful to adjust the formula of the rating estimator for only long strategies.
- Settings to change the length of the indicator: between “Fast”, “Normal” and “Slow”. This setting is designed to use the indicator mainly on the Daily chart, analyzing respectively a month, a semester, and an entire year.
- Clear and easy visuals: users can adjust the color of all the indicators to have a common aesthetics and select the gradient mode for a different color mode of the rating evaluator
The Commitment of Traders (COT) report is a widely followed weekly publication in the futures market that provides a breakdown of the positions held by various market participants. It offers valuable insights into the market sentiment and helps traders and analysts assess the positioning of different market players, including commercial traders, non-commercial traders, and non-reportable traders. On this indicator you’ll see a colored line, indicating the Large traders, and the gray histogram, which displays the difference between the large traders and the commercial hedgers.
The VIX, also known as the CBOE Volatility Index, is a popular measure of market risk and investor sentiment. It is often referred to as the "fear gauge" or "fear index" because it is designed to reflect the market's expectation of future volatility over the next 30 days. On this indicator, we have designed a formula that allows traders to see an indicator that gives an output very similar to the standard Vix and can be calculated on any market.
Additionally, as shown in the picture, this indicator has two lines and a histogram, the upper line reflects the inverted vix, useful to analyze potential long reversal, meanwhile, the one below the zero line is calculated to detect the short price reversal and inversion. Together, they originate the gray histogram, which acts like a midpoint of the two lines.
The Detrended Spread indicator allows traders to analyze whether one asset outperforms or not the chosen benchmark, and also to detect clear price cycles and overbought or oversold levels thanks to the color coding of the main line.
The Value at Risk (VaR) is a widely used risk management tool that provides an estimate of the potential loss in value of a portfolio or assets over a specified time horizon, under normal market conditions, at a given confidence level. VaR helps traders assess and quantify the potential downside risk associated with their investments and portfolios.
With this script you’ll have both the short-term and the long-term VAR lines, being able to detect periods that allow traders to have less estimated risk on the market. The VAR does not provide any indication of the potential direction of the market, but it’s important data for risk management and volatility.
The Sentiment estimator is a tool that aims to give an indication about the sentiment of the markets, allowing traders both to have an indication about the direction of the market by timings and to have useful pieces of information about areas that can lead to a reversal of the price.
Risk Disclaimer:
All content and scripts provided are purely for informational & educational purposes only and do not constitute financial advice or a solicitation to buy or sell any securities of any type. Past performance does not guarantee future results. Trading can lead to a loss of the invested capital in the financial markets. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information. All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
Spot-Vol CorrelationSpot-Vol Correlation Script Guide
Purpose:
This TradingView script measures the correlation between percentage changes in the spot price (e.g., for SPY, an ETF that tracks the S&P 500 index) and the changes in volatility (e.g., as indicated by the VIX, the Volatility Index). Its primary objective is to discern whether the relationship between spot price and volatility behaves as expected ("normal" condition) or diverges from the expected pattern ("abnormal" condition).
Normal vs. Abnormal Correlation:
Normal Correlation: Historically, the VIX (or volatility) and the spot price of major indices like the S&P 500 have an inverse relationship. When the spot price of the index goes up, the VIX tends to go down, indicating lower volatility. Conversely, when the index drops, the VIX generally rises, signaling increased volatility.
Abnormal Correlation: There are instances when this inverse relationship doesn't hold, and both the spot price and the VIX move in the same direction. This is considered an "abnormal" condition and might indicate unusual market dynamics, potential uncertainty, or impending shifts in market sentiment.
Using the Script:
Inputs:
First Symbol: This is set by default to VIX, representing volatility. However, users can input any other volatility metric they prefer.
Second Symbol: This is set to SPY by default, representing the spot price of the S&P 500 index. Like the first symbol, users can substitute SPY with any other asset or index of their choice.
Length of Calculation Period: Users can define the lookback period for the correlation calculation. By default, it's set to 10 periods (e.g., days for a daily chart).
Upper & Lower Bounds of Normal Zone: These parameters define the range of correlation values that are considered "normal" or expected. By default, this is set between -0.60 and -1.00.
Visuals:
Correlation Line: The main line plot shows the correlation coefficient between the two input symbols. When this line is within the "normal zone", it indicates that the spot price and volatility are inversely correlated. If it's outside this zone, the correlation is considered "abnormal".
Green Color: Indicates a period when the spot price and VIX are behaving as traditionally expected (i.e., one rises while the other falls).
Red Color: Denotes a period when the spot price and VIX are both moving in the same direction, which is an abnormal condition.
Shaded Area (Normal Zone): The area between the user-defined upper and lower bounds is shaded in green, highlighting the range of "normal" correlation values.
Interpretation:
Monitor the color and position of the correlation line relative to the shaded area:
If the line is green and within the shaded area, the market dynamics are as traditionally expected.
If the line is red or outside the shaded area, users should exercise caution as this indicates a divergence from typical behavior, which can precede significant market moves or heightened uncertainty.
S/R and Reversal BarsToday I'm proposing an idea to form S/R with a slightly different basic idea. This is a combination of CCI and candlestick study, and we will use this to mark possible reversal candles and possible S/R lines.
This is nothing complicated, I've used a basic CCI indicator with certain rules/system to mark S/R levels on the chart. (Have loaded traditional CCI indicator on bottom for comparison)
S/R levels are market as followed
Cross -
Lime = Support
Red = Resistance
Zero/Balance line - Yellow circles
The idea is to use this indicator to trade sideways market more successfully, in trending market this can be futile if you are not waiting for the break-out or breakdowns with confirmation.
Since this is based on CCI, it will give static result only when bar is closed, till then it will be susceptible for repaint. This is inherited nature from CCI readings on current bar. I could change this to only making reading on closed bar (historical bar), but that takes away from the uniqueness of this indicator in giving early indications.
This is a great tool for intraday scalping, but it does work on all timeframes, it's not bound by granularity.
This is for education purpose only.
Past success or seemingly positive results on published posts are not indication of future success.
TASC 2023.11 VAcc█ OVERVIEW
The November 2023 edition of TASC's Traders' Tips features an article titled "VAcc: A Momentum Indicator Based On Velocity And Acceleration" by Scott Cong. This script implements the author's momentum indicator based on simple physics concepts.
█ CONCEPTS
The indicator is named VAcc as it is derived from the average velocity (V) and acceleration (Acc) over a specified lookback period. Consequently, its readings reflect two valuable characteristics of price data: rate (indicating the speed at which the price is moving) and rate of change (indicating whether the price is speeding up or slowing down).
In the article, the author reports that for longer periods, VAcc behaves similarly to the MACD , albeit with a more responsive nature. For shorter periods, VAcc exhibits characteristics reminiscent of the stochastic oscillator , but it trends more prominently and is less prone to overbought/oversold saturation.
To incorporate VAcc into trading strategies, the author suggests considering the following two permutations for the velocity and acceleration data series:
Strong upward condition: Velocity is rising, and acceleration is rising above zero.
Strong downward condition: Velocity is falling, and acceleration is falling.
In the current implementation, the chart displays the average velocity as a line, while the average acceleration is presented as a histogram.
█ CALCULATIONS
The calculation of VAcc involves the following steps:
For the current closing price, C , and for each bar C (i) within a specified lookback period from the current bar, the script calculates velocities, V (i) = ( C - C (i))/i. These velocities are then subjected to an exponential moving average to obtain the smoothed average velocity.
Similarly, for each bar within the lookback period, accelerations are calculated as Acc (i) = ( V - V (i))/i and then averaged without smoothing.