Bar█ OVERVIEW
This indicator demonstrates how we can use Pine script for collecting data to study the market.
By building a statistical report based on the chart candlestick analysis, discover if there is an edge or not, when and where?
Compare it with a specific candlestick pattern and know how its behavior diverges. I have already covered some here .
I hope it can bring you ideas for researching new edges, testing, and trying new things.
█ FEATURES
Sections
The report organizes the data into the following sections: retracement , invalidation , continuation , breakout , and state . Each of them provides insights into the price behavior and answers to questions such as: How often does price retrace? Does the pattern often invalidate? If it does not, does it break in the pattern's direction? How far does the price go? What are the odds of a false breakout? What is the likelihood of the next bar being a down candle?
Highlighter
The indicator highlights flat bars (open and close at the same price). It also highlights bullish and bearish bars once a filter is applied.
Settings
Filtering of bars closing beyond their prior bar’s high and low;
Filtering of reversal bars (two modes available);
Displaying distances relative to the bars length or Average True Range;
Collapsing/expanding each section;
Changing the report’s coloring and positioning;
█ NOTES
Computation
The script computation occurs on bar close.
Distances in ATR
When using a period of 20, for example, the first 19 candles are ignored because the ATR is not defined yet.
Candle
Candlestick Trading (Malaysia Stock Market)1. This indicator will indicate signals of bearish/bullish candlestick as below:
- 10 Bear Candles: Dark Cloud Cover, Bearish Kickers, Bearish Engulfing, Evening Star, Three Black Crows, Hanging Man, Shooting Star, Tweezer Top, Bearish Harami, Doji
- 10 Bull Candles: Piercing, Bullish Kickers, Bullish Engulfing, Morning Star, Three White Soldiers, Hammer, Inverted Hammer, Tweezer Bottom, Bearish Harami, Doji
2. In order for the Bear Candle signals to appear, these conditions should be met:
- Price must be above MA 1 (preset at SMA 20)
- Price must be above MA 2 (preset at SMA 50)
- Price must be above MA 3 (preset at SMA 200)
- In the range of specified trading days (preset at latest 10 days of trading)
3. For a strong bearish signal, a namely 'Potential Top' signal will appear on the top of the bearish candlestick signal. This 'Potential Top' signal will only appear under the condition of:
- Stochastic is at overbought area (preset at 75%)
4. In order for the Bull Candle signals to appear, these conditions should be met:
- Price must be in between MA 4 (preset at EMA 30) and MA 5 (preset at EMA 100)
- In the range of specified trading days (preset at latest 10 days of trading)
5. For a strong bullish signal, a namely 'Potential Bottom' signal will appear at the bottom of the bullish candlestick signal. This 'Potential Bottom' signal will only appear under the condition of:
- Stochastic is at oversold area (preset at 25%)
6. This indicator can help one to enter/exit a trade based on the bullish/bearish candlestick patterns that appear at the beginning/end of a trend, especially when the 'Potential Bottom/Top' appears with any of bullish/bearish candlestick signal.
7. However, this indicator is only designed for Malaysian Stocks Market as the script is based on the bids/pips calculation of the Malaysian Stocks Market. Nevertheless, I let the script open for everyone to modify it based on your own preference markets/instruments.
8. Hope you guys enjoy it. Thanks.
NSDT Bearish-Bullish CandlesThis is another interesting take on candlesticks . These Bearish-Bullish Candles do not show the wicks. Instead, the upper wick is made into a Red body and the lower wick is made into a Green body. If you match the candle body color in the chart settings (or turn off the candles completely), you get a unique way of seeing how Bearish or how Bullish a candle is because the wick will now match the body size and color.
This indicator is very similar to our NSDT Special High-Low Candles.
Aurora Candle with AlertThe indicator is derived from the concept of Aurora Candles (Credit to RK Arora)
Description
The script instantly calculates and highlights the largest candle (from high to low) in a user specified lookback period. It then plots the expected support, resistance, supply and demand levels. When a larger candle is printed, it will immediately plot the new levels.
How To Use
Use the indicator to find the largest candle in a specified lookback period.
• As soon as the Aurora candle is printed, future levels are plotted.
• If a larger candle is printed it will reset and create a new roadmap as big money dictates the market.
• The Aurora candle will mirror itself above and below X amount of times based on your settings.
• Colours, levels and lookback period are customizable.
• There is only 1 look back period. You can add more than one indicator if you want to set different lookback periods for long and short term levels.
• Alert function has been added
Access the indicator
• Contact me on TradingView
CandleEvaluationLibrary "CandleEvaluation"
Contains functions to evaluate bullish and bearish, engulfing, and outsized candles. They are different from the built-in indicators from TradingView in that these functions don't evaluate classical patterns composed of multiple candles, and they reflect my own understanding of what is "bullish" and bearish", "engulfing", and "outsized".
isBullishBearishCandle()
Determines if the current candle is bullish or bearish according to the length of the wicks and the open and close.
int _barsBack How many bars back is the candle you want to evaluate. By default this is 0, i.e., the current bar.
returns Two values, true or false, for whether it's a bullish or bearish candle respectively.
isTripleBull()
Tells you whether a candle is a "Triple Bull" - that is, one which is bullish in three ways:
It closes higher than it opens
It closes higher than the body of the previous candle
The High is above the High of the previous candle.
int _barsBack How many bars back is the candle you want to evaluate. By default this is 0, i.e., the current bar.
returns True or false.
isTripleBear()
Tells you whether a candle is a "Triple Bear" - that is, one which is bearish in three ways:
It closes lower than it opens
It closes lower than the body of the previous candle
The Low is below the Low of the previous candle.
int _barsBack How many bars back is the candle you want to evaluate. By default this is 0, i.e., the current bar.
returns True or false.
isBigBody()
Tells you if the current candle has a larger than average body size.
int _length - The length of the sma to calculate the average
float _percent - The percentage of the average that the candle body has to be to count as "big". E.g. 100 means it has to be just larger than the average, 200 means it has to be twice as large.
returns True or false
isBullishEngulfing()
Tells you if the current candle is a bullish engulfing candle.
int _barsBack How many bars back is the candle you want to evaluate. By default this is 0, i.e., the current bar.
int _atrFraction The denominator for the ATR fraction, which is the small amount by which the open can be different from the previous close.
returns True or false
isBearishEngulfing()
Tells you if the current candle is a bearish engulfing candle.
int _barsBack How many bars back is the candle you want to evaluate. By default this is 0, i.e., the current bar.
int _atrFraction The denominator for the ATR fraction, which is the small amount by which the open can be different from the previous close.
returns True or false
Heatmap Volume ColorBar trial v7FTJR20 This indicator is a heatmap of financial volume by repainting the candlesticks, I use three different ways to define the heatmap separating it into 3 phases:
Phase A: low volume
Phase B: average volume
Phase C: high volume
Don't worry about this data, the trial indicator is configured to auto-interpret the information.
The heat map uses the following colors and specifications
Red = Ultra High Volume
Orange = High volume
Yellow = Average Volume (balance)
Blue = Low volume
White = Volume below average
The heat map compares the phases to identify if it finds a standard deviation over time, that is, it is possible to see a smaller volume with the same red bar as before, because the aggressions are updated in real time.
I also created a trend line moved by the accumulated volume x the average price, there will always be an important zone, where the long/short can defend or not their position.
Tutorial:
1.0 - It is necessary that you have the minimum knowledge of waves, a quick explanation is that the market always works in 5 (1 to 5) or in 3 waves (ABC).
1.1- The Concept: When identifying the 3 wave or the C wave with a red cadle and a spread 2 to 3x larger than the average, mark the bottom and top of this red cadle.
-Note that in the example I marked it and named it "Support 3"
Note 1: Note that I had already marked the "Support 1" line from the moment the asset went down.
This candlestick is important for two reasons, it is a red candlestick with ultra volume and it was the beginning of the bullish impulse, if there was a place for the buyer to defend it was there.
Note 2: We don't know if the top or bottom of the candle was a support or resistance, check, be patient, watch the movement inside this red cadle and what the color of the cadles will be in the movements.
1.2 - see that the market makes several zig zags within our marking, and the color of the cadles turned white and blue (low volumes) someone was acting passively (probably who absorbed the red bar, we don't know yet).
1.3 - see that the price comes very close to the trend line and as it approaches the price drops with an aggression at the end, see that the cadle turned orange, even with the aggression the price goes back up, at this moment we already see that there is someone buying and defending the position.
Note: red, orange and yellow candles are aggressors.
1.4 - In the marking of point , see that the price falls in the region of the orange bar...
*remember, aggression bars are important regions, tick!
Note that the price drops with blue and white bars, breaks the previous bottom without aggression, see that the bars are blue, the seller has been absorbed and the buyer starts to attack.
On this occasion, see how many factors led you to believe that there was institutional defense there, be patient and study the attitudes within the chart.
1.5 - look at point 2 we see the price breaking the trend line,
there was a resistance there was a lot of money, so another red bar, the market from the sequence on the high and stops exactly at the line marked with "support 3", there was a region to protect the operation, my stop is below the red bar near 35k , where there is defense.
1.6 - Sequence market in the move and test the "resistance 1" and feel offer, see the perfection of the corrective zig zag in (ABC) on top of the red bar "the biggest red bar" of that move in point 4.
-see market tests 2x the top of "support 3" and takes the bear out of the game.
1.7 - From point 4 onwards, the market of the bullish sequence with aggression an orange bar and at point 5 we have another red bar, that is, we are close to a new resistance, "resistance 2", at this time the market is above this red bar from point 5, it is still bullish, below it, it may seek the trendline and its breakout may seek the "support 1" line.
- I like your feedback and leave your settings and experiences in the comments.
20% up with all continuously green candle: Lovevanshi It can be used to get the indication for 20% up movement among all continuously green candles formed in past. It is suitable for Indian company stock for short term trading plans.
Aurora CandleThe indicator is derived from the concept of Aurora Candles (Credit to RK Arora)
Description
The script instantly calculates and highlights the largest candle (from high to low) in a user specified lookback period. It then plots the expected support, resistance, supply and demand levels. When a larger candle is printed, it will immediately plot the new levels.
How To Use
Use the indicator to find the largest candle in a specified lookback period.
• As soon as the Aurora candle is printed, future levels are plotted.
• If a larger candle is printed it will reset and create a new roadmap as big money dictates the market.
• The Aurora candle will mirror itself above and below X amount of times based on your settings.
• Colours, levels and lookback period are customizable.
• There is only 1 look back period. You can add more than one indicator if you want to set different lookback periods for long and short term levels.
Access the indicator
• Contact me on TradingView
Special Time PeriodWith this indicator, you can choose candles in the period you want on your chart.
How ?
• If your chart is 5 minutes, the duration should be greater than 5 on this indicator.
If you do not do it this way, there will be gaps in the price, it will not give the right result.
• If you want to see it in minutes, you must enter a direct numerical value. For example, to see 2 hours, you must enter the number 120. Because 2 hours is 120 minutes.
Like the warning above, if you want to plot a 2-hour chart with this indicator, a maximum of 1 hour should be selected on your main chart.
• Resolution, eg. '60' - 60 minutes, 'D' - daily, 'W' - weekly, 'M' - monthly, '5D' - 5 days, '12M' - one year, '3M' - one quarter
• For example, if you want to see the 2-day chart, you should have a maximum of 1 day chart open on your home screen and write "2D" to the indicator value.
• You will get much better results if the period on your main chart and the period on this indicator are multiples of each other.
• In the image below, the period on the main chart is 30 minutes, but the period on the indicator is 90
• Click on the facing brackets at the top right of the legend and your chart will enlarge.
Longest CandleThe script detects and highlights the longest candle (from high to low) in a user specified lookback period.
Description
The longest candle in a specified range will form very strong predefined support and resistance levels. The concept is based on Aurora Candles.
How To Use
Use the indicator to find the longest candle in a specified lookback period. You can then mark the highs and lows for predefined S/R areas. Each trader can adjust the lookback period and colour.
Access the indicator
• Contact me on TradingView
Bar StatisticsThis script calculates and displays some bar statistics.
For the bar length statistics, it takes every length of upper or lower movements and calculates their average (with SD), median, and max. That way, you can see whether there is a bias in the market or not.
Eg.: If for 10 bars, the market moved 2 up, then 1 down, then 3 up, then 2 down, and 2 up, the average up bars length would be at 2.33, while the average for the down length would be at 1.5, showing that upper movements last longer than down movements.
For the range statistics, it takes the true range of each bar and calculates where the close of the bar is in relation to the true low of it. So if the closing of the bar is at 10.0, the low is at 9.0, and the high is at 10.2, the candle closed in the upper third of the bar. This process is calculated for every bar and for both closing prices and open prices. It is very useful to locate biasses, and they can you a better view of the market, since for most of the time a bar will open on an extreme and close on another extreme.
Eg.: Here on the DJI, we can see that for most of the time, a month opens at the lower third (near the low) and closes at the upper third (near the high). We can also see that it is very difficult for a month to open or close on the middle of the candle, showing how important the first and the last day are for determining the trend of the rest of the month.
EM_RSI Gradient Candles
I've missed the beautiful trend visualization of Heiken Ashi candles ever since I first learned they don't play well with other indicators largely due to the method with which they're plotted.
I wanted to color code a gradient onto candles to help visualize trend strength, and the Relative Strength Index was the first thing to come to mind. For coloring, it's possible the new color.from_gradient function would have worked, but I couldn't guarantee a highly customizable indicator with a single gradient so I took a more classic approach.
First, RSI was calculated using Tradingview's built-in RSI code.
Then I broke down the RSI's range of 1-100 into 10 tiers and assigned each a color option with the ability to turn any particular tier off if desired.
I found it to be extremely modular and helpful in visualizing both trend strength and identifying potential trend reversals due to a reduction in strength.
You can use it on every candle to help inform decisions, or keep all but <10 and >90 turned off so that it only changes candle color during the most extreme trends.
Or anything in between!
This is my first self-coded indicator so I'm already proud.
Please let me know what you think, and feel free to suggest improvements for future versions in the comments!
st_own_candleA script that builds candlesticks from the difference between a moving one for a short period and a moving one for a long period. Indicator parameters: long and short periods
Ryan's Candle Comboinside bar breakouts and reversal moves. version 1. use however u like it I cannot guarantee profitability :)
MTF WatchList Charts [Anan]█ OVERVIEW
I am happy to present this script with a nice idea!
You can now customize a watchlist with your preferred time frame and any symbol from any market.
The main purpose is to be aware of any moves and watch a brief overview of the chart.
█ FEATURES
- 8 customizable symbols with the option to show/hide anyone
- Multi time frame support
- 3 Types of charts (Candles / Heikin Ashi / Line)
- Displaying up to 10 candles for every chart
- Customizable chart colors
- Option to Show/hide Price
- Option to Show/hide Price Line
- Option to change Labels and Text Size
- Show Symbol name and used time frame
- Option to change gaps between charts
- Hover over on the top of any candle to see (Open/High/Low/Close) Prices
█ SCREENSHOTS
-----------------------------------------------
Special thanks to @dgtrd for inspiration and for the amazing framework used here ( HTF Candles by DGT )
Special thanks to Pine Chat @fareidzulkifli @Bjorgum @JohnBaron @fpainchaud
Candlestick RecognitionCandlestick Recognition
Version 1.0
Fun script to recognize and name candlesticks. Hamers and Highwaves and Marubozus oh my!
All candlestick names can be turned on or off in the settings since sometimes they stack close to each other and are hard to read. If you think I mislabeled any please provide me with an example of what you think it should be and I will review it to see if any changes need to be made. Please keep in mind that each stock will be a little different as the Candlestick Recognition uses ATR (Average True Range) for the calculations.
Secondary Candle OverlayThis simple script is meant to allow the user to select another symbol to add onto their chart and plot the candlesticks for that symbol at the selected resolution requested.
Please see the tooltip provided by the 'Secondary Symbol' input for more details with regards to properly using this script on symbols that have vastly different valuations, it will help with getting the symbol requested to scale properly with the primary symbol on the chart.
The user may also input which colors are used for bullish/bearish candles as well as the symbol itself and its resolution.
IMPORTANT NOTE: THIS SCRIPT DOES NOT ACCOUNT FOR SYMBOLS THAT ARE NOT CONTINUOUS (The defval for the symbol is TVC:DXY which closes on weekends whereas a cryptocurrency like Bitcoin does not stop trading ever; candles on these kinds of markets will be repeated when overlaid onto markets that do not have this property.)
DECPDECP is simple and easy to use!
It detects bullish and bearish engulfing candlestick patterns.
After detecting the patterns I've said, it mentions that the pattern is going to continue its direction to up or down.
But remember candlestick patterns don't determine targets and it's possible that predicted directions fail.
So use it carefully and enjoy it!
Candle Percent Volatility by AllenlkThis indicator gives you the percentage movement of each candle. Measurements are taken between the candle High point and Low point, and also between the Open and Close and calculated in percent %. From there it smooths out the data with a moving average. This gives you an idea of how much volatility is within each candle given the time resolution of the chart.
I like to use this information as a way to turn off a strategy, or select a proper time resolution for a strategy. If each candle has less than 2.5% Volatility most strategies will typically buy and sell rapidly at prices that are too close together, potentially losing money. During those times it seems best to either temporarily turn off the strategy, change the time resolution or switch to another strategy.
Fibonacci candle with Fibonacci ema strategyFor this strategy I am making use of the fibonacci numbers until 10 sequences and I am using them to make an avg candle and an average ema.
With it, I combine multiple price action rules and I set it up to only go long. When we have a short , we exit from the trade.
From the initial tests, it looks like it performs better on big timeframes.
If you have any questions, let me know !