ZenAlgo - LevelsThis script combines multiple anchored Volume-Weighted Average Price (VWAP) calculations into a single tool, providing a continuous record of past VWAP levels and highlighting when price has tested them. Typically, VWAP indicators show only the current VWAP for a single anchor period, requiring you to either keep re-anchoring manually or juggle multiple instances of different VWAP tools for each timeframe. By contrast, this script automatically tracks both the ongoing VWAP and previously completed VWAP values, along with real-time detection of “tests” (when price crosses a particular VWAP level). It’s especially valuable for traders who want to see how price has interacted with VWAP over several sessions, weeks, or months—without switching between separate indicators or manually setting anchors.
Below is a comprehensive explanation of each component, why multiple VWAP lines working together can be more informative than a single line, and how to adjust the script for various markets and trading styles:
Primary VWAP vs. Historical VWAP Lines - Standard VWAP indicators typically focus on the current line only. This script also calculates a primary VWAP, but it “locks in” each completed VWAP value when a new time anchor is detected (e.g., new weekly bar, new monthly bar, new session). As a result, you retain an ongoing history of VWAP lines for every completed anchored period. This is more powerful than manually setting up multiple VWAP tools—one for each desired timeframe—because everything is handled in a single script. You avoid chart clutter and the risk of forgetting to reset your manual VWAP at the correct bar.
Why Combine Multiple Anchored VWAP Lines in One Script? - Viewing several anchored VWAP lines together offers synergy . You see not only the current VWAP but also previous ones from different sessions or months, all within the same chart pane. This synergy becomes apparent if multiple historical VWAP lines cluster near the same price level, indicating a potentially significant zone of volume-based support or resistance. Handling this manually would involve repeatedly setting separate VWAP indicators, each reset at specific points, which is time-consuming and prone to error. In this script, the process is automated: as soon as the anchor changes, a completed VWAP line is stored so you can observe how price eventually reacts to it, repeatedly or not at all.
Automated “Test” Detection - Once a historical VWAP line is set, the script tracks when price crosses it in subsequent bars. If the high and low of a bar span that line, the script marks it in red (both the line and its label). It also keeps a counter of how many times each line has been tested. This method goes beyond a simple visual approach by quantifying the retests. Because all these lines are created and managed in one place, you don’t have to manually label the lines or check them one by one.
Advantages Over Manually Setting Multiple VWAPs
You save screen space: Instead of layering several VWAP indicators, each with unique settings, this single script plots them all on one overlay.
Automation: When a new anchor period begins, the script “closes out” the old VWAP and starts a new one. You never need to remember to reset it manually.
Retest Visualization: The script not only draws each line but also changes color and updates the label automatically if a line gets tested. Doing this by hand would be labor-intensive.
Unified Parameters: All settings (e.g., array size, max distance, test count limit) apply uniformly. You can manage them from one place, instead of configuring multiple separate tools.
Extended Insight with Multiple VWAP Lines
Since VWAP reflects the volume-weighted average price for each chosen period, historical lines can show zones where the market had a fair-value consensus in previous intervals. When the script preserves these lines, you see potential support/resistance areas more distinctly. If, for instance, price continually pivots around an old VWAP line, that may reveal a strong volume-based level. With several older VWAP lines on the chart, you gain an immediate sense of where these volume-derived averages have appeared and how price reacted over time. This wider perspective often proves more revealing than a single “current” VWAP line that does not reflect previous anchor sessions.
Handling of Illiquid Markets and Volume Limitations
VWAP is inherently tied to volume data, so its reliability decreases if volume reporting is missing or if the asset trades with very low liquidity. In such cases, a single large trade might momentarily skew the VWAP, resulting in “false” test signals when the high/low range intersects an abnormal price swing. If you suspect the data is incomplete or the market is unusually thin, it’s wise to confirm the validity of these VWAP lines before using them for any decision-making. Additionally, unusual market conditions—like after-hours trading or sudden high-volatility events—may cause VWAP to shift quickly, setting up multiple lines in a short time.
Key User-Configurable Settings
Hide VWAP on Day timeframe and above : Lets you disable the primary VWAP plot on daily or higher timeframes for a cleaner view.
Anchor Period : Select from Session, Week, Month, Quarter, Year, Decade or Century. Controls how frequently the script resets and preserves the VWAP line.
Offset : Moves the current VWAP line by a specified number of bars if you need a shifted perspective.
Max Array Size : Caps how many past VWAP lines the script will remember. Prevents clutter if you’re charting very long histories.
Max Distance : Defines how far back (in bar index units) a line is kept. If a line’s start bar is older than this threshold, it’s removed, keeping the chart uncluttered.
Max Red Labels : Limits the number of tested (red) VWAP lines that appear. If price tests a large number of old lines, only the newest red labels remain once you hit the set limit.
Workflow Overview
As soon as a new anchor period begins (e.g., a new weekly candle if “Week” is chosen), the script ends the current VWAP and stores that final value in its internal arrays.
It creates a dotted line and label representing the completed VWAP, and keeps track of whether it has been tested or not.
Subsequent bars may then cross that line. If a bar’s high/low includes the line’s value, it’s flagged as tested, labeled red, and a test counter increases.
As new anchored periods come, old lines remain visible—unless they fall outside your maxDistance or you exceed the maximum stored line count.
Real-World Benefits
Combining multiple VWAP lines—ranging, for example, from session-based lines for intraday perspectives to monthly or quarterly lines for broader context—provides a layered view of the volume-based fair price. This can help you quickly spot zones where price repeatedly intersects old VWAPs, potentially highlighting where bulls or bears took action historically. Because this script automates the management of all these lines and flags their retests, it removes a great deal of repetitive manual work that would typically accompany multiple, separate VWAP indicators set to different anchors.
Limitations & Practical Use
As with any volume-related tool, the script depends on reliable volume data. Assets trading on smaller venues or during illiquid periods may produce spurious signals. The script does not signal buy or sell decisions; rather, it helps visually map out where volume-weighted averages from previous periods might still be relevant to market behavior. Always combine the insight from these historical VWAP lines with your existing analytical approach or other technical and fundamental tools you use.
Conclusion
This script unifies past and present VWAP lines into one overlay, automatically detecting new anchor resets, storing the final VWAP values, and indicating whenever old lines are retested by price. It offers synergy through the simultaneous display of multiple historical VWAP lines, making it quicker and easier to detect potential support/resistance zones and better reflect changing market volumes over time. You no longer need to manually create, configure, or reset multiple VWAP indicators. Instead, the script handles all aspects of line creation, retest detection, and clutter management, giving you a robust framework to observe how historical VWAP data aligns with current price action.
By understanding the significance of multiple anchored VWAP lines, you can assess market structure from multiple angles in a single view. As always, ensure you confirm the reliability of the volume data for your particular asset and use these lines in conjunction with other analyses to form a well-rounded perspective on current market behavior.
Magic
Magic VIBIntroducing the "Magic Vib Indicator" – 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.
MAGIC MACDMAGIC MACD ( MACD Indicator with Trend Filter and EMA Crossover confirmation and Momentum). This MACD uses Default Trading view MACD
from Technical indicators library and adding a second MACD along with 3 EMA's to detect Trend and confirm MACD Signal.
Eliminates usage of 3different indicators (Default MACD , MACD-2,EMA5, EMA20, EMA50)
Basic IDEA.
Idea is to filter Histogram when price is above or below 50EMA. Similar to QQE -mod oscillator but Has a EMA Filter
1.Take DEFAULT MACD crossover signals with lower period
2.check with a Higher MACD Histogram.
3.Enter upon EMA crossover signal and Histogram confirmation.
Histogram changes to GRAY when price is below EMA 50 or above EMA 50 (Follows Trend)
4.Exit on next Default MACD crossover signal.
Overview :
Moving Average Convergence Divergence Indicator Popularly Known as MACD is widely used. MACD Usually generates a lots of False signals
and noise in Lower Time Frames, making it difficult to enter a trade in sideways market. Divergence is a major issue along with sideways
movement and tangling of MACD and Signal Lines. There is no way to confirm a Default MACD signal, except to switch time frames and
verify.
Magic MACD Can be used to in combination with other signals.
This MACD uses two MACD Signals to verify the signal given by Default MACD . The Histogram Plot shown is of a higher period
MACD (close,5,50,30) values. When a signal is generated on a lower MACD it is verified by the histogram with higher time period.
Technicals Used:
1. Lower MACD-1 values 12,26 and signal-9 (crossover Signals)
2. Higher MACD-2 values 5,50 and signal-30 (Histogram)
3. EMA 50 (Histogram Filter to allow only if price above or below Ema 50)
4. EMA 5 and EMA 20 for crossover confirmation of trend
What's is in this Indicator?
1.Histogram-(higher period 5,50 and 30signal)
2. MACD crossover Signals-(lower period Default MACD setting)
3.Signal Lines-( EMA 5 & 20)
Implemented & Removed in this Indicator
1. Default MACD and Signal Lines are removed completely
2. MACD crossover are taken on lower periods and plotted as signals(Blue Triangle or Red Triangle)
3. Histogram is plotted from a higher Period providing a clear picture with Higher Time period
4. EMA 5 and EMA 20 are used for MACD signal confirmation
How to use?
Up Signal
1. MACD Default (12,26,30) up signals are shown in Blue
2. Wait till the Histogram changes Blue
3. Look for EMA signals crossover near by
Down Signal
1. MACD Default (12,26,30) up signals are shown in Red
2. Wait till the Histogram changes Red
3. Look for EMA signals crossover near by
Do's
Consider only opposite color as signals
1. Red Triangle on Blue Histogram(likely to move down direction)
2. Blue Triangle on Red Histogram (Likely to move up direction)
Don'ts
1.Ignore Blue Signal on Blue Histogram (pull back signals can be used to enter trade if you miss first crossover)
2.Ignore Red Signal on Red Histogram(pull back signals can be used to enter trade if you miss first crossover)
3.Ignore Up and Down signals till Gray or Blacked out area is finished in Histogram
Tips:
1. EMA plot also shows pull back areas along with signals
2.side by side opposite signals shows sides ways movement
3. EMA 5,20 is plotted on MACD Histogram for Additional Benefit
Thanks & Credits
To Tradingview Team for allowing me to use their default MACD version and coding it in to a MAGIC MACD by adding a few lines of code that
makes it more enhanced.
Warning...!
This is purely for Educational purpose only. Not to be used as a stand alone indicator. Usage is at your own Risk. Please get familiar with its working before implementing. Its not a Financial Advice or Suggestion . Any losses or gains is at your own risk.
Moving Average - fade when crossed [cajole]This indicator simply provides a moving average (SMA, EMA, etc. can be selected) which hides itself when touched by the price.
Two potential uses:
Set the growth rate to be slow, to highlight only very rapid moves on a chart.
Use the default settings and change the averaging period until the MA line remains bright. This MA can then act as a good trailing stop for the specific security.
TradingView does not remember indicator settings for specific charts. Consider adding a text label to your chart after you identify the ideal trailing stop. Similar trailing-stop methods are recommended by Kristjan Qullamagie is identical to Jesse Stine's "magic line" concept .
PSv5 Color Magic and Chart Theme SimulatorKEEP YOUR COINS FOLKS! I DON'T NEED THEM, DON'T WANT THEM. Many other talented authors on TV deserve them.
INTRODUCTION:
This is my "PSv5 Color Magic and Chart Theme Simulator" displayed using Pine Script version 5.0. The purpose of this PSv5 colorcator is to show vivid colors that are most suitable in my opinion for modifying or developing Pine scripts. Whether you are new to Pine or an experienced Pine poet, this should aid you in developing indicators with stunning color from the provided color list that is easily copied and pasted into any novel script you should possess. Whichever colors you choose, and how, is up to your imagination's capacity.
COMMENTARY:
I have a thesis. Pine essentially is a gigantor calculator with a lot of programmable bells and whistles to perform intense analytics. Zillions of numbers per day are blended up into another cornucopia of numbers to analyze. The thing is, ALL of those numbers are moot unless we can informatively portray them in various colorized forms with unique methods to point out significant numeric events. By graphically displaying them with specific modes of operation, only then do these numbers truly make any sense to us and become quantitatively beneficial.
I have to admit... I hate numbers. I never really liked them, even before I knew what an ema() was. Some days I almost can't stand them, and on occasion I feel they deserve to be flushed down the toilet at times. However, I'm a stickler for a proper gauge of measurements. Numbers are a mental burden, but they do have "purpose and meaning". That's where COLOR comes in! By applying color in specific ways in varying dynamic forms, we can generate smarter visual aids from these numerics. Numbers can be "transformed" into something colorful it wasn't before, into a tool, like a hammer. But we don't need a hammer, we need an impressive jack hammer for BIG problem solving that we could never achieve in the not to distant past.
As time goes on, we analytically measure more, and more, and more each year. It's necessary to our continual evolution. That's one significant difference between us and cave men, and the pertinent reason why we are quickly evolving as a species, while animals haven't. Humankind is gifted to enumerate very well AND blessed to see in color. We use it for innumerable things in the technological present for purpose and pleasure. Day in and day out, we take color for granted, because it's every where we can look. The fact is, color is the most important apparatus in humankind's existence EVER. We wouldn't have survived this far without it.
By utilizing color to it's grand potential, greater advancements can be attained while simultaneously being enjoyed visually. Once color is transformed from it's numeric origins into applicable tools, we can enjoy the style, elegance, and QUALITATIVE nature of the indication that can be forged. Quantities can't reveal all. Color on the other hand has a handy "quality" factor to it, often revealing things we can't ordinarily recognize. When high quality tools provide us with obtained goals, that's when we will realize how magical color truly is, always has been, and shall always be.
The future emerging economies and future financial vessels of people around the globe are going to be dependent on the secured construction of intelligent applications with a rock solid color foundation, not just math alone. I have no doubt about that. I can envision that with my eyes closed. To make an informed choice, it should be charted or graphed somehow prior to a final executive decision to trade. Going back to abysmal black and white with double decimal points placed next to cartoons within extinction doomed newspapers is not a viable option any more.
OBSERVATIONS AND UTILITY:
One thing you will notice is the code is very dense. Looks almost hideous right? Well, the variable naming is lengthy, but it's purpose is to be self explanatory, even for those who don't know how to program, YET. I'm simply not a notation enthusiast. My main intention was to provide clearly identifiable variables from their origin of assignment to their intended destination of use, clearly visible for anyone visiting. The empowerment of well versed words that are easier to understand, is a close rival to the prominent influence color has.
Secondly, I'm displaying hline() and label.new() as prime candidates to exemplify by demonstration how the "Power of Color" can be embraced with the "Power of Pine". Color in Pine has been extensively upgraded to serve novel purposes to accomplish next generation indicators that do and WILL come to exist. New functions included with PSv5 are color.rgb(), color.from_gradient(), color.r(), color.g(), color.b(), and color.t() to accompany color.new() in our mutual TV adventures. Keep in mind, the extreme agility of color also extends to line.new(), the "entirely new" linefill.new(), table.new(), bgcolor() and every other function that may utilize color.
There's a wide range of adjustability in Settings to make selections to see how they perform on different backgrounds, with their size and form. As you curiously toy with those, you're going to notice how some jump out like laser beams while others don't. Things that aren't visually appealing, still have very viable purposes, even if they don't stand out in the crowd. Often, that's preferable. The important thing is that when pertinent information relative to indication is crucial, you can program it with distinction from an assortment of a potential 1.67 million colors that can be created in Pine. "These" are my chosen favorite few, and I hope you adopt them.
PURPOSES:
For those of you who are new to Pine Script, this also may help you understand color hex/rgb and how it is utilized in Pine in a most effective manner. The most skilled of programmers can garner perks as well. There is countless examples of code diversity present here that are applicable in other scripts with adequate mutation. Any member has the freedom use any of this code in this script any way they see fit. It's specifically intended for all. There is absolutely no need for accreditation for any of this code reuse ever, in the present case. Don't worry about, I'm not.
The color_tostring() will be most valuable in troubleshooting color when using color.rgb() and becoming adept with it. I'm not going to be able to use color.rgb() without it. Chameleon indicators of the polychromatic variety are most likely going to be fine tuned with color_tostring() divulging it's results to label.new() or even table.new() maybe. One the best virtues of this script in chart, is when you hover over the generated labels, there's a hidden gift for those who truly wish to learn the intricate mechanics of diverse color in Pine. Settings has informative tooltips too.
AFTERTHOUGHTS:
Colors are most vibrant on the "Black Chart" which is the default, but it doesn't currently exist as a chart theme. With the extreme luminous intensity of LCDs in millicandela( mcd ), you may notice "Light" charts may saturate the colors making charts challenging to analyze. Because of this, I personally use "Dark Charts" and design my indicators specifically for these. I hope this provides inspiration for the future developers who are contemplating the creation of next generation indicators and how color may enhance their usefulness.
When available time provides itself, I will consider your inquiries, thoughts, and concepts presented below in the comments section, should you have any questions or comments regarding this indicator. When my indicators achieve more prevalent use by TV members , I may implement more ideas when they present themselves as worthy additions. Have a profitable future everyone!
Magic Band MA20 High LowMA 20 period Magic Band - based on Highs and Lows (as opposed to Close), can be used on any time frame for a better grip on price action.
Hidden Supports & Resistances + Round LevelsIf you search the internet, you won't find much about these types of resistance and support levels. Hidden levels are SnR levels calculated based on some psychological patterns and sometimes it's unbelievable that the chart responds to these levels.
So use the indicator and check the idea.
Magic 8-Ball [QuantNomad]Sometimes get tired and what to create something fun and useless )
Here I developed a magic 8-ball. You can apply it to the chart, and it randomly will show you a prediction unique for your symbol/candle time.
Please don't take this prediction seriously; there is 0 rationale behind it. However, I believe it can outperform some traders here on TradginView =)
So it will show you one of the following messages:
Buy
Strong Buy
HODL
Sell
Strong Sell
Ask again later
Better not tell you now
Neutral
Cannot predict now
Very doubtful
Magic 8The Magic 8 is reference of when to go long a stock after a drop of its price action. An arrow will fire off and the background will change, when the price action crosses the 8sma (from above or below). The target would then be the 20sma or the 50sma with a stop one tick below the 5 min entry bar. This was emphasized to me by Jory Lamping at Traderstoolbox. I have put it out here for anyone to use, on any stock or market price action. It is a way to find an entry by knowing your stop and target prices when you enter a trade. Please keep in mind that all trading is the responsibility of the trader ultimately.
SW Magic Signals EMA [Sergio Waldoke]// SW Magic Signals EMA , shorttitle="MagicSignalsEMA"
// Script created by Sergio Waldoke (BETA VERSION v0.99)
// Buy Long when you see a Green buy arrow
// Sell Short when you see a Red sell arrow
// Basis Signal is the difference between EMA's. When the difference change from increase to decrease or inversely, signals are triggered
// Step signal shows if difference increases or decreases
Magic Moving Averages!Magic Moving Averages! is an indicator that comes standard in many forex trading platforms, and now on Tradingview designed for comfortable readability! It incorporates a series of simple moving averages plotted together with increasing periods. Finding a good trade with this is easily found with a set of rules. I took a course with Alex du Plooy on these rules and am using his suggested default values, however there are many more teachers of this method that have various rules that may be similar. If you desire a greater MA spread simply increase the MA Separation value in the input. Best for 15 mins or longer charts.
Happy trading