Fan Projections [theEccentricTrader]█ OVERVIEW
This indicator automatically projects trendlines in the shape of a fan, from a single point of origin. In the example above I have applied the indicator twice to the 1D SPXUSD. The seven upper lines (green) are projected at an angle of -5 from the 1-month swing high anchor point. And the five lower lines (blue) are projected at an angle of 10 from the 1-week swing low anchor point.
█ CONCEPTS
Green and Red Candles
• A green candle is one that closes with a high price equal to or above the price it opened.
• A red candle is one that closes with a low price that is lower than the price it opened.
Swing Highs and Swing Lows
• A swing high is a green candle or series of consecutive green candles followed by a single red candle to complete the swing and form the peak.
• A swing low is a red candle or series of consecutive red candles followed by a single green candle to complete the swing and form the trough.
Peak and Trough Prices (Basic)
• The peak price of a complete swing high is the high price of either the red candle that completes the swing high or the high price of the preceding green candle, depending on which is higher.
• The trough price of a complete swing low is the low price of either the green candle that completes the swing low or the low price of the preceding red candle, depending on which is lower.
Historic Peaks and Troughs
The current, or most recent, peak and trough occurrences are referred to as occurrence zero. Previous peak and trough occurrences are referred to as historic and ordered numerically from right to left, with the most recent historic peak and trough occurrences being occurrence one.
Support and Resistance
• Support refers to a price level where the demand for an asset is strong enough to prevent the price from falling further.
• Resistance refers to a price level where the supply of an asset is strong enough to prevent the price from rising further.
Support and resistance levels are important because they can help traders identify where the price of an asset might pause or reverse its direction, offering potential entry and exit points. For example, a trader might look to buy an asset when it approaches a support level , with the expectation that the price will bounce back up. Alternatively, a trader might look to sell an asset when it approaches a resistance level , with the expectation that the price will drop back down.
It's important to note that support and resistance levels are not always relevant, and the price of an asset can also break through these levels and continue moving in the same direction.
Trendlines
Trendlines are straight lines that are drawn between two or more points on a price chart. These lines are used as dynamic support and resistance levels for making strategic decisions and predictions about future price movements. For example traders will look for price movements along, and reactions to, trendlines in the form of rejections or breakouts/downs.
█ FEATURES
Inputs
• Anchor Point Type
• Swing High/Low Occurrence
• HTF Resolution
• Highest High/Lowest Low Lookback
• Angle Degree
• Number Lines
• Line Color
Anchor Point Types
• Swing High
• Swing Low
• Swing High (HTF)
• Swing Low (HTF)
• Highest High
• Lowest Low
• Intraday Highest High (intraday charts only)
• Intraday Lowest Low (intraday charts only)
Swing High/Swing Low Occurrence
This input is used to determine which historic peak or trough to reference for swing high or swing low anchor point types.
HTF Resolution
This input is used to determine which higher timeframe to reference for swing high (HTF) or swing low (HTF) anchor point types.
Highest High/Lowest Low Lookback
This input is used to determine the lookback length for highest high or lowest low anchor point types.
Intraday Highest High/Lowest Low Lookback
When using intraday highest high or lowest low anchor point types, the lookback length is calculated automatically based on number of bars since the daily candle opened.
Angle Degree
This input is used to determine the angle of the trendlines. The output is expressed in terms of point or pips, depending on the symbol type, which is then passed through the built in math.todegrees() function. Positive numbers will project the lines upwards while negative numbers will project the lines downwards. Depending on the market and timeframe, the impact input values will have on the visible gaps between the lines will vary greatly. For example, an input of 10 will have a far greater impact on the gaps between the lines when viewed from the 1-minute timeframe than it would on the 1-day timeframe. The input is a float and as such the value passed through can go into as many decimal places as the user requires.
It is also worth mentioning that as more lines are added the gaps between the lines, that are closest to the anchor point, will get tighter as they make their way up the y-axis. Although the gaps between the lines will stay constant at the x2 plot, i.e. a distance of 10 points between them, they will gradually get tighter and tighter at the point of origin as the slope of the lines get steeper.
Number Lines
This input is used to determine the number of lines to be drawn on the chart, maximum is 500.
█ LIMITATIONS
All green and red candle calculations are based on differences between open and close prices, as such I have made no attempt to account for green candles that gap lower and close below the close price of the preceding candle, or red candles that gap higher and close above the close price of the preceding candle. This may cause some unexpected behaviour on some markets and timeframes. I can only recommend using 24-hour markets, if and where possible, as there are far fewer gaps and, generally, more data to work with.
If the lines do not draw or you see a study error saying that the script references too many candles in history, this is most likely because the higher timeframe anchor point is not present on the current timeframe. This problem usually occurs when referencing a higher timeframe, such as the 1-month, from a much lower timeframe, such as the 1-minute. How far you can lookback for higher timeframe anchor points on the current timeframe will also be limited by your Trading View subscription plan. Premium users get 20,000 candles worth of data, pro+ and pro users get 10,000, and basic users get 5,000.
█ RAMBLINGS
It is my current thesis that the indicator will work best when used in conjunction with my Wavemeter indicator, which can be used to set the angle. For example, the average wave height or amplitude could be used as the value for the angle input. Or some factor or multiple of such an average. I think this makes sense as it allows for objectivity when applying the indicator across different markets and timeframes with different energies and vibrations.
“If you want to find the secrets of the universe, think in terms of energy, frequency and vibration.”
― Nikola Tesla
ピボットポイントと水準
Fibonacci Ratios HTF [theEccentricTrader]█ OVERVIEW
This indicator automatically draws higher timeframe Fibonacci levels from current peak to current trough or current trough to current peak, depending on where the current wave cycle ends. In the example above I have set the higher timeframe resolution to 1-month and applied it to a daily chart.
█ CONCEPTS
Green and Red Candles
• A green candle is one that closes with a high price equal to or above the price it opened.
• A red candle is one that closes with a low price that is lower than the price it opened.
Swing Highs and Swing Lows
• A swing high is a green candle or series of consecutive green candles followed by a single red candle to complete the swing and form the peak.
• A swing low is a red candle or series of consecutive red candles followed by a single green candle to complete the swing and form the trough.
Peak and Trough Prices (Basic)
• The peak price of a complete swing high is the high price of either the red candle that completes the swing high or the high price of the preceding green candle, depending on which is higher.
• The trough price of a complete swing low is the low price of either the green candle that completes the swing low or the low price of the preceding red candle, depending on which is lower.
Historic Peaks and Troughs
The current, or most recent, peak and trough occurrences are referred to as occurrence zero. Previous peak and trough occurrences are referred to as historic and ordered numerically from right to left, with the most recent historic peak and trough occurrences being occurrence one.
Wave Cycles
A wave cycle is here defined as a complete two-part move between a swing high and a swing low, or a swing low and a swing high. The first swing high or swing low will set the course for the sequence of wave cycles that follow; for example a chart that begins with a swing low will form its first complete wave cycle upon the formation of the first complete swing high and vice versa.
Figure 1.
Range
The range is simply the difference between the current peak and current trough prices, generally expressed in terms of points or pips.
Support and Resistance
• Support refers to a price level where the demand for an asset is strong enough to prevent the price from falling further.
• Resistance refers to a price level where the supply of an asset is strong enough to prevent the price from rising further.
Support and resistance levels are important because they can help traders identify where the price of an asset might pause or reverse its direction, offering potential entry and exit points. For example, a trader might look to buy an asset when it approaches a support level , with the expectation that the price will bounce back up. Alternatively, a trader might look to sell an asset when it approaches a resistance level , with the expectation that the price will drop back down.
It's important to note that support and resistance levels are not always relevant, and the price of an asset can also break through these levels and continue moving in the same direction.
Fibonacci Retracement and Extension Ratios
The Fibonacci sequence is a series of numbers in which each number is the sum of the two preceding numbers, starting with 0 and 1. For example 0 + 1 = 1, 1 + 1 = 2, 1 + 2 = 3, and so on. Ultimately, we could go on forever but the first few numbers in the sequence are as follows: 0 , 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144.
The extension ratios are calculated by dividing each number in the sequence by the number preceding it. For example 0/1 = 0, 1/1 = 1, 2/1 = 2, 3/2 = 1.5, 5/3 = 1.6666..., 8/5 = 1.6, 13/8 = 1.625, 21/13 = 1.6153..., 34/21 = 1.6190..., 55/34 = 1.6176..., 89/55 = 1.6181..., 144/89 = 1.6179..., and so on. The retracement ratios are calculated by inverting this process and dividing each number in the sequence by the number proceeding it. For example 0/1 = 0, 1/1 = 1, 1/2 = 0.5, 2/3 = 0.666..., 3/5 = 0.6, 5/8 = 0.625, 8/13 = 0.6153..., 13/21 = 0.6190..., 21/34 = 0.6176..., 34/55 = 0.6181..., 55/89 = 0.6179..., 89/144 = 0.6180..., and so on.
1.618 is considered to be the 'golden ratio', found in many natural phenomena such as the growth of seashells and the branching of trees. Some now speculate the universe oscillates at a frequency of 0,618 Hz, which could help to explain such phenomena, but this theory has yet to be proven.
Traders and analysts use Fibonacci retracement and extension indicators, consisting of horizontal lines representing different Fibonacci ratios, for identifying potential levels of support and resistance. Fibonacci ranges are typically drawn from left to right, with retracement levels representing ratios inside of the current range and extension levels representing ratios extended outside of the current range. If the current wave cycle ends on a swing low, the Fibonacci range is drawn from peak to trough. If the current wave cycle ends on a swing high the Fibonacci range is drawn from trough to peak.
Although there is some contention over which popular levels are and are not actually Fibonacci ratios, such as 50% and 100%, in this script I have based my retracement level calculations on the ratios of 23.6%, 38.2%, 50%, 61.8%, 78.6% and 100%. And my extension level calculations on the ratios of 161.8%, 261.8%, 361.8%, 423.6% and 461.8%.
█ FEATURES
Inputs
• HTF Resolution
• Show Fibonacci Extensions
• 00.0% Line Color
• 23.6% Line Color
• 38.2% Line Color
• 50.0% Line Color
• 61.8% Line Color
• 78.6% Line Color
• 100.0% Line Color
• 161.8% Line Color
• 261.8% Line Color
• 361.8% Line Color
• 423.6% Line Color
• 461.8% Line Color
• Extend Line Type
• Show Labels
• Label Colors
█ LIMITATIONS
All green and red candle calculations are based on differences between open and close prices, as such I have made no attempt to account for green candles that gap lower and close below the close price of the preceding candle, or red candles that gap higher and close above the close price of the preceding candle. This may cause some unexpected behaviour on some markets and timeframes. I can only recommend using 24-hour markets, if and where possible, as there are far fewer gaps and, generally, more data to work with.
Similarly, if the current timeframe is not a factor of the higher timeframe there will be occasions when the left hand offset is out by a couple of bars. This is because the calculations are ultimately based on how many lower timeframe bars there are inside a sequence of higher timeframe bars. The indicator will also behave unexpectedly if the higher timeframe resolution is lower than the current timeframe, but that should be expected.
If the lines do not draw or you see a study error saying that the script references too many candles in history, this is most likely because the higher timeframe anchor point is not present on the current timeframe. This problem usually occurs when referencing a higher timeframe, such as the 1-month, from a much lower timeframe, such as the 1-minute. How far you can lookback for higher timeframe anchor points on the current timeframe will also be limited by your Trading View subscription plan. Premium users get 20,000 candles worth of data, pro+ and pro users get 10,000, and basic users get 5,000.
Fibonacci Ratios [theEccentricTrader]█ OVERVIEW
This indicator automatically draws Fibonacci levels from current peak to current trough or current trough to current peak, depending on where the current wave cycle ends.
█ CONCEPTS
Green and Red Candles
• A green candle is one that closes with a high price equal to or above the price it opened.
• A red candle is one that closes with a low price that is lower than the price it opened.
Swing Highs and Swing Lows
• A swing high is a green candle or series of consecutive green candles followed by a single red candle to complete the swing and form the peak.
• A swing low is a red candle or series of consecutive red candles followed by a single green candle to complete the swing and form the trough.
Peak and Trough Prices (Basic)
• The peak price of a complete swing high is the high price of either the red candle that completes the swing high or the high price of the preceding green candle, depending on which is higher.
• The trough price of a complete swing low is the low price of either the green candle that completes the swing low or the low price of the preceding red candle, depending on which is lower.
Historic Peaks and Troughs
The current, or most recent, peak and trough occurrences are referred to as occurrence zero. Previous peak and trough occurrences are referred to as historic and ordered numerically from right to left, with the most recent historic peak and trough occurrences being occurrence one.
Wave Cycles
A wave cycle is here defined as a complete two-part move between a swing high and a swing low, or a swing low and a swing high. The first swing high or swing low will set the course for the sequence of wave cycles that follow; for example a chart that begins with a swing low will form its first complete wave cycle upon the formation of the first complete swing high and vice versa.
Figure 1.
Range
The range is simply the difference between the current peak and current trough prices, generally expressed in terms of points or pips.
Support and Resistance
• Support refers to a price level where the demand for an asset is strong enough to prevent the price from falling further.
• Resistance refers to a price level where the supply of an asset is strong enough to prevent the price from rising further.
Support and resistance levels are important because they can help traders identify where the price of an asset might pause or reverse its direction, offering potential entry and exit points. For example, a trader might look to buy an asset when it approaches a support level , with the expectation that the price will bounce back up. Alternatively, a trader might look to sell an asset when it approaches a resistance level , with the expectation that the price will drop back down.
It's important to note that support and resistance levels are not always relevant, and the price of an asset can also break through these levels and continue moving in the same direction.
Fibonacci Retracement and Extension Ratios
The Fibonacci sequence is a series of numbers in which each number is the sum of the two preceding numbers, starting with 0 and 1. For example 0 + 1 = 1, 1 + 1 = 2, 1 + 2 = 3, and so on. Ultimately, we could go on forever but the first few numbers in the sequence are as follows: 0 , 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144.
The extension ratios are calculated by dividing each number in the sequence by the number preceding it. For example 0/1 = 0, 1/1 = 1, 2/1 = 2, 3/2 = 1.5, 5/3 = 1.6666..., 8/5 = 1.6, 13/8 = 1.625, 21/13 = 1.6153..., 34/21 = 1.6190..., 55/34 = 1.6176..., 89/55 = 1.6181..., 144/89 = 1.6179..., and so on. The retracement ratios are calculated by inverting this process and dividing each number in the sequence by the number proceeding it. For example 0/1 = 0, 1/1 = 1, 1/2 = 0.5, 2/3 = 0.666..., 3/5 = 0.6, 5/8 = 0.625, 8/13 = 0.6153..., 13/21 = 0.6190..., 21/34 = 0.6176..., 34/55 = 0.6181..., 55/89 = 0.6179..., 89/144 = 0.6180..., and so on.
1.618 is considered to be the 'golden ratio', found in many natural phenomena such as the growth of seashells and the branching of trees. Some now speculate the universe oscillates at a frequency of 0,618 Hz, which could help to explain such phenomena, but this theory has yet to be proven.
Traders and analysts use Fibonacci retracement and extension indicators, consisting of horizontal lines representing different Fibonacci ratios, for identifying potential levels of support and resistance. Fibonacci ranges are typically drawn from left to right, with retracement levels representing ratios inside of the current range and extension levels representing ratios extended outside of the current range. If the current wave cycle ends on a swing low, the Fibonacci range is drawn from peak to trough. If the current wave cycle ends on a swing high the Fibonacci range is drawn from trough to peak.
Although there is some contention over which popular levels are and are not actually Fibonacci ratios, such as 50% and 100%, in this script I have based my retracement level calculations on the ratios of 23.6%, 38.2%, 50%, 61.8%, 78.6% and 100%. And my extension level calculations on the ratios of 161.8%, 261.8%, 361.8%, 423.6% and 461.8%.
█ FEATURES
Inputs
• Show Fibonacci Extensions
• 00.0% Line Color
• 23.6% Line Color
• 38.2% Line Color
• 50.0% Line Color
• 61.8% Line Color
• 78.6% Line Color
• 100.0% Line Color
• 161.8% Line Color
• 261.8% Line Color
• 361.8% Line Color
• 423.6% Line Color
• 461.8% Line Color
• Extend Line Type
• Show Labels
• Label Colors
█ LIMITATIONS
All green and red candle calculations are based on differences between open and close prices, as such I have made no attempt to account for green candles that gap lower and close below the close price of the preceding candle, or red candles that gap higher and close above the close price of the preceding candle. This may cause some unexpected behaviour on some markets and timeframes. I can only recommend using 24-hour markets, if and where possible, as there are far fewer gaps and, generally, more data to work with.
VWAP Bollinger Band Crossover Breakout with ResistanceCredit to © Jesus_Salvatierra for VWAP script
This script help you find a trend in momentum stock that is about to breakout and shows resistance point. This script utilizes Bollinger bands VWAP and is good for intra day charts.
VWAP, or Volume Weighted Average Price, is a technical analysis tool used to measure the average price a security trades at during a given time period, weighted by the trading volume for each price level. It is commonly used by traders and investors to identify the true average price of a security and to assess whether they are buying or selling at a fair price.
A Bollinger Band is a technical analysis tool that uses standard deviation to measure the volatility of a security. The Bollinger Band is typically composed of three lines: the upper band, the lower band, and the middle band. The middle band is a simple moving average of the security's price, while the upper and lower bands are calculated based on the standard deviation of the security's price.
A Bollinger Band crossover occurs when the price of a security crosses above or below one of the bands. When the price crosses above the upper band, it is considered overbought, while when it crosses below the lower band, it is considered oversold. Traders often use Bollinger Band crossovers as a signal to enter or exit a position, depending on their trading strategy.
The VWAP and Bollinger Band crossover are two separate technical analysis tools that can be used in conjunction with each other. When a security's price crosses above or below the Bollinger Band, traders may look to the VWAP to confirm whether the security is trading at a fair price. If the security is trading above the VWAP, it may be overvalued, while if it is trading below the VWAP, it may be undervalued. Similarly, traders may use the Bollinger Band crossover as a signal to enter or exit a position, while also taking into account the VWAP to assess whether the price is fair.
Smart Money Concepts Probability (Expo)█ Overview
The Smart Money Concept Probability (Expo) is an indicator developed to track the actions of institutional investors, commonly known as "smart money." This tool calculates the likelihood of smart money being actively engaged in buying or selling within the market, referred to as the "smart money order flow."
The indicator measures the probability of three key events: Change of Character ( CHoCH ), Shift in Market Structure ( SMS ), and Break of Structure ( BMS ). These probabilities are displayed as percentages alongside their respective levels, providing a straightforward and immediate understanding of the likelihood of smart money order flow.
Finally, the backtested results are shown in a table, which gives traders an understanding of the historical performance of the current order flow direction.
█ Calculations
The algorithm individually computes the likelihood of the events ( CHoCH , SMS , and BMS ). A positive score is assigned for events where the price successfully breaks through the level with the highest probability, and a negative score when the price fails to do so. By doing so, the algorithm determines the probability of each event occurring and calculates the total profitability derived from all the events.
█ Example
In this case, we have an 85% probability that the price will break above the upper range and make a new Break Of Structure and only a 16.36% probability that the price will break below the lower range and make a Change Of Character.
█ Settings
The Structure Period sets the pivot period to use when calculating the market structure.
The Structure Response sets how responsive the market structure should be. A low value returns a more responsive structure. A high value returns a less responsive structure.
█ How to use
This indicator is a perfect tool for anyone that wants to understand the probability of a Change of Character ( CHoCH ), Shift in Market Structure ( SMS ), and Break of Structure ( BMS )
The insights provided by this tool help traders gain an understanding of the smart money order flow direction, which can be used to determine the market trend.
█ Any Alert function call
An alert is sent when the price breaks the upper or lower range, and you can select what should be included in the alert. You can enable the following options:
Ticker ID
Timeframe
Probability percentage
-----------------
Disclaimer
The information contained in my Scripts/Indicators/Ideas/Algos/Systems does not constitute financial advice or a solicitation to buy or sell any securities of any type. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
My Scripts/Indicators/Ideas/Algos/Systems are only for educational purposes!
CPR Weekly Variable Weekday SellerGood afternoon traders,
This is a script I built for option selling, in attempt to have a high success rate. This is pretty much the same as my other one titled "CPR Option Selling Strategy." The difference is this one is strictly for Weeklies, with a variable weekday to expiry. I've had many requests to have a weekly that would end on Thursday, so here it is. Just select the date for expiry of the option, then it will calculate a "weekly" option set, using the the same set up as the traditional M-F weekly CPR information, except for offset for the weekday in question.
So for expiry dates for options on Thursday, you would choose "Thursday" in the parameters and it will calculate using Fri through Thu data for the pivot timeframes.
The rest is like this...
The gist of how it works:
It uses the opening or close of the current chart's timeframe opening bar when referenced against a "weekly" timeframe determined by the week ending weekday chosen for the central pivot range ( CPR ).
Using that comparison, this script calculates an option to sell: put, call, or iron condor. It will calculate a call value using an average of the CPR central pivot and the max value of the prior higher timeframe's high or R1 (whichever is higher.)
It does the same for the put side, but uses the higher timeframe's low or S1 (whichever is lower.)
It will use the option on the other side of the source (open or close) of the CPR as the "option in play."
Settings:
There are many settings, most are simply "viewable" settings, and probably self explanatory, others, not so much:
"Source for Trigger" - this is the value used on the "opening bar," such as the close. This value is the one compared to the Central Pivot Range in determining whether to sell a call (if the source is lower,) sell a put (if the source is higher,) or an iron condor if it's in the CPR .
"Show Historical Win/Loss Percentages" - this shows a table in the bottom right of the W/L percentages for the current ticker and settings. Used for a quick glance at historical success rates.
Example use (OLD EXAMPLE):
An example use (which I completed last week) on the chart referenced in this share: I sold a put-spread for $0.90, selling a 590 and buying a 570 strike in the middle of the week. I was looking at an hourly timeframe chart with a weekly pivot timeframe for the strategy.
Obviously, making only $0.90 on a $20 spread, there is a lot more to lose than to make, but I did some other analysis to go with it, so I felt safe, and I had a stop set for $1.50. So it worked, along with 3 other plays I did, very similar, and if that "Historical Win/Loss Percentage" is accurate, which I am fairly certain it is, I felt good about it.
The key all comes down to what you sell it for, right? That piece only you can determine. :)
Happy trading and enjoy,
Deuce
Balance Zone ExtensionBalance zones are an aspect of trading that many traders notice. Balance Zones are formed when a market is in equilibrium and respects a certain high and low multiple times. These zones could also be called accumulation or distribution areas depending on the price action. If the term "choppy" is used to describe a given markets price action, it is probably a fair statement to say that the market is currently in a Balance Zone.
This script is a take on vwaptrader1's teachings where you take a balance zone and "double it" to get a target if/when it does break out of balance. It provides an automated way of extending levels based on a given balance range.
The lines plotted by the script are calculated based off of the balance high/low inputs, how many sections are desired per zone, and how many boxes to plot based on the other user inputs.
Warning: Due to a current limitation of the Pine, this script is only allowed to plot up to 500 lines total. If you start to notice lines starting to disappear or you begin getting a script error, double check the input settings as the script may have crossed the 500 line threshold.
This can be used in conjunction with Fixed Range Volume Profile . Select the balance range with the Fixed Volume Profile . Note the Value Area High and Value Area Low prices and input those into the balance range High/Low inputs.
Use to create price targets from Balance Zone Breakouts
A recent example of this idea in action on ticker ES1! 2 hour chart where the balance range was found and the target (double the box size of the balance range) was hit.
Another example of this same concept but on a normal security like AAPL but on a 30 minute chart:
Extending the usefulness even further to crypto on BTCUSD with a 5 minute chart:
Use to create reference levels for future price action
The other way to utilize this is to provide future reference levels from a key balance range from the past.
Here is another example utilizing the AMD daily chart . First, a balance zone was noted for all of 2017:
Moving forward to the most recent price action in 2023, notice that the box extension levels are still fairly well respected almost 6 years later!
Three-Day Rolling PivotThe three-day rolling pivot is another pivot concept,
which may be used by intermediate positions, for several days or even weeks.
It can be utilized in many ways, such as to determine an entry point or trailing stop.
As the name suggests, this pivot is based on the last three days.
I learned this concept of the book "The logical Trader" by Mark Fisher.
Kudos go to him!
My version of the Three-Day Rolling Pivot uses actual data!
And all similar scripts I have found so far calculate future data and don't take into account the original data.
I hope this script will help some people to do some better decisions.
And I am pleased to get some advice to make this script even better!
Future data vs original data
Pine Script v5 Reference Manual:
Merge strategy for the requested data position... This merge strategy can lead to undesirable effect of getting data from "future" on calculation on history. This is unacceptable in backtesting strategies, but can be useful in indicators.
e2e4 on Stack Overflow said:
Pine v1-v2's security() function is using the lookahead parameter by default, which could be modified in v3-v5...
stackoverflow.com
I haven't found a script which put this into account jet.
I leave this option available for people that wanna more speculated data. But it's disabled by default.
Long/Short Example
You can enter Long when the market cross over the upper line (default color is green) and you should put your trailing stop 1-5 ticks below the lower line (default color is red).
The opposite when Shorting, then the market has to cross down the lower line and your trailing stop should be 1-5 ticks above the upper line.
How does this script work:
First it fetches the highest high of ...
yesterday,
the day before yesterday,
and the day before that.
After that the script looks for the highest high of all three.
Next it does the same for previous lowest low.
Last but not least, it fetches the closing price of the last day.
After that it adds all three prices together and divide them by three.
This result in a three day pivot price.
Then it adds the highest high and lowest low of the three last days and divide it by two.
This gives us the second number we need to calculate the differential.
The differential is the gap between the three day pivot price and the second number.
Sometimes the second number is bigger than the three day pivot price so I took that into account too. Other wise the colors plotted would be on the wrong site.
Finally, the script is rounding the numbers to the nearest minimum tick of that security.
Swing BoxesHey, folks!
Sorry for not posting anything for such a long time. Don't have enough ideas and resources to get inspiration, so trying to brainstorm good stuff in my free time from university studies.
But despite my absence more I now have 300+ people subscribed to me! Thanks, guys, for keeping interest for my work, as I still do value each boost on my script, for real :)
So here is new script , enjoy!
Swing Boxes is pretty simple indicator, which plots signals with "boxes", that help you determine price targets.
What is the idea behind?
I wanted to make indicator, that could help me make swing trades with nice accuracy (as all we want, lol), and for signal criteria I decided to use highs and lows of the price . Then I started coding some ideas to see which of them could be worthy. And, actually, Swing Boxes appeared to be good. But the thing is, that I didn't intend to build them, they appeared as an anomaly from my code :)
I started to explore this anomaly (it looked super cool, but was repainting hard) to fix it and I succeeded, now Swng Boxes don't repaint.
The main idea is that when price goes above it's highest value of p-bars back or below it's lowest value p-bars back, then there is a some god probability, that price will continue to follow current direction.
And the things about Swing Boxes is that when there is a good trend movement, the boxes become super small to track price movement and when price breaks out in the counter-trend direction, then you will be able to almost perfectly catch a top or a bottom! But most of the signals won't be so high-quality, so don't think that is this some holy grail to trade swing-trading, because it is not.
Signal logic
Quick hint:
- epsilon(variable e ) = ATR * ATR_Factor . It is used to determine box's sensitivity to price changes.
If previous close is higher than variable, which contains previous HIGHEST value (variable h in the code), then update the this variable by taking up-to-date highest value and add epsilon( e ) to it;
If previous close is lower than variable, which contains previous LOWEST value (variable l in the code), then update the this variable by taking up-to-date lowest value and substract epsilon( e ) from it.
Variables decribed above ( h and l ) are box's top and bottom respectively, so if price cross them, it is logical to update it is value.
Settings and what is what
Swing Box Period - numbers fo bars in the past to find highest and lowest price from. The bigger the input, the bigger the boxes will be;
ATR Period;
ATR Factor - multiplier for ATR, determines sensitivity for price changes. The bigger this input, the more accurate signals will be, but less the probability that the signal will be on the top or a bottom.
Show Boxes? - when chosen, plots box's top and bottom. Used to determine price targets.
Show Baseline? - when chosen, plot's baseline, which midline between box's top and bottom.
How to use?
This indicator plots green and red triangles by default.
- Green triangle --> Buy ;
- Red triangle --> Sell ;
As I've said before, many signals from indicator will probably be garbage, so you need to tune settings for youself, so it could satisfy you .
You can enable showing boxes to see box's top and bottom. Box's bottom --> your entry, top --> your profit target.
If you find a way to sort bad signals, you will be able to trade with super cool RR, because the signal from Swing Boxes appear to be a good one, there is almost 95% probability, that price will not even come close to your stop loss, so you can trade with super small stop-losses! Smaller stop-loss --> smaller risk --> smaller loss --> bigger profit, it is that easy.
Also you can enable baseline to use at as your 1st TP, and box's top/bottom as 2nd TP, closing 25% on TP1 and the rest on TP2 (but that is just mine recommendation, you can use different RM (risk-management), if you want).
Also you can use baseline as your S/R (Support/Resistance) line, test it out on your charts.
And please, hear me out: as all other indicators out here on the TradingView, Swing Boxes ARE NOT meant to be traded in solo! Many bad signal can go in a row, so PLEASE find your way to filter out bad signals with other indicators.
You can see here the example of a garabge-class signal in a row, so be don't be deluded!
I do hope that somebody will suggest and idea to improve this thing, as I personally don't have enough time to think about it because of my university studies, but I will probably try it make this thing better throughout the time.
And that's it for now, folks! If you have any ideas for scripts, strategies or anything else, feel free to DM me or leave a comment, I will check it.
Hope you will find this script useful.
Take your profits!
- Tarasenko Fyodor
Multi-Timeframe High Low (@JP7FX)Multi-Timeframe High Low Levels (@JP7FX)
This Price Action indicator displays high and low levels from a selected timeframe on your current chart.
These levels COULD represent areas of potential liquidity, providing key price points where traders can target entries, reversals, or continuation trades.
Key Features:
Display high and low levels from a selected timeframe.
Customize line width, colors for high and low levels, and label text color.
Enable or disable the display of high levels, low levels, and labels.
Receive alerts when the price takes out high or low levels.
How to use:
It is important to note that using this indicator on it's own is not advisable. Instead, it should be combined with other tools and analysis for a more comprehensive trading strategy.
Possibly look to use my MTF Supply and Demand Indicator to look for zones to trade from at these levels?
If the price breaks above a high level, you might consider entering a long position, with the expectation that the price will continue to rise. Conversely, if the price breaks below a low level, you may think about entering a short position, anticipating further downward movement.
On the other hand, you can also use high or low levels to look for reversal trades, as these areas can represent attractive liquidity zones.
By identifying these key price points, you could take advantage of potential market reversals and capitalise on new trading opportunities.
Always remember to use this indicator in conjunction with other technical analysis tools for the best results.
Additionally, you can enable alerts to notify you when the price takes out high or low levels, helping you stay informed about significant price movements.
This indicator could be a valuable tool for traders looking to identify key price points for potential trading opportunities.
As always with the markets, Trade Safe :)
Opening Range with FibsThe indicator uses a time range and another instrument for time reference, so that it works in the time zone you care about. I have set the default to SPX500USD since it is in EST ( SPX , ES and many futures are on Chicago time and opening range gets confused). You can change the reference instrument in the settings.
You can also change the multipliers and use other values instead of 1.272 and 1.618 for Fib extensions.
TradingView has a limit as to how many objects an indicator can create so if you want to go back further for visual backtesting - use the replay tool - it will be able to draw up to the time you selected within its limits.
Let me know if you need anything else...
Happy Trading!
RS Stage AnalysisThis script trying to detect different lifecycle of stock / Stages.
There is mainly 4 stages of stocks.
1) stage 1 - Accumulation = color = aqua
2) stage 2 - Advancing = color = green
3) stage 3 - Distribution = color = yellow
4) stage 4 - Declining = color = red
At some point the condition i wrote wont detect any stage.
9:15 AM middle price #rangeofstinoThis indicator will show the middle price of the first one-minute candle of BankNifty at 9:15 AM for every day.
Range Analysis - By LeviathanThe Interactive Range Analysis script is an essential tool for analyzing price ranges. It automatically draws important range levels, generates a Volume Profile or Open Interest profile and horizontal/vertical heatmaps, plots the anchored VWAP, draws Fibonacci levels, and much more.
How to use the indicator:
1. The script will prompt you to select the "Start Time" and "End Time" using Tradingview's interactive interface. These two points will determine the length of the range.
2. Once you have selected the range, the script will automatically anchor the range highs and lows to the highest and lowest close/wick/hlc3/ohlc4 (whichever you prefer).
3. You can then begin exploring different tools and options such as Quarters, Eighths, Fibonacci, Outer Levels, VWAP, Horizontal Volume/OI Heatmap, Vertical Volume/OI Heatmap, Fixed Range Volume Profile, Open Interest Profile, Value Area, VAH, VAL, and POC.
4. You can adjust the range by dragging the Start Time and End Time anchors or by removing/reapplying the script.
Tool overview
Range Levels
After selecting your preferred time range, the script will identify and draw a range high level and a range low level, which serve as a base for other important levels. “Half” is the level halfway between the range high and range low. “Quarters” will, as the name suggests, split the range into four equal zones (quarters) and “Eighths” will split the range into eight equal zones (eighths).
”Fibonacci” option allows you to display Fibonacci retracement levels (0.786, 0.618, 0.382, 0.236). “VWAP” will plot a Volume Weighted Average Price, anchored to the start of the range. “Direction” input lets you choose whether your range is UP or DOWN trending in order to make sure that the Fibonacci levels and labels are generated and assigned correctly. With “Outer” turned ON, the script will also generate active levels (quarters/eighths/Fibonacci) above and below the selected price range. “Extend Right” will extend all levels to the right indefinitely, while “Extend (+Bars)” lets you choose how far right the levels get extended. “Diagonal Line” is drawn from the bottom left of the range to the top right of the range or from the top left of the range to the bottom right of the range, depending on the “Direction” input.
Volume Profile / Open Interest Profile
After selecting the “Data Type”, Volume Profile or OI Profile can be generated by turning ON the “Volume/OI Profile” option.
“Resolution” input defines the amount of nodes/rows in the range that are used in profile/heatmap generation for distributing the data. While you can increase the “Resolution” to get better, more granular profiles, you should keep in mind that you might need to lower the resolution when generating profiles for larger ranges.
”Node Type” offers you two options when it comes to the representation of data: Up/Down - divides a node in two sections for up volume/OI and down volume/OI, Total - one node for total volume/OI and Delta - net difference in up volume/OI and down volume/OI.
”Profile Position” lets you choose whether the profile is positioned on the left side of the range or on the right side of the range.
“Profile Direction” determines whether the profile nodes are facing right or left.
“Profile Type” enables you to visualize the nodes in a classic way (Type 1) or in a way where down volume/negative OI are positioned on the left side of the y axis and up volume/positive OI on the right side of the y axis.
“Node Size (%)” defines how much space in the range can be taken by the profile’s nodes. Eg. 50% will allow the largest node to extend to the middle of the range (and others scaled accordingly), 100% will allow the largest node to extend the max right point of the range (and others scaled accordingly).
”Value Area (%)” defines the VA zone, which represents the area where the most volume occured (usually 70% or 68%).
”Horizontal Heatmap” will display a heatmap-like overlay, that will help you identify the price levels where most volume/open interest action occurred.
”Vertical Heatmap” will display a heatmap-like overlay, that will help you identify the points in time where most volume/open interest action occurred.
A more detailed description of this indicator is coming in the next few days.
Important:
* If volume or OI profile does not get generated, try lowering the resolution.
* Once in a while, the script will disappear from your chart. Just remove and reapply.
* Open Interest data is only avaiable on Binance Perpetual Futures pairs
To learn more, read the tooltips in the indicator’s settings and stay tuned for upcoming additions (Range Market Structure, Liquidation Levels, Range Statistics,…)
Previous Levels With Custom TimeZoneThe Previous Levels With Custom TimeZone indicator shows to users specifics price area which can be liquidity to take.
Users can determine the desired time zone to retrieve the correct daily, weekly and monthly values.
Several price area are shown with with indicator which are :
Daily Open Price
Daily Low Price
Daily High Price
Previous Daily Low Price
Previous Daily High Price
Previous Weekly Low Price
Previous Weekly High Price
Previous Monthly Low Price
Previous Monthly High Price
All price area are configurable to let user have specific color or line style for each area.
Here's some example :
Daily Open / High / Low
Previous Daily High / Low
Previous Weekly High / Low
Previous Monthly High / Low
4C Options Expected Move (Weekly + 0DTE)This indicator plots the calculated Expected Move for BOTH Weekly and Zero Dated Expiration (0DTE) Daily options, for a quick visual reference.
Please Note: This indicator is different from our original "4C Expected Move (Weekly Options)" indicator, as it now packages the ability to ALSO plot 0DTE options expected moves along with Weekly expected moves. Many other newer features have also been implemented.
Background Information
The Expected Move (EM) is the amount that a stock is predicted to increase or decrease from its current price, based on the current level of options pricing and implied volatility.
This range can be viewed as possible support and resistance, or, once price gets outside of the range, institutional hedging actions can accelerate the move in that direction.
It can be useful to know what the weekly EM range is for a stock to understand the probabilities of the overall distance, direction and volatility for the week.
About the Indicator
This indicator plots the calculated Expected Move for BOTH Weekly and Zero Dated Expiration (0DTE) options, for a quick visual reference.
For the weekly EM, the range is based on the Weekly close of the prior week.
For the Daily EM based on 0DTE options, the range is based on the Daily close of the prior day.
The indicator will automatically start a new weekly EM plot at the beginning of the week, and a new daily EM at the beginning of each day.
The EM values must be updated weekly and/or daily.
Features
Plots the EM for the week
Plots the EM for the day, for symbols that offer daily expiration options
Plots the 2 Standard Deviation EM for both the weekly and daily EM
Labels with calculated values are plotted near the levels for quick visual aid
Settings
Can toggle weekly EM on/off
Can toggle Daily EM on/off
Can toggle 2 Standard Deviation lines on/off
Can toggle labels for all EM on/off
Robust line settings
Can adjust label location left/right based on personal preference
Can enter symbol into settings as a reference
Handy instructions in the settings
How To Set Up The Indicator
To use this indicator you must have access to a broker with options data (not available on Tradingview).
Usually, you can look at the stock's option chain to find the weekly expected move.
You will have to do your own research to find where this information is displayed depending on your broker. You may also need to find the information elsewhere if your broker does not have this information.
You can also do your calculation of the EM using the following formula (please do your own research):
Expected Move = Option Price x Implied Volatility x Square Root of Time
See screenshot example below
This is the Thinkorswim platform's option chain, and the Implied Volatility % and the calculated EM are on the right side of the option chain.
The Expected Move is circled in blue. Use the +- number in parentheses, NOT the % value.
For the weekly EM, input the number that corresponds to the weekly option into the indicator. This must be done on a weekly basis, and It is typically best to use the EM for the next week expiration that is generated AFTER the Friday close and/or before the Monday open of the upcoming week.
For the daily EM, input the number that corresponds to the daily 0DTE option into the indicator. This must be done on a daily basis, and it is typically best to use the EM value for the 0DTE option that is generated the night before (after market close), or before the market opens for that 0DTE. .
Consecutive Unswept Lower Highs/ Higher Lows CounterCounts consecutive Lower Highs and Higher Lows; number resets to zero when previous pivot high or low gets swept
-To help give an idea of when a retracement / run-on-stops may be overdue. i.e. the higher the counter number grows, the longer we've gone without a proper retracement.
//inputs//
~pivot lookback/lookforward: increase this for more significant pivot highs and lows.
~number of pivot high 'counter' labels (pairs) to show in history.
~formatting options.
Daily Opening GAPPlots the daily opening gap as a box. As price moves into the box the size of the box is reduced until the gap is closed and the box no longer extends forward.
There are options to include middle lines for the center of the gap, as well as quartile lines.
While there are plenty of opening gap scripts out there none that I found tracked the closing of the gap over time.
[JL] Supertrend Zone Pivot Point with zigzag fibThis is an open-source Pine script that generates a Supertrend Zone Pivot Point with Zigzag Fib indicator for TradingView. The indicator displays the Supertrend Zone, pivot points, and Fibonacci levels on the chart.
One of the unique features of this indicator is that it uses a Zigzag that does not repaint, ensuring accurate high and low points for the pivot points.
Another feature is that when the Supertrend is in an uptrend, only the highest points are taken as pivot points, and when it's in a downtrend, only the lowest points are taken as pivot points.
The Fibonacci levels are calculated based on the previous high and low pivot points, with labels displaying the corresponding levels on the chart.
The indicator also includes options to show/hide the Zigzag and Fibonacci levels.
Overall, this indicator is useful for identifying key pivot points and Fibonacci levels in the Supertrend Zone, providing valuable information for traders to make informed decisions.
BB Mod + ForecastThis is a combination of two previous indicators; ALMA stdev band with fibs and Vector MACD.
Bollinger Band Mod fits the standard deviation on both sides of the center moving average ( ALMA +/- stdev / 2 ) and calculates Fibonacci ratios from stdev on both sides.
It is more averaging and more responsive at the same time compared to Bollinger Band.
Forecast is calculated from difference between origin ma ( ALMA from hl2 ) and six different period Hull moving averages averaged together and added to the center ma on both sides.
Fibonacci levels for 0.618 1.618 and 2.618 are added.
The dashed lines point towards the trend. Gives you a better idea of the current trend and momentum in the band.
Weekly Opening GAPThis indicator will plot the weekly opening gap on the chart. The gap will be carried forward until it is closed or the max line count is reached. Additionally the 1/4 levels inside the gap are plotted on the chart as weekly gaps can be large.
The weekly opening gap levels can act as targets and rejection points.
Optionally the script can also carry forward the top and bottom lines of the weekly opening gap for up to the 10 prior gaps. These lines are not removed when the gap is closed.
Drip's 11am rule breakout/breakdown (OG)This indicator is based on Drippy2hard's 11:30 am (EST) rule.
In simple terms the rule states that:
If a trending stock makes a new high after 11:15-11:30am EST, there is a 75% chance of closing within 1% of High of day (HOD). Same applies for downtrend.
Please note:
Not all stocks will abide by this, this is backtested on stocks with avg daily volume > 2M and mostly mega cap stocks which have liquid option chains. The backtesting results show very promising results on $SPY/ $SPX so it is advised to trade $SPY/ $SPX using this indicator over any other stocks.
Although the name suggests 11 AM rule, the backtesting shows higher win rate for 11:30 AM so please select that option in the settings.
As always, no indicator is perfect and please follow your risk management and understand that indicators are tools to aid your trading and by no means they are supposed to work as intended in all scenarios
How the script works
1. A HOD/LOD zone is identified based on regular session (9:30am-11:30am) EST. Users can select cut off time to 11AM in the settings. These will be indicated on chart after 11/11:30pm depending on what user selected
2. If the stock breaks above the HOD and the ADX is showing strong momentum to upside then the candlesticks will start showing neon color, if the trend based on moving averages and candle closing is also bullish then the indicator will show trend arrows under the candle indicating to stay in the trade. Same applies for break below LOD, only the colors will change to represent downtrend.
3. An optional cloud is also shown if the trend is developed. The cloud can be used as trail stop or re entry point as long as it is displayed on chart
How to use the indicator in trading
In general, there are three scenarios which are trade worthy
1. If the stocks breaks out above the HOD zone and up trend develops or the stocks breaks below the LOD zone and downtrend develops. See images below
2. You can also use the LOD/HOD zone as demand/ supply if the Price action is range bound like this example below
Thanks for reading, please give thumbs up if you like using it! Please post comments on how to use it.
[JL] Fractals ATR BlockI decided to combine Fractal ROC , ATR Break, and Order Blocks to an Indicator
The Fractal ROC , ATR Break, and Order Blocks indicator combines three concepts to help traders identify potential trade opportunities and manage risk. By using a combination of Fractal ROC , ATR Break, and Order Blocks, traders can gain a deeper understanding of market dynamics and make more informed trading decisions.
Fractal ROC is a momentum-based indicator that calculates the rate of change of the price between fractals, which are turning points in the market. It is calculated by taking the difference between the closing price and the lowest price in the previous n+1 periods, and dividing it by the difference between the open price 2n periods ago and the lowest price in the previous n+1 periods. This calculation is done for both up and down fractals. When the Fractal ROC value is greater than the ROC Break Level (as determined by the input variable roclevel), it indicates a potential momentum shift in the market. This can be used to identify potential trade entries or exits, depending on your trading strategy.
ATR Break is an indicator that helps traders identify significant price movements in the market. It measures the distance between the price and the Average True Range (ATR), which is a measure of the volatility of the market. ATR Break is calculated by taking the difference between the close and high/low, and dividing it by the previous ATR value. This calculation is done for both up and down movements. When the ATR Break value is greater than the ATR Break Level (as determined by the input variable atrlevel), it indicates a significant move in the market. This can be used to identify potential breakouts or breakdowns, and can be used to set stop-loss and take-profit levels.
An Order Block is a price level where significant buying or selling activity has taken place. The order blocks made by ATR Break and Fractal ROC are drawn using boxes on the chart. When the ATR or Fractal ROC level is breached, a box is drawn with the high and low of the candle that breached the level as the top and bottom of the box, respectively. The box is then extended to the right until the end of the chart or until another ATR or Fractal ROC level is breached, at which point a new box is drawn. This allows traders to easily identify significant price movements and potential support and resistance levels on the chart. When an Order Block is identified, it can be used as a potential support or resistance level . If price approaches an Order Block from below, it is likely to bounce off this level and continue in an upward direction. Similarly, if price approaches an Order Block from above, it is likely to bounce off this level and continue in a downward direction. Traders can use these levels to identify potential trade entries or exits, as well as to set stop-loss and take-profit levels.
Overall, the Fractal ROC , ATR Break, and Order Blocks indicator is a powerful tool for traders who want to identify potential trade opportunities and manage risk. By combining these three concepts, traders can gain a deeper understanding of market dynamics and make more informed trading decisions. As with any indicator, it is important to use it in conjunction with other analysis tools and to have a clear trading plan in place.