Candle Close ConfirmationTradingview doesn't provide a way to prevent unclosed candles from displaying in real time.
This script helps to reduce errors that span from reading unconfirmed candles by preventing the unconfirmed candle from displaying across all timeframes.
Ideal for traders with strategies that rely on candle confirmation signals.
NOTE: It works by drawing new candles based on the normal candles and stops just before the current unconfirmed candle, so you need to disable regular bar chart candles for this to work properly.
How to do that -
Chart Settings >
Symbols >
Candles >
Disable (Body, Borders, Wick)
Candlestick analysis
The Godfather
This indicator uses a custom MA as well as RSI bar-flips, as a form of pivot point, to signal the direction of the trend.
The triangle markers on the chart are the RSI flipping from negative to positive, and vice versa.
The lighter shaded candles are up candles, the darker shaded candles are down candles.
One Minute Algo Run (OMAR)OMAR marks the High and Low range of the opening candle (1min is recommended default for trading this) based on the current time frame in current session.
Additionally it marks recommended 1x and 2x extensions of the ranges for taking profit that may also be adjusted as needed.
Price Correction to fix data manipulation and mispricingPrice Correction corrects for index and security mispricing to the extent possible in TradingView on both daily and intraday charts. Price correction addresses mispricing issues for specific securities with known issues, or the user can build daily candles from intraday data instead of relying on exchange reported daily OHLC prices, which can include both legitimate special auction and off-exchange trades or illegitimate mispricing. The user can also detect daily OHLC prices that don’t reflect the intraday price action within a specified percent deviation. Price Correction functions as normal candles or bars for any time frame when correction is not needed.
On the 4th of October 2022, the AMEX exchange, owned by the New York Stock Exchange, decided to misprice the daily OHLC data for the SPY, the world’s largest ETF fund. The exchange eliminated the overnight gap that should have occurred in the daily chart that represents regular trading hours by showing a wick connecting near the close of the previous day. Neither the SPX, the SP500 cash index that the SPY ETF tracks, nor other SPX ETFs such as VOO or IVV show such a wick because significant price action at that level never occurred. The intraday SPY chart never shows the price drop below 372.31 that day, but there is a wick that extends to 366.57. On the 6th of October, they continued this practice of using a wick that connects with the close of the previous day to eliminate gaps in daily price action. The objective of this indicator is to fix such inconsistent mispricing practices in the SPY, NYA, and other indices or securities.
Price Correction corrects for the daily mispricing in the SPY to agree with the price action that actually occurred in the SPX index it tracks, as well as the other SPX ETFs, by using intraday data. The chart below compares the Price Correction of the SPY (top) to the SPX (middle) and the original mispriced SPY (bottom) with incorrect wicks. Price correction (top) removes those incorrect wicks (bottom) to match the SPX (middle).
The daily mispricing of the SPY follows after the successful deployment of the NYSE Composite Index mispricing, NYA, an index that represents all common stocks within the New York Stock Exchange, the largest exchange in the world. The importance of the NYA should not be understated. It is the price counterpart to NYSE’s market internals or statistics. Beginning in 2021, the New York Stock Exchange eliminated gaps in daily OHLC data for the NYA by using the close of the previous day as the open for the following day, in violation of their own NYSE Index Series Methodology. The Methodology states for the opening price that “The first index level is calculated and published around 09:30 ET, when the U.S. equity markets open for their regular trading session. The calculation of that level utilizes the most updated prices available at that moment.” You can verify for yourself that this is simply not the case. The first update of the NYA price for each day matches the close of the previous day, not the “most updated prices available at that moment”, causing data providers to often represent the first intraday bar with a huge sudden price change when an overnight price change occurred instead. For example, on 13 Jun 2022, TradingView shows a one-minute bar drop 2.3%. With a market capitalization of roughly 23 trillion dollars, the NYSE composite capitalization did not suddenly drop a half-trillion dollars in just one minute as the intraday chart data would have you believe. All major US indices, index ETFs, and even foreign indices like the Toronto TAX, the Australian ASXAL, the Bombay SENSEX, and German DAX had down gaps that day, except for the mispriced NYSE index. Price Correction corrects for this mispricing in daily OHLC data, as shown in the main chart at the top of this page comparing the original NYA (top) to the Price Corrected NYA (bottom).
Price Correction also corrects for the intraday mispricing in the NYA. The chart below shows how the Price Correction (top) replaces the incorrect first one-minute candles with gaps (bottom) from 22 Sep 2022 to 29 Sep 2022. TradingView is inconsistent in how intraday data is reported for overnight gaps by sometimes connecting the first intraday bar of the day to the close of the previous day, and other times not. This inconsistency may be due to manually changing the intraday data based on user support tickets. For example, after reporting the lack of a major gap in the NYA daily OHLC prices that existed intraday for 13 Jun 2022, TradingView opted to remove the true gap in intraday prices by creating a 2.3% half-a-trillion-dollar one-minute bar that connected the close of the previous day to show a sudden drop in price that didn’t occur, instead of adding the gap in the daily OHLC data that actually took place from overnight price action.
Price Correction allows users to detect daily OHLC data that does not reflect the intraday price action within a certain percent difference by changing the color of those candles or bars that deviate. The chart below clearly shows the start of the NYSE disinformation campaign for NYA that started in 2021 by painting blue those candles with daily OHLC values that deviated from the intraday values by 0.1%. Before 2021, the number of deviating candles is relatively sparse, but beginning in 2021, the chart is littered with deviating candles.
If there are other index or security mispricing or data issues you are aware of that can be incorporated into Price Correction, please let me know. Accurate financial data is indispensable in making accurate financial decisions. Assert your right to accurate financial data by reporting incorrect data and mispricing issues.
How to use the Price Correction
Simply add this “indicator” to your chart and remove the mispriced default candles or bars by right clicking on the chart, selecting Settings, and de-selecting Body, Wick, and Border under the Symbol tab. The Presets settings automatically takes care of mispricing in the NYA and SPY to the extent possible in TradingView. The user can also build their own daily candles based off of intraday data to address other securities that may have mispricing issues.
Price Percent Change (O/C)This bar chart indicates the percent change between open and close.
- In addition, the min percent move input, filters out the bars that do not contain the specified min value.
- for example, a value of 4, will filter all the bars that had a +/- 4% or greater move between the open and close.
i'm simply using: (close_price-open_price)/open_price
This is not a supper guru indicator, just a simple filter the days that had similar interday moves.
Wick-off Check Moving Average [Misu]█ This Indicator shows a wick-off check pattern applied to a moving average.
This pattern appears when a candle opens below the moving average and closes above it, or when it opens above a moving average and closes below it. This causes a wick to go through the moving average: a wick-off check moving average.
█ Usages:
This indicator detects small pullbacks in a trend. This is mainly used for trading continuation strategies.
It can also be used to validate a resistance or support level .
█ Features:
> Average Wick Validation: You can validate a wick-off check pattern depending on the average wick size. This is configured with parameters "Lenght Avg Wick Validation" and "Factor Wick Validation".
> Trend Validation: A trend is taken into account when detecting a "continuation pattern". A trend is validated if X candles close above (up trend) or under (down trend) the moving average. This "X" is defined by "Length Bar - Trend Validation" parameter.
> Buy and Sell: Labels are showing wick-of check patterns but can be interpreted as a buy & sell signal.
> Multi Moving Average.
> Alerts.
█ Parameters:
Method Multi MA : The method for calculating the moving average.
Multi MA Length : The length used to calculate the moving average.
Length Bar - Trend Validation : Define the number of bar needed to validate a trend. When price is above the MA, trend is up. When price is under MA, trend is down.
Wickoff Mode : Mode used to detect Wickoff check pattern.
> continuation pattern: only shows wick-off check pattern in a confirmed trend.
> no trend in progress: only shows wick-off check pattern in a not confirmed trend.
> both: shows both.
Lenght Avg Wick Validation : Lenght used to calculate the average wick size.
Factor Wick Validation : Factor used to validate the length of a wick when a wick-off check is detected.
Ohana_Wick_EntryIndicator will change color depending if a wick comprises of less than 35% of the candlestick.
Strategy involves taking trades on stops above a green signal (<35% wick) to a target of the size of the candle body (expressed as the value in the indicator)
Chews Opening Range Breakout - FibonacciVisual tool for taking a Fibonacci retracement-backed opening range breakout.
How it works:
Short a first red candle. Long a first green candle.
You decide which Fibonacci % you prefer your stop loss to be, the plot and label will represent your decision.
Fibonacci logic is close --> open.
Recommendations:
Use a lower time frame interval like 3m.
Extra Notes:
On higher priced stocks, you may see some discrepancy (~$0.1!) when plotting a Fibonacci Retracement compared to the suggested stop loss.
Since this discrepancy happens on inherently more volatile stocks, I have chosen to neglect the discrepancy instead of going for point perfect stop loss exits.
Realistically, it won't matter unless you get very unlucky.
Fibonacci drawing is not a feature of what this indicator plots. It's there for reference, but I can add if requested.
I drafted this simple code to help me visualize automating this strategy.
"That's spoicy!"
ToDo: Add an optional two-sided ORB. Higher chance of success since it is meant for reversals.
StairstepThis indicator helps you to recognize stairstep patterns on any timeframe by labeling them as they occur. The label changes to let you know when the pattern has broken, and then disappears after that.
buy sell pressurebuy sell pressure indicator
Every stock /indices /chart is unique in nature. there will always be some kind of buyers and sellers present in these equities/stocks. due to their inherent buying and selling nature, these stocks also develop a pattern. such patterns are not always visible directly on the chart but we can calculate buying and selling pressure for these stocks individually . if we plot a graph on chart , we can easily see when stock is getting and when it is showing strength.
The logic for calculating buying and selling pressure is given below-
buying pressure= 14 days ema of {close- low(1)}
selling pressure= 14 days ema of {high(1)- close}
low (1) indicates 1 day ago candle's low price
high(1) indicates 1 day ago candle's high price
close= recent candle's close price
how to read chart :-
whenever buying pressure line (green color) crosses the selling pressure line (red color)stock will show strength and will go up. if the red line starts to cross the green line then we may see prices go down. so one can book profit here.
there is a unique zero line which is blue in color. it will act as a supreme buy and sell zone. if the green line touches or somehow goes below the zero line(blue line), stock will see strong buying pressure . if the red line (selling pressure line) goes below the zero line, the stock will witness strong selling pressure.
The VXLIndicator for any and all traders. Includes: 3 different moving averages with 5 different moving average types, Parabolic SAR, and buy and sell alerts for all timeframes. All of these settings are customizable within the settings of the indicator.
Pro Trading Art - Candlestick Patterns with alertAll candlestick pattern based on "Japanese candlestick charting techniques".
Currently Supported List of Candlestick Patterns :
Hammer
Hanging Man
Inverted Hammer
Shooting Star
Morning Star
Evening Star
Bullish Engulfing
Bearish Engulfing
Important Points:
1. You can create alert for all patterns.
2. You can modify multiplier(Length Of Shadow) for Hammer, Hanging Man, Inverted Hammer and Shooting Star
3. You can modify EMA length for upward and downward validation of any pattern.
Key Levels and Trend indicatorKey Levels and Trend indicator By Pravin. This indicator shows you the recent Support level and resistance level for the current script.
It also detects breakout and breakdown at levels.
Outside Bar + PFR - x Cash InvestingOUTSIDE BAR + PFR (Stoch)
Indicador Simples, para facilitar a análise e visualização de Outside Bar (Barra Externa), sendo um gatilho fantástico e também PFR.
Para o PFR, foi incluso um filtro, o Estocastico Lento, ao qual você pode editar as configurações do mesmo de acordo com sua preferência.
Instagram @xcashinvesting
ICT Market Protraction (0:00, 7:00, 20:00 NY time highlight)Market protraction, as defined by ICT, is a time-specific reoccurring impulse move in forex markets. It is designed for market manipulation and will go in the opposite direction of the following trend.
My indicator will add a shape above/below the candle if it fits the time criteria.
I recommend to watch: ICT Mentorship Core Content - Month 1 - Impulse Price Swings & Market Protraction on Youtube
Candlestick Pattern Criteria and Analysis Indicator█ OVERVIEW
Define, then locate the presence of a candle that fits a specific criteria. Run a basic calculation on what happens after such a candle occurs.
Here, I’m not giving you an edge, but I’m giving you a clear way to find one.
IMPORTANT NOTE: PLEASE READ:
THE INDICATOR WILL ALWAYS INITIALLY LOAD WITH A RUNTIME ERROR. WHEN INITIALLY LOADED THERE NO CRITERIA SELECTED.
If you do not select a criteria or run a search for a criteria that doesn’t exist, you will get a runtime error. If you want to force the chart to load anyway, enable the debug panel at the bottom of the settings menu.
Who this is for:
- People who want to engage in TradingView for tedious and challenging data analysis related to candlestick measurement and occurrence rate and signal bar relationships with subsequent bars. People who don’t know but want to figure out what a strong bullish bar or a strong bearish bar is.
Who this is not for:
- People who want to be told by an indicator what is good or bad or buy or sell. Also, not for people that don’t have any clear idea on what they think is a strong bullish bar or a strong bearish bar and aren’t willing to put in the work.
Recommendation: Use on the candle resolution that accurately reflects your typical holding period. If you typically hold a trade for 3 weeks, use 3W candles. If you hold a trade for 3 minutes, use 3m candles.
Tldr; Read the tool tips and everything above this line. Let me know any issues that arise or questions you have.
█ CONCEPTS
Many trading styles indicate that a certain candle construct implies a bearish or bullish future for price. That said, it is also common to add to that idea that the context matters. Of course, this is how you end up with all manner of candlestick patterns accounting for thousands of pages of literature. No matter the context though, we can distill a discretionary trader's decision to take a trade based on one very basic premise: “A trader decides to take a trade on the basis of the rightmost candle's construction and what he/she believes that candle construct implies about the future price.” This indicator vets that trader’s theory in the most basic way possible. It finds the instances of any candle construction and takes a look at what happens on the next bar. This current bar is our “Signal Bar.”
█ GUIDE
I said that we vet the theory in the most basic way possible. But, in truth, this indicator is very complex as a result of there being thousands of ways to define a ‘strong’ candle. And you get to define things on a very granular level with this indicator.
Features:
1. Candle Highlighting
When the user’s criteria is met, the candle is highlighted on the chart.
The following candle is highlighted based on whether it breaks out, breaks down, or is an inside bar.
2. User-Defined Criteria
Criteria that you define include:
Candle Type: Bull bars, Bear bars, or both
Candle Attributes
Average Size based on Standard Deviation or Average of all potential bars in price history
Search within a specific price range
Search within a specific time range
Clarify time range using defined sessions and with or without weekends
3. Strike Lines on Candle
Often you want to know how price reacts when it gets back to a certain candle. Also it might be true that candle types cluster in a price region. This can be identified visually by adding lines that extend right on candles that fit the criteria.
4. User-Defined Context
Labeled “Alternative Criteria,” this facet of the script allows the user to take the context provided from another indicator and import it into the indicator to use as a overriding criteria. To account for the fact that the external indicator must be imported as a float value, true (criteria of external indicator is met) must be imported as 1 and false (criteria of external indicator is not met) as 0. Basically a binary Boolean. This can be used to create context, such as in the case of a traditional fractal, or can be used to pair with other signals.
If you know how to code in Pinescript, you can save a copy and simply add your own code to the section indicated in the code and set your bull and bear variables accordingly and the code should compile just fine with no further editing needed.
Included with the script to maximize out-of-the-box functionality, there is preloaded as alternative criteria a code snippet. The criteria is met on the bull side when the current candle close breaks out above the prior candle high. The bear criteria is met when the close breaks below the prior candle. When Alternate Criteria is run by itself, this is the only criteria set and bars are highlighted when it is true. You can qualify these candles by adding additional attributes that you think would fit well.
Using Alternative Criteria, you are essentially setting a filter for the rest of the criteria.
5. Extensive Read Out in the Data Window (right side bar pop out window).
As you can see in the thumbnail, there is pasted a copy of the Data Window Dialogue. I am doubtful I can get the thumbnail to load up perfectly aligned. Its hard to get all these data points in here. It may be better suited for a table at this point. Let me know what you think.
The primary, but not exclusive, purpose of what is in the Data Window is to talk about how often your criteria happens and what happens on the next bar. There are a lot of pieces to this.
Red = Values pertaining to the size of the current bar only
Blue = Values pertaining or related to the total number of signals
Green = Values pertaining to the signal bars themselves, including their measurements
Purple = Values pertaining to bullish bars that happen after the signal bar
Fuchsia = Values pertaining to bearish bars that happen after the signal bar
Lime = Last four rows which are your percentage occurrence vs total signals percentages
The best way I can explain how to understand parts you don’t understand otherwise in the data window is search the title of the row in the code using ‘ctrl+f’ and look at it and see if it makes more sense.
█ [b}Available Candle Attributes
Candle attributes can be used in any combination. They include:
[*}Bodies
[*}High/Low Range
[*}Upper Wick
[*}Lower Wick
[*}Average Size
[*}Alternative Criteria
Criteria will evaluate each attribute independently. If none is set for a particular attribute it is bypassed.
Criteria Quantity can be in Ticks, Points, or Percentage. For percentage keep in mind if using anything involving the candle range will not work well with percentage.
Criteria Operators are “Greater Than,” “Less Than,” and “Threshold.” Threshold means within a range of two numbers.
█ Problems with this methodology and opportunities for future development:
#1 This kind of work is hard.
If you know what you’re doing you might be able to find success changing out the inputs for loops and logging results in arrays or matrices, but to manually go through and test various criteria is a lot of work. However, it is rewarding. At the time of publication in early Oct 2022, you will quickly find that you get MUCH more follow through on bear bars than bull bars. That should be obvious because we’re in the middle of a bear market, but you can still work with the parameters and contextual inputs to determine what maximizes your probability. I’ve found configurations that yield 70% probability across the full series of bars. That’s an edge. That means that 70% of the time, when this criteria is met, the next bar puts you in profit.
#2 The script is VERY heavy.
Takes an eternity to load. But, give it a break, it’s doing a heck of a lot! There is 10 unique arrays in here and a loop that is a bit heavy but gives us the debug window.
#3 If you don’t have a clear idea its hard to know where to start.
There are a lot of levers to pull on in this script. Knowing which ones are useful and meaningful is very challenging. Combine that with long load times… its not great.
#4 Your brain is the only thing that can optimize your results because the criteria come from your mind.
Machine learning would be much more useful here, but for now, you are the machine. Learn.
#5 You can’t save your settings.
So, when you find a good combo, you’ll have to write it down elsewhere for future reference. It would be nice if we could save templates on custom indicators like we can on some of the built in drawing tools, but I’ve had no success in that. So, I recommend screenshotting your settings and saving them in Notion.so or some other solid record keeping database. Then you can go back and retrieve those settings.
#6 no way to export these results into conditions that can be copy/pasted into another script.
Copy/Paste of labels or tables would be the best feature ever at this point. Because you could take the criteria and put it in a label, copy it and drop it into another strategy script or something. But… men can dream.
█ Opportunities to PineCoders Learn:
1. In this script I’m importing libraries, showing some of my libraries functionality. Hopefully that gives you some ideas on how to use them too.
The price displacement library (which I love!)
Creative and conventional ways of using debug()
how to display arrays and matrices on charts
I didn’t call in the library that holds the backtesting function. But, also demonstrating, you can always pull the library up and just copy/paste the function out of there and into your script. That’s fine to do a lot of the time.
2. I am using REALLY complicated logic in this script (at least for me). I included extensive descriptions of this ? : logic in the text of the script. I also did my best to bracket () my logic groups to demonstrate how they fit together, both for you and my future self.
3. The breakout, built-in, “alternative criteria” is actually a small bit of genius built in there if you want to take the time to understand that block of code and think about some of the larger implications of the method deployed.
As always, a big thank you to TradingView and the Pinescript community, the Pinescript pros who have mentored me, and all of you who I am privileged to help in their Pinescripting journey.
"Those who stay will become champions" - Bo Schembechler
Local Polynomial RegressionThis is a local polynomial regression of price data. It does not give any explicit prediction, but it helps to show the overall trend and movement of price. Due to limitation of Pine, this script can only calculate for a limited length of price series, and the order of polynomial regression cannot be too high.
Options Scalping by harsh gbychi this is my script.
Bank Nifty Live OI Change Chart can give very useful clues for intraday support and resistance levels for Bank Nifty. If there is more addition in Open Interest at 12200 Calls, that would mean most market players are comfortable writing call options at this level because they believe it to be a strong resistance. That would be bearish indication for BankNifty.
Similarly is there is highest writing in 12000 Puts that would indicate strong intraday support at that level.
Third Scenario: There is good amount of Open Interest increase in 12000 PE and 12200 CE –> this means we should expect a range bound session for the day, as both bears and bulls are comfortable holding the 12200 and 12000 levels respectively.
Following factors could improve reliability of BankNifty OI Change analysis:
1) Put Call Ratio: Higher PCR means bullishness. If there is more writing at 12000PE and PCR is high and increasing during the day that would add to bullish scenario
If the PCR is declining for the day and more writing happening at 12200CE then this adds to bearishness.
2) Close to expiry: The closer to expiry we are, the more reliable the ‘Open Interest’ analysis. Early in the series, the OI analysis is less reliable.
3) More Players: As the number of players increase, the OI analysis become more reliable.
4) Bid-ask Spread: The lower the bid-ask spread the more reliable the OI analysis.
5) Technical Indicators: The best trades are found by combining OI analysis with other technical indicators. MACD, RSI, Channel lines and EW count give best results with Open Interest Analysis.
Tradesharpe Session BiasThis script is designed for traders who want help defining their session bias it is for people who trade in sessions which will most likely be 1 4h candle. The way I trade using Price action to get my daily bias, to either look for sells or buys or both I look at the previous daily candle close and previous 4hr candle close before analyzing the structure on the lower time frames to get my session bias of bullish/bearish. so this indicator compares the daily and 4hr candles to develop a bias for example
previous daily bullish + Previous 4hr Bullish = BULLISH BIAS
previous daily Bearish + Previous 4hr Bearish = BEARISH BIAS
if Daily bullish 4hr bearish = MIXED SESSION
if daily bearish 4hr bullish = MIXED SESSION
MIXED SESSION = Can argue both buys and sells
BEARISH SESSION = Best to look for Sells only based on my trading style
BULLISH SESSION = Best to look for Buys only based on my trading style
Confined Range Candle FinderThis indicator finds candlesticks which are confined within the range of a previous candlestick. This indicates volatility contraction which often leads to volatility expansion, i.e. large price movements.
While every confined range will contain at least 1 inside bar, this indicator differs from the Inside Bar Finder which only finds consecutive inside bars.
This indicator includes options such as:
- The minimum number of candlesticks confined within the range of a previous candlestick to trigger the indicator
- Labels to indicate the number of confined candles
- Signal lines to indicate the high and low of the containing candlestick
Try out this indicator with different options on different timeframes to see if confined ranges increase the probability of identifying the direction of price movements. Breaks or closes outside signal lines can be used to trigger trade signals.
[FrizLabz]FVG Bar
For those of you that like to keep your charts nice and tidy for your Technical Analysis!
FVG = Fair Value Gap
Fair Value Gaps are when impulse movements create an imbalance in price leaving unfilled orders.. they are popular because after one is created we often observe price return to fill these unfilled orders
3 candles make a FVG
When the high/low of most recent candle is lower/high than the low/high of the bar before last
Similar to my other FVG indicator but this one allows you to delete Filled FVGs and have them adjust when filled
Uses a line whose x1 and x2 are on the FVG bar and adjust the size of the FVG with line width because line width on line.new()s doesnt have a cap on line width like plot()s do
Not much too it I made this because a few people were asking if they could delete the FVG after it was Mitigated and since my other uses plots it wasnt possible
so I hope this works for those who were asking about it
hope you enjoy please let me know if you have an idea or find a bug,
Thank You! -