Dynamic Price Targets @shrilssDynamic Price Targets is a designed to provide traders with a comprehensive view of dynamic price levels based on Volume Weighted Moving Average (VWMA) and standard deviation. This script allows users to identify potential support and resistance zones, aiding in strategic decision-making during market analysis.
The script calculates the VWMA of a chosen price source over a specified length, establishing a dynamic baseline for market trends. The standard deviation is then used to derive multiple upper and lower targets, each representing a certain deviation from the VWMA. These levels are color-coded for clarity, with upper targets displayed in shades of red and lower targets in shades of green.
Скользящие средние
[blackcat] L1 Fibonacci MA BandThe true charm of the Fibonacci moving average band lies not only in its predictive ability. Its essence is that it combines the beauty of mathematics with the practicality of market analysis, providing traders with a powerful tool to optimize trading strategies. It's not a simple number game, but a wisdom that sees into the deeper structure of the market.
Next, we will delve into the core technical indicators of the Fibonacci moving average band - WHALES, RESOLINE, STICKLINE functions, and TRENDLINE, as well as their clever applications. The WHALES indicator, with its 12-period exponential moving average, captures short-term market trends; the RESOLINE indicator, through the 120-period EMA, reveals mid-term market movements; the STICKLINE function, distinguishes the relationship between WHALES and RESOLINE with colors, providing clear visual aids; while TRENDLINE, combining price slope with EMA, depicts more detailed market changes for traders.
The integrated application of these indicators has built a multi-dimensional market analysis framework for traders. They help traders examine the market from different angles, judge the market status more accurately, and make wiser decisions in the ever-changing market environment. The Fibonacci moving average band indicator is like a lighthouse, emitting guiding light in the ocean of trader's navigation.
1. `xsl(src, len)` function: This function calculates a value called the linear regression slope. Len defines the length of the linear regression. Then, this function normalizes the difference between the current value of the linear regression and the previous value. The formula is `(lrc - lrprev) / timeframe.multiplier`.
2. `whales`, `resoline`, and `trendline` are Exponential Moving Averages (EMA) calculated in different ways. "whales" is the 13-period closing price EMA, "resoline" is the 144-period closing price EMA, and "trendline" is a more complicated EMA. It is the 50-period EMA calculated by the 21-period closing price slope multiplied by 23 plus the closing price.
3. The `plotcandle` function draws two sets of candlestick charts. One set shows in blue when "whales" is greater than "resoline", and the other set shows in green when "whales" is less than "resoline".
4. The `plot` function draws three lines: "whales", "resoline", and "trendline". "whales" is displayed in orange with a line thickness of 2. "resoline" is displayed in yellow with a line thickness of 1. "trendline" is displayed in red with a line thickness of 3.
5. The last line draws a conditional line. When the closing price is less than the "trendline", the green "trendline" is drawn, otherwise, it is not drawn. This is a logical judgment, the drawing operation is only executed when the condition is met.
Dual Dynamic Fibonacci Grouped Averages with Color ChangeRed Bearish Green Bullish
Using grouped fib averages, works similar to SMA
Clustered Asset Moving Average @shrilssThe Clustered Asset Moving Average script is designed to provide traders with a unique perspective on a cluster of multiple assets. By combining the closing prices and volumes of 12 specified assets, this indicator calculates a Clustered Moving Average to reveal potential trends and market sentiment within this asset cluster.
Key Features:
- Asset Cluster Analysis:
The script considers 12 assets, including well-known names such as Google (GOOG), Microsoft (MSFT), Apple (AAPL), Tesla (TSLA), and others.
It calculates the price and volume of each asset to form a comprehensive view of the asset cluster.
- Clustered Moving Average Calculation:
The Asset Price and Volume are combined to calculate the Clustered Moving Average
This moving average reflects the relationship between the aggregated price and volume of the specified assets.
- Multiple Exponential Moving Averages (EMA):
The script includes three EMAs (10, 25, and 100) applied to the Clustered Moving Average, providing different time perspectives.
Users can customize the visibility of each EMA based on their trading preferences.
- Visual Representation:
The indicator offers a visual representation of the Clustered Moving Average, allowing traders to quickly identify trends and potential reversal points.
Different EMAs are color-coded, enhancing visual clarity.
MTF MA ChaserThis is my own Moving Averages analysis tool, if anyone else will find it useful.
How It Works:
Upon adding the indicator to the chart, it calculates the selected Moving Averages for the defined timeframes. The main chart will display these MAs according to the user's chosen timeframe and type (default is the chart timeframe). Simultaneously, a table is generated on the chart, showcasing the percentage difference of the current price from these MAs across various timeframes. This table is color-coded to indicate different market states, such as proximity to MA/price crossovers.
Key Features:
Multi-Timeframe Analysis: Users can view Moving Average data from different timeframes (5m, 15m, 1H, 4H, 1D, 1W) on their current chart. This allows for quick and efficient analysis without the need to switch between different timeframe charts.
Variety of Moving Averages: The indicator supports different types of MAs, including EMA (Exponential Moving Average), SMA (Simple Moving Average), and others, providing flexibility in analysis.
Realtime Data Option: Users can choose to display real-time data for MAs, enabling them to make timely trading decisions based on the most current market information.
Customizable Display: The indicator features a customizable table that displays the MA values and their differences from the current price in percentages. Users can show or hide this table and adjust its position and text size according to their preference.
Limited Timeframe Support: The indicator is designed to work on equal or higher timeframes relative to the current chart's timeframe. It specifically supports 5-minute (5m), 15-minute (15m), 1-hour (1H), 4-hour (4H), 1-day (1D), and 1-week (1W) timeframes. This means if your current chart is set to a 1-hour timeframe, the indicator will only show MA data for 1-hour and longer timeframes (4H, 1D, 1W), but not for shorter ones like 5m or 15m.
Yet, you can go down to a 1 - 4 minute chart for scalping purposes if necessary.
Engulfing pullbackThis Indicator searching for pullback on input Moving Average with Engulfing candle
Rules for indicator :-
Buy Signal -
1) search for pullback on ma if price above ma and come back and touches ma
2)after pullback on ma searching for bullish engulfing pattern on next candle
3)if pullback on previous candle and bullish engulfing for buy signal form
Sell Signal -
1) search for pullback on ma if price below ma and come back touches ma
2)after pullback on ma searching for bearish engulfing pattern on next candle
3)if pullback on previous candle and bearish engulfing for buy signal form
Disclaimer -Traders can use this script as a starting point for further customization or as a reference for developing their own trading strategies. It's important to note that past performance is not indicative of future results, and thorough testing and validation are recommended before deploying any trading strategy.
Risk Metric combinedAttempt at replicating a simplified Risk-Metric for BTC.
Original code written by user Oakley Wood.
Based on 3 different approaches:
- deviation from 4 year sma
- ln(btc / 20 wma)
- 50D MA / 50W MA
Qullamaggie ADR and Volatility and Price Change IndicatorElevate your trading strategy with Qullamaggie ADR, a dynamic indicator inspired by the Kristjan Qullamaggie trading approach. Gain a deeper understanding of market dynamics, daily price movements, and potential turning points.
Key Features:
Qullamaggie ADR: Assess market volatility through the QullaADR, offering customizable time intervals (5, 10, 15, 20 days) to adapt to various trading styles.
Today's Change: Monitor price changes relative to the low of the current trading day, providing valuable intraday insights.
PrevDay price differentials from the previous day's low, aiding in the identification of potential trend reversals.
Track the percentage change from the opening price, offering a snapshot of intraday market sentiment.
Percent from 10-day SMA: Visualize the percentage difference between the closing price and a 10-day Simple Moving Average (SMA), a key trend-following indicator.
Usage:
Utilize QullaADR to set realistic profit targets and stop-loss levels based on current market conditions.
Identify potential trend shifts by observing changes from the previous day's low with Today's QullaChange.
Incorporate QullaPercent from 10-day SMA for trend confirmation and well-informed trading decisions.
Strategy Inspiration:
QullaADR draws inspiration from the Kristjan Qullamaggie trading strategy, aiming to complement your trading toolkit and enhance decision-making.
Disclaimer:
Trading involves risk, and past performance is not indicative of future results. Use this indicator as a supplementary tool within a comprehensive trading strategy.
Version: 1.0
LYFX-GOLD-15MIndicator Operation Method:
The indicator provides a buy signal when the price stabilizes above the moving averages. It should be close to the averages at the same time to ensure a close stop loss.
When the conditions are met, a long trade is opened, and the buy signal appears on the indicator. The stop loss is placed with the red line, and the targets are indicated with the blue balloons. Usually, the first target is twice the stop loss, and the second target is three times the stop loss.
This indicator is one of the most powerful indicators for monitoring price explosions in gold.
For clarification, this indicator is used (according to its default settings) exclusively for gold and only on the 15-minute timeframe. The indicator is created by Mr. Layth Al-Muhandis:
The indicator provides a very close stop loss compared to the first and second targets. I recommend adhering strictly to the stop loss and securing the trade after achieving profits.
This is a simple explanation of how the indicator works.
طريقة عمل المؤشر:
يوفر المؤشر إشارة شراء عند استقرار السعر فوق المتوسطات المتحركة. يجب أن يكون السعر قريبًا من المتوسطات في نفس الوقت لضمان وجود استوب لوس قريب.
عند تحقيق الشروط، يتم فتح صفقة شراء، وتظهر إشارة الشراء على المؤشر. يتم وضع الاستوب لوس بالخط الأحمر، وتوضح البالونات الزرقاء الأهداف. عادةً، يكون الهدف الأول ضعف الاستوب لوس، والهدف الثاني ثلاثة أضعاف الاستوب.
هذا المؤشر من بين أقوى المؤشرات لرصد انفجارات الأسعار في الذهب.
للتنويه، يُستخدم هذا المؤشر (وفقًا لإعداداته الافتراضية) حصريًا للذهب وعلى فاصل زمني 15 دقيقة فقط. تم إنشاء المؤشر بواسطة السيد ليث المهندس.
يوفر المؤشر استوب لوس قريب جداً مقارنة بالهدف الأول والهدف الثاني. أنصح بالالتزام الصارم بالاستوب لوس وتأمين الصفقة بعد تحقيق الأرباح.
Multi MAs mit LabelA MA (Moving Average) is useful to identify a trend of an assets. The TradingView builtin indicator "Exponential Moving Average" is useful, but limited in some aspects:
Bound to the active timeframe (e.g. h1)
One MA per indicator instance. Makes it confusing when using multiple
In reality to want to have multiple MAs with different types (EMA, SMA), length and timeframes on your chart to identify trading opportunities. As an example you can use the daily EMA12 and EMA21 to identify the trend and EMA200 on the h4 to enter a trade. That's what this script is used for.
The provided script is an extension to the indicator powered by chipmonk (link to profile below). The original script let you add up to 8 EMAs that can be bound to any timeframe and length. The timeframe and length is displayed on the chart next to EMA.
Unfortunately you can only add EMAs (Exponential Moving Averages) and no SMAs (Simple Moving Averages). That's why the script was extended. You can now choose the type (EMA or SMA) for up to 8 MAs.
Links
Profile of chipmonk
Indicator by chipmonk
Simple Volume-Based Support & Resistance IndicatorWelcome to my open-source indicator that uses trading volume and market trends to identify potential support and resistance levels. This tool is great for seeing where the price might pause or reverse, helping you make more informed trading decisions.
Why You'll Love This Indicator:
Volume Awareness: It looks at how much trading is happening to better predict support (where the price might stop falling) and resistance (where the price might stop rising).
Trend Tracking: The indicator uses the market's ups and downs to refine these support and resistance areas.
Easy to Read: We've made the lines and zones clear and simple to understand, so you can focus on what matters.
How to Use This Tool:
No complicated settings needed! Since it's open-source, feel free to explore the code and tweak it if you like.
The chart will show support zones in green and resistance zones in red. These are your clues for potential price turns.
The Open-Source Advantage:
This script is completely open for you to use, modify, and share. I believe in community-driven improvements, so dive into the code, see how it works, and if you've got a knack for coding, you can even make it better!
Understanding the Chart:
You'll see the support and resistance levels dynamically drawn on your chart. Green shades are where the price might bounce up, and red shades indicate where it might bounce down.
This indicator is my way of giving back to the trading community. By sharing it openly, I hope we can all help improve it and learn from each other. Happy trading!
Trend Change IndicatorThe Trend Change Indicator is an all-in-one, user-friendly trend-following tool designed to identify bullish and bearish trends in asset prices. It features adjustable input values and a built-in alert system that promptly notifies investors of potential shifts in both short-term and long-term price trends. This alert system is crucial for helping less active investors correctly position themselves ahead of major trend shifts and assists in risk management after a trend is established. It's important to note that this indicator is most effective with assets that historically exhibit strong trends.
At the heart of this tool is the interaction between the 30-day and 60-day Exponential Moving Averages (EMA). A bullish trend is indicated in green when the 30-day EMA is above the 60-day EMA, while a bearish trend is signaled in red when the 30-day EMA is below the 60-day EMA. The appearance of gray alerts users to potential shifts in the current trend as the EMAs converge, falling below the Average True Range (ATR) safety margin. This analysis is conducted across both hourly and daily timeframes, with the 4-hour timeframe providing early signals for daily trend changes. The band visually represents the interaction between the daily EMAs and is also displayed in the second row of the table, with the first row showing the same EMA interaction on the 4-hour timeframe.
This indicator also includes a 140-day (20-week) Simple Moving Average (SMA), visually represented by a line with predictive dots. This feature significantly enhances the investor's ability to understand long-term trends in asset prices, offering forward-looking insights by projecting the SMA value 10 days into the future. The value of this forecast lies in interpreting the slope of the dots; upward trending dots suggest a bullish underlying trend, while downward trending dots indicate a bearish trend. Generally, prices above the SMA signal bullishness, and prices below indicate bearishness.
In summary, the Trend Change Indicator is a comprehensive solution for identifying price trends and managing risk. Its intuitive, color-coded design makes it an indispensable tool for traders and investors who aim to be well-positioned ahead of trend shifts and manage risk once a trend has been established. While it has proven historically valuable in trending markets such as cryptocurrencies, tech stocks, and commodities, it is advisable to use this indicator in conjunction with other technical analysis tools for a more comprehensive and well-rounded decision-making process.
MoonFlag BTC Daily Swing PredictorThis script mainly works on BTC on the daily timeframe. Other coins also show similar usefulness with this script however, BTC on the daily timeframe is the main design for this script.
(Please note this is not trading advice this is just comments about how this indicator works.)
This script is predictive. It colors the background yellow when the script calculates a large BTC swing is potentially about to happen. It does not predict in which direction the swing will occur but it leads the price action so can be useful for leveraged trades. When the background gets colored with vertical yellow lines - this shows that a largish price swing is probably going to occur.
The scripts also shades bands around the price action that are used to estimate an acceptable volatility at any given time. If the bands are wide that means price action is volatile and large swings are not easily predicted. Over time, with reducing volatility, these price action bands narrow and then at a set point or percentage (%) which can be set in the script settings, the background gets colored yellow. This indicates present price action is not volatile and a large price swing is potentially going to happen in the near future. When price action breaks through the narrowing bands, the background is no longer presented because this is seen as an increase in volatility and a considerable portion of the time, a large sudden drop in price action or momentous gain in price is realized.
This indicator leads price action. It predicts that a swing is possibly going to happen in the near future. As the indicator works on the BTC daily, this means on a day-to-day basis if the bands continually narrow - a breakout is more likely to happen. In order to see how well this indicator works, have a look at the results on the screenshot provided. Note the regions where vertical yellow lines are present on the price action - and then look after these to see if a sizeable swing in price has occurred.
To use this indicator - wait until yellow vertical lines are presented on the BTC daily. Then use your experience to determine which way the price action might swing and consider entering a trade or leveraged trade in this direction. Alternatively wait a while to see in which direction the break-out occurs and considering and attempt to trade with this. Sometimes swings can be unexpected and breakout in one direction before then swinging much larger in the other. Its important to remember/consider that this indicator works on the BTC daily timeframe, so any consideration of entering a trade should be expected to cover a duration over many days or weeks, or possibly months. A large swing is only estimated every several plus months.
Most indicators are based on moving averages. A moving average is not predictive in the sense in that it lags price actions. This indicator creates bands that are based on the momentum of the price action. A change in momentum of price action therefore causes the bands to widen. When the bands narrow this means that the momentum of the price action is steady and price action volatility has converged/reduced over time. With BTC this generally means that a large swing in price action is going to occur as momentum in price action then pick-up again in one direction or another. Trying to view this using moving averages is not easy as a moving average lags price action which means that it is difficult to predict any sudden movements in price action ahead of when they might occur. Although, moving averages will converge over time in a similar manner as the bands calculated by this script. This script however, uses the price action momentum in a predictive manner to estimate where the price action might go based on present price momentum. This script therefore reacts to reduced volatility in price action much faster than a set of moving averages over various timescales can achieve.
MoonFlag
Golden Cross and Death Cross with ProbabilityThe Advanced Golden and Death Crossover Indicator offers traders a powerful tool for identifying potential buy and sell signals through the classic technical analysis method of moving average crossovers. This script enhances decision-making by dynamically changing the chart background color in response to Golden (bullish) and Death (bearish) crossovers, providing a visual representation of the market's momentum.
Features:
Golden and Death Crossover Detection: Utilizes a 50-period SMA and a 200-period SMA to identify potential buy (golden cross) and sell (death cross) points.
Continuous Background Coloring: Changes the chart's background color to green for golden crosses and red for death crosses, offering an intuitive grasp of market trends.
Customizable Lookback Period: Allows users to adjust the lookback period for calculating the success rate of each crossover, making the indicator adaptable to various trading strategies.
Success Rate Calculation: Provides an additional layer of analysis by calculating the historical success rate of crossovers within the specified lookback period.
Instructions:
Adding the Indicator: Search for "Advanced Golden and Death Crossover Indicator" in the TradingView Indicators & Strategies library and add it to your chart.
Customization: Access the indicator settings to adjust the lookback period according to your trading preferences.
Interpretation: Use the continuous background color as a guide to market conditions, with green indicating bullish momentum and red indicating bearish momentum. The success rate of past crossovers can help assess the reliability of the signals.
How the Script Works:
The Advanced Golden and Death Crossover Indicator operates by continuously monitoring two key moving averages (MAs) on your chart: a short-term (50-period) SMA and a long-term (200-period) SMA. Here's a step-by-step breakdown of its functionality:
Crossover Detection:
Golden Cross: When the short-term MA crosses above the long-term MA, indicating potential bullish momentum, the script identifies this as a Golden Cross signal.
Death Cross: Conversely, when the short-term MA crosses below the long-term MA, suggesting potential bearish momentum, the script flags this as a Death Cross signal.
Background Coloring:
Upon detecting a Golden Cross, the script changes the chart background to green, visually representing a bullish market condition.
Upon detecting a Death Cross, the chart background turns red, indicating bearish market conditions.
This color change remains in effect until the next crossover event, providing a continuous visual cue of the market's trend direction.
Success Rate Calculation:
The script calculates the historical success rate of these crossovers within a user-defined lookback period. This metric helps assess the reliability of the signals based on past performance.
Customization:
Users have the flexibility to adjust the lookback period for the success rate calculation, allowing for customization according to individual trading strategies and risk preferences.
Application in Trading Analysis:
Traders can use this indicator as part of their technical analysis toolkit to make informed decisions about entry and exit points. The visual cues from the continuous background coloring, combined with the success rate of past signals, provide a comprehensive overview of market trends and crossover reliability. It’s important for traders to combine this indicator with other analysis tools and consider broader market conditions to optimize their trading strategy.
Disclaimer:
This script is provided for educational and informational purposes only and should not be construed as investment advice. Trading involves risk, and you should conduct your own research or consult a financial advisor before making investment decisions. The author or distributor of this script bears no responsibility for any trading losses incurred by users.
Custom Dual SMADescription
The Custom Dual SMA Indicator is designed for traders who wish to track and compare the moving averages of two different financial instruments simultaneously on the same chart, usually if there is correlation between to different asset such as TQQQ vs SQQQ. This indicator is particularly useful for those who engage in comparative analysis or pairs trading strategies.
Features
Dual Ticker Input: Users can input any two ticker symbols (e.g., stocks, currencies, commodities) to analyze. This flexibility allows for a broad range of comparative analyses across different markets or sectors.
Customizable SMA Length: The indicator provides the option to set the length of the SMA for each ticker symbol independently. This feature is critical for traders who wish to analyze the moving averages over different time periods, depending on their trading strategy or the specific characteristics of the instruments being analyzed.
Overlay on Price Chart: The calculated SMAs are overlaid directly on the price chart, enabling users to easily visualize how the moving averages of the two instruments move in relation to each other and to their respective price actions.
Color-Coded for Clarity: Each SMA is plotted in a different color (red and blue by default), ensuring clear differentiation and easy interpretation at a glance.
Use Case
This indicator is particularly beneficial for:
Comparative Analysis: Traders can compare the performance and trends of two different instruments, observing how their moving averages converge or diverge over time.
Pairs Trading: Those involved in pairs trading can use this tool to identify potential entry and exit points by analyzing the moving averages of two correlated or inversely correlated instruments.
Diversification Analysis: Investors looking to diversify their portfolio can use this indicator to understand the moving average trends of various instruments, helping them make informed decisions about asset allocation.
Summary
The Custom Dual SMA Indicator is a versatile tool for traders and investors who require a comparative view of the moving averages of two different instruments on the same chart. Its customizable nature and ease of use make it suitable for a wide range of trading strategies and market analyses.
PKJ StrategyWelcome to the Daily Price Action Mastery Strategy, a powerful approach to navigating the financial markets using the purest form of market analysis – price action. This trading view strategy is meticulously crafted for those seeking a method that harnesses the daily price movements to make informed and strategic trading decisions.
Key Features:
Daily Candlestick Analysis: Dive into the daily candlestick patterns to identify key support and resistance levels, trend reversals, and potential breakout points. The strategy leverages the valuable information encapsulated in each day's price action to discern market sentiment.
Trend Identification: Utilize trend analysis tools and indicators to pinpoint the prevailing market direction. By understanding the dynamics of daily trends, traders can align their positions with the broader market movement for higher probability trades.
Dynamic Support and Resistance: Implement dynamic support and resistance levels derived from daily price action. These levels act as crucial markers for entry and exit points, helping traders set effective stop-loss and take-profit orders.
Chart Patterns Recognition: Uncover chart patterns such as head and shoulders, flags, and triangles on the daily timeframe. The strategy incorporates pattern recognition techniques to identify potential trend continuation or reversal scenarios, offering traders a comprehensive view of market dynamics.
Volatility Analysis: Gauge market volatility by studying daily price ranges and fluctuations. Volatility indicators are integrated to help traders adjust their risk management strategies in response to varying market conditions.
Confirmation through Indicators: Supplement price action analysis with carefully selected indicators for additional confirmation signals. These indicators are chosen to align with the philosophy of the Daily Price Action Mastery Strategy, enhancing the precision of trade entries and exits.
Risk Management Guidelines: Discover effective risk management practices tailored to the daily timeframe. Learn how to optimize position sizes, set appropriate stop-loss levels, and manage capital to ensure long-term success and sustainability in your trading journey.
Whether you are a seasoned trader or a newcomer to the markets, the Daily Price Action Mastery Strategy provides a comprehensive framework to navigate the complexities of daily price movements. Elevate your trading experience by incorporating this strategy into your analysis, and empower yourself to make well-informed decisions in the dynamic world of finance.
EMA + Lower Timeframe EMA (correct display in Replay Mode)This indicator shows
one EMA for the current timeframe
one EMA for a lower timeframe
Unlike the built-in Tradingview EMA indicator, this indicator shows the correct values for the lower timeframe EMA during Replay Mode.
[MAD] Acceleration based dampened SMA projectionsThis indicator utilizes concepts of arrays inside arrays to calculate and display projections of multiple Smoothed Moving Average (SMA) lines via polylines.
This is partly an experiment as an educational post, on how to work with multidimensional arrays by using User-Defined Types
------------------
Input Controls for User Interaction:
The indicator provides several input controls, allowing users to adjust parameters like the SMA window, acceleration window, and dampening factors.
This flexibility lets users customize the behavior and appearance of the indicator to fit their analysis needs.
sma length:
Defines the length of the simple moving average (SMA).
acceleration window:
Sets the window size for calculating the acceleration of the SMA.
Input Series:
Selects the input source for calculating the SMA (typically the closing price).
Offset:
Determines the offset for the input source, affecting the positioning of the SMA. Here it´s possible to add external indicators like bollinger bands,.. in that case as double sma this sma should be very short.
(Thanks Fikira for that idea)
Startfactor dampening:
Initial dampening factor for the polynomial curve projections, influencing their starting curvature.
Growfactor dampening:
Growth rate of the dampening factor, affecting how the curvature of the projections changes over time.
Prediction length:
Sets the length of the projected polylines, extending beyond the current bar.
cleanup history:
Boolean input to control whether to clear the previous polyline projections before drawing new ones.
Key technologies used in this indicator include:
User-Defined Types (UDT) :
This indicator uses UDT to create a custom type named type_polypaths.
This type is designed to store information for each polyline, including an array of points (array), a color for the polyline, and a dampening factor.
UDTs in Pine Script enable the creation of complex data structures, which are essential for organizing and manipulating data efficiently.
type type_polypaths
array polyline_points = na
color polyline_color = na
float dampening_factor= na
Arrays and Nested Arrays:
The script heavily utilizes arrays.
For example, it uses a color array (colorpreset) to store different colors for the polyline.
Moreover, an array of type_polypaths (polypaths) is used, which is an array consisting of user-defined types. Each element of this array contains another array (polyline_points), demonstrating nested array usage.
This structure is essential for handling multiple polylines, each with its set of points and attributes.
var type_polypaths polypaths = array.new()
Polyline Creation and Manipulation:
The core visual aspect of the indicator is the creation of polylines.
Polyline points are calculated based on a dampened polynomial curve, which is influenced by the SMA's slope and acceleration.
Filling initial dampening data
array_size = 9
middle_index = math.floor(array_size / 2)
for i = 0 to array_size - 1
damp_factor = f_calculate_damp_factor(i, middle_index, Startfactor, Growfactor)
polyline_color = colorpreset.get(i)
polypaths.push(type_polypaths.new(array.new(0, na), polyline_color, damp_factor))
The script dynamically generates these polyline points and stores them in the polyline_points array of each type_polypaths instance based on those prefilled dampening factors
if barstate.islast or cleanup == false
for damp_factor_index = 0 to polypaths.size() - 1
GET_RW = polypaths.get(damp_factor_index)
GET_RW.polyline_points.clear()
for i = 0 to predictionlength
y = f_dampened_poly_curve(bar_index + i , src_input , sma_slope , sma_acceleration , GET_RW.dampening_factor)
p = chart.point.from_index(bar_index + i - src_off, y)
GET_RW.polyline_points.push(p)
polypaths.set(damp_factor_index, GET_RW)
Polyline Drawout
The polyline is then drawn on the chart using the polyline.new() function, which uses these points and additional attributes like color and width.
for pl_s = 0 to polypaths.size() - 1
GET_RO = polypaths.get(pl_s)
polyline.new(points = GET_RO.polyline_points, line_width = 1, line_color = GET_RO.polyline_color, xloc = xloc.bar_index)
If the cleanup input is enabled, existing polylines are deleted before new ones are drawn, maintaining clarity and accuracy in the visualization.
if cleanup
for pl_delete in polyline.all
pl_delete.delete()
------------------
The mathematics
in the (ABDP) indicator primarily focuses on projecting the behavior of a Smoothed Moving Average (SMA) based on its current trend and acceleration.
SMA Calculation:
The indicator computes a simple moving average (SMA) over a specified window (sma_window). This SMA serves as the baseline for further calculations.
Slope and Acceleration Analysis:
It calculates the slope of the SMA by subtracting the current SMA value from its previous value. Additionally, it computes the SMA's acceleration by evaluating the sum of differences between consecutive SMA values over an acceleration window (acceleration_window). This acceleration represents the rate of change of the SMA's slope.
sma_slope = src_input - src_input
sma_acceleration = sma_acceleration_sum_calc(src_input, acceleration_window) / acceleration_window
sma_acceleration_sum_calc(src, window) =>
sum = 0.0
for i = 0 to window - 1
if not na(src )
sum := sum + src - 2 * src + src
sum
Dampening Factors:
Custom dampening factors for each polyline, which are based on the user-defined starting and growth factors (Startfactor, Growfactor).
These factors adjust the curvature of the projected polylines, simulating various future scenarios of SMA movement.
f_calculate_damp_factor(index, middle, start_factor, growth_factor) =>
start_factor + (index - middle) * growth_factor
Polynomial Curve Projection:
Using the SMA value, its slope, acceleration, and dampening factors, the script calculates points for polynomial curves. These curves represent potential future paths of the SMA, factoring in its current direction and rate of change.
f_dampened_poly_curve(index, initial_value, initial_slope, acceleration, damp_factor) =>
delta = index - bar_index
initial_value + initial_slope * delta + 0.5 * damp_factor * acceleration * delta * delta
damp_factor = f_calculate_damp_factor(i, middle_index, Startfactor, Growfactor)
Have fun trading :-)
SMIIO + VolumeThis indicator generates long and short signals.
The operation of the indicator is as follows;
First, true strength index is calculated with closing prices. We call this the "ergodic" curve.
Then the average of the ergodic (ema) is calculated to obtain the "signal" curve.
To calculate the "oscillator", the signal is subtracted from ergodic (oscillator = ergodic - signal).
The last variable to be used in the calculation is the average volume, calculated with sma.
Calculation for long signal;
- If the ergodic curve cross up the zero line (ergodic > 0 AND ergodic < 0) and,
- If the current oscillator is greater than the previous oscillator (oscillator > oscillator ) and,
- If the current ergonic is greater than the previous signal (ergonic > signal) and,
- If the current volume is greater than the average volume (volume > averageVolume) and,
- If the current candle closing price is greater than the opening price (close > open)
If all the above conditions are fullfilled, the long input signal is issued with "Buy" label.
Calculation for short signal;
- If the ergodic curve cross down the zero line (ergodic < 0 AND ergodic > 0) and,
- If the current oscillator is smaller than the previous oscillator (oscillator < oscillator ) and,
- If the current ergonic is smaller than the previous signal (ergonic < signal) and,
- If the current volume is greater than the average volume (volume > averageVolume) and,
- If the current candle closing price is smaller than the opening price (close < open)
If all the above conditions are fullfilled, the short input signal is issued with "Sell" label.
Osmosis [ChartPrime]Osmosis is a multi indicator, multi period heatmap. Lookback periods can be mysterious as it can tend to seem very arbitrary. This tool allows users to see how price/volume reacts to short to long periods by visualizing all of the periods at the same time. This is useful because small periods are only good for short term movements while long periods are useful for long term movements. This more detailed view of market trends is analogues of multi time frame analysis. The lookback periods are arranged from bottom up, where the bottom of the indicator is the shortest period while the top is the longest period.
One major feature of this indicator is its ability to signal potential trend reversals. For example, a shift in the direction at the lower end of the heatmap can indicate a weakening of the current trend, suggesting a possible reversal. On the other hand, when the heatmap is fully saturated at all levels, it may indicate a strong trend that could be nearing a reversal point.
Another important and unique aspect of the Osmosis indicator is its automatic highlighting feature. This feature emphasizes regions within the heatmap that score exceptionally high or low, drawing attention to significant market movements or potential anomalies.
All of the indicators are normalized using min/max scaling driven by the highest highs and lows. The period of this scaling is adjustable by changing the "Lookback" parameter under settings. Delta length changes the lookback for "MA Delta" and "Volume Delta". A longer period corresponds to a smoother output. Fast Mode scales back the range of the indicator, literally halving the increment.
Here is a short description of what each input does:
Alternate Source: A choice to use a different data source for the indicator.
Source: An option to turn on or off the alternate data source.
Style: A selection menu to choose the visual style of the indicator.
Lookback: Adjusts how far back in time the indicator looks for its calculations.
Delta Length: Changes the length of time over which changes are measured.
Fast Mode: A setting that adjusts the range of the indicator for quicker analysis.
Enable Smoothing: A choice to smooth out the data for a cleaner look.
Smooth: Activates the smoothing feature.
Max Region: Highlights the highest value regions in the heatmap.
Max Threshold: Sets the threshold for what counts as a 'max' region.
Minimum Max Width: Determines the smallest size for a 'max' region to be highlighted.
Max Region Color: Chooses the color for the maximum value regions.
Max Top Line Alpha: Adjusts the transparency of the top line in max regions.
Max Bottom Line Alpha: Adjusts the transparency of the bottom line in max regions.
Line Width: Sets the thickness of the lines in the max regions.
Region Start Indication: Specifies where the max region starts.
Fill Max: Decides if the max regions should be filled with color and sets the transparency level for the color fill in max regions.
Minimum Region: Highlights the lowest value regions in the heatmap.
Minimum Threshold: Sets the threshold for what counts as a 'min' region.
Minimum Minimum Width: Determines the smallest size for a 'min' region to be highlighted.
Minimum Region Color: Chooses the color for the minimum value regions.
Minimum Top Line Alpha: Adjusts the transparency of the top line in min regions.
Minimum Bottom Line Alpha: Adjusts the transparency of the bottom line in min regions.
Minimum Line Width: Sets the thickness of the lines in the min regions.
Minimum Region Start Indication: Specifies where the min region starts.
Fill Minimum: Decides if the min regions should be filled with color and sets the transparency level for the color fill in min regions.
Color Presets: Provides pre-set color schemes.
Invert Color Scale: Flips the color scale.
Gradient Colors: Customizes individual colors for the gradient scale.
Available styles include:
'MACD Histogram'
'Normalized MACD'
'Slow MACD'
'MACD Percent Rank'
'MA Delta' (Delta Length set to 2)
'BB Width'
'BB Width Percentile'
'Stochastic'
'RSI'
'True Range OSC'
'Normalized Volume'
'Volume Delta'
'True Range'
'Rate of Change' (Smoothing set to 1)
'OBV' (Smoothing set to 1)
'MFI' (Smoothing set to 1)
'Trend Angle' (Smoothing set to 2 and fast mode off)
EXPONOVA @thejamiulNSE:NIFTY "EXPONOVA @thejamiul," is designed to provide traders with a visual tool to analyze market trends and potential entry or exit points. Here's an overview of its features and functionality:
1. Dual Exponential Moving Averages (EMAs):
The indicator utilizes two EMAs with different lengths - one set at 20 periods and the other at 55 periods. These EMAs are calculated based on the closing prices of the assets.
2. Color Gradient Feature:
A unique aspect of this indicator is its use of a color gradient to visually represent the relationship between the price and the longer EMA (55 periods). The gradient consists of a series of colors ranging from shades of red to green.
3. Dynamic Color Adaptation:
The indicator dynamically changes the color of the area between the two EMAs. This color change is based on the position of the closing price relative to the longer EMA (55 periods). The color shifts through the gradient based on the number of bars since the price last crossed the longer EMA.
4. Close Price and EMA Interaction:
The script includes functions to determine whether the closing price is above or below the longer EMA. This interaction is a crucial part of how the color gradient is applied.
5. Visualisation of Market Trends:
By plotting these EMAs and the color-filled area between them, the indicator provides a visual representation of market trends. The changing colors can help traders in identifying trend strength, potential reversals, or consolidation phases.
6. Overlay on Price Chart:
The indicator is designed to overlay directly on the price chart, making it easier for traders to correlate the EMAs and the color gradient with price movements.
7. Explicit Mention of Originality:
One of the distinctive features of 'EXPONOVA @thejamiul' is its innovative use of a color gradient to visually represent the price's relationship with the longer EMA. This approach, combined with our specific choice of EMAs and the dynamic color adaptation technique, sets this script apart from standard EMA-based indicators.
8. Acknowledgement of Potential Shortcomings or Limitations:
While 'EXPONOVA @thejamiul' provides a dynamic visual aid for trend analysis, users should note that like all indicators, it is subject to market volatility and should be used in conjunction with other analysis methods. This script is best suited for , and users may need to adjust settings for optimal performance in different market scenarios.
9. Summary:
"EXPONOVA @thejamiul" is a visually intuitive and dynamic trading tool that combines dual EMAs with a unique color gradient feature to aid traders in making informed decisions based on the relationship between price trends and moving averages.
Moving Average Dispersion Index w/ Z-Score (Adjusted MADI-Z)Overview
The Adjusted MADI-Z indicator is a custom indicator that looks to decipher trends and consolidations based on the clustering and dispersion of Moving Averages. It calculates a z-score based on the dispersion of various exponentially weighted moving averages to identify trends and consolidation. The z-score is then adjusted using a logistic function to map it between 0-100.
How can it be used?
- Identify trends and consolidation - Values above 80 indicate a strong trend while values below 20 show consolidation
- Gauge trend strength - Higher positive values suggest a stronger uptrend while lower negative values indicate a stronger downtrend
- Generate trading signals - Crossovers of key levels can act as entry/exit triggers
- Smooth noise in price action - The adjusted z-score filters out market noise
Default Values
- ma5_len = 5
- ma10_len = 10
- ma50_len = 50
- ma200_len = 200
- lookback_period = 100
Strategies
The Adjusted MADI-Z can be used for trend-following strategies across various timeframes. Specific strategies include:
- Trend trading - Enter long on crossover above 80, exit on crossover below 80. Reverse for short trades.
- Range trading - Enter short on crossover below 20, exit on crossover above 20. Reverse for long trades.
- Identifying pullbacks - Temporary moves below 80 during uptrends and above 20 during downtrends can act as retracement entry points.
Rationale
By adjusting the z-score output of the standard MADI using a logistic function, the indicator becomes bounded and easier to interpret for trading purposes. The customized moving average lengths also allow tuning the indicator to particular assets and timeframes.
Interpretation
- Above 80 - Strong uptrend
- 70 to 80 - Moderate uptrend
- 50 to 70 - Weak uptrend
- 30 to 50 - Range-bound consolidation
- 20 to 30 - Weak downtrend
- Below 20 - Strong downtrend
Values below 15 or above 85 represent extremes outside two standard deviations.