SandTigerSandTiger is an auto-counting tool that counts naturally occurring events in a price series. This version has been reduced to 377 lines of code and should run faster than previous versions. Although not shown here, I highly recommend running my 'ELB' script with SandTiger. ELB is an 'event locator' and will mark all points that SandTiger numbers - giving you visual cues as to where these points are located. ELB also displays support/resistance levels.
SandTiger is designed to be used with MAGENTA - a counting system for Forex and other markets.
MAGENTA is a free and open framework for understanding and explaining price movement in financial markets. Any materials associated with MAGENTA are strictly for educational purposes only.
SandTiger tracks Component Values, Dyads, and Sum Table Values (STV's) over straight and curved trends, allowing a trader to discern where directional shifts are likely to occur.
SandTiger requires just 3 things to function accurately:
1) A correct starting point (this will typically be an obvious trend turn high or low in a series of price moves).
2) A 'push 1' count ('push 1' runs from the starting point to the event prior to the first terminal of the first FCT or Fractured Counter-Trend).
3) A 'high prime' value (the high prime count runs from the starting point through to the second terminal of the first FCT with no skips).
FRAMEWORK OVERVIEW: 'Component' values are filtered from the prime set (including the half prime and further reductions). Once we have the comp table we add the values to get a 'total'. With the 'total' we divide and multiply by two to get two additional values. 'Derivatives' are based on various calculations using these three values.
We're looking for 'total/2' to count into either itself, 'total', 'total*2', or a derivative. Comp counts are in Tx form and counted from trend start. If the trend doesn't turn on a comp value it will likely turn on a Dyad or STV value. If that also doesn't happen it's likely you have a 'curved' trend/sequence that will turn on one of the above after moving away from its high/low. This can also be traded using SandTiger's 'Seg Terminals' skip option.
Sum tables and Dyad values are drawn from the 'primes' and Dyads use the 'push1' value as well. In a structural trend, primes are gotten by counting pushpulls 1 & 2 in 'Ti' form. Comps, Sum table values, and Dyads are equivalent, sequences can turn on either value type belonging to the 1st or 2nd prime set. Both STV's and Dyads are counted in 'Tx' form (except where count-through signals occur).
Types and antitypes correlate and are associated with a 12-count 'cycle.' (Ti = 'Terminals Included'; Tx = 'Terminals eXcluded'; both refer to FCT terminals)
THE STRATEGY:
For Structures: Trade Comps, Dyads, and STV's from sets 1 (all) and 2 (Dyads and STV's only) in the 'main' segment then on the 'carry-over' by skipping segment terminals. If a PC or cycle caps the sequence, trade that as well.
For NSM's: Trade movements that flash a signal prior to the end of the initial cycle. The mark will be the push1 value. Twelve will be the 'high prime.' Skip interrupts and trade carry-over values.
The first version of SandTiger was conceived/planned/authored by Erek A.D. and coded by Erek A.D. and @SimpleCryptoLife beginning in August 2022 and finishing in Dec. 2022
The current version was written and developed July 3, 2023 and has been refined and upgraded by Erek A.D. through Jan. 2024...
المستويات والنقاط المحورية
Threshold counterOVERVIEW
The "Threshold Counter" is a tool for quantifying occurrences of closing prices of an asset that align with specified criteria and is a flexible and visual approach to studying price action.
A user-definable target threshold can be set and a comparator (<, =, >, and so on) can be selected. The indicator counts values on the main chart meeting these conditions, over a user-defined `lookback` period.
KEY FEATURES
User definable threshold: target value with optional upper bound can be specified
Versatile Comparisons: Choose from "=", ">=", ">", "<=", "<", "between", and "between (inclusive)" for diverse analysis.
Historical Analysis: Assess occurrences over a customisable period.
Visual Representation: Displays instances graphically on the chart with customisable colours.
Summary: Provides a summary label for a quick understanding of the analysed data.
USE-CASES
Pattern Recognition: Identify patterns or trends based on user-defined price criteria.
Threshold Analysis: Quantify occurrences of prices crossing or staying within a specified range.
Strategy Testing: Evaluate historical performance of strategies relying on specific price conditions.
Behavioural Insights: Gain insights into price behaviour by counting occurrences of interest.
The "Threshold Counter" indicator offers a flexible and visual approach to studying price action, which may aid in making decisions based on historical data.
IMPORTANT CONSIDERATIONS
Period selection: The effectiveness of the analysis may be influenced by the choice of the lookback period. Consider an appropriate duration based on the strategy or pattern being analysed.
Comparator Selection: Comparison operator selection will obviously affect the results. There are two range operators of `between` and `between (inclusive)`. The latter will add closing prices that exactly meet the threshold and upper bound. The former does not.
Visualisation: Interpretation of the visual representation is colour-coded.
Red is threshold condition is not met.
Green is threshold condition is met.
Aqua is outside of the lookback period.
User Discretion: This script relies on historical data and should be used with caution. Past performance is not indicative of future results.
Supplementary Analysis: Trading decisions should not rely solely on this script. Users should exercise judgment and consider market conditions.
2bandHello traders
In this script, I have defined two bands with a deviation of 2 and 3
I designed the setup so that the upper lines represent red resistance, the lower lines represent green support, and the blue line represents the average price of the previous 20 candles in each time frame.
This code can be used mostly in time frames above 30 minutes and somehow predict possible price targets.
For example, if the price closes above the blue line in the one-hour time frame, the two fixed lines above are considered as targets and vice versa.
I have also added the pivot point calculation formula in orange
Most importantly, I added the closing price of the previous days in black
I hope it will be used by dear traders and you will support more for new works.
Consolidation FilterDescription:
Consolidation is a technical analysis term used to describe a assets's price movement within a given support and resistance range for a period of time. Consolidations happen either during trending market phases or before a new trend. Consolidation is generally interpreted as market indecisiveness and uncertainty as to which way the market will go next caused due to trader indecisiveness, which ends when the asset's price moves above or below the trading level. A consolidation level could be broken for several reasons, such as the release of materially important news or the triggering of a succession of limit orders.
Markets spend a great amount of time ranging and going sideways. It pays off to know how to identify and trade consolidations because they happen so frequently.
Periods of consolidation can be found in price charts for any time interval, and these periods can last for days, weeks, or months. Technical traders look for support and resistance levels in price charts and then use these levels to make buy and sell decisions. Typically, traders look for certain consolidation patterns: sideways ranges, downward or upward sloping ranges (also called flags), or triangular consolidations (triangles, wedges and pennants).
In contrast, this script offers an alternative, fairly straightforward but effective, way to pinpoint consolidation periods using a forecast oscillator method and simply highlighting relevant regions in the chart (with a yellow background).
In the settings menu you can select one of the three calculation methods, but all of them are based on the forecast oscillator. The indicator settings depend on the asset and on the timeframe. For example for the 2H timeframe BTSUSD preferred settings are period:10/method:2/threshold:0.2, and for the 15M timeframe BTSUSD the settings are period:10/method:2/threshold:0.02. Feel free to experiment with settings to suit your needs.
Fair Value Gap Finder with Integrated Gann BoxTitle: Fair Value Gap Finder with Integrated Gann Box Analysis
Description:
The "Fair Value Gap Finder with Integrated Gann Box Analysis" is a unique technical indicator designed for traders who wish to incorporate the concepts of Fair Value Gaps (FVG) and Gann Box methodologies into their trading strategy. This tool is beneficial for both trend-following and scalping techniques across various markets and timeframes.
Functionality:
The indicator identifies Fair Value Gaps, which are areas on the chart where price has skipped a range, creating a 'gap'. Recognizing these zones can be crucial for understanding potential price support and resistance areas. Alongside FVG detection, this script employs Gann Box principles to project potential levels of interest. Gann Boxes are drawn automatically when an FVG is identified, providing additional insights based on W.D. Gann's theories, which relate to time and price symmetry.
Usage:
Upon detecting an FVG, the indicator will highlight the gap on the chart and overlay a Gann Box between the high and low points of the gap. Traders can use these zones to make informed decisions about entry and exit points, stop loss, and take profit levels. The script offers customization options for the appearance and behavior of the FVG boxes and Gann Lines, allowing users to adapt the tool to their preferences.
Originality:
What sets this indicator apart is the integration of FVG with Gann Box levels within a single tool, streamlining the analysis process. It takes the classic approach of identifying gaps and enriches it with the geometric significance of Gann's work, all while allowing users to visualize and interact with these levels in a user-friendly manner.
Open-Source Nature:
This script is open-source, making it a transparent solution for those who wish to understand the underlying calculations. While not all traders are versed in Pine Script, the logic of identifying FVGs and applying Gann Box levels is explained through the script's annotations and the user interface itself.
Instructions for Use:
Apply the script to your chart, and it will automatically detect FVGs.
Adjust the settings in the indicator's input menu to match your trading style and preferences.
Use the FVG and Gann Box levels as potential areas of interest for trade setups.
This script does not guarantee profits and should be used as part of a comprehensive trading plan. It is best used in conjunction with other analysis methods to confirm signals and strategies.
PercenageDropFromATHINFO:
The PercenageDropFromATH script is fairly simple indicator, which is able to:
detect the last ATH (real ATH of the full chart, not related to the selected timeframe) and plot it
user can select a percentage of drop from this price, and once reached can receive a notification
Note that if the ATH is outside of the visibility of the currently selected timeframe the indicator will not be able to show it. Recommended settings is 1D TF!
DETAILS:
The purpose of the script is to serve to ease passive investments in ETFs and indices, once those are dropping below certain point from the ATH.
Individual stocks are not really recommended in my view, as unlike the indices which are cherry picking the best companies from the sector, individual companies can always start drifting away.
Anyway, the indicator should work on all assets, including crypto, gold, etc.
Example usage could be of setting an alert for 25% drop in SPY, and start accumulating positions on every next 10% additional drop, so DCA can be done with favorable prices.
SETTINGS
The settings are pretty straight forward:
ATH Source - source for computing the ATH, default to "high", but user can select to check only on open/close/low as well
Percentage drop target from ATH - self explaining, default to 20
ATH color - only the last ATH until the current bar is been drawn
Plot ATH drop target price - optionally the target price after the percentage drop can be plotted as well
ATH drop target color - the color of the price after the percentage drop from ATH
BreakoutTrendFollowingINFO:
The "BreakoutTrendFollowing" indicator is a comprehensive trading system designed for trend-following in various market environments. It combines multiple technical indicators, including Moving Averages (MA), MACD, and RSI,
along with volume analysis and breakout detection from consolidation, to identify potential entry points in trending markets. This strategy is particularly effective for assets that exhibit strong trends and significant price movements.
Note that using the consolidation filter reduces the amount of entries the strategy detects significantly, and needs to be used if we want to have an increased confidence in the trend via breakout.
However, the strategy can be easily transformed to various only trend-following strategies, by applying different filters and configurations.
The indicator 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)
DETAILS:
The strategy's core is built upon several key components:
Moving Average (MA): Used to determine the general trend direction. The strategy checks if the price is above the selected MA type and length.
MACD Filter: Analyzes the relationship between two moving averages to confirm the trend's momentum.
Consolidation Detection: Identifies periods of price consolidation and triggers trades on breakouts from these ranges.
Volume Analysis: Assesses trading volume to confirm the strength and validity of the breakout.
RSI: Used to avoid overbought conditions, ensuring trades are entered in favorable market situations.
Wick filters: make sure there is not a long wick that indicates selling pressure from above
The strategy generates buy signals when several conditions are met concurrently (each one of them can be individually enabled/disabled)"
The price is above the selected MA.
A breakout occurs from a configurable consolidation range.
The MACD line is above the signal line, indicating bullish momentum.
The RSI is below the overbought threshold.
There's an increase in trading volume, confirming the breakout's strength.
Currently the strategy fires SL signals, as the approach is to check for loss of momentum - i.e. crossunder of the MACD line and signal line, but that is to everyone to determine the exit conditions.
The buy and SL signals are set on the chart using green or orange triangles on the below/above the price action.
SETTINGS:
Users can customize various parameters, including MA type and period, MACD settings, consolidation length, and volume increase percentage. The strategy is equipped with alert conditions for both entry (buy signals) and exit (set stop loss) points, facilitating both manual and automated trading.
Each one of the technical indicators, as well as the consilidation range and breakout/wick settings can be configured and enabled/disabled individually.
Please thoroughly review the available settings of the script, but here is an outline of the most important ones:
Use bar wicks (instead of open/close) - the ref_high/low will be taken based on the bar wicks, rather than the open/close when determining the breakout and MA
Enter position only on green candles - additional filters to make sure that we enter only on strong momentum
MA Filter: (enable, source, type, length) - general settings for MA filter to be checked against the stock price (close or upper wick)
MACD Filter: (enable, source, Osc MA type, Signal MA type, Fast MA length, Slow MA length, Low MACD Hist) - detailed settings for fine MACD tuning
Consolidation:
Consolidation Type: we have two different ways of detecting the consolidation, note the types below.
CONSOLIDATION_BASIC - consolidation areas by looking for the pivot point of a trend and counts the number of bars that have not broken the consolidation high/low levels.
CONSOLIDATIO_RANGE_PERCENT - identifies consolidation by comparing the range between the highest and lowest price points over a specified period.
So in summary the CONSOLIDATIO_RANGE_PERCENT uses a percentage-based range to define consolidation, while CONSOLIDATION_BASIC uses a count of bars within a high-low range to establish consolidation.
Thus the former is more focused on the tightness of the price range, whereas the latter emphasizes the duration of the consolidation phase.
The CONSOLIDATIO_RANGE_PERCENT might be more sensitive to recent price movements and suitable for shorter-term analysis, while CONSOLIDATION_BASIC could be better for identifying longer-term consolidation patterns.
Min consolidation length - applicable for CONSOLIDATION_BASIC case, the min number of bars for the price to be in the range to consider consolidation
Consolidation Loopback period - applicable for CONSOLIDATION_BASIC case, the loopback number of bars to look for consolidation
Consolidation Range percent - applicable for CONSOLIDATIO_RANGE_PERCENT, the percent between the high and low in the range to consider consolidation
Plot consolidation - enables plotting of the consolidation (only for debug purposes)
Breakout: (enable, low, high) - the definition of the breakout from the previous consolidation range, the price should be between to determine the breakout as successfull
Upper wick: (enable, percent) - defines the percent of the upper wick compared to the whole candle to allow breakout (if the wick is too big part of the candle we can consider entering the position riskier)
RSI: (enable, length, overbought) - general settings for RSI TA
Volume (enbale, percentage increase, average volume filter en, loopback bars) - percentage of increase of the volume to consider for a breakout. There are two modes - percentage increase compared to the previous bar, or percentage against the average volume for the last loopback bars.
Note that there are many different configuration that you can play with, and I believe this is the strength of the strategy, as it can provide a single solution for different cases and scenarios.
My advice is to try and play with the different options for different markets based on the approach you want to implement and try turning features on/off and tuning them further.
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 explored 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:
Deal Conditions Mode - External (take enter/exit conditions from an external script)
🔌Signal 🛈➡ - BreakoutTrendFollowing: 🔌Signal to TTS (this is the output from the indicator script, according to the TTS convention)
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 preferences, 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)
Tennis Ball ActionInspired by Mark Minervini's sell rules in "Think and Trade Like a Champion".
Used to determine if a stock is behaving well after a breakout
Used to determine when it might by prudent to reduce a position or sell
Used as a visual aid, but based purely off price and volume action
Here's a breakdown of what each condition checks for:
Up Close Counter: Checks for a sequence of upward closes. If there are 12 or more up closes in the last 15 days, it flags up_days as true.
Upper 50% Range Condition: Determines if 9 or more out of the last 15 closes are in the upper 50% of the price range.
Bullish Engulfing: Identifies a bullish engulfing candlestick pattern where the close is higher than the previous high and the open is lower than the previous low.
Stock Up 3% or More: Flags when the stock is up 3% or more on the day.
Inside Day Condition: Checks if the current day's high is lower than the previous day's high and the current day's low is higher than the previous day's low.
Close Below 50-day SMA: Indicates a negative confirmation when the stock closes below the 50-day Simple Moving Average (SMA).
Weak Close Condition: Similar to the Upper 50% Range Condition, but looking for lower closes.
Close Below 20-day SMA: Another negative confirmation when the stock closes below the 20-day SMA.
Three Lower Lows: Identifies a pattern where the current close is lower than the previous two closes.
Down on Above Average Volume: Flags when the stock closes lower than the previous day's close and the volume is higher than the 20-day SMA of volume.
The script then tallies up the confirmations and violations based on these conditions and plots them on a histogram. Confirmations are represented in green, violations in red.
This indicator evaluates both bullish and bearish signals based on various technical conditions to assist traders in decision-making. The confirmations suggest potential bullish movements, while violations indicate potential bearish movements in the stock.
Support and Resistance (MTF) | Flux Charts💎 GENERAL OVERVIEW
Introducing a groundbreaking support and resistance indicator designed to revolutionize your trading experience on TradingView! This innovative tool operates across three distinct timeframes, offering a comprehensive view of market dynamics to help you make informed trading decisions.
The indicator offers a large variety of features :
Select Up To 3 Timeframes
Select Strength Of Supports & Resistances
Select Between Zones & Lines
Show Breaks & Restests
Break & Retest Alerts
Avoid False Breaks
Inverse Color After Broken
Expand Lines & Zones
🚩UNIQUENESS
What sets this indicator apart is its ability to seamlessly integrate and analyze support and resistance levels across multiple timeframes simultaneously. By combining data from three different timeframes, this indicator provides a holistic perspective on market trends and key levels. The adaptive nature of this tool ensures a dynamic assessment of support and resistance zones, empowering traders to adapt to changing market conditions efficiently.
⚙️SETTINGS
1. General Configration
Support & Resistance Count -> Select between 1-3 support & resistance zones for each timeframe.
Pivot Range -> The pivot range is taken into calculations when finding high & low pivots in the chart. Increase if you need a more general look at the support & support zones, or decrease if you need a more detailed look.
Strength -> The strength of the support & resistance zones are determined by how many times the price touched the zone in the past. You can increase the strength up to 4.
Expand Lines & Zones -> If enabled, the support & resistance zones will be expanded to both left and right infinitely. If disabled, the support & resistance zones will be clamped between the time they are first seen, and the time they become broken.
2. Support & Resistance Zones
Enable Zones -> The support & resitsance lines will be converted to zones if enabled.
Zone Width -> The width of the zones. 1 -> %0.05, 2 -> %0.06, 3 -> %0.075.
3. Timeframes
Enable & Disable up to 3 different timeframes using the checkboxes. You can set the timeframes using the selectboxes.
4. Breaks & Retests
Show Breaks -> Points the break points with a blue label with the text "B" on it.
Show Retests -> Points the times when the support & resistance zones are being retested in the current chart.
Avoid False Breaks -> If enabled, the algorithm will try to avoid false break points by comparing the average volume of the point to a longer average volume.
Break Volume Threshold % -> If "Avoid False Breaks" option is enabled, the average volume of the break point should surpass the general average volume by this percent. Higher values mean it's less likely to be a break.
Inverse Color After Broken -> As broken support & resistance zones often become resistance & support zones respectively, if you enable this option the broken zones will inverse their color.
5. Alerts
To make the alerts work, you'll need to add an alert to the chart using the TradingView® alert feature.
Enable Retest Alerts -> You will receive alerts when restests happen on any of the support & resistance zones. "Show Retests" option needs to be enabled to get alerts of this category.
Enable Break Alerts -> You will receive alerts when breaks happen on any of the support & resistance zones.
Opening/Closing Highs and LowsDescription:
This indicator tracks the daily, monthly, and yearly opening, closing, highs, and lows in the stock market. It's designed to display crucial price points within different time frames, aiding traders in assessing significant market movements.
Features:
Daily View: Shows the opening, closing, highest, and lowest prices within each trading day.
Monthly Overview: Highlights the monthly opening, closing, highs, and lows to offer insights into broader market trends.
Yearly Perspective: Presents the annual opening, closing, highs, and lows, aiding in long-term market analysis.
How to Use:
Daily Analysis: Monitor daily fluctuations and spot intraday trends by observing the daily opening/closing ranges.
Monthly Trends: Identify monthly patterns by reviewing the monthly opening/closing levels.
Yearly Insights: Gain a broader perspective on yearly market movements by analyzing the annual highs and lows
Peak & Valley Levels [AlgoAlpha]The Peak & Valley Levels indicator is a sophisticated script designed to pinpoint key support and resistance levels in the market. By utilizing candle length and direction, it accurately identifies potential reversal points, offering traders valuable insights for their strategies.
Core Components:
Peak and Valley Detection: The script recognizes peaks and valleys in price action. Peaks (potential resistance levels) are identified when a candle is longer than the previous one, changes direction, and closes lower, especially on lower volume. Valleys (potential support levels) are detected under similar conditions but with the candle closing higher.
Color-Coded Visualization:
Red lines mark resistance levels, signifying peaks in the price action.
Green lines indicate support levels, representing valleys.
Dynamic Level Adjustment: The script adapts these levels based on ongoing market movements, enhancing their relevance and accuracy.
Rejection Functions:
Bullish Rejection: Determines if a candlestick pattern rejects a level as potential support.
Bearish Rejection: Identifies if a pattern rejects a level as possible resistance.
Usage and Strategy Integration:
Visual Aid for Support and Resistance: The indicator is invaluable for visualizing key market levels where price reversals may occur.
Entry and Exit Points: Traders can use the identified support and resistance levels to fine-tune entry and exit points in their trading strategies.
Trend Reversal Signals: The detection of peaks and valleys serves as an early indicator of potential trend reversals.
Application in Trading:
Versatile for Various Trading Styles: This indicator can be applied across different trading styles, including swing trading, scalping, or trend-following approaches.
Complementary Tool: For best results, it should be used alongside other technical analysis tools to confirm trading signals and strategies.
Customization and Adaptability: Traders are encouraged to experiment with different settings and timeframes to tailor the indicator to their specific trading needs and market conditions.
In summary, the Peak & Valley Levels by AlgoAlpha is a dynamic and adaptable tool that enhances a trader’s ability to identify crucial market levels. Its integration of candlestick analysis with dynamic level adjustment offers a robust method for spotting potential reversal points, making it a valuable addition to any trader's toolkit.
Adaptive MFT Extremum Pivots [Elysian_Mind]Adaptive MFT Extremum Pivots
Overview:
The Adaptive MFT Extremum Pivots indicator, developed by Elysian_Mind, is a powerful Pine Script tool that dynamically displays key market levels, including Monthly Highs/Lows, Weekly Extremums, Pivot Points, and dynamic Resistances/Supports. The term "dynamic" emphasizes the adaptive nature of the calculated levels, ensuring they reflect real-time market conditions. I thank Zandalin for the excellent table design.
---
Chart Explanation:
The table, a visual output of the script, is conveniently positioned in the bottom right corner of the screen, showcasing the indicator's dynamic results. The configuration block, elucidated in the documentation, empowers users to customize the display position. The default placement is at the bottom right, exemplified in the accompanying chart.
The deliberate design ensures that the table does not obscure the candlesticks, with traders commonly situating it outside the candle area. However, the flexibility exists to overlay the table onto the candles. Thanks to transparent cells, the underlying chart remains visible even with the table displayed atop.
In the initial column of the table, users will find labels for the monthly high and low, accompanied by their respective numerical values. The default precision for these values is set at #.###, yet this can be adjusted within the configuration block to suit markets with varying degrees of volatility.
Mirroring this layout, the last column of the table presents the weekly high and low data. This arrangement is part of the upper half of the table. Transitioning to the lower half, users encounter the resistance levels in the first column and the support levels in the last column.
At the center of the table, prominently displayed, is the monthly pivot point. For a comprehensive understanding of the calculations governing these values, users can refer to the documentation. Importantly, users retain the freedom to modify these mathematical calculations, with the table seamlessly updating to reflect any adjustments made.
Noteworthy is the table's persistence; it continues to display reliably even if users choose to customize the mathematical calculations, providing a consistent and adaptable tool for informed decision-making in trading.
This detailed breakdown offers traders a clear guide to interpreting the information presented by the table, ensuring optimal use and understanding of the Adaptive MFT Extremum Pivots indicator.
---
Usage:
Table Layout:
The table is a crucial component of this indicator, providing a structured representation of various market levels. Color-coded cells enhance readability, with blue indicating key levels and a semi-transparent background to maintain chart visibility.
1. Utilizing a Table for Enhanced Visibility:
In presenting this wealth of information, the indicator employs a table format beneath the chart. The use of a table is deliberate and offers several advantages:
2. Structured Organization:
The table organizes the diverse data into a structured format, enhancing clarity and making it easier for traders to locate specific information.
3. Concise Presentation:
A table allows for the concise presentation of multiple data points without cluttering the main chart. Traders can quickly reference key levels without distraction.
4. Dynamic Visibility:
As the market dynamically evolves, the table seamlessly updates in real-time, ensuring that the most relevant information is readily visible without obstructing the candlestick chart.
5. Color Coding for Readability:
Color-coded cells in the table not only add visual appeal but also serve a functional purpose by improving readability. Key levels are easily distinguishable, contributing to efficient analysis.
Data Values:
Numerical values for each level are displayed in their respective cells, with precision defined by the iPrecision configuration parameter.
Configuration:
// User configuration: You can modify this part without code understanding
// Table location configuration
// Position: Table
const string iPosition = position.bottom_right
// Width: Table borders
const int iBorderWidth = 1
// Color configuration
// Color: Borders
const color iBorderColor = color.new(color.white, 75)
// Color: Table background
const color iTableColor = color.new(#2B2A29, 25)
// Color: Title cell background
const color iTitleCellColor = color.new(#171F54, 0)
// Color: Characters
const color iCharColor = color.white
// Color: Data cell background
const color iDataCellColor = color.new(#25456E, 0)
// Precision: Numerical data
const int iPrecision = 3
// End of configuration
The code includes a configuration block where users can customize the following parameters:
Precision of Numerical Table Data (iPrecision):
// Precision: Numerical data
const int iPrecision = 3
This parameter (iPrecision) sets the precision of the numerical values displayed in the table. The default value is 3, displaying numbers in #.### format.
Position of the Table (iPosition):
// Position: Table
const string iPosition = position.bottom_right
This parameter (iPosition) sets the position of the table on the chart. The default is position.bottom_right.
Color preferences
Table borders (iBorderColor):
// Color: Borders
const color iBorderColor = color.new(color.white, 75)
This parameters (iBorderColor) sets the color of the borders everywhere within the window.
Table Background (iTableColor):
// Color: Table background
const color iTableColor = color.new(#2B2A29, 25)
This is the background color of the table. If you've got cells without custom background color, this color will be their background.
Title Cell Background (iTitleCellColor):
// Color: Title cell background
const color iTitleCellColor = color.new(#171F54, 0)
This is the background color the title cells. You can set the background of data cells and text color elsewhere.
Text (iCharColor):
// Color: Characters
const color iCharColor = color.white
This is the color of the text - titles and data - within the table window. If you change any of the background colors, you might want to change this parameter to ensure visibility.
Data Cell Background: (iDataCellColor):
// Color: Data cell background
const color iDataCellColor = color.new(#25456E, 0)
The data cells have a background color to differ from title cells. You can configure this is a different parameter (iDataColor). You might even set the same color for data as for the titles if you will.
---
Mathematical Background:
Monthly and Weekly Extremums:
The indicator calculates the High (H) and Low (L) of the previous month and week, ensuring accurate representation of these key levels.
Standard Monthly Pivot Point:
The standard pivot point is determined based on the previous month's data using the formula:
PivotPoint = (PrevMonthHigh + PrevMonthLow + Close ) / 3
Monthly Pivot Points (R1, R2, R3, S1, S2, S3):
Additional pivot points are calculated for Resistances (R) and Supports (S) using the monthly data:
R1 = 2 * PivotPoint - PrevMonthLow
S1 = 2 * PivotPoint - PrevMonthHigh
R2 = PivotPoint + (PrevMonthHigh - PrevMonthLow)
S2 = PivotPoint - (PrevMonthHigh - PrevMonthLow)
R3 = PrevMonthHigh + 2 * (PivotPoint - PrevMonthLow)
S3 = PrevMonthLow - 2 * (PrevMonthHigh - PivotPoint)
---
Code Explanation and Interpretation:
The table displayed beneath the chart provides the following information:
Monthly Extremums:
(H) High of the previous month
(L) Low of the previous month
// Function to get the high and low of the previous month
getPrevMonthHighLow() =>
var float prevMonthHigh = na
var float prevMonthLow = na
monthChanged = month(time) != month(time )
if (monthChanged)
prevMonthHigh := high
prevMonthLow := low
Weekly Extremums:
(H) High of the previous week
(L) Low of the previous week
// Function to get the high and low of the previous week
getPrevWeekHighLow() =>
var float prevWeekHigh = na
var float prevWeekLow = na
weekChanged = weekofyear(time) != weekofyear(time )
if (weekChanged)
prevWeekHigh := high
prevWeekLow := low
Monthly Pivots:
Pivot: Standard pivot point based on the previous month's data
// Function to calculate the standard pivot point based on the previous month's data
getStandardPivotPoint() =>
= getPrevMonthHighLow()
pivotPoint = (prevMonthHigh + prevMonthLow + close ) / 3
Resistances:
R3, R2, R1: Monthly resistance levels
// Function to calculate additional pivot points based on the monthly data
getMonthlyPivotPoints() =>
= getPrevMonthHighLow()
pivotPoint = (prevMonthHigh + prevMonthLow + close ) / 3
r1 = (2 * pivotPoint) - prevMonthLow
s1 = (2 * pivotPoint) - prevMonthHigh
r2 = pivotPoint + (prevMonthHigh - prevMonthLow)
s2 = pivotPoint - (prevMonthHigh - prevMonthLow)
r3 = prevMonthHigh + 2 * (pivotPoint - prevMonthLow)
s3 = prevMonthLow - 2 * (prevMonthHigh - pivotPoint)
Initializing and Populating the Table:
The myTable variable initializes the table with a blue background, and subsequent table.cell functions populate the table with headers and data.
// Initialize the table with adjusted bgcolor
var myTable = table.new(position = iPosition, columns = 5, rows = 10, bgcolor = color.new(color.blue, 90), border_width = 1, border_color = color.new(color.blue, 70))
Dynamic Data Population:
Data is dynamically populated in the table using the calculated values for Monthly Extremums, Weekly Extremums, Monthly Pivot Points, Resistances, and Supports.
// Add rows dynamically with data
= getPrevMonthHighLow()
= getPrevWeekHighLow()
= getMonthlyPivotPoints()
---
Conclusion:
The Adaptive MFT Extremum Pivots indicator offers traders a detailed and clear representation of critical market levels, empowering them to make informed decisions. However, users should carefully analyze the market and consider their individual risk tolerance before making any trading decisions. The indicator's disclaimer emphasizes that it is not investment advice, and the author and script provider are not responsible for any financial losses incurred.
---
Disclaimer:
This indicator is not investment advice. Trading decisions should be made based on a careful analysis of the market and individual risk tolerance. The author and script provider are not responsible for any financial losses incurred.
Kind regards,
Ely
Targets For Many Indicators [LuxAlgo]The Targets For Many Indicators is a useful utility tool able to display targets for many built-in indicators as well as external indicators. Targets can be set for specific user-set conditions between two series of values, with the script being able to display targets for two different user-set conditions.
Alerts are included for the occurrence of a new target as well as for reached targets.
🔶 USAGE
Targets can help users determine the price limit where the price might start deviating from an indication given by one or multiple indicators. In the context of trading, targets can help secure profits/reduce losses of a trade, as such this tool can be useful to evaluate/determine user take profits/stop losses.
Due to these essentially being horizontal levels, they can also serve as potential support/resistances, with breakouts potentially confirming new trends.
In the above example, we set targets 3 ATR's away from the closing price when the price crosses over the script built-in SuperTrend indicator using ATR period 10 and factor 3. Using "Long Position Target" allows setting a target above the price, disabling this setting will place targets below the price.
Users might be interested in obtaining new targets once one is reached, this can be done by enabling "New Target When Reached" in the target logic setting section, resulting in more frequent targets.
Lastly, users can restrict new target creation until current ones are reached. This can result in fewer and longer-term targets, with a higher reach rate.
🔹 Dashboard
A dashboard is displayed on the top right of the chart, displaying the amount, reach rate of targets 1/2, and total amount.
This dashboard can be useful to evaluate the selected target distances relative to the selected conditions, with a higher reach rate suggesting the distance of the targets from the price allows them to be reached.
🔶 DETAILS
🔹 Indicators
Besides 'External' sources, each source can be set at 1 of the following Build-In Indicators :
ACCDIST : Accumulation/distribution index
ATR : Average True Range
BB (Middle, Upper or Lower): Bollinger Bands
CCI : Commodity Channel Index
CMO : Chande Momentum Oscillator
COG : Center Of Gravity
DC (High, Mid or Low): Donchian Channels
DEMA : Double Exponential Moving Average
EMA : Exponentially weighted Moving Average
HMA : Hull Moving Average
III : Intraday Intensity Index
KC (Middle, Upper or Lower): Keltner Channels
LINREG : Linear regression curve
MACD (macd, signal or histogram): Moving Average Convergence/Divergence
MEDIAN : median of the series
MFI : Money Flow Index
MODE : the mode of the series
MOM : Momentum
NVI : Negative Volume Index
OBV : On Balance Volume
PVI : Positive Volume Index
PVT : Price-Volume Trend
RMA : Relative Moving Average
ROC : Rate Of Change
RSI : Relative Strength Index
SMA : Simple Moving Average
STOCH : Stochastic
Supertrend
TEMA : Triple EMA or Triple Exponential Moving Average
VWAP : Volume Weighted Average Price
VWMA : Volume-Weighted Moving Average
WAD : Williams Accumulation/Distribution
WMA : Weighted Moving Average
WVAD : Williams Variable Accumulation/Distribution
%R : Williams %R
Each indicator is provided with a link to the Reference Manual or to the Build-In Indicators page.
The latter contains more information about each indicator.
Note that when "Show Source Values" is enabled, only values that can be logically found around the price will be shown. For example, Supertrend , SMA , EMA , BB , ... will be made visible. Values like RSI , OBV , %R , ... will not be visible since they will deviate too much from the price.
🔹 Interaction with settings
This publication contains input fields, where you can enter the necessary inputs per indicator.
Some indicators need only 1 value, others 2 or 3.
When several input values are needed, you need to separate them with a comma.
You can use 0 to 4 spaces between without a problem. Even an extra comma doesn't give issues.
The red colored help text will guide you further along (Only when Target is enabled)
Some examples that work without issues:
Some examples that work with issues:
As mentioned, the errors won't be visible when the concerning target is disabled
🔶 SETTINGS
Show Target Labels: Display target labels on the chart.
Candle Coloring: Apply candle coloring based on the most recent active target.
Target 1 and Target 2 use the same settings below:
Enable Target: Display the targets on the chart.
Long Position Target: Display targets above the price a user selected condition is true. If disabled will display the targets below the price.
New Target Condition: Conditional operator used to compare "Source A" and "Source B", options include CrossOver, CrossUnder, Cross, and Equal.
🔹 Sources
Source A: Source A input series, can be an indicator or external source.
External: External source if 'External" is selected in "Source A".
Settings: Settings of the selected indicator in "Source A", entered settings of indicators requiring multiple ones must be comma separated, for example, "10, 3".
Source B: Source B input series, can be an indicator or external source.
External: External source if 'External" is selected in "Source B".
Settings: Settings of the selected indicator in "Source B", entered settings of indicators requiring multiple ones must be comma separated, for example, "10, 3".
Source B Value: User-defined numerical value if "value" is selected in "Source B".
Show Source Values: Display "Source A" and "Source B" on the chart.
🔹 Logic
Wait Until Reached: When enabled will not create a new target until an existing one is reached.
New Target When Reached: Will create a new target when an existing one is reached.
Evaluate Wicks: Will use high/low prices to determine if a target is reached. Unselecting this setting will use the closing price.
Target Distance From Price: Controls the distance of a target from the price. Can be determined in currencies/points, percentages, ATR multiples, ticks, or using multiple of external values.
External Distance Value: External distance value when "External Value" is selected in "Target Distance From Price".
Anchored Chandelier ExitThe Chandelier Exit is a popular tool among traders used to help determine appropriate stop loss levels. Originally developed by Chuck LeBeau, the Chandelier Exit takes into account market volatility and adjusts the stop loss level dynamically. This indicator builds upon the original Chandelier Exit by allowing the trader to select an anchor date or starting point for the indicator to begin calculating from.
The Original Chandelier Exit
Before we get into the details of the Anchored Chandelier Exit, let's review the original. Essentially a dynamic ATR stop loss, the Chandelier Exit provides a trailing stop that moves higher or lower based on volatility.
The Chandelier Exit is calculated based on the following criteria:
🔶ATR - The ATR is used to measure the volatility of a security over a lookback period. The ATR length determines the number of bars to consider when calculating the average true range. The shorter the length, the more responsive the level will be.
🔶ATR Multiplier - The default multiplier is set to 3. This is used to determine the sensitivity of the Chandelier Exit. The higher the ATR multiplier the wider the stop levels will be. A lower multiplier will tighten stop levels.
🔶Highest / Lowest Points - Determine the highest high (bullish trade) or lowest low (bearish trade) during the lookback period. The default length is 22 bars.
Calculating the Chandelier Exit
Bullish trades - Highest High - ATR * Multiplier
Bearish trades - Lowest Low + ATR * Multiplier
The Anchored Chandelier Exit
The Anchored Chandelier Exit is a new twist on the original, allowing traders to adapt their stop loss levels based on specific market events, levels or bars.
Similar to the original, traders can select the ATR length and multiplier, however, the high or low from which the ATR is subtracted or added is first determined at the anchor bar.
As new bars form, the indicator checks for the previous high/low to be breached. If the high or low is exceeded, the highest/lowest point is updated and the Chandelier Exit is recalculated.
When the indicator is first loaded to your chart, it will ask you to select an anchor bar and choose the bias for the trade.
A bullish (long) bias trade will plot the Chandelier Exit below price action, while a bearish (short) bias trade will plot the Chandelier Exit above price action.
Indicator Features
🔶Custom Start Date
🔶Bullish or Bearish Bias
🔶Selectable ATR Length & Multiplier
🔶Custom Colors
🔶Exit With Close or Wicks
🔶Exit Alerts
With careful parameter optimization, the Anchored Chandelier Exit can be a useful tool for helping traders manage risk based on market volatility.
Re-Anchoring VWAP TripleThe Triple Re-Anchoring VWAP (Volume Weighted Average Price) indicator is a tool designed for traders seeking a deeper understanding of market trends and key price levels. This indicator dynamically recalibrates VWAP calculations based on significant market pivot points, offering a unique perspective on potential support and resistance levels.
Key Features:
Dynamic Re-anchoring at All-Time Highs (ATH) : The first layer of this indicator continuously tracks the all-time high and recalibrates the VWAP from each new ATH. This VWAP line, typically acting as a dynamic resistance level, offers insights into the overbought conditions and potential reversal zones.
Adaptive Re-anchoring to Post-ATH Lows : The second component of the indicator shifts focus to the market's reaction post-ATH. It identifies the lowest low following an ATH and re-anchors the VWAP calculation from this point. This VWAP line often serves as a dynamic support level, highlighting key areas where the market finds value after a significant high.
Re-anchoring to Highs After Post-ATH Lows : The third element of this tool takes adaptation one step further by tracking the highest high achieved after the lowest low post-ATH. This VWAP line can act as either support or resistance, providing a nuanced view of the market's valuation in the recovery phase or during consolidation after a significant low.
Applications:
Trend Confirmation and Reversal Signals : By comparing the price action relative to the dynamically anchored VWAP lines, traders can gauge the strength of the trend and anticipate potential reversals.
Entry and Exit Points : By highlighting significant support and resistance areas, it assists in determining optimal entry and exit points, particularly in swing trading and mean reversion strategies.
Enhanced Market Insight : The dynamic nature of the indicator, with its shifting anchor points, offers a refined understanding of market sentiment and valuation changes over time.
Why Triple Re-Anchoring VWAP?
Traditional VWAP tools offer a linear view, often missing out on the intricacies of market fluctuations. The Triple Re-Anchoring VWAP addresses this by providing a multi-faceted view of the market, adapting not just to daily price changes but pivoting around significant market events. Whether you're a day trader, swing trader, or long-term investor, this indicator adds depth to your market analysis, enabling more informed trading decisions.
Examples:
One Setup for Life ICTGuided by ICT tutoring, I create this versatile 'One Trading Set Up For Life' indicator
This indicator shows a different way of viewing the "Highs and Lows" of Previous Sessions, drawing from the current day until 09:30 AM, the time at which the Highs and Lows of the previous day's sessions can be taken into consideration for a Reversal or for a Take profit.
Levels tested after 9.30am will be blocked so you have a good and clear view of the levels affected
Timing Session =
London: 02:00 to 05:00
New York: 9.30am to 12.30pm
Lunch: 12.30pm to 1pm
PM Session: 1.30pm to 4pm
The user has the possibility to:
- Choose to view sessions or not
- Choose to show levels from previous sessions
- Choose to show today's session levels
- Choose between 08:30 and 09:30 the starting time for the Liquidity taken
- Choose to view High and Low only from the previous day
- See both the name of the Sessions and the price of the levels
The indicator must be used as ICT shows in its concepts, the indicator takes into consideration both previous sessions and today's sessions, and the session levels can be used both for a reversal and for a possible Take Profit like the example here under
Reversal =
Possible Take Profit =
If something is not clear, comment below and I will reply as soon as possible.
WHALE SIGNAL 4H
WHALE SIGNAL 4H BASED ON VOLUME CHANGE AND MOVING AVERAGE
This script aims to highlight potential whale signals on the 4-hour timeframe by analyzing volume changes, and it provides options for customization through input parameters. Whale signals are then displayed on the chart with different colors for the last hit and the previous hits. The Detector parameter adds flexibility to consider neighboring bars in the detection process, Let's break down the key components:
1/The script defines input parameters that users can customize:
-VCH (Volume Change on 4H candle) with a default value of 3, 3 times the MA Value.
-Length_240 (Moving Average length for the last 21 bars on the 4-hour timeframe).
-Detector (a boolean parameter to enable or disable whale detection in the previous or next bar).
2/Logic Section:
The script defines a function bar(hit) to convert the bar index based on the timeframe.
It calculates the Volume Change (whale signal) by comparing the current volume with a threshold (VCH * vma).
The Detector parameter allows for flexibility in detecting whale signals in neighboring bars.
3/ Plotting Section:
The script defines a function is_whale() to check if there is a whale signal and if it occurred in the last three bars.
It uses the plot function to display whale signals on the chart with different colors and offsets.
PivottrendHi all!
This script is based on the concept of "higher highs and higher lows" and "lower highs and lower lows". Bullish/bearish trend changes when a previous pivot (low in bullish trend and high in bearish trend) is broken (or has equal value). Some settings are customizable by the user:
Timeframe
- You can choose what timeframe the pivots are found on
Left length
- The left length used for the pivots found
Right length
- The right length used for the pivots found
Show labels
- Choose if you want to display buy and sell labels
Show pivots
- Choose if you want to display the pivots found
Show MSS
- Choose if you want to display a line when price breaks a previous pivot
The "look and feel" is inspired by the script "SuperTrend" by KivancOzbilgic ().
Best of trading luck!
VIX based LevelsSupport and resistance levels for the day based on the volatility index.
Major - The Major support line where the day low, high or close can occur at that level
Minor - The second level of the Support/Resistance line , where we can expect some rejections or breakouts/breakdowns
Mild - The mid level between the Major and minor levels. The market may consolidate around that area.
The script will automatically get the previous day close value of the current scrip and the India vix.
India vix is calculated based on the annual percentage and hence the previous day close value of the scrip is divided by 19.1 ( square root of 365 )
The PDC values can be manually overridden for backtesting purposes.
Please note, there will be some slippages involved on the trend lines.
Immediate rebalanceGuided by the new ICT tutoring, I create this versatile Immediate Rebalance indicator
This indicator shows a different way on how to view the "Spikes or Shadows", based on the direction of the price this indicator divides the "Spike or Shadows" into levels 0.5 - 0.75 - 0.25 Fibonacci, giving the possibility to view the levels both in normal or in pre-Macro times
The user has the possibility to:
- Choose to have Spike levels shown in MultiTimeframe
- Choose to show Sike levels only Bullish or only Bearish
- Choose to show Sike levels only in pre-Macro/Macro times
- Choose to view the maximum amount of levels with Max Show
The indicator must be used as ICT shows in its concepts, the indicator takes into consideration the last 2 candles already closed so on the candle that is forming it is possible to expect reactions on the levels it marks, below is an example of how to use it in MultiTimeframe
Below I show an example on how to set the indicator to see Immediate Rebalance in Macro times
Below is an example of when not to take the indicator into consideration
OHLC BreakThis indicator shows the Support and Resistance zones in a different way with Boxes that extend to the right and show the candle that has broken a minimum number of High or Low
The user has the possibility to:
- Choose to show High or Low levels not yet broken
- Shows candles that have broken a total of high or Low that you pre-set
- Choose to show a Box on candles that have broken the minimum of the preset levels
- Choose to show the total of broken levels with a Label on the candle
The indicator should be used as OHLC shows in its concepts, it can also be implemented to your Support and Resistance strategies, it can be implemented to Sessions strategies as in the Example
Below I show various examples on how to set the indicator for show High or Low levels not yet broken
If something is not clear, comment below and I will reply as soon as possible.
Custom Price Levels and AveragesThe "Custom Price Levels and Averages" indicator is a versatile tool designed for TradingView. It dynamically calculates and displays key price levels based on user-defined parameters such as distance percentages and position size. The indicator plots three ascending and descending price levels (A, B, C, X, Y, Z) around the last candle close on a specified timeframe. Additionally, it provides the average price for both upward and downward movements, considering the user's specified position size and increase factor. Traders can easily customize the visual appearance by adjusting colors for each plotted line. This indicator assists in identifying potential support and resistance levels and understanding the average price movements within a specified trading context.
Avoid SL hunting by acumulating your position with scaled orders.
Input Parameters:
inputTimeframe: Allows the user to select a specific timeframe (default: "D" for daily).
distancePercentageUp: Determines the percentage increase for ascending price levels (default: 1.5%).
distancePercentageDown: Determines the percentage decrease for descending price levels (default: 1.5%).
position: Specifies the position size in USD for calculating average prices (default: $100).
increaseFactor: Adjusts the increase in position size for each subsequent level (default: 1.5).
calcAvgPrice Function:
Parameters:
priceA, priceB, priceC: Ascending price levels.
priceX, priceY, priceZ: Descending price levels.
position: User-defined position size.
increaseFactor: User-defined increase factor.
Calculation:
Calculates the weighted average price for ascending (priceA, priceB, priceC) and descending (priceX, priceY, priceZ) levels.
Utilizes the specified position size and increase factor to determine the weighted average.
Plotting:
Price Calculations:
priceA, priceB, priceC: Derived by applying percentage increases to the last candle's close.
priceX, priceY, priceZ: Derived by applying percentage decreases to the last candle's close.
avgPriceUp, avgPriceDown: Computed using the calcAvgPrice function for ascending and descending levels, respectively.
Plotting Colors:
User-customizable through input parameters (colorPriceA, colorPriceB, colorPriceC, colorAvgPriceUp, colorPriceX, colorPriceY, colorPriceZ, colorAvgPriceDown).
Styling:
All lines are plotted with minimal thickness (linewidth=1) for a clean visualization.
Overall, the indicator empowers traders to analyze potential support and resistance levels and understand average price movements based on their specified parameters. The flexibility of color customization adds a layer of personalization to suit individual preferences.
Option Buying Pivot and SMA 3 Pivot crossoverThis script is designed as a visual aid for options trading specifically for option buying, providing information about potential entry points, Option levels, and trade outcomes. Here's a summary of the key elements:
1. Pivot Point and True Range:*
- The script calculates the current candle's pivot point, representing an average of high, low, and close prices from the previous candle.
- True range, a measure of volatility, is determined using the high, low, and close prices of the last two candles.
2. Option Levels:
- Downside (PutValue - Red colour line) and upside (CallValue - Green Colour line) are calculated based on the current pivot point and true range.
PutValue = currentCandlePivot + currentCandleTrueRange
CallValue = currentCandlePivot - currentCandleTrueRange
3. Simple Moving Average (SMA) of Pivot Point:
- A 3-period SMA is applied to the pivot point to smooth out fluctuations.
4. Trade Entry Logic:
- Long entry is signalled when the current pivot point is above the SMA. (longEntry = currentCandlePivot > smaPivot)
- At the time of long entry BUY THE CALL OPTION OR SELL THE PUT OPTION near the CallValue Green line
- Short entry is signalled when the current pivot point is below the SMA. (shortEntry = currentCandlePivot < smaPivot)
- At the time of Short entry BUY THE PUT OPTION OR SELL THE CALL OPTION near the PutValue Red line
The indicator having option to change the background of the candle as a green for long; and change the background of the candle as red for short. Also, Having the option to plot as label.
5. Win and Loss Logic:
- Winning conditions are assessed based on the close price relative to CallValue (for Long) and PutValue (for Short).
- Losing conditions are determined similarly.
- winLong = close > CallValue and longEntry
- winShort = close < PutValue and shortEntry
-lossLong = close < CallValue and longEntry
-lossShort = close > PutValue and shortEntry
The indicator having option to change the background of the candle as a green for win; and change the background of the candle as red for loss. Also, Having the option to plot as label.
6. Background Coloring and Plots:
- The script uses background colors to highlight Long, Short, Win, and Loss scenarios.
- Shapes and labels are plotted on the chart to visually represent entry points, stop-loss levels, and trade outcomes.
The overall purpose is to provide traders with a clear visual representation of potential trading opportunities and outcomes, helping them make informed decisions in the options market.