Wick %Heyo Fellas,
thanks for checking out my new indicator.
Introduction
Wick % is a simple indicator to compare wick size with body size (mode 1) and to compare wick size with candle size (mode 2).
Upper wicks are bullish when close is higher than open pricen.
Lower wicks are bearish when close is lower than open price.
Wick Theory
In general, big wick and small bodie on a bar means that bull and bears are fighting heavily.
A big wick below the body means the bulls are leading in that fight,
and a big wick above the body means the bears are leading in that fight.
Calculation Formula
Mode 1 – Percentual Increase Wick/Body:
upperWickPercentage = (upperWick / body) * 100 - 100
lowerWickPercentage = (lowerWick / body) * 100 - 100
Mode 2 – Percent Wick/Candlestick:
upperWickPercentage = (upperWick / (high - low)) * 100
lowerWickPercentage = (lowerWick / (high - low)) * 100
Usage
You can use it on every symbol and every timeframe.
The indicator repaints by default, but you can disable it in the settings.
When you disable repaint, it moves the label one bar to the right.
If you want to use the indicator for signals, you must disable repainting.
Best regards,
simwai
Candlestick analysis
Dump CandleThe "Dump Candle" indicator is a tool designed to help traders visualise potential "dump" candles on a altcoin's price chart. A dump candle is a transparent candle with pink outline and it shows where the price experiences a significant drop from its high to its close, indicating a potential sell-off or market weakness. These are usually caused by relatively smaller moves on BTC.
Features:
Customizable Percentage Drop: Traders can input the desired percentage drop threshold to define what constitutes a dump candle. This allows for flexibility in adapting the indicator to different market conditions and trading styles.
Historical Dump Candle Highlighting: Traders have the option to highlight historical dump candles on the chart, making it easier to spot past instances of significant price drops and analyze their impact on the market.
Average Dump Percentage: The indicator can calculate the average percentage drop of the five most recent dump candles, giving traders a sense of the typical magnitude of price drops in the current market environment.
Informative Label: A label is displayed next to the most recent dump candle, providing key information such as the percentage drop, the number of candles since the last dump, and the average dump percentage. This helps traders quickly assess the significance and context of the identified dump candle.
Usage:
Use the dump candle to find where to set your bids/buys for the moment when BTC drops to wipe out leveraged traders. This can be very lucrative, as your orders get wicked into, and price very quickly heads north again, meaning you are instantly in profit, and the overall market generally continues being bullish from that point, as people buy the dip. I place by bids at the 4H or 12H RMA14 moving average, in Fair Value Gaps, and at orderblocks. Obviously make sure to use a stop loss too
Auto-magnifier / quantifytools- Overview
Auto-magnifier shows a lower timeframe view of candles and volume bars inside any main timeframe candle by zooming into it. Candles and volume bars as they develop are shown chronologically from left to right. By default, magnifier is triggered when less than 3 candles are visible on the chart.
By default, 20 lower timeframe candles are displayed by splitting main timeframe into 20 parts. The amount of candles displayed is a target rate, meaning the script will use a lower timeframe that has the closest match to 20 candles and therefore will vary a bit. Users can override automatic timeframe calculation and opt in to display any specific lower timeframe or adjust amount of candles shown (e.g. 20 -> 30 candles) per each main timeframe candle.
Example
Main timeframe set to 30 minute, candles displayed set to 20 -> Magnifying using 2 minute candles (30 minute/20 candles = 1.5 min, rounded to 2 min)
Main timeframe set to 30 minute, override set to 5 minutes -> Displaying 5 minute candles
Size of volume bars is calculated using relative volume (volume relative to volume SMA20), lowest bar representing relative volume values of under or equal to 1x the moving average and from there onwards progressively growing.
- Limitations and considerations
Amount of candles shown might flow over from the background on smaller screen sizes, in which case you would want to decrease the amount shown. Opposite is true for bigger screens, this value can be increased as more candles fit.
This indicator involves a lot of tricks with text elements to make it work automatically by zooming in. Size of wicks, bodies and volume bars are calculated by adding more text elements on big candles and less text elements on smaller candles. This means the displayed candles won't be a 100% match, but a rather a fair representation of the view, e.g. candle is green = lower timeframe candle is green, candle has a big wick = lower timeframe candle has a big wick (but not a 100% match).
Example
Magnified lower timeframe chart vs. Actual lower timeframe chart
Most mismatch will be found on the price levels where lower timeframe candles are shown, which is sacrificed for the sake of getting a better readability on the overall shape of lower timeframe price action. Users can alternatively optimize calculations for more accuracy, giving a better representation of the price levels where candles truly originated. This typically comes with the cost of worse readability however.
Example
Optimized for readability vs. Optimized for accuracy
- Visuals
All visual elements are fully customizable.
Dark Cloud [TradingFinder] Piercing Line Reversal chart Pattern
🔵 Introduction
"Reversal candlestick patterns" are among the Japanese candlestick patterns considered as alerts for a potential change in the current price trend. It is often assumed that by identifying reversal candlestick patterns, the price trend will definitely change, either from bullish to bearish or from bearish to bullish. However, this claim is not entirely accurate, and a change in price trend does not always mean a reversal.
Nonetheless, the importance of reversal candlestick patterns remains significant. By recognizing these patterns, you can better predict changes in the trend with higher probability and make better trading decisions.
🔵 Dark Cloud
The "Dark Cloud" pattern occurs when, after an upward trend, buyers continue to drive the price up in the first candle. However, in the next candle, with sellers entering and increasing selling pressure, the price starts to decrease compared to the close of the previous candle.
This price decrease is significant enough that in the last candle, the price goes lower than the open of the previous candle, serving as a warning sign for a potential change in price trend.
The fundamental principles for the formation of the "Dark Cloud" pattern include :
1.Two candles consisting of a positive candle (first candle) and a negative candle (second candle) whose main body should be above the halfway point of the first candle's main body but does not completely cover it.
2.The color of the main body of the second candle should be opposite to the color of the main body of the first candle.
Factors affecting the strength of the "Dark Cloud" pattern include :
1.The length of the bodies of both candles, especially the second candle, which increases the strength of the pattern.
2.The gap between the two bodies can also indicate the strength of the pattern.
3.The absence of a lower shadow in the second candle also indicates the strength of the pattern.
4.If the pattern forms in a price resistance range, it has more strength.
🔵 Piercing Line
The "Piercing Line" pattern occurs when, after a downward trend, sellers decrease the price by offering their shares on the first day. However, on the next day, with buyers entering and increasing demand, the price starts to increase compared to the close of the previous day.
This increase is significant enough that in the last candle, the price goes higher than the open of the previous day, serving as a warning sign for a reversal in the price trend. Overall, this pattern is the opposite of the "Dark Cloud" pattern and occurs under a bearish trend.
The fundamental principles for the formation of the "Piercing Line" pattern include :
1.Two candles consisting of a negative candle (first candle) and a positive candle (second candle) whose main body should be above the halfway point of the first candle's main body but does not completely cover it.
2.The color of the main body of the second candle should be opposite to the color of the main body of the first candle.
Factors affecting the strength of the "Piercing Line" pattern include :
1.The length of the bodies of both candles, especially the second candle, which increases the strength of the pattern.
2.The gap between the two bodies can also indicate the strength of the pattern.
3.The absence of an upper shadow in the second candle also indicates the strength of the pattern.
4.If the pattern forms in a price support range, it has more strength.
🔵 How to Use
The "green circle" symbol corresponds to the "Strong Piercing Line" signal, the "blue triangle" symbol corresponds to the "Weak Piercing Line" signal, the "red circle" symbol corresponds to the "Strong Dark Cloud" signal, and the "red triangle" symbol corresponds to the "Weak Dark Cloud" signal.
🔵 Setting
Using the "Show Dark Cloud" and "Show Piercing Line" buttons, you can enable or disable the display of Dark Cloud and Piercing Line.
CandleStick [TradingFinder] - All Reversal & Trend Patterns🔵 Introduction
"Candlesticks" patterns are used to predict price movements. We have included 5 of the best candlestick patterns that are common and very useful in "technical analysis" in this script to identify them automatically. The most important advantage of this indicator for users is saving time and high precision in identifying patterns.
These patterns are "Pin Bar," "Dark Cloud," "Piercing Line," "3 Inside Bar," and "Engulfing." By using these patterns, you can predict price movements more accurately and therefore make better decisions in your trades.
🔵 How to Use
Pin Bar : This pattern consists of a Candle where "Open Price," "Close Price," "High Price," and "Low Price" form the "Candle Body," and it also has "Long Shadow" and "Short Shadow." In the visual appearance of the Pin Bar pattern, we have a candle body and a pin bar shadow, where the candle body is smaller relative to the shadow.
Just as the candle body plays an important role in analysis, the pin bar shadow can also be influential. The larger the pin bar shadow, the stronger the expectation of a trend reversal.
When a "bearish pin bar" occurs at resistance or the chart ceiling, it can be predicted that the price trend will be downward. Similarly, at support points and the chart floor, a "bullish pin bar" can indicate an upward price movement.
Additionally, patterns like "Hammer," "Shooting Star," "Hanging Man," and "Inverted Hammer" are types of pin bars. Pin bars are formed in two ways: bullish pin bars have a long lower shadow, and bearish pin bars have a long upper shadow. Important: Displaying "Bullish Pin Bar" is labeled "BuPB," and "Bearish Pin Bar" is labeled "BePB."
Dark Cloud : The Dark Cloud pattern is one type of two-candle patterns that occurs at the end of an uptrend. The 2-candle pattern indicates the shape of this pattern, which actually consists of 2 candles, one bullish and one bearish. This pattern indicates a trend reversal and is quite powerful.
The Dark Cloud pattern is seen when, after a bullish candle at the end of an uptrend, a bearish candle opens at a higher level (weakly, equal, or higher) than the closing point of the bullish candle and finally closes at a point approximately in the middle of the previous candle. In this indicator, the Dark Cloud pattern is identified as "Wick" and "Strong" .
The difference between these two lies in the strictness of their conditions. Important: Strong Dark Cloud is labeled "SDC," and Weak Dark Cloud is labeled "WDC."
Piercing Line : The Piercing candlestick pattern consists of 2 candles, the first being bearish and consistent with the previous trend, and the second being bullish. The conditions of the pattern are such that the first candle is bearish and a price gap is created between the two candles upon the opening of the next candle because its opening price is below (weakly equal to or less than) the closing price of the previous candle.
Additionally, its closing price must be at least 50% above the red candle.
This means that the second candle must penetrate at least 50% into the first candle. Important: Strong Piercing Line is labeled "SPL," and Weak Piercing Line is labeled "WPL."
3 Inside Bar (3 Bar Reversal) : The 3 Inside Bar pattern is a reversal pattern. This pattern consists of 3 consecutive candles and can be either bullish or bearish. In the bullish pattern (Inside Up) formed at the end of a downtrend, the last candle must be bullish, and the third candle from the end must be bearish.
Additionally, the close price must be more than 50% of the third candle from the end. In the bearish pattern (Inside Down) formed at the end of an uptrend, the last candle must be bearish, and the third candle from the end must be bullish. Additionally, the close price must be less than 50% of the third candle from the end. Important: Bullish 3 Inside Bar is labeled "Bu3IB," and Bearish 3 Inside Bar is labeled "Be3IB."
Engulfing : The Engulfing candlestick pattern is a reversal pattern and consists of at least two candles, where one of them completely engulfs the body of the previous or following candle due to high volatility.
For this reason, the term "engulfing" is used for this pattern. This pattern occurs when the price body of a candle encompasses one or more candles before it. Engulfing candles can be bullish or bearish. Bullish Engulfing forms as a reversal candle at the end of a downtrend.
Bullish Engulfing indicates strong buying power and signals the beginning of an uptrend. This pattern is a bullish candle with a long upward body that completely covers the downward body before it. Bearish Engulfing, as a reversal pattern, is a long bearish candle that engulfs the upward candle before it.
Bearish Engulfing forms at the end of an uptrend and indicates the pressure of new sellers and their strong power. Additionally, forming this pattern at resistance levels and the absence of a lower shadow increases its credibility. Important: Bullish Engulfing is labeled "BuE," and Bearish Engulfing is labeled "BeE."
🔵 Settings
This section, you can use the buttons "Show Pin Bar," "Show Dark Cloud," "Show Piercing Line," "Show 3 Inside Bar," and "Show Engulfing" to enable or disable the display of each of these candlestick patterns.
Engulfing [TradingFinder] Bullish & Bearish CandleStick Pattern🔵 Introduction
The candlestick engulfing pattern is important pattern in technical analysis that can be observed in candlestick charts. This pattern occurs when a complete candle engulfs or "engulfs" the body of a previous candle, meaning that the body of the new candle completely covers the body of the previous candle.
The candlestick engulfing pattern has two types: the bullish engulfing pattern and the bearish engulfing pattern.
• Bullish Engulfing Pattern: This pattern occurs when a market candle opens with a larger and higher body than the previous market candle and completely covers the body of the previous candle. This pattern may indicate the presence of strong buying pressure and a potential change in price direction upwards.
• Bearish Engulfing Pattern: This pattern occurs when a market candle opens with a larger and lower body than the previous market candle and completely covers the body of the previous candle. This pattern may indicate the presence of strong selling pressure and a potential change in price direction downwards.
The candlestick engulfing pattern is usually used as a valid signal for a change in price direction in the market and can enhance a combination of crossover investments and technical analysis. However, it should always be evaluated alongside other indicators and market factors, and counter decisions should be made accordingly.
🔵 Recognition Method
Correct, the candlestick engulfing pattern is one of the important patterns in technical analysis that is typically used as a strong signal for a valid change in price direction in the market. This pattern occurs when a candle (usually in the market) opens with a larger and higher (for bullish engulfing pattern) or lower (for bearish engulfing pattern) body than a previous market candle and completely covers the body of the previous candle.
Example of Bullish Engulfing Pattern:
• First Candle: A bearish (downward) candle with a small red body.
• Second Candle: A bullish (upward) candle with a larger body that completely covers the body of the previous candle.
This pattern may indicate a change in price direction from downward to upward.
Example of Bearish Engulfing Pattern:
• First Candle: A bullish (upward) candle with a small green body.
• Second Candle: A bearish (downward) candle with a larger body that completely covers the body of the previous candle.
This pattern may indicate a change in price direction from upward to downward.
The most important point is that the candlestick engulfing pattern should be carefully considered and always evaluated alongside other market indicators and overall conditions. For example, the engulfing pattern near important support or resistance levels, during significant market command changes, or accompanied by other technical signals can have greater signaling power.
🟣 "Bullish Engulfing" Candle
• The first candle is bullish and the second candle is bearish.
• At the end of a downtrend.
• The closing of the first candle is above the opening of the second candle.
• The high of the first candle is higher than the high of the second candle.
Optimal Condition:
• The closing of the first candle is higher than the high of the second candle.
• More than 80% of the first candle is bullish.
🟣 "Bearish Engulfing" Candle
• The first candle is bearish and the second candle is bullish.
• At the end of an uptrend.
• The closing of the first candle is below the opening of the second candle.
• The low of the first candle is lower than the low of the second candle.
Optimal Condition:
• The closing of the first candle is below the opening of the second candle.
• More than 80% of the first candle is bearish.
🔵 Settings
The "Engulf Filter" option allows the "Optimal Condition" to be executed and will show fewer candlesticks.
🔵 Status
Off: Default mode, showing more identifications.
• Green color indicates optimal "Bullish Engulfing" candles.
• Red color indicates optimal "Bearish Engulfing" candles.
On: By changing the default to "On," the number of identifications decreases and the optimal condition is applied.
• Blue color indicates "Bullish Engulfing" candles.
• Black color indicates "Bearish Engulfing" candles.
🟣 Important Note
"Engulfing" candles are very useful signals in the direction of the overall trend, but we do not expect a suitable movement from "Engulfing" candles against the trend.
Magic VIBs V1Introducing the "Magic Vib Indicator" V1 Adeed more extention so it works better on higher time frames, Plus a colour changer so now you can pick a colour for bullish and bearish
a powerful tool designed to identify and highlight unique market scenarios known as "magic volume imbalances." This indicator is specifically crafted to recognize specific candlestick patterns that have demonstrated a significant impact on price movements.
The Magic Vib Indicator is meticulously engineered to detect a particular pattern, which occurs when the high of the first candle aligns perfectly with the open of the subsequent candle, while simultaneously witnessing the close of the first candle matching the low of the second candle. These precise conditions generate what is commonly referred to as a "magic vib."
This indicator has been developed with the sole purpose of capturing these magical moments in the market. By systematically scanning and analyzing price data, it spots instances where these extraordinary price imbalances occur. Once identified, the indicator promptly marks these candles on your trading platform, providing clear visual cues for enhanced decision-making.
The Magic Vib Indicator acts as a catalyst for traders and investors, as it has proven to be a reliable precursor to significant price reactions. These marked candles act as potent signals, suggesting an impending shift in market sentiment and a high probability of substantial price movement. The resulting price action often sees significant volatility, making it an enticing opportunity for those seeking substantial gains.
However, it's important to note that while the Magic Vib Indicator offers valuable guidance, it should not be the sole basis for trading decisions. It is crucial to incorporate other technical and fundamental analysis tools, risk management strategies, and market awareness to achieve consistent success.
In summary, the Magic Vib Indicator represents a breakthrough in technical analysis, specifically tailored to identify and mark candles exhibiting the remarkable characteristics of a "magic volume imbalance." By harnessing the power of this indicator, traders can anticipate substantial price reactions, allowing them to seize opportunities and maximize their trading outcomes.
PA Helper - Draw Next 5 CandlesA user-friendly tool designed for a quick visual preview of the next 5 candles on your trading chart.
Here's how to use it effortlessly:
Set Open Prices:
Adjust the open prices for the upcoming 5 candles using the inputs labeled Next close #1 to Next close #5.
Toggle Candles:
Use the checkboxes (p1 to p5) to enable or disable the drawing of each corresponding next candle.
Offset Option:
Customize your preview by toggling the offset option:
If offset is set to false, the drawing starts from the current candle's close, providing insight into the next 5 candles relative to the current one.
If offset is set to true, the drawing begins with the next candle, offering a preview of the upcoming 5 candles, effectively skipping the current one.
Visual Representation:
The indicator visually displays the next 5 candles on your chart based on your selected open prices, offering a clear and tailored insight into potential market movements.
Fair Value Gaps
Introducing the Fair Value Gaps (FVG) Indicator by OmegaTools, a distinctive and analytical tool designed for TradingView. This script meticulously identifies and visualizes fair value gaps within the market, offering traders a nuanced understanding of potential price movement areas that are not immediately apparent through traditional analysis.
Concept and Methodology:
Fair Value Gaps are identified as areas on a chart where the price has skipped over, leaving a 'gap' that has not been filled. These gaps often occur due to sudden market movements triggered by news events, changes in market sentiment, or large orders that move the price significantly. The FVG Indicator detects these gaps by analyzing price action and identifying discrepancies between high and low prices over a specified period. This approach is rooted in the belief that markets tend to return to these unfilled spaces, providing potential opportunities for traders.
How It Works:
The indicator scans the chart for gaps between the high of one session and the low of the next (or vice versa), marking these gaps visually for easy identification.
Users can customize the lookback period to adjust the sensitivity of the indicator to recent versus historical data.
The FVG Indicator employs color-coding to distinguish between bullish and bearish gaps, allowing traders to quickly gauge market sentiment around these gaps.
Using the FVG Indicator:
Apply the indicator to any chart on TradingView and adjust the input settings, including the extension of FVGs and aesthetic preferences like color, to suit your analysis style.
Use the visual cues provided by the FVG Indicator to identify potential areas where the market may move to fill the gaps.
Combine the insights from the FVG Indicator with other technical analysis tools or fundamental analysis to validate potential trading opportunities.
Originality and Usefulness:
The FVG Indicator stands out due to its focused approach to identifying and visualizing fair value gaps, a concept that is often overlooked in conventional market analysis. By providing a clear visual representation of these gaps, the indicator adds depth to market analysis, aiding in the identification of potential price reversal zones or continuation signals.
Disclaimer and Responsible Use:
The financial markets are complex and unpredictable. The FVG Indicator is designed to offer analytical insights and should be used as part of a comprehensive trading strategy. It does not guarantee profits or predict market movements with absolute certainty. Traders are encouraged to use this tool judiciously, alongside proper risk management practices. Remember, past performance does not guarantee future results, and trading involves risks, including the potential loss of investment.
Day of the Week LabelOverview:
The "Day of the Week Label Indicator" is a simple yet powerful tool designed for traders and analysts who use TradingView for chart analysis. This indicator adds a clear visual cue to your charts by displaying the first letter of each day of the week directly above the corresponding candlestick. With this indicator, you can easily identify the day of the week at a glance without cluttering your chart.
Key Features:
Day Identification: Marks each candle with the first letter of the corresponding day of the week (e.g., "M" for Monday, "T" for Tuesday, and so on), providing immediate day recognition.
Color-Coded Labels: Each day is color-coded for better visibility and quick identification. Sundays and Saturdays are distinguished from the trading week, making it easier to spot the beginning and end of the trading week.
Overlay Design: As an overlay, this indicator seamlessly integrates with your existing chart setup, enhancing your analysis without interfering with other technical indicators or chart elements.
Benefits:
Enhanced Chart Analysis: Quickly discern patterns or trends that may be specific to certain days of the week, aiding in the refinement of trading strategies.
Time Management: Helps in planning trading activities or analysis by visually highlighting the days directly on the chart.
User-Friendly: Simple and non-intrusive, this indicator is designed to complement your chart without overwhelming it with information.
How to Use:
Simply add the "Day of the Week Label Indicator" to your chart, and the first letter of each day will automatically appear above the corresponding candlestick. No additional configuration is required, making it suitable for both novice and experienced traders.
Whether you're conducting a detailed market analysis, looking for day-specific patterns, or simply want a clearer visual representation of the time on your charts, this indicator is an essential addition to your TradingView toolkit.
18 Bar MM RangeFirst Indicator in a (hopefully) many indicators to help bring Al Brook's methodoligies to Pine Script.
This indicator plots the highest and lowest close from the first 18bars of the NY session and uses them to plot the 18bar MM. Most days, a BO of the 18bar range is met. This is help to keep track of that key price action on your chart.
It doesn't plot until bar 18 has closed.
Candle DecompositionThe Candle Decomposition indicator shows the last 2 candles in detail, with 2 levels of lower timeframes (LTF).
In this way, you can keep oversight of history, while zooming in on the last and previous candle.
This tool is meant to be used in realtime, preferentially for intraday usage.
🔶 USAGE
In this example, on the current timeframe of 15 minutes, you see the 2 latest candles, visualized through dotted lines/boxes.
The first LTF level is set at 5 minutes, the second level at 15 seconds:
(The 2 exclamation marks are just to emphasize this is the latest price which will be repainted)
The combination of 2 LTF's can be helpful in finding support/resistance levels.
These are taken in realtime, not in bar replay, so the outcome wasn't known in advance:
(blue lines were drawn manually)
After first testing resistance, the price went to the support area, bouncing back to an area of resistance and breaking it briefly.
Price turned back, and found support, after which resistance was tested once more:
Support was again tested, after which resistance was clearly broken:
A bit later (every time 1 candle further):
The following example shows 2 last candles with signs of indecision, but LTF candles show support and resistance areas:
🔶 IMPORTANT
PP = TradingView Premium / Professional Plan
BEP = TradingView Basic / Essential / Plus Plan
This publication uses second-based TF's, which is only available for PP users.
To ensure a smooth experience for BEP users, we have disabled the setting "Premium/Professional Plan" .
BEP users will get a warning when trying to use a second-based TF.
If possible, BEP users should use non-second-based TF's.
PP users have to enable the setting "Premium/Professional Plan" .
🔶 DETAILS
🔹 Timeframes
Most common timeframes can be used: 2W, W, 3D, 2D, D, 12h, 8h, 6h, 4h, 3h, 2h, 1h, 30min, 15min, 10min, 5min, 3min, 1min
When having the current chart timeframe at 1 of these TF's, you can set 1st and 2nd LTF. Choices are pré-set to ensure maximum usage of drawings:
In the image above you'll see there are gaps between candles.
The script ensures that when there are no trades, instead of attaching the next bar next to the previous, it leaves the gap visible (which is more realistic).
More in detail you can see the gaps are preserved:
(compared between white -current TF- candles, and LTF candles)
🔹 Limitations
When on a Weekly TF, and 2nd LTF is set at 4h, all drawings have enough space:
If we change the 2nd LTF to 2h, there isn't enough space for the second last candle, after which an orange coloured informational warning label will be shown:
When current chart TF is not 1 of the encoded TF's, a red warning text will be shown:
This script can be used using "Bar Replay", but very limited.
You can change the date ("Jump To..."), but "Play" is not advisable.
🔹 Code
This script uses string manipulation to convert inputs like "1 hour", "5 min", "5 sec" to usable timeframe strings like "60", "5" and "5S"
• str.contains(str , 'hour') ? str.tostring(str.tonumber(str.replace(str, ' hour', '')) * 60) : str
• str.replace(input.string( '5 sec', '' , options= ), " sec", "S")
• str.replace(str, " min", "")
Since string manipulation consumes resources, these are place in local blocks.
While inputs always will be extracted, whether it is put in an if-block or not, the string manipulation only will be executed when condition is fulfilled, in this case when we are at the right timeframe.
In following example you'll always see the '1 sec' input, on every TF, but the string manipulation will only happen when we are at a 1 minute TF:
str = ''
if timeframe.period == '1'
str := str.replace(input.string( '1 sec', '' , options= ), " sec", "S")
// output -> "5S" or "1S"
The "visible chart function" chart.right_visible_bar_time is used to reset everything when a new candle starts. This makes sure that when using "barstate.islastconfirmedhistory", the second last bar is used. Also all lines & boxes are automatically removed, starting with a fresh slate.
chT = timenow > chart.right_visible_bar_time
•••
if chT
if barstate.islastconfirmedhistory
f(4)
if barstate.islast
f(2)
If boxes/lines end up before the first bar, or after the last bar, this can be messy.
To protect ourselves against it 2 techniques are used:
math.max(0, x) is used to make sure lines & boxes don't end up before the first bar,
isOK = index < last_bar_index is used to be sure that the width of 1 candle (here index) is not wider than the total of all bars (which is the same as last_bar_index)
🔶 SETTINGS
3 columns:
Current TF: This columns shows you the chart TF where LTF settings are applicable.
1st LTF: set the timeframe of the first level LTF
2nd LTF: set the timeframe of the second level LTF
Colours can be set for 3 timeframes
+4-4 ChartThis overlay indicator provides a visual representation of momentum and price direction within each bar (or candlestick). It does this by comparing the current bar's open, high, low, and close to the previous bar's values, highlighting the following conditions:
Strong Up (Green): All four components (open, high, low, close) are higher than the previous bar.
Weak Up (Light Green): Three out of four components are higher than the previous bar.
Strong Down (Red): All four components are lower than the previous bar.
Weak Down (Light Red): Three out of four components are lower than the previous bar.
White: None of the strong or weak conditions are met, suggesting possible consolidation or indecision.
How to Use: The +4-4 Chart Indicator can be helpful in identifying potential trend continuation patterns, reversals, or periods of consolidation. Traders might use the predominance of green or red to gauge overall market sentiment. It is most useful to visualise long term daily, weekly, monthly market trends for SPY and QQQ etc.
Candle Length >= 70This script will highlight candles that have 70 or more points difference between open and close price. It ignores high and low prices.
% Change CandleThis script creates a trading indicator that shows how much the price of a financial instrument (like a stock or currency) changes within each trading period, represented by candles on a chart. Each candle shows the range of prices from the highest to the lowest within a specific time frame.
The indicator calculates the percentage difference between the highest and lowest prices for each candle. If the closing price of the candle is higher than the opening price, suggesting that the price has gone up during that period, the indicator will display this percentage increase as a green line. Conversely, if the closing price is lower than the opening price, indicating a price decrease, it will display the percentage decrease as a red line.
In simple terms, this indicator provides a visual way to see how much and in which direction the price is moving during each trading period, with green lines showing periods of price increase and red lines showing periods of price decrease.
Custom Swing Index [AstroHub]Custom Swing Index - Unleashing Precision in Trend Analysis
🌟 Overview:
The Custom Swing Index is a meticulously crafted tool that empowers traders with advanced insights into market dynamics, specifically focusing on identifying potential trend reversals. Developed by AstroHub, this indicator stands out for its unique combination of price-related calculations, ratios, and averages, providing a comprehensive and nuanced view of market sentiment.
📈 Key Components:
Price Calculation:
- Price Change: Captures the difference between the current and previous closing prices.
- High and Low Points: Analyzes the high and low points of each bar for crucial price movement data.
Ratios and Averages:
- Upper-Lower Shadow Ratio: Measures the relationship between the upper and lower shadows.
- Open-Close Ratio: Evaluates the ratio of opening to closing prices.
- Sum Price Changes: Sums up price changes over a specified period.
Differences and Shadows:
- Open-Close Difference: Considers the difference between opening and closing prices.
- Upper and Lower Shadow Ratios: Examines the proportions of upper and lower shadows.
Bar Size Metrics:
- Average Bar Size: Determines the average size of each bar.
- High-Low Difference: Measures the difference between the high and low points.
Swing Indicator Calculation:
- The Custom Swing Index is the result of combining these components, creating a dynamic metric that reflects potential trend reversals.
🚥 How to Use:
Understanding the Indicator:
- Bullish signals may be indicated when the swing index surpasses a defined threshold.
- Bearish signals may be indicated when the swing index falls below the negative threshold.
Visual Interpretation:
- Color-coded bars enhance visual interpretation, turning green for bullish conditions and red for bearish conditions.
Entry Points:
- Look for entry points where circle markings are present, indicating potential opportunities.
Alerts:
- Integrated alerts keep traders informed of significant swings, ensuring timely decision-making.
Kzx | RSI + Div + MACDComponents Description:
Relative Strength Index (RSI):
Purpose: Measures the magnitude of recent price changes to evaluate overbought or oversold conditions in the price of a stock or other asset.
Implementation: The script allows users to set the length of the RSI calculation and defines overbought and oversold levels, which can be visually represented on the chart. Additional features include options to fill and/or color the background of the chart when overbought or oversold levels are reached.
Divergence (Div):
Purpose: Identifies instances where the price of an asset is moving in the opposite direction of a momentum indicator, such as the RSI in this script. Divergences can signal potential trend reversals.
Implementation: The script provides options for users to define the conditions under which divergences are identified, including the source of price tops/bottoms, detection limits, and the maximum lookback period for divergence analysis. It visually highlights these divergences on the chart.
Moving Average Convergence Divergence (MACD):
Purpose: Tracks the relationship between two moving averages of a security's price. The MACD is used to identify trend direction, momentum, and potential reversal points through crossovers.
Implementation: The script calculates the MACD line and its signal line. It plots buy or sell markers based on crossovers between these two lines, indicating potential entry or exit points.
Script Category:
Category: Technical Analysis / Indicators and Strategies
Subcategory: Oscillators (for RSI and MACD) and Trend Analysis (for Divergence)
Usage:
The script is designed for traders and analysts who rely on technical analysis to make informed decisions in the financial markets. By integrating RSI, divergence detection, and MACD analysis into a single script, users can gain a more nuanced understanding of market conditions, potentially improving their trading strategies.
Customization and Visualization:
Users can customize various parameters, including lengths for RSI and MACD, overbought/oversold levels, divergence detection criteria, and visual aspects like colors and marker sizes.
The script provides visual cues directly on the price chart, making it easy to spot potential buy/sell signals, overbought/oversold conditions, and divergences without the need to switch between different indicators.
Ninja Trend v2Ninja Trend V2 is best for swing, day trading and scalping using higher timeframe bias and executing in the lower timeframes. Uses MACD for the overall bias and paints a Heikin-Ashi chart.
Settings:
Firstly, go to chart settings, check (tick) the body, uncheck borders and wicks.
Secondly, go to the script settings and input the following;
Source close
Fast moving average 7
Slow moving average 13
Signal length 4
For day trading and scalping, change the script settings timeframe to 15 minutes and use a smaller chart timeframe (M5 or M1)
For swinging change the script settings timeframe to Daily and use H4 chart timeframe.
Behind the code:
When the higher timeframe MACD histogram crosses and closes above zero line, script goes to neutral and paints grey bars waiting for the signal line to cross and close above the zero line and then paints green bars and a buy signal is generated.
When the higher timeframe MACD histogram crosses and closes below zero line, script goes to neutral and paints grey bars waiting for the signal line to cross and close below the zero line and then paints red bars.
Advantage of this is to filter out the chart noise by painting Heikin Ashi charts.
Signals:
Grey means neutral. No entries should be made.
Red means sells only. And then hold until the trend changes to green or use your desired TP and SL.
Green means buys only. And then hold until the trend changes to red or use your desired TP and SL.
HTF CandlesHTF Candles Indicator (High Time Frame Candles for Low Time Frame Charts)
Overview:
This indicator plots High Time Frame (HTF) candle boxes on Lower Time Frame (LTF) charts. The purpose is to provide traders with a visual representation of (HTF) candlestick movements on a lower timeframe (LTF) within a specified interval.
Usage:
Traders can utilize this indicator to gain insights into HTF candle movements on LTF charts. It helps in identifying the range, direction, and bodies of candles from a higher timeframe perspective.
HTF Candle Box Formation:
The script identifies the start of a new interval on the HTF by monitoring changes in the specified timeframe (Interval).
For each new interval, it records key data points, including the open, high, low, and bar index.
The indicator then uses this information to draw a box on the LTF chart, encapsulating the HTF candle's high and low.
Candle Body Representation:
Users can choose to include the candle body in the box (BodyCandleBox).
If selected, the script draws an additional box representing the HTF candle body, from the open to the previous bar's close.
Color Customization:
Traders can customize box colors for long and short candles on the HTF.
Boxes can be transparent or filled with a specified color.
Multiple Timeframes:
The script supports multiple timeframes simultaneously, allowing traders to overlay HTF candle boxes from different intervals on the same chart.
Configurable options (Interval, Interval1, Interval2) provide flexibility in selecting additional timeframes.
Note:
Understanding the visual representation of HTF candles on LTF charts can aid traders in making more informed decisions, especially when considering the interplay between different timeframes.
Fetch EngulfingBuysThis script makes use of bullish engulfing candles, trend analysis, and time.
The trend is devided between an up- and downtrend. This is based on a simple cross over strategy, using the 9 and 50 moving averages.
The buys are calculated based on how many times a bullish engulfing candle was displayed on the chart during a downtrend. Bullish engulfing candles in an uptrend will never result in a buy signal.
The sells are simply based on time. This means that the script counts how many days you have been in a trade. The default is 100 candles. You can tweak this in the settings of the indicator.
Finally, this script does not provide you with any stop-losses. I am planning on releasing a v2 once I figured out what a good balance is. Also, you might notice that there are more buys than sells. This is because only the first trade in the series is tracked. V2 could improve on this flaw of the indicator.
Hope you enjoy this first iteration of the indicator.
Local Highs & Lows ATC-LHAL [ATC]What does this indicator do?
This indicator plots the highest and lowest historical price for each candle for a specified time interval, so you can see for each candle which price was the historical ("local") maximum or minimum in the defined time interval. It helps you not to lose sight of previous highs and lows, even when working with short time frames.
In the example chart you can see the highest price for each candle, that have occurred during a defined time interval (adjustable in the indicator settings), here as an example during 1 day.
So, for example, during trading in a 5m chart, you can always see the highest and lowest price, that occurred e.g. some time ago.
Where is the benefit?
For trading, it can be a strategic advantage to know the last decisive high or low in a defined period of time.
If the time frame is very short, e.g. 5m as in the example chart shown, then the overall overview is often missing: It is often of interest to know at what price the last high was within the last day, for example. This indicator can therefore be configured by specifying a time interval so that this local high is always displayed. In the example chart, this high is shown as a plotted green line.
The same is true with the historical low point in a defined interval: This is shown in red in the example chart. As an example, one day was specified for the lookback period for both the local high and the local low.
How is the data for each candle calculated?
The indicator's script plots the highest or lowest price for each candle that occurred in the specified time period. The loopback periods can be defined separately for the high price and low price.
How is the indicator configured?
Inside of the settings of the indicator you can set the High Lookback Interval and the Low Lookback Interval easily, for example 1 day, or 30 minutes, just as you like.
This interval will be the lookback period, and the highest or lowest price that occurred during this interval will be plotted.
Why is this script special?
Unlike most other scripts, the time interval can be specified in seconds, minutes, hours or days and not by a number of candles. It is therefore independent of the time interval. It is no longer necessary to adjust the number of candles accordingly, when you switch the time frame.
Have fun!
Candle Body Percentages TableThis script is designed as an analysis tool to visually represent the relative strength of bullish and bearish market sentiments over a specified number of candles. It calculates and displays the percentages of bullish and bearish "candle bodies" as part of the total price range observed in the chosen period.
Here's a breakdown of its functionalities:
User-Defined Period Analysis: Users can specify the number of candles they wish to analyze, allowing for flexible and dynamic examination of market trends over different time frames.
Bullish Body Percentage: The script calculates the combined length of all bullish candle bodies (where the closing price is higher than the opening price) within the selected range and expresses this total as a percentage of the combined price range of all candles analyzed.
Bearish Body Percentage: Similarly, it computes the aggregate length of all bearish candle bodies (where the closing price is lower than the opening price) and presents this sum as a percentage of the total price range.
Visual Representation: The results are displayed in a table format on the chart, providing an immediate visual summary of the prevailing market dynamics. The table shows the percentages of price movement dominated by bullish or bearish sentiment.
Market Sentiment Indicator: This tool can be particularly useful for traders and analysts looking to gauge market sentiment. High bullish body percentages might indicate strong buying pressure, while high bearish body percentages could suggest significant selling pressure.
Strategic Decision Making: By providing a clearer picture of market sentiment over a user-defined period, the script aids in making informed trading decisions, potentially enhancing trading strategies that are sensitive to trends and market momentum.
Wick Percentages TableThis script is designed to calculate and display the percentage representation of wick lengths in relation to the total candle range for the last 100 candles on a trading chart. Here's a breakdown of its functionality:
Indicator Initialization: It sets up an indicator named "Wick Percentages Table" (WPT) that overlays on the trading chart.
Variables Initialization: The script initializes variables to store the total lengths of top wicks, bottom wicks, and the total ranges for the last 100 candles.
Wick and Range Calculations: For the past 100 candles, it calculates:
The length of the top wick (the distance between the high and the higher of the open or close).
The length of the bottom wick (the distance between the low and the lower of the open or close).
The total range of each candle (the distance between the high and the low).
Percentage Calculations: It computes the top and bottom wick lengths as percentages of the total candle range across the last 100 candles.
Table Display: It creates or updates a table displayed on the top right of the chart showing these percentages. The table has two rows: one for the "Top Wick %" and another for the "Bottom Wick %", with the corresponding percentages calculated and displayed.
Visibility Maintenance: It plots a dummy variable to ensure the indicator's visibility on the chart.
The purpose of this script is to provide traders with a visual representation of the wick lengths as percentages, offering insights into market behavior and potential price movements based on recent candlestick patterns. It aids in assessing market volatility and trader sentiment through the analysis of wick lengths relative to the total candle sizes.
...
Any improvements to this code would be more then welcome.
I was getting an error in line 30, the only thing I could find was to comment it out.