WAP Maverick - (Dual EMA Smoothed VWAP) - [mutantdog]Short Version:
This here is my take on the popular VWAP indicator with several novel features including:
Dual EMA smoothing.
Arithmetic and Harmonic Mean plots.
Custom Anchor feat. Intraday Session Sizes.
2 Pairs of Bands.
Side Input for Connection to other Indicator.
This can be used 'out of the box' as a replacement VWAP, benefitting from smoother transitions and easy-to-use custom alerts.
By design however, this is intended to be a highly customisable alternative with many adjustable parameters and a pseudo-modular input system to connect with another indicator. Well suited for the tweakers around here and those who like to get a little more creative.
I made this primarily for crypto although it should work for other markets. Default settings are best suited to 15m timeframe - the anchor of 1 week is ideal for crypto which often follows a cyclical nature from Monday through Sunday. In 15m, the default ema length of 21 means that the wap comes to match a standard vwap towards the end of Monday. If using higher chart timeframes, i recommend decreasing the ema length to closely match this principle (suggested: for 1h chart, try length = 8; for 4h chart, length = 2 or 3 should suffice).
Note: the use of harmonic mean calculations will cause problems on any data source incorporating both positive and negative values, it may also return unusable results on extremely low-value charts (eg: low-sat coins in /btc pairs).
Long version:
The development of this project was one driven more by experimentation than a specific end-goal, however i have tried to fine-tune everything into a coherent usable end-product. With that in mind then, this walkthrough will follow something of a development chronology as i dissect the various functions.
DUAL-EMA SMOOTHING
At its core this is based upon / adapted from the standard vwap indicator provided by TradingView although I have modified and changed most of it. The first mod is the dual ema smoothing. Rather than simply applying an ema to the output of the standard vwap function, instead i have incorporated the ema in a manner analogous to the way smas are used within a standard vwma. Sticking for now with the arithmetic mean, the basic vwap calculation is simply sum(source * volume) / sum(volume) across the anchored period. In this case i have simply applied an ema to each of the numerator and denominator values resulting in ema(sum(source * volume)) / ema(sum(volume)) with the ema length independent of the anchor. This results in smoother (albeit slower) transitions than the aforementioned post-vwap method. Furthermore in the case when anchor period is equal to current timeframe, the result is a basic volume-weighted ema.
The example below shows a standard vwap (1week anchor) in blue, a 21-ema applied to the vwap in purple and a dual-21-ema smoothed wap in gold. Notably both ema types come to effectively resemble the standard vwap after around 24 hours into the new anchor session but how they behave in the meantime is very different. The dual-ema transitions quite gradually while the post-vwap ema immediately sets about trying to catch up. Incidentally. a similar and slower variation of the dual-ema can be achieved with dual-rma although i have not included it in this indicator, attempted analogues using sma or wma were far less useful however.
STANDARD DEVIATION AND BANDS
With this updated calculation, a corresponding update to the standard deviation is also required. The vwap has its own anchored volume-weighted st.dev but this cannot be used in combination with the ema smoothing so instead it has been recalculated appropriately. There are two pairs of bands with separate multipliers (stepped to 0.1x) and in both cases high and low bands can be activated or deactivated individually. An example usage for this would be to create different upper and lower bands for profit and stoploss targets. Alerts can be set easily for different crossing conditions, more on this later.
Alongside the bands, i have also added the option to shift ('Deviate') the entire indicator up or down according to a multiple of the corrected st.dev value. This has many potential uses, for example if we want to bias our analysis in one direction it may be useful to move the wap in the opposite. Or if the asset is trading within a narrow range and we are waiting on a breakout, we could shift to the desired level and set alerts accordingly. The 'Deviate' parameter applies to the entire indicator including the bands which will remain centred on the main WAP.
CUSTOM (W)ANCHOR
Ever thought about using a vwap with anchor periods smaller than a day? Here you can do just that. I've removed the Earnings/Dividends/Splits options from the basic vwap and added an 'Intraday' option instead. When selected, a custom anchor length can be created as a multiple of minutes (default steps of 60 mins but can input any value from 0 - 1440). While this may not seem at first like a useful feature for anyone except hi-speed scalpers, this actually offers more interesting potential than it appears.
When set to 0 minutes the current timeframe is always used, turning this into the basic volume-weighted ema mentioned earlier. When using other low time frames the anchor can act as a pre-ema filter creating a stepped effect akin to an adaptive MA. Used in combination with the bands, the result is a kind of volume-weighted adaptive exponential bollinger band; if such a thing does not already exist then this is where you create it. Alternatively, by combining two instances you may find potential interesting crosses between an intraday wap and a standard timeframe wap. Below is an example set to intraday with 480 mins, 2x st.dev bands and ema length 21. Included for comparison in purple is a standard 21 ema.
I'm sure there are many potential uses to be found here, so be creative and please share anything you come up with in the comments.
ARITHMETIC AND HARMONIC MEAN CALCULATIONS
The standard vwap uses the arithmetic mean in its calculation. Indeed, most mean calculations tend to be arithmetic: sma being the most widely used example. When volume weighting is involved though this can lead to a slight bias in favour of upward moves over downward. While the effect of this is minor, over longer anchor periods it can become increasingly significant. The harmonic mean, on the other hand, has the opposite effect which results in a value that is always lower than the arithmetic mean. By viewing both arithmetic and harmonic waps together, the extent to which they diverge from each other can be used as a visual reference of how much price has changed during the anchored period.
Furthermore, the harmonic mean may actually be the more appropriate one to use during downtrends or bearish periods, in principle at least. Consider that a short trade is functionally the same as a long trade on the inverse of the pair (eg: selling BTC/USD is the same as buying USD/BTC). With the harmonic mean being an inverse of the arithmetic then, it makes sense to use it instead. To illustrate this below is a snapshot of LUNA/USDT on the left with its inverse 1/(LUNA/USDT) = USDT/LUNA on the right. On both charts is a wap with identical settings, note the resistance on the left and its corresponding support on the right. It should be easy from this to see that the lower harmonic wap on the left corresponds to the upper arithmetic wap on the right. Thus, it would appear that the harmonic mean should be used in a downtrend. In principle, at least...
In reality though, it is not quite so black and white. Rarely are these values exact in their predictions and the sort of range one should allow for inaccuracies will likely be greater than the difference between these two means. Furthermore, the ema smoothing has already introduced some lag and thus additional inaccuracies. Nevertheless, the symmetry warrants its inclusion.
SIDE INPUT & ALERTS
Finally we move on to the pseudo-modular component here. While TradingView allows some interoperability between indicators, it is limited to just one connection. Any attempt to use multiple source inputs will remove this functionality completely. The workaround here is to instead use custom 'string' input menus for additional sources, preserving this function in the sole 'source' input. In this case, since the wap itself is dependant only price and volume, i have repurposed the full 'source' into the second 'side' input. This allows for a separate indicator to interact with this one that can be used for triggering alerts. You could even use another instance of this one (there is a hidden wap:mid plot intended for this use which is the midpoint between both means). Note that deleting a connected indicator may result in the deletion of those connected to it.
Preset alertconditions are available for crossings of the side input above and below the main wap, alongside several customisable alerts with corresponding visual markers based upon selectable conditions. Alerts for band crossings apply only to those that are active and only crossings of the type specified within the 'crosses' subsection of the indicator settings. The included options make it easy to create buy alerts specific to certain bands with sell alerts specific to other bands. The chart below shows two instances with differing anchor periods, both are connected with buy and sell alerts enabled for visible bands.
Okay... So that just about covers it here, i think. As mentioned earlier this is the product of various experiments while i have been learning my way around PineScript. Some of those experiments have been branched off from this in order to not over-clutter it with functions. The pseudo-modular design and the 'side' input are the result of an attempt to create a connective framework across various projects. Even on its own though, this should offer plenty of tweaking potential for anyone who likes to venture away from the usual standards, all the while still retaining its core purpose as a traders tool.
Thanks for checking this out. I look forward to any feedback below.
Intraday
Initial BalanceThis script calculates and draws the initial balance price levels which can be really interesting for intraday activities.
Note: Obviously, you need to wait for the calculation period to finish in order to see your daily levels
The tool includes the following options
Customization of the session used to calculate the initial balance (default 0930-1030)
Show/Hide the calculation period (as a background color)
Show/Hide extra levels (report the IBH-IBL delta above and under the IB area)
Show/Hide intermediate levels (displays 50% price levels in the IB and extra areas)
Show labels (Display levels names as well as their price on corresponding lines)
Levels names:
- IBH (Initial Balance High)
- IBH (Initial Balance Low)
- IBM (Initial Balance Middle)
- IBH x2
- IBL x2
Default colors are green for high levels, red for low levels, and orange for intermediate levels
Extend levels (extends the current levels to left/right/both/none sides of the chart)
MILK (My Intraday Lazy Kit)I made this script to group information considered useful in forex day trading, of course it can be used on crypto or other markets.
First of all, feel free to suggest any improvement/new feature you would consider interesting for such an use. This is not especially a final version and I'm sure other relevant information can be added in this tool.
Current features are the following
An international clock showing time and session status (open/closed) for 5 different cities. You can modify it in parameters.
Drawings of previous days/weeks open/high/low/close prices, which will be often used as supports and resistances zones.
The Clock shows
City
Time (with a bgcolor corresponding to the "period" of the day (Morning, Afternoon, Evening, Night)
Session status (Cyan when the corresponding session is open, blue when it's closed)
Price levels names are
YTD-H : Yesterday's high
YTD-L : Yesterday's low
YTD-C : Yesterday's close
YTD-O : Yesterday's open
PWH : Previous week high
PWL : Previous week low
PWO : Previous week open
PWC : Previous week close
Levels width and colors can be modified.
You can also enable/disable the clock, and daily or weekly levels in the options panel.
Nothing more to say for now, I mainly integrated information I like to have, but I'll probably add new features in it if I get some.
RVI Relative Volume IntradayRVI Relative Volume Intraday is a simple label next to the last bar that shows the relative volume as a percentage of the ratio of today's volume to the average volume for the same intraday time period of the last five days. Useful for break-out intraday strategies.
Moving Average and PerformanceThis indicator combines several tools that are used daily for analysis:
The performance of the action we are seeing.
The percentage of retracement the stock has made from its all time high.
Possibility of using up to four exponential or simple moving averages in the length we want.
It allows to see or not the levels of four moving averages in daily temporality.
This indicator is unique since it allows you to see in real time the performance of the Stock or ETF that is being analyzed, which allows you to make a timely decision for short, medium or long-term investments.
If you are doing scalping, swing, or intraday trading, you can see the retracement it has made from the ATH (3, 5, 10 or 13%) which can become Supports or Resistances where the price can rebound, Likewise, the levels of the moving averages in 1D temporality can be observed at the same time, which are usually dynamic supports or resistances and it can also be observed in the same temporality of the chart four moving averages that the trader can configure in the length that you deem convenient to improve your analysis and make decisions as quickly as possible.
Este indicador es único ya que permite ver en tiempo real el rendimiento de la Acción o ETF que se está analizando, lo cual permite tomar una decisión oportuna para las inversiones a corto, mediano o largo plazo.
Si se está haciendo trading tipo scalping, swing, o intradía, se puede observar el retroceso que ha hecho desde el ATH (3, 5, 10 o 13%) el cual puede convertirse en Soportes o Resistencias en donde el precio puede hacer rebotes, así mismo se pueden estar observando al mismo tiempo los niveles de las medias móviles en temporalidad de 1D, los cuales usualmente son Soportes o resistencias dinámicas y también se puede observar en la misma temporalidad del gráfico cuatro medias móviles que el trader puede configurar en la longitud que crea conveniente para mejorar su análisis y tomar decisiones lo más rápido posible.
Intraday Trading ZonesThis script can help in intraday trading. It can plot
1. Previous day high, low and close.
2. Intraday Fibonacci levels
3. Big Round Numbers
3. CPR (Central Pivot Range)
4. VWAP
Wide BarsSimple scripts show the wide range bars within in the look back period, visualizing the bigger momentum.
Added four exponential moving averages which define the trend of the instrument.
Wide range candles in the direction of overall trend on higher timeframes; give confluence of higher participation in the same direction.
Note : Decent volume above the average volume with wide range candle adds more value.
Green and Red Bar Difference - Intra Day Simple Indicator which plots the total of all green bars and red bars as the day progress. On a trending day there will be difference between the two lines , on a range bound day both the lines will be very close. If both the lines are far apart for some time but start moving towards each other it is a signaling end of the trend .
Intrangle - Straddle / StrangleIntrangle is an indicator to assist Nifty / Bank Nifty Option Writers / Sellers to identify the PE / CE legs to Sell for Straddle and Strangle positions for Intraday.
Basic Idea : (My Conclusion for making this Indicator)
1) Last 10 Years data says Nifty / Bank Nifty More than 66% of times Index are sideways or rangebound (within 1% day) .
2) Mostly, First one hour high and low working as good support and resistance.
Once First one hour complete, this indicator will show Strangle High (CE), Strangle Low (PE) and Straddle (CE/PE).
Straddle:
If you want to do straddle strategy, sell at the money strike (CE/PE) when price comes near to the straddle line (black line),
Strangle:
If you want to do Strangle strategy, sell Strangle High (CE) and Strangle Low (PE) when price comes near to the straddle line (black line). Both Strangle High and Low will be out of the money when price near to the straddle line (black line).
Adjustment: option adjustment to be done based on the price movement. Adjustment purely up to the user / trader.
Note1: If price not comes to near straddle line after first hour, better to stay light…
Note2: If first hour not giving wide High / Low, don’t use strangle strike based on this indicator. Straddle can be done any day with require adjustment / hedge. This Indicator is purely for education purpose, user / trader has to be back-tested before their start using it.
This indicator will work in Nifty / Bank Nifty only. Best Time frames are 3/5/15 Mins. This is purely made for Intraday
Happy Trading 😊
Gann Circle Intraday LevelsThis indicator is an intraday version of Gann Circle Swing Levels indicator. It further divides the Gann Circle into the Eighths in order to generate intraday Levels.
Introduction
This indicator is based on W. D. Gann's Square of 9 Chart and can be interpreted as the Gann Circle / Gann Wheel / 360 Degree Circle Chart or Square of the Circle Chart for intraday usage.
Spiral arrangement of numbers on the Square of 9 chart creates a very unique square root relationship amongst the numbers on the chart. If you take any number on the Square of 9 chart, take the square root of the number, then add 2 to the root and re-square it, resulting in one full 360 degree cycle (i.e. a 360 degree Circle) out from the center of the chart.
For example,
the square root of 121 = 11,
11 + 2 = 13,
and the square of 13 = 169
The number 169 is one full 360 degree cycle out (with reference to 121) from the center of the Square of 9 chart. If we further divide the circle in eight equal parts of 45 degree each, following intermediate resistance levels (ascending) would be generated:
127 (45 degree)
133 (90 degree)
139 (135 degree)
145 (180 degree)
151 (225 degree)
157 (270 degree)
163 (315 degree)
Similarly, if you take any number on the Square of 9 chart, take the square root of the number, then subtract 2 from the root and re-square it, resulting in one full 360 degree inward rotation towards the center of the chart.
For example,
the square root of 565 = 23.77,
23.77 - 2 = 21.77,
and the square of 21.77 = 473.93 (approximately equal to 474, which is directly below 565 on the Square of 9 chart)
The number 474 is one full 360 degree inward rotation (with reference to 565) towards the center of the chart. If we further divide the circle in eight equal parts of 45 degree each, following intermediate support levels (descending) would be generated:
553 (45 degree)
541 (90 degree)
529 (135 degree)
518 (180 degree)
507 (225 degree)
496 (270 degree)
485 (315 degree)
How to Use this Indicator ?
This indicator is designed to generate Gann Circle Intraday Levels based on HIGH and LOW of the opening bar for the day. You may use the bar interval (1 minute, 3 minutes, 5 minutes, 15 minutes etc.) which is suitable for the underlying instrument. Support and resistance lines for the day would be generated only after confirmation of the opening bar of the day.
Input :
Number of Gann Levels (Number of Gann Levels to be projected)
Color codes for the Support and Resistance Levels
Output :
Gann Support or Resistance Levels:
HIGH and LOW of the Opening bar for the day (dashed BLUE lines)
Support levels calculated with reference to the HIGH of the opening bar
Resistance levels calculated with reference to the LOW of the opening bar
Screener: Alpha & BetaThis is a Live Screener for my previous Alpha & Beta indicator, which filters stocks lively based on the given values.
Use 5min timeframe for Live Intraday.
The default stocks in the screener is selected based on high beta value from F&O listed stocks. It may include other stocks also.
User can input stocks of your choice either through the menu or through the Pine editor.
The maximum number of stocks inputs is only 40. The indicator includes only 20 stocks by default.
More number of stocks can be added but it makes the screener slower to load.
Open the indicator in a sperate tab or window to avoided the loading lag.
It is recommended to choose only 10 to 20 stocks based on the weightage from each sectors.
Beta values are dynamic. It changes from day to day based on the trend and sector.
Update the sock list weekly or twice a week or monthly.
Use investing.com screener(preferably) or TradingView screener for shortlisting beta stocks.
Remember that majority of indicators fails in a sideways market, also every indicator is not 100% accurate.
EMA 8, 21 and SMA 50 from daily timeframe horizontal linesShow horizontal lines after the last point of EMA8, EMA21 and SMA50 from daily timeframe. Always shows the daily lines no matter the timeframe of your chart. It can be use as a reference in intraday time frames lower than 1 day.
Muestra líneas horizontales que continúan del último punto del EMA8, EMA21 y SMA50. Siempre muestra las líneas diarias sin importar el rango de tiempo que estés utilizando. Se puede usar como líneas de referencia para intradía.
Cvwap-Pvwap 2.0A simple vwap based Intraday trend indicator.
Volume-Weighted Average Price (VWAP) - the average price weighted by volume, starts when trading opens and ends when it closes. This can help institutions buy or sell in large orders, without disturbing the market.
After buying or selling, institutions compare instrument price to closing VWAP values at end of the day.
For big financial institutions;
A buy order executed below the VWAP value, considered a good fill because the security was bought at a below average price.
A sell order executed above the VWAP would be deemed a good fill because it was sold at an above average price.
Simple price based moving average is not helpful for them; = as it doesn't incorporates volume traded. Hence - VWAP :)
So how it helps us in decoding the IntraDay-trend? - Through a 2 day vwap co-relation.
So, Closing value of previous day vwap = Pvwap
Today's running vwap = Cvwap
Defining the IntraDay Trend:
Moderately Bullish = candle closing price above Pvwap but below Cvwap
Super Bullish = Closing price is above both (Cvwap and Pvwap)
Moderately Bearish = Closing price is above Cvwap but below Pvwap
Super Bearish = Closing Price is below both (Cvwap and Pvwap)
A big gap between the Cvwap and the candle closing price defines the strong participation from institutions in that direction. (Strong Trend)
Moving with the smart money, in the overall trend is a wise decision for any intraday trader and this helps at its best.
Intraday SeasonalityDay trading trend filter indicator designed to hep get better entries or exits based on historical opens and closes each hour.
This indicator is NOT designed as an entry or exit signal. The purpose behind it is to give you statistical information about how likely certain times of day are either bullish, bearish or neutral and use that to confirm or reject other trading signals.
For example you might be anticipating a breakout based on your strategy or another indicator but see that the next few hours are usually bearish and re-evaluate entering the trade.
The Intraday Seasonality indicator calculates the percentage of candles per hour that had a higher close than open.
Default settings are:
- a look-back of 90 days.
- extreme bullish (bright green) above 74%
-extreme bearish (bright red) below 25%
- bullish (green) above 55%
- bearish (red) below 45%
- neutral (white) exactly 50%
- no trend (gray) 46% - 54%
All of these are updatable via the settings.
This indicator is designed to work only on the 1 hour timeframe.
To use the indicator set your local timezone offset in the indicator settings.
*Due to daylight savings and certain timezones changing throughout the year there is a timezone override in the indicator settings if the indicator doesn't pick up the correct local time.
Key Levels SpacemanBTC IDWMKey levels, plotted automatically
Additional timeframes can be added on request
Useful for seeing strength of the trend in the market
Half BackA dynamic intraday midpoint for Day Timeframe trader reference.
Midpoint is halfway between the day's highest high and lowest low.
Midpoint resets daily.
GMS: Market Performance IndicatorThis is just an easy way to visualize what the market's performance is (in price or percent) in any given session for any chosen time frame. The magnitude of price moves are not the same today as they were 50 years ago, which is why I included the percent selection to better compare historical movements. Time frame selections are Daily, Weekly, Monthly, Quarterly, and Yearly. I added in a little background highlight to show the start of a new session as well.
The source code is open so feel free to poke around!
Hope this helps,
Andre
MAST TrendHello Traders !!
This is a simple super trend based MAST trend.
By default the supertrend is 10 period with 3 ATR multiplier.
A moving average is used to benefit from the pullback entries.
Bullish Pullback : Price above Supertrend & below MA
Bullish: Price above Supertrend and above MA
Bearish pullback : Price below Supertrend & above MA
Bearish : Price below Supertrend & below MA
Refer to investopedia or any relevant articles for in detail about Supertrend.
Intraday Caja de AlfredoThis indicator is not a strategy by itself, and only works intraday.
A box will start to draw an hour after the market open and continue being drawn for the next two hours. This is being done due to the theory of it being the time where small investors and institutions are moving the price with less volatility than the first hour.
Once the Box has been closed support and resistance of the day will be drawn. Price should try remaining between t his two.
There are alerts for the breakthrough of the box to either upside or downside. This should be followed by a corresponding direction candle pattern, in order to expect a higher/lower break.
Intraday Mid PointA moving indicator that is overlaid main chart. Identifies the start of the day, and then applies this formula:
( Current High of Day + Current Low of Day ) / 2, to get the mid point. It is a useful tool to identify buy side or sell side control, along with vwap.
Delta Volume Weighted - IntradayResets at the start of the day's session (9:50 am on the ASX).
Takes the first candle and checks if its a green candle (close > open), and adds the volume to a total (which starts at 0 at the start of the day).
Subtracts it if the candles in red.
Continues to do this along with all the candles.
The volume is also multiplied by the difference between open and close so that large candles with large volume have more weight and move the indicator more.