Market Structure & Liquidity: CHoCHs+Nested Pivots+FVGs+Sweeps//Purpose:
This indicator combines several tools to help traders track and interpret price action/market structure; It can be divided into 4 parts; 
1. CHoCHs, 2. Nested Pivot highs & lows, 3. Grade sweeps, 4. FVGs.
This gives the trader a toolkit for determining market structure and shifts in market structure to help determine a bull or bear bias, whether it be short-term, med-term or long-term.
This indicator also helps traders in determining liquidity targets: wether they be voids/gaps (FVGS) or old highs/lows+ typical sweep distances.
Finally, the incorporation of HTF CHoCH levels printing on your LTF chart helps keep the bigger picture in mind and tells traders at a glance if they're above of below Custom HTF CHoCH up or CHoCH down (these HTF CHoCHs can be anything from Hourly up to Monthly).
//Nomenclature:
CHoCH = Change of Character
STH/STL = short-term high or low 
MTH/MTL = medium-term high or low   
LTH/LTL = long-term high or low 
FVG = Fair value gap 
CE = consequent encroachement (the midline of a FVG)
 ~~~ The Four components of this indicator ~~~ 
    1. CHoCHs: 
•Best demonstrated in the below charts. This was a method taught to me by @Icecold_crypto. Once a 3 bar fractal pivot gets broken, we count backwards the consecutive higher lows or lower highs, then identify the CHoCH as the opposite end of the candle which ended the consecutive backwards count. This CHoCH (UP or DOWN) then becomes a level to watch, if price passes through it in earnest a trader would consider shifting their bias as market structure is deemed to have shifted.
•HTF CHoCHs: Option to print Higher time frame chochs (default on) of user input HTF. This prints only the last UP choch and only the last DOWN choch from the input HTF. Solid line by default so as to distinguish from local/chart-time CHoCHs. Can be any Higher timeframe you like.
•Show on table: toggle on  show table(above/below)  option to show in table cells (top right): is price above the latest HTF UP choch, or is price below HTF DOWN choch (or is it sat between the two, in a state of 'uncertainty').
•Most recent CHoCHs which have not been met by price will extend 10 bars into the future. 
• USER INPUTS:  overall setting:  SHOW CHOCHS  | Set  bars lookback  number to limit historical Chochs. Set  Live CHoCHs  number to control the number of active recent chochs unmet by price. Toggle  shrink chochs once hit  to declutter chart and minimize old chochs to their origin bars. Set  Multi-timeframe color override : to make Color choices  auto-set to your preference color for each of 1m, 5m, 15m, H, 4H, D, W, M (where up and down are same color, but 'up' icon for up chochs and down icon for down chochs remain printing as normal)
    2. Nested Pivot Highs & Lows; aka 'Pivot Highs & Lows (ST/MT/LT)' 
•Based on a seperate, longer lookback/lookforward pivot calculation. Identifies Pivot highs and lows with a 'spikeyness' filter (filtering out weak/rounded/unimpressive Pivot highs/lows)
•by 'nested' I mean that the pivot highs are graded based on whether a pivot high sits between two lower pivot highs or vice versa.
--for example: STH = normal pivot. MTH is pivot high with a lower STH on either side. LTH is a pivot high with a lower MTH on either side. Same applies to pivot lows (STL/MTL/LTL)
•This is a useful way to measure the significance of a high or low. Both in terms of how much it might be typically swept by (see later) and what it would imply for HTF bias were we to break through it in earnest (more than just a sweep).
• USER INPUTS:  overall setting:  show pivot highs & lows  |  Bars lookback  (historical pivots to show) |  Pivots: lookback/lookforward  length (determines the scale of your pivot highs/lows) | toggle on/off  Apply 'Spikeyness' filter  (filters out smooth/unimpressive pivot highs/lows). Set  Spikeyness index  (determines the strength of this filter if turned on) | Individually toggle on each of STH, MTH, LTH, STL, MTL, LTL along with their  label text type , and  size . Toggle on/off  line  for each of these Pivot highs/lows. | Set  label spacer  (atr multiples above / below) | set  line style  and  line width 
    3. Grade Sweeps: 
•These are directly related to the nested pivots described above. Most assets will have a typical sweep distance. I've added some of my expected sweeps for various assets in the indicator tooltips.
--i.e. Eur/Usd 10-20-30 pips is a typical 'grade' sweep. S&P  HKEX:5 - HKEX:10  is a typical grade sweep. 
•Each of the ST/MT/LT pivot highs and lows have optional user defined grade sweep boxes which paint above until filled (or user option for historical filled boxes to remain).
•Numbers entered into sweep input boxes are auto converted into appropriate units (i.e. pips for FX, $ or 'handles' for indices, $ for Crypto. Very low $ units can be input for low unit value crypto altcoins.
• USER INPUTS:  overall setting:  Show sweep boxes   | individually select  colors  of each of STH, MTH, LTH, STL, MTL, LTL sweep boxes. | Set  Grade sweep ($/pips)  number for each of ST, MT, LT. This auto converts between pips and $ (i.e. FX vs Indices/Crypto). Can be a float as small or large as you like ($0.000001 to  HKEX:1000 ). | Set box  text position  (horizontal & vertical) and  size , and  color . | Set  Box width (bars)  (for non extended/ non-auto-terminating at price boxes). | toggle on/off  Extend boxes/lines right . | Toggle on/off  Shrink Grade sweeps on fill  (they will disappear in realtime when filled/passed through)
    4. FVGs:  
•Fair Value gaps. Represent 'naked' candle bodies where the wicks to either side do not meet, forming a 'gap' of sorts which has a tendency to fill, or at least to fill to midline (CE).
•These are ICT concepts. 'UP' FVGS are known as BISIs (Buyside imbalance, sellside inefficiency); 'DOWN' FVGs are known as SIBIs (Sellside imbalance, buyside inefficiency). 
• USER INPUTS:  overall setting:  show FVGs  |  Bars lookback  (history). | Choose to display:  'UP' FVGs (BISI)  and/or  'DOWN FVGs (SIBI) . Choose to display the midline:  CE , the  color  and the line  style .  Choose threshold:  use CE (as opposed to Full Fill)  |toggle on/off  Shrink FVG on fill (CE hit or Full fill)  (declutter chart/see backtesting history)
////••Alerts (general notes & cautionary notes):: 
•Alerts are optional for most of the levels printed by this indicator. Set them via the three dots on indicator status line. 
•Due to dynamic repainting of levels, alerts should be used with caution. Best use these alerts either for Higher time frame levels, or when closely monitoring price.
--E.g. You may set an alert for down-fill of the latest FVG below; but price will keep marching up; form a newer/higher FVG, and the alert will trigger on THAT FVG being down-filled (not the original)
•Available Alerts: 
-FVG(BISI) cross above threshold(CE or full-fill; user choice). Same with FVG(SIBI).
-HTF last CHoCH down, cross below | HTF last CHoCH up, cross above.
-last CHoCH down, cross below |  last CHoCH up, cross above.
-LTH cross above, MTH cross above, STH cross above | LTL cross below, MTL cross below, STL cross below.
////••Formatting (general)::
•all table text color is set from the 'Pivot highs & Lows (ST, MT, LT)' section (for those of you who prefer black backgrounds).
•User choice of Line-style, line color, line width. Same with Boxes. Icon choice for chochs. Char or label text choices for ST/MT/LT pivot highs & lows.
////••User Inputs (general):
•Each of the 4 components of this indicator can be easily toggled on/off independently.
•Quite a lot of options and toggle boxes, as described in full above. Please take your time and read through all the tooltips (hover over '!' icon) to get an idea of formatting options.
•Several Lookback periods defined in bars to control how much history is shown for each of the 4 components of this indicator.
•'Shrink on fill' settings on FVGs and CHoCHs: Basically a way to declutter chart; toggle on/off depending on if you're backtesting or reading live price action.
•Table Display: applies to ST/MT/LT pivot highs and to HTF CHoCHs; Toggle table on or off (in part or in full)
////••Credits:
•Credit to ICT (Inner Circle Trader) for some of the concepts used in this indicator (FVGS & CEs; Grade sweeps).
•Credit to @Icecold_crypto for the specific and novel concept of identifying CHoCHs in a simple, objective and effective manner (as demonstrated in the 1st chart below).
 CHoCH demo page 1: shifting tweak; arrow diagrams to demonstrate how CHoCHs are defined: 
  
 CHoCH demo page 2: Simplified view; short lookback history; few CHoCHs, demo of 'latest' choch being extended into the future by 10 bars: 
  
 USAGE: Bitcoin Hourly using HTF daily CHoCHs: 
  
 USAGE-2: Cotton Futures (CT1!) 2hr. Painting a rather bullish picture. Above HTF UP CHoCH, Local CHoCHs show bullish order flow, Nice targets above (MTH/LTH + grade sweeps): 
  
 Full Demo; 5min chart; CHoCHs, Short term pivot highs/lows, grade sweeps, FVGs: 
   
 Full Demo, Eur/Usd 15m: STH, MTH, LTH grade sweeps, CHoCHs, Usage for finding bias (part A): 
  
 Full Demo, Eur/Usd 15m: STH, MTH, LTH grade sweeps, CHoCHs, Usage for finding bias, 3hrs later (part B): 
  
 Realtime Vs Backtesting(A): btc/usd 15m; FVGs and CHoCHs: shrink on fill, once filled they repaint discreetly on their origin bar only. Realtime (Shrink on fill, declutter chart): 
  
 Realtime Vs Backtesting(B): btc/usd 15m; FVGs and CHoCHs: DON'T shrink on fill; they extend to the point where price crosses them, and fix/paint there. Backtesting (seeing historical behaviour): 
 
Cari dalam skrip untuk "神户胜利+VS+磐田喜悦"
Support Bands indicatorSupport Band to follow Trends.
We can see clear where price is Trading. Observe how moving averages are developing or aligning to change trend or continuation.
Green up trend  vs Red Down Trend
Band 1
8EMA Green Line vs 10SMA  Light blue Line 
Band 2
21EMA Orange Line vs 30 SMA Brown Line
Also includes 
1 SMA Gray line for closing when you're looking at weakly charts. 
40 SMA darker Gray
50 SMA Blue
100 SMA White
150 SMA Pink
200 SMA Yellow
300 SMA Dark Red
I hope it helps you to see when price is trending up and a set correctly your stop.
CVD - Cumulative Volume Delta Candles█   OVERVIEW 
This indicator displays cumulative volume delta in candle form. It uses intrabar information to obtain more precise volume delta information than methods using only the chart's timeframe.
█   CONCEPTS 
 Bar polarity 
By  bar polarity , we mean the direction of a bar, which is determined by looking at the bar's  close  vs its  open .
 Intrabars 
 Intrabars  are chart bars at a lower timeframe than the chart's. Each 1H chart bar of a 24x7 market will, for example, usually contain 60 bars at the lower timeframe of 1min, provided there was market activity during each minute of the hour. Mining information from intrabars can be useful in that it offers traders visibility on the activity inside a chart bar.
 Lower timeframes (LTFs) 
A  lower timeframe  is a timeframe that is smaller than the chart's timeframe. This script uses a LTF to access intrabars. The lower the LTF, the more intrabars are analyzed, but the less chart bars can display CVD information because there is a limit to the total number of intrabars that can be analyzed.
 Volume delta 
The volume delta concept divides a bar's volume in "up" and "down" volumes. The delta is calculated by subtracting down volume from up volume. Many calculation techniques exist to isolate up and down volume within a bar. The simplest techniques use the polarity of interbar price changes to assign their volume to up or down slots, e.g.,  On Balance Volume  or the  Klinger Oscillator . Others such as  Chaikin Money Flow  use assumptions based on a bar's OHLC values. The most precise calculation method uses tick data and assigns the volume of each tick to the up or down slot depending on whether the transaction occurs at the bid or ask price. While this technique is ideal, it requires huge amounts of data on historical bars, which usually limits the historical depth of charts and the number of symbols for which tick data is available.
This indicator uses  intrabar analysis  to achieve a compromise between the simplest and most precise methods of calculating volume delta. In the context where historical tick data is not yet available on TradingView, intrabar analysis is the most precise technique to calculate volume delta on historical bars on our charts. Our  Volume Profile indicators  use it. Other volume delta indicators in our Community Scripts such as the  Realtime 5D Profile  use realtime chart updates to achieve more precise volume delta calculations, but that method cannot be used on historical bars, so those indicators only work in real time.
This is the logic we use to assign intrabar volume to up or down slots:
 • If the intrabar's  open  and  close  values are different, their relative position is used.
 • If the intrabar's  open  and  close  values are the same, the difference between the intrabar's  close  and the previous intrabar's  close  is used.
 • As a last resort, when there is no movement during an intrabar and it closes at the same price as the previous intrabar, the last known polarity is used.
Once all intrabars making up a chart bar have been analyzed and the up or down property of each intrabar's volume determined, the up volumes are added and the down volumes subtracted. The resulting value is volume delta for that chart bar.
█   FEATURES 
 CVD Candles 
Cumulative Volume Delta Candles present volume delta information as it evolves during a period of time.
This is how each candle's levels are calculated:
 •  open : Each candle's' open level is the cumulative volume delta for the current period at the start of the bar.
  This value becomes zero on the first candle following a CVD reset.
  The candles after the first one always open where the previous candle closed.
  The candle's high, low and close levels are then calculated by adding or subtracting a volume value to the open.
 •  high : The highest volume delta value found in intrabars. If it is not higher than the volume delta for the bar, then that candle will have no upper wick.
 •  low : The lowest volume delta value found in intrabars.  If it is not lower than the volume delta for the bar, then that candle will have no lower wick.
 •  close : The aggregated volume delta for all intrabars. If volume delta is positive for the chart bar, then the candle's close will be higher than its open, and vice versa.
The candles are plotted in one of two configurable colors, depending on the polarity of volume delta for the bar.
 CVD resets 
The "cumulative" part of the indicator's name stems from the fact that calculations accumulate during a period of time. This allows you to analyze the progression of volume delta across manageable chunks, which is often more useful than looking at volume delta cumulated from the beginning of a chart's history.
You can configure the reset period using the "CVD Resets" input, which offers the following selections:
 •  None : Calculations do not reset.
 •  On a fixed higher timeframe : Calculations reset on the higher timeframe you select in the "Fixed higher timeframe" field.
 •  At a fixed time  that you specify.
 •  At the beginning of the regular session .
 •  On a stepped higher timeframe : Calculations reset on a higher timeframe automatically stepped using the chart's timeframe and following these rules:
 
    Chart TF        HTF
     <  1min        1H
     <  3H          1D
     <= 12H         1W
     <  1W          1M
     >= 1W          1Y
 
The indicator's background shows where resets occur.
 Intrabar precision 
The precision of calculations increases with the number of intrabars analyzed for each chart bar. It is controlled through the script's "Intrabar precision" input, which offers the following selections:
 •  Least precise, covering many chart bars 
 •  Less precise, covering some chart bars  
 •  More precise, covering less chart bars 
 •  Most precise, 1min intrabars 
As there is a limit to the number of intrabars that can be analyzed by a script, a tradeoff occurs between the number of intrabars analyzed per chart bar and the chart bars for which calculations are possible.
 Total volume candles 
You can choose to display candles showing the total intrabar volume for the chart bar. This provides you with more context to evaluate a bar's volume delta by showing it relative to the sum of intrabar volume. Note that because of the reasons explained in the "NOTES" section further down, the total volume is the sum of all intrabar volume rather than the volume of the bar at the chart's timeframe.
Total volume candles can be configured with their own up and down colors. You can also control the opacity of their bodies to make them more or less prominent. This publication's chart shows the indicator with total volume candles. They are turned off by default, so you will need to choose to display them in the script's inputs for them to plot.
 Divergences 
Divergences occur when the polarity of volume delta does not match that of the chart bar. You can identify divergences by coloring the CVD candles differently for them, or by coloring the indicator's background.
 Information box 
An information box in the lower-left corner of the indicator displays the HTF used for resets, the LTF used for intrabars, and the average quantity of intrabars per chart bar. You can hide the box using the script's inputs.
█   INTERPRETATION 
The first thing to look at when analyzing CVD candles is the side of the zero line they are on, as this tells you if CVD is generally bullish or bearish. Next, one should consider the relative position of successive candles, just as you would with a price chart. Are successive candles trending up, down, or stagnating? Keep in mind that whatever trend you identify must be considered in the context of where it appears with regards to the zero line; an uptrend in a negative CVD (below the zero line) may not be as powerful as one taking place in positive CVD values, but it may also predate a movement into positive CVD territory. The same goes with stagnation; a trader in a long position will find stagnation in positive CVD territory less worrisome than stagnation under the zero line.
After consideration of the bigger picture, one can drill down into the details. Exactly what you are looking for in markets will, of course, depend on your trading methodology, but you may find it useful to:
  • Evaluate volume delta for the bar in relation to price movement for that bar.
  • Evaluate the proportion that volume delta represents of total volume.
  • Notice divergences and if the chart's candle shape confirms a hesitation point, as a Doji would.
  • Evaluate if the progress of CVD candles correlates with that of chart bars.
  • Analyze the wicks. As with price candles, long wicks tend to indicate weakness.
Always keep in mind that unless you have chosen not to reset it, your CVD resets for each period, whether it is fixed or automatically stepped. Consequently, any trend from the preceding period must re-establish itself in the next.
█   NOTES 
 Know your volume 
Traders using volume information should understand the volume data they are using: where it originates and what transactions it includes, as this can vary with instruments, sectors, exchanges, timeframes, and between historical and realtime bars. The information used to build a chart's bars and display volume comes from data providers (exchanges, brokers, etc.) who often maintain distinct feeds for intraday and end-of-day (EOD) timeframes. How volume data is assembled for the two feeds depends on how instruments are traded in that sector and/or the volume reporting policy for each feed. Instruments from crypto and forex markets, for example, will often display similar volume on both feeds. Stocks will often display variations because  block trades  or other types of trades may not be included in their intraday volume data. Futures will also typically display variations.
Note that as intraday vs EOD variations exist for historical bars on some instruments, differences may also exist between the realtime feeds used on intraday vs 1D or greater timeframes for those same assets. Realtime reporting rules will often be different from historical feed reporting rules, so variations between realtime feeds will often be different from the variations between historical feeds for the same instrument. The  Volume X-ray  indicator can help you analyze differences between intraday and EOD volumes for the instruments you trade.
 If every unit of volume is both bought by a buyer and sold by a seller, how can volume delta make sense? 
Traders who do not understand the mechanics of matching engines (the exchange software that matches orders from buyers and sellers) sometimes argue that the concept of volume delta is flawed, as every unit of volume is both bought and sold. While they are rigorously correct in stating that every unit of volume is both bought and sold, they overlook the fact that information can be mined by analyzing variations in the price of successive ticks, or in our case, intrabars.
Our calculations model the situation where, in fully automated order handling, market orders are generally matched to limit orders sitting in the order book. Buy market orders are matched to quotes at the ask level and sell market orders are matched to quotes at the bid level. As explained earlier, we use the same logic when comparing intrabar prices. While using intrabar analysis does not produce results as precise as when individual transactions — or ticks — are analyzed, results are much more precise than those of methods using only chart prices.
Not only does the concept underlying volume delta make sense, it provides a window on an oft-overlooked variable which, with price and time, is the only basic information representing market activity. Furthermore, because the calculation of volume delta also uses price and time variations, one could conceivably surmise that it can provide a more complete model than ones using price and time only. Whether or not volume delta can be useful in your trading practice, as usual, is for you to decide, as each trader's methodology is different.
 For Pine Script™ coders 
As our latest  Polarity Divergences  publication, this script uses the recently released  request.security_lower_tf()  Pine Script™ function discussed in  this blog post . It works differently from the usual  request.security()  in that it can only be used at LTFs, and it returns an array containing one value per intrabar. This makes it much easier for programmers to access intrabar information.
 Look first. Then leap.  
Numbers RenkoRenko with Volume and Time in the box was developed by David Weis (Authority on Wyckoff method) and his student.
I like this style (I don't know what it is officially called) because it brings out the potential of Wyckoff method and Renko, and looks beautiful.
I can't find this style Indicator anywhere, so I made something like it, then I named  "Numbers Renko" (数字 練行足 in Japanese).
 
Caution : This indicator only works exactly in Renko Chart.
////////// Numbers Renko General Settings //////////
Volume Divisor : To make good looking Volume Number.  
  ex) You set 100. When Volume is 0.056, 0.05 x 100 = 5.6. 6 is plotted in the box (Decimal are round off). 
Show Only Large Renko Volume : show only Renko Volume which is larger than Average Renko Volume  (it is calculated by user selected moving average, option below).
Show Renko Time : "Only Large Renko Time"  show only Renko Time which is larger than Average Renko Time (it is calculated by user selected moving average, option below).
EMA period for calculation : This is used to calculate Average Renko Time and Average Renko Volume (These are used to decide Numbers colors and Candles colors). Default is EMA, You can choice SMA.
////////// Numbers Renko Coloring //////////
The Numbers in the box are color coded by compared the current Renko Volume with the Average Renko Volume.
If the current Renko Volume is 2 times larger than the ARV, Color2 will be used. If the current Renko Volume is 1.5 times larger than the ARV, Color1.5 will be used. Color1 If the current Renko Volume is larger than the ARV . Color0.5 is larger than half Athe RV and Color0 is  less than or equal to half the ARV. Color1, Color1.5 and Color2 are Large Value, so only these colored Numbers are showed when use "Show Only ~ " option.
Default is Renko Volume based Color coding, You can choice Renko Time based Color coding. Therefore you can use two type coloring at the same time. ex) The Numbers Colors are Renko Volume based. Candle body, border and wick Colors are Renko Time based.
////////// Weis Wave Volume //////////
Show Effort vs Result : Weis Wave Volume divided by Wave Length.
   ex) If 100 Up WWV is accumulated between 30 Up Renko Box, 100 / 30 = 3.33...  will be 3.3 (Second decimal will be rounded off).
No Result Ratio : If current "Effort vs Result" is "No Result Ratio" times larger than Average Effort vs Result, Square Mark will be show. AEvsR is calculated by 5SMA. 
  ex) You set 1.5. If Current EvsR is 20 and AEvsR is 10, 20 > 10 x 1.5 then Square Mark will be show.
  If the left and right arrows are in the same direction, the right arrow is omitted.
Show Comparison Marks : Show left side arrow by compare current value to previous previous value and show right side small arrow by compare current value to previous value. 
ex) Current Up WWV is 17 and Previous Up WWV (previous previous value) is 12, left side arrow is Up. Previous Dn WWV is 20, right side small arrow is Dn. 
Large Volume Ratio : If current WWV is "Large Volume Ratio" times larger than Average WWV, Large WWV color is used.
Sample layout 
  
  
  
DailyDeviationLibrary   "DailyDeviation" 
Helps in determining the relative deviation from the open of the day compared to the high or low values.
 hlcDeltaArrays(daysPrior, maxDeviation, spec, res)  Retuns a set of arrays representing the daily deviation of price for a given number of days.
  Parameters:
     daysPrior : Number of days back to get the close from.
     maxDeviation : Maximum deviation before a value is considered an outlier. A value of 0 will not filter results.
     spec : session.regular (default), session.extended or other time spec.
     res : The resolution (default = '1440').
  Returns:   Where OH = Open vs High, OL = Open vs Low, and OC = Open vs Close
 fromOpen(daysPrior, maxDeviation, comparison, spec, res)  Retuns a value representing the deviation from the open (to the high or low) of the current day given number of days to measure from.
  Parameters:
     daysPrior : Number of days back to get the close from.
     maxDeviation : Maximum deviation before a value is considered an outlier. A value of 0 will not filter results.
     comparison : The value use in comparison to the current open for the day.
     spec : session.regular (default), session.extended or other time spec.
     res : The resolution (default = '1440').
Modified ATR Indicator [KL]Modified Average True Range (ATR) Indicator 
This indicator displays the ATR with  relative highs  and  relative lows  statistically determined.
 What is ATR: 
To know what ATR is, we need to understand what a True Range (TR) is.
- TR at a given bar is the highest distance between points: a) High vs low, b) High vs Close, and c) Low vs Close. 
- ATR is the moving average of TRs over a predefined lookback period; 14 is the most commonly used.
- ATR can be mathematically expressed as:
  
 Why is ATR Important 
ATR often used to measure volatility; high volatility is indicated by high ATR, vice versa for low. This is a versatile tool allowing traders to determine entry/exit points, as well as the size of stop losses and when to take profits relative to it. 
 
This is an opinion: Through observations, I have noticed that ATR can also indirectly tell us the levels of relative volume. This intuitively makes sense because in order to increase length of TR, high amounts of capital inflow/outflow is required (graphically speaking, high volume is required in order to make lengths of candle sticks longer). The relationship between ATR and relative volume should hold unless the market is illiquid to the extreme that there is no relationship between volume and price.
That said, knowing the relative lows/highs of ATR is very useful. It can be interpreted as:
- Relative high = high volatility, usually during sell offs
- Relative low = decreasing volume, could indicate price consolidation 
Instead of arbitrarily determining whether ATR is high/low, this indicator will determine  relative highs  and  relative lows  using a simple statistical model.
 How relative high/low is determined by this model 
This indicator applies two-tailed hypothesis testing to test whether ATR (ie. say lookback of 14) has greatly deviated from a larger sample size (ie. lookback of 50). Assuming ATR is normally distributed and variance is known, then test statistic (z) can be used to determine whether ATR14 is within the critical area under Null Hypothesis: ATR14 == ATR50. If z falls below/above the left/right critical values (ie. 1.645 for a 90% confidence interval), then this is shown by the indicator through using different colors to plot the ATR line.
Volume X-ray [LucF]█  OVERVIEW 
This tool analyzes the relative size of volume reported on intraday vs EOD (end of day) data feeds on historical bars. If you use volume data to make trading decisions, it can help you improve your understanding of its nature and quality, which is especially important if you trade on intraday timeframes.
I often mention, when discussing volume analysis, how it's important for traders to understand the volume data they are using: where it originates, what it includes and does not include. By helping you spot sizeable differences between volume reported on intraday and EOD data feeds for any given instrument, "Volume X-ray" can point you to instruments where you might want to research the causes of the difference.
█  CONCEPTS 
The information used to build a chart's historical bars originates from data providers (exchanges, brokers, etc.) who often maintain distinct historical feeds for intraday and EOD timeframes. How volume data is assembled for intraday and EOD feeds varies with instruments, brokers and exchanges. Variations between the two feeds — or their absence — can be due to how instruments are traded in a particular sector and/or the volume reporting policy for the feeds you are using. Instruments from crypto and forex markets, for example, will often display similar volume on both feeds. Stocks will often display variations because  block trades  or other types of trades may not be included in their intraday volume data. Futures will also typically display variations. It is even possible that volume from different feeds may not be of the same nature, as you can get trade volume (market volume) on one feed and tick volume (transaction counts) on another. You will sometimes be able to find the details of what different feeds contain from the technical information provided by exchanges/brokers on their feeds. This is an example for the  NASDAQ feeds . Once you determine which feeds you are using, you can look for the reporting specs for that feed. This is all research you will need to do on your own; "Volume X-ray" will not help you with that part.
You may elect to forego the deep dive in feed information and simply rely on the figure the indicator will calculate for the instruments you trade. One simple — and unproven — way to interpret "Volume X-ray"  values is to infer that instruments with larger percentages of intraday/EOD volume ratios are more "democratic" because at intraday timeframes, you are seeing a greater proportion of the actual traded volume for the instrument. This could conceivably lead one to conclude that such volume data is more reliable than on an instrument where intraday volume accounts for only 3% of EOD volume, let's say.
Note that as intraday vs EOD variations exist for historical bars on some instruments, there will typically also be differences between the realtime feeds used on intraday vs 1D or greater timeframes for those same assets. Realtime reporting rules will often be different from historical feed reporting rules, so variations between realtime feeds will often be different from the variations between historical feeds for the same instrument. A deep dive in reporting rules will quickly reveal what a jungle they are for some instruments, yet it is the only way to really understand the volume information our charts display.
█  HOW TO USE IT 
The script is very simple and has no inputs. Just add it to 1D charts and it will calculate the proportion of volume reported on the intraday feed over the EOD volume. The plots show the daily values for both volumes: the teal area is the EOD volume, the orange line is the intraday volume. A value representing the average, cumulative intraday/EOD volume percentage for the chart is displayed in the upper-right corner. Its background color changes with the percentage, with brightness levels proportional to the percentage for both the bull color (% >= 50) or the bear color (% < 50). When abnormal conditions are detected, such as missing volume of one kind or the other, a yellow background is used.
Daily and cumulative values are displayed in indicator values and the Data Window.
The indicator loads in a pane, but you can also use it in overlay mode by moving it on the chart with "Move to" in the script's "More" menu, and disabling the plot display from the "Settings/Style" tab.
█  LIMITATIONS 
 • The script will not run on timeframes >1D because it cannot produce useful values on them.
 • The calculation of the cumulative average will vary on different intraday timeframes because of the varying number of days covered by the dataset.
  Variations can also occur because of irregularities in reported volume data. That is the reason I recommend using it on 1D charts.
 • The script only calculates on historical bars because in real time there is no distinction between intraday and EOD feeds.
 • You will see plenty of special cases if you use the indicator on a variety of instruments:
   • Some instruments have no intraday volume, while on others it's the opposite.
   • Missing information will sometimes appear here and there on datasets.
   • Some instruments have higher intraday than EOD volume.
  Please do not ask me the reasons for these anomalies; it's your responsibility to find them. I supply a tool that will spot the anomalies for you — nothing more.
█  FOR PINE CODERS 
 • This script uses a little-known feature of  request.security() , which allows us to specify `"1440"` for the `timeframe` argument. 
  When you do, data from the 1min intrabars of the historical intraday feed is aggregated over one day, as opposed to the usual EOD feed used with `"D"`.
 • I use gaps on my  request.security()  calls. This is useful because at intraday timeframes I can cumulate non- na  values only.
 • I use  fixnan()  on some values. For those who don't know about it yet, it eliminates  na  values from a series, just like not using gaps will do in a  request.security()  call.
 • I like how the new  switch  structure makes for more readable code than equivalent  if  structures.
 • I wrote my script using the revised recommendations in the  Style Guide  from the Pine v5 User Manual.
 • I use the new  runtime.error()  to throw an error when the script user tries to use a timeframe >1D. 
  Why? Because then, my  request.security()  calls would be returning values from the last 1D intrabar of the dilation of the, let's say, 1W chart bar.
  This of course would be of no use whatsoever — and misleading. I encourage all Pine coders fetching HTF data to protect their script users in the same way.
  As tool builders, it is our responsibility to shield unsuspecting users of our scripts from contexts where our calcs produce invalid results.
 • While we're on the subject of accessing intrabar timeframes, I will add this to the intention of coders falling victim to what appears to be 
  a new misconception where the mere fact of using intrabar timeframes with  request.security()  is believed to provide some sort of edge.
  This is a fallacy unless you are sending down functions specifically designed to mine values from  request.security() 's intrabar context.
  These coders do not seem to realize that:
   • They are only retrieving information from the last intrabar of the chart bar.
   • The already flawed behavior of their scripts on historical bars will not improve on realtime bars. It will actually worsen because in real time, 
    intrabars are not yet ordered sequentially as they are on historical bars.
   • Alerts or strategy orders using intrabar information acquired through  request.security()  will be using flawed logic and data most of the time.
  The situation reminds me of the mania where using Heikin-Ashi charts to backtest was all the rage because it produced magnificent — and flawed — results.
  Trading is difficult enough when doing the right things; I hate to see traders infected by lethal beliefs.
  Strive to sharpen your "herd immunity", as Lionel Shriver calls it. She also writes: "Be leery of orthodoxy. Hold back from shared cultural enthusiasms." 
  Be your own trader.
█  THANKS 
This indicator would not exist without the invaluable insights from Tim, a member of the Pine team. Thanks Tim!
Relative StrengthThis indicator is called Relative Strength and is no way related to RSI ( Relative strength indicator).
It is simply a ratio of asset A to asset B plotted. Usually it is used to look for strength vs a particular index. Since it is a ratio, all the trendlines work on it. The default index is NIFTY. You can change it any index/script you want to compare:
1. Script vs Index
2. Index vs Index
Market BuySell RatioA script using 1m small candle size (configurable) to compute the volume of buy (up) vs sell (down) candles (instead of actual market buy vs sell orders which are not available in pine script).
It then plots the buy vs sell ratio as an oscillator below the cart.
This gives traders an idea of current order flow in the market.
To compute the small candles this script uses the "Smart Volume" script which can be found here: 
Cora Combined Suite v1 [JopAlgo]Cora Combined Suite v1   (CCSV1)
This is an 2 in 1 indicator (Overlay & Oscillator) the Cora Combined Suite v1  .
CCSV1 combines a price-pane Overlay for structure/trend with a compact Oscillator for timing/pressure. It’s designed to be clear, beginner-friendly, and largely automatic: you pick a profile (Scalp / Intraday / Swing), choose whether to run as Overlay or Oscillator, and CCSV1 tunes itself in the background.
What’s inside — at a glance
1) Overlay (price pane)
CoRa Wave: a smooth trend line based on a compound-ratio WMA (CRWMA).
Green when the slope rises (bull bias), Red when it falls (bear bias).
Asymmetric ATR Cloud around the CoRa Wave
Width expands more up when buyer pressure dominates and more down when seller pressure dominates.
Fill is intentionally light, so candlesticks remain readable.
Chop Guard (Range-Lock Gate)
When the cloud stays very narrow versus ATR (classic “dead water”), pullback alerts are muted to avoid noise.
Visuals don’t change—only the alerting logic goes quiet.
Typical Overlay reads
Trend: Follow the CoRa color; green favors long setups, red favors shorts.
Value: Pullbacks into/through the cloud in trend direction are higher-quality than chasing breaks far outside it.
Dominance: A visibly asymmetric cloud hints which side is funding the move (buyers vs sellers).
2) Oscillator (subpane or inline preview)
Stretch-Z (columns): how far price is from the CoRa mean (mean-reversion context), clipped to ±clip.
Near 0 = equilibrium; > +2 / < −2 = stretched/extended.
Slope-Z (line): z-score of CoRa’s slope (momentum of the trend line).
Crossing 0 upward = potential bullish impulse; downward = potential bearish impulse.
VPO (stepline): a normalized Volume-Pressure read (positive = buyers funding, negative = sellers).
Rendered as a clean stepline to emphasize state changes.
Event Bands ±2 (subpane): thin reference lines to spot extension/exhaustion zones fast.
Floor/Ceiling lines (optional): quiet boundaries so the panel doesn’t feel “bottomless.”
Inline vs Subpane
Inline (overlay): the oscillator auto-anchors and scales beneath price, so it never crushes the price scale.
Subpane (raw): move to a new pane for the classic ±clip view (with ±2 bands). Recommended for systematic use.
Why traders like it
Two in one: Structure on the chart, timing in the panel—built to complement each other.
Retail-first automation: Choose Scalp / Intraday / Swing and let CCSV1 auto-tune lengths, clips, and pressure windows.
Robust statistics: On fast, spiky markets/timeframes, it prefers outlier-resistant math automatically for steadier signals.
Optional HTF gate: You can require higher-timeframe agreement for oscillator alerts without changing visuals.
Quick start (simple playbook)
Run As
Overlay for structure: assess trend direction, where value is (the cloud), and whether chop guard is active.
Oscillator for timing: move to a subpane to see Stretch-Z, Slope-Z, VPO, and ±2 bands clearly.
Profile
Scalp (1–5m), Intraday (15–60m), or Swing (4H–1D). CCSV1 adjusts length/clip/pressure windows accordingly.
Overlay entries
Trade with CoRa color.
Prefer pullbacks into/through the cloud (trend direction).
If chop guard is active, wait; let the market “breathe” before engaging.
Oscillator timing
Look for Funded Flips: Slope-Z crossing 0 in the direction of VPO (i.e., momentum + funded pressure).
Use ±2 bands to manage risk: stretched conditions can stall or revert—better to scale or wait for a clean reset.
Optional HTF gate
Enable to green-light only those oscillator alerts that align with your chosen higher timeframe.
What each signal means (plain language)
CoRa turns green/red (Overlay): trend bias shift on your chart.
Cloud width tilts asymmetrically: one side (buyers/sellers) is dominating; extensions on that side are more likely.
Stretch-Z near 0: fair value around CoRa; pullback timing zone.
Stretch-Z > +2 / < −2: extended; watch for slowing momentum or scale decisions.
Slope-Z cross up/down: new impulse starting; combine with VPO sign to avoid unfunded crosses.
VPO positive/negative: net buying/selling pressure funding the move.
Alerts included
Overlay
Pullback Long OK
Pullback Short OK
Oscillator
Funded Flip Up / Funded Flip Down (Slope-Z crosses 0 with VPO agreement)
Pullback Long Ready / Pullback Short Ready (near equilibrium with aligned momentum and pressure)
Exhaustion Risk (Long/Short) (Stretch-Z beyond ±2 with weakening momentum or pressure)
Tip: Keep chart alerts concise and use strategy rules (TP/SL/filters) in your trade plan.
Best practices
One glance workflow
Read Overlay for direction + value.
Use Oscillator for trigger + confirmation.
Pairing
Combine with S/R or your preferred execution framework (e.g., your JopAlgo setups).
The suite is neutral: it won’t force trades; it highlights context and quality.
Markets
Works on crypto, indices, FX, and commodities.
Where real volume is available, VPO is strongest; on synthetic volume, treat VPO as a soft filter.
Timeframes
Use the Profile preset closest to your style; feel free to fine-tune later.
For multi-TF trading, enable the HTF gate on the oscillator alerts only.
Inputs you’ll actually use (the rest can stay on Auto)
Run As: Overlay or Oscillator.
Profile: Scalp / Intraday / Swing.
Oscillator Render: “Subpane (raw)” for a classic panel; “Inline (overlay)” only for a quick preview.
HTF gate (optional): require higher-timeframe Slope-Z agreement for oscillator alerts.
Everything else ships with sensible defaults and auto-logic.
Limitations & tips
Not a strategy: CCSV1 is a decision support tool; you still need your entry/exit rules and risk management.
Non-repainting design: Signals finalize on bar close; intrabar graphics can adjust during the bar (Pine standard).
Very flat sessions: If price and volume are extremely quiet, expect fewer alerts; that restraint is intentional.
Who is this for?
Beginners who want one clean overlay for structure and one simple oscillator for timing—without wrestling settings.
Intermediates seeking a coherent trend/pressure framework with HTF confirmation.
Advanced users who appreciate robust stats and clean engineering behind the visuals.
Disclaimer: Educational purposes only. Not financial advice. Trading involves risk. Use at your own discretion.
HalfTrend Adaptive Pro v3half trend version 3.1//@version=6
indicator("Candlestick Recognizer v1 (Praveen Edition)", overlay=true, max_labels_count=500)
// ──────────────────────────────
// Inputs: toggles & thresholds
// ──────────────────────────────
grpUse = "Enable Patterns"
useEngulf     = input.bool(true,  "Engulfing (Bull/Bear)", group=grpUse)
usePiercing   = input.bool(true,  "Piercing Line / Dark Cloud", group=grpUse)
useMarubozu   = input.bool(true,  "Marubozu (Bull/Bear)", group=grpUse)
useHammers    = input.bool(true,  "Hammer / Hanging Man", group=grpUse)
useInverted   = input.bool(true,  "Inverted Hammer / Shooting Star", group=grpUse)
useDoji       = input.bool(true,  "Doji", group=grpUse)
useStars      = input.bool(true,  "Morning/Evening Star", group=grpUse)
useThree      = input.bool(true,  "Three Soldiers / Three Crows", group=grpUse)
grpThr = "Thresholds"
minBodyPct         = input.float(0.6, "Min Body vs Range (0-1) for 'strong body'", step=0.05, group=grpThr)
maxDojiBodyPct     = input.float(0.1, "Max Body vs Range (0-1) for Doji", step=0.02, group=grpThr)
minEngulfFactor    = input.float(1.02, "Engulf body size factor", step=0.01, group=grpThr)
wickRatioHammer    = input.float(2.0, "Hammer lower wick ≥ body ×", step=0.1, group=grpThr)
wickRatioShooting  = input.float(2.0, "Shooting Star upper wick ≥ body ×", step=0.1, group=grpThr)
gapTolerance       = input.float(0.15, "Star gap tolerance as % of ATR", step=0.01, group=grpThr)
grpVis = "Visuals"
showLabels         = input.bool(true, "Show Labels", group=grpVis)
labelSize          = input.string("normal", "Label Size", options= , group=grpVis)
onlyConfirmed      = input.bool(true, "Only on bar close (confirmed)", group=grpVis)
// Colors
bullCol  = color.new(color.green, 0)
bearCol  = color.new(color.red, 0)
warnCol  = color.new(color.yellow, 0)
textCol  = color.black
// Helper to gate by confirmation
confirmed = onlyConfirmed ? barstate.isconfirmed : true
// ──────────────────────────────
// Candle math helpers
// ──────────────────────────────
body(o, c) => math.abs(c - o)
range(h, l) => h - l
isBull(o, c) => c > o
isBear(o, c) => c < o
upperW(h, o, c) => h - math.max(o, c)
lowerW(l, o, c) => math.min(o, c) - l
safeDiv(x, y) => y == 0.0 ? 0.0 : x / y
// Current and previous (p1, p2)
o = open, c = close, h = high, l = low
o1 = open , c1 = close , h1 = high , l1 = low 
o2 = open , c2 = close , h2 = high , l2 = low 
b  = body(o, c)
r  = range(h, l)
ub = upperW(h, o, c)
lb = lowerW(l, o, c)
b1  = body(o1, c1)
r1  = range(h1, l1)
b2  = body(o2, c2)
r2  = range(h2, l2)
bull  = isBull(o, c)
bear  = isBear(o, c)
bull1 = isBull(o1, c1)
bear1 = isBear(o1, c1)
bull2 = isBull(o2, c2)
bear2 = isBear(o2, c2)
bodyVsRange  = safeDiv(b,  r)
bodyVsRange1 = safeDiv(b1, r1)
bodyVsRange2 = safeDiv(b2, r2)
atr = ta.atr(14)
// ──────────────────────────────
/* Pattern logic */
// ──────────────────────────────
// 1) Engulfing
bullEngulf = useEngulf and confirmed and bear1 and bull and (b >= b1 * minEngulfFactor) and (o <= c1) and (c >= o1)
bearEngulf = useEngulf and confirmed and bull1 and bear and (b >= b1 * minEngulfFactor) and (o >= c1) and (c <= o1)
// 2) Piercing Line / Dark Cloud Cover
piercing = usePiercing and confirmed and bear1 and bull and c > (o1 + c1)/2 and o <= l1 + (h1 - l1)*0.25 // open near/below prior low, close into upper half
darkCloud = usePiercing and confirmed and bull1 and bear and c < (o1 + c1)/2 and o >= h1 - (h1 - l1)*0.25 // open near/above prior high, close into lower half
// 3) Marubozu (strong body, tiny wicks)
maruBull = useMarubozu and confirmed and bull and bodyVsRange >= minBodyPct and ub <= b * 0.1 and lb <= b * 0.1
maruBear = useMarubozu and confirmed and bear and bodyVsRange >= minBodyPct and ub <= b * 0.1 and lb <= b * 0.1
// 4) Hammer / Hanging Man (small body, long lower wick)
hammer     = useHammers and confirmed and bull and lb >= b * wickRatioHammer and ub <= b * 0.5
hangingMan = useHammers and confirmed and bear and lb >= b * wickRatioHammer and ub <= b * 0.5
// 5) Inverted Hammer / Shooting Star (small body, long upper wick)
invHammer    = useInverted and confirmed and bull and ub >= b * wickRatioShooting and lb <= b * 0.5
shootingStar = useInverted and confirmed and bear and ub >= b * wickRatioShooting and lb <= b * 0.5
// 6) Doji
doji = useDoji and confirmed and bodyVsRange <= maxDojiBodyPct
// 7) Morning Star
Custom Two Sessions H/L/50% LevelsTrack high/low/midpoint levels across two customizable time sessions. Perfect for monitoring H4 blocks, session ranges, or any custom time periods as reference levels for lower timeframe trading.
  
What This Indicator Does:
Tracks and projects High, Low, and 50% Midpoint levels for two fully customizable time sessions. Unlike fixed-session indicators, you define EXACTLY when each session starts and ends.
Key Features:
• Two independent sessions with custom start/end times (hour and minute)
• High/Low/50% midpoint tracking for each session
• Visual session boxes showing calculation periods
• Horizontal lines projecting levels into the future
• Historical session levels remain visible for reference
• Works on any chart timeframe (M1, M5, M15, H1, H4, etc.)
• Full visual customization (colors, line styles, widths)
• DST timezone support
Common Use Cases:
H4 Candle Tracking - Set sessions to 4-hour blocks (e.g., 6-10am, 10am-2pm) to track individual H4 highs/lows
H1 Candle Tracking - 1-hour blocks for scalping reference levels
Session Trading - ETH vs RTH, London vs NY, Asian session, etc.
Custom Time Periods - Any time range you want to monitor
How to Use:
The indicator identifies key price levels from higher timeframe periods. Use previous session H/L/50% as reference levels for:
Identifying sweep and reclaim setups
Lower timeframe structural flip confirmations
Support/resistance zones for entries
Delivery targets after breaks of structure
Settings:
Configure each session's start/end times independently. The indicator automatically triggers at the first bar crossing into your specified time, making it compatible with all chart timeframes.
Legendx🧠 LegendX Strategy — Adaptive Multi-Asset Smart Trading System
🔍 Overview
LegendX is a precision-engineered quantitative strategy designed for crypto and commodities (like Gold and Oil).
It automatically adapts to each market’s volatility, trend strength, and mean-reversion behavior using statistical models and volatility-adjusted moving averages.
This strategy was built to work seamlessly across different assets and timeframes — from high-frequency crypto scalping to medium-term gold trading — while keeping risk tightly controlled.
⚙️ Core Logic
LegendX combines multiple market intelligence layers:
Dynamic Moving Averages (EMA, HMA, VWAP, VWMA, etc.) – Defines directional bias based on adaptive smoothing.
Volatility Filters (ATR + Standard Deviation) – Detects expansion/contraction phases to time breakouts and reversals.
Distance Thresholds (MA Delta %) – Confirms entries only when price moves a specific % away from the equilibrium mean.
Multi-Take-Profit Architecture (TP1–TP8) – Smart scaling system that tracks realistic exit zones for each move.
Real-Time Telegram Signal Alerts – Sends BUY/SELL, entry, SL, and all 8 take-profit levels instantly to your Telegram channel.
In-Chart Statistics Dashboard – Displays rolling performance, win rates, drawdowns, and average R/R ratios dynamically.
🧩 How It Works
Long Trades: Trigger when price exceeds the upper adaptive threshold (volatility-weighted MA + ATR + StdDev).
Short Trades: Trigger when price drops below the lower adaptive threshold.
Each position includes dynamic stop-loss and multiple take-profit targets scaled by the Renormalization Coefficient, optimizing per asset class (Crypto vs Gold vs Oil).
The system tracks historical performance to calculate win rates, average profit, and cumulative statistics for the last 25–100 trades.
📊 Performance Dashboard
The on-chart probability table includes:
✅ TP hit probability (TP1–TP8)
📈 Average Max Profit / Drawdown
⚖️ Realized Risk-to-Reward (R/R)
🧮 Cumulative trade statistics (25–100 trade lookback)
⚡ Telegram Integration
Every time a new signal triggers:
Sends a rich message with entry, TP1–TP8, and SL directly to your Telegram channel.
All alerts are formatted for instant readability with emojis, markdown, and timestamps.
Works with TradingView’s Webhook URL + Bot Token + Chat ID setup.
💡 Recommended Use
Asset	Timeframe	Style	Notes
XAUUSD (Gold)	15m–1h	Swing	Ideal volatility balance
BTC/ETH/BNB	15m–30m	Trend-following	Works best during strong directional moves
USOIL (WTI)	15m	Intraday	Great during energy news cycles
⚠️ Risk Management
Built-in SL scaling via ATR ensures consistent volatility-adjusted risk.
Leverage defaults to 20× but can be customized per asset.
Daily loss cap and strategy sizing can be set within TradingView’s strategy properties.
🧭 Key Features Summary
Feature	Description
📊 Multi-Asset Profiles	Auto-optimizes settings for 30+ markets
📈 Adaptive MA Logic	Switchable EMA, HMA, VWAP, VWMA, SMA
🧮 ATR & StDev Filters	Dynamic volatility detection
🎯 8-Tier Take-Profit Ladder	Scales out profit progressively
🧠 Smart Stop-Loss	Auto-adjusts to volatility
🕹️ Built-In Stats Dashboard	Displays performance instantly
🔔 Telegram Integration	Auto-send real-time trade alerts
🚀 Goal
Deliver 4–5% monthly returns with smooth equity growth and minimal drawdowns by combining adaptive volatility filters, statistical profiling, and multi-level take-profit logic.
MTF 20 SMA Table - DXY**MTF 20 SMA Table - Multi-Timeframe Trend Analysis Dashboard**
**Overview:**
This indicator provides a comprehensive multi-timeframe analysis dashboard that displays the relationship between price and the 20-period Simple Moving Average (SMA) across four key timeframes: 15-minute, 1-hour, 4-hour, and Daily. It's designed to help traders quickly identify trend alignment and potential trading opportunities across multiple timeframes at a glance.  It's definitely not perfect but has helped me speed up my backtesting efforts as it's worked well for me eliminating flipping back and forth between timeframes excpet when I have confluence on the table, then I check the HTF.
**How It Works:**
The indicator creates a table overlay on your chart showing three critical metrics for each timeframe:
1. **Price vs SMA (Row 1):** Shows whether price is currently above (bullish) or below (bearish) the 20 SMA
   - Green = Price Above SMA
   - Red = Price Below SMA
2. **SMA Direction (Row 2):** Indicates the trend direction of the SMA itself over a lookback period
   - Green (↗ Rising) = Uptrend
   - Red (↘ Falling) = Downtrend
   - Gray (→ Flat) = Ranging/Consolidation
3. **Strength (Row 3):** Displays the distance between current price and the SMA in pips
   - Purple background = Strong move (>50 pips away)
   - Orange background = Moderate move (20-50 pips)
   - Gray background = Weak/consolidating (<20 pips)
   - Text color: Green for positive distance, Red for negative
**Key Features:**
- **Customizable Table Position:** Place the table anywhere on your chart (9 position options)
- **Adjustable SMA Lengths:** Modify the SMA period for each timeframe independently (default: 20)
- **Direction Lookback Settings:** Fine-tune how far back the indicator looks to determine SMA direction for each timeframe
- **Flat Threshold:** Set the pip threshold for determining when an SMA is "flat" vs trending (default: 5 pips)
- **DXY Optimized:** Calculations are calibrated for the US Dollar Index (1 pip = 0.01)
**Best Use Cases:**
1. **Trend Alignment:** Identify when multiple timeframes align in the same direction for higher probability trades
2. **Divergence Spotting:** Detect when lower timeframes diverge from higher timeframes (potential reversals)
3. **Entry Timing:** Use lower timeframe signals while higher timeframes confirm overall trend
4. **Strength Assessment:** Gauge how extended price is from the mean (SMA) to avoid overextended entries
**Settings Guide:**
- **SMA Settings Group:** Adjust the SMA period for each timeframe (15M, 1H, 4H, Daily)
- **SMA Direction Group:** Control lookback periods to determine trend direction
  - 15M: Default 5 candles
  - 1H: Default 10 candles
  - 4H: Default 15 candles
  - Daily: Default 20 candles
- **Flat Threshold:** Set sensitivity for "flat" detection (lower = more sensitive to ranging markets)
**Trading Strategy Examples:**
1. **Trend Following:** Look for all timeframes showing the same direction (all green or all red)
2. **Pullback Trading:** When Daily/4H are green but 15M/1H show red, wait for lower timeframes to flip green for entry
3. **Ranging Markets:** When multiple SMAs show "flat", consider range-bound strategies
**Important Notes:**
- This is a reference tool only, not a standalone trading system
- Always use proper risk management and combine with other analysis methods
- Best suited for trending instruments like indices and major forex pairs
- Calculations are optimized for DXY but can be used on other instruments (pip calculations may need adjustment)
**Credits:**
Feel free to modify and improve this code! Suggestions for enhancements are welcome in the comments.
---
**Installation Instructions:**
1. Add the indicator to your TradingView chart
2. Adjust the table position via settings to avoid overlap with price action
3. Customize SMA lengths and lookback periods to match your trading style
4. Monitor the table for timeframe alignment and trend confirmation
---
This indicator is published as open source for the community to learn from and improve upon. Happy trading! 📈
Ichimoku MultiTF WillyArt v1.0.0What this indicator does
Ichimoku WillyArt turns the Ichimoku lines into angle-based momentum across multiple timeframes (W, D, 4H, 1H, 30m, 5m).
For each TF it computes the slope (angle in degrees) of:
Tenkan-sen
Kijun-sen
Senkou Span A
Senkou Span B
Angles are normalized so they’re comparable across assets and scales. You get a table with the angle per line and a quick emoji direction (↑, →, ↓), optional plots of the chosen line, and ready-to-use alerts.
Why angle?
Slope-as-degrees is an intuitive proxy for momentum/impulse:
Positive angle → line rising (bullish impulse).
Negative angle → line falling (bearish impulse).
Near zero → flat/indecisive.
Two normalization modes
ATR (default): slope / ATR. Robust across instruments; less sensitive to price level.
%Price: slope / price. More sensitive; can highlight subtle turns on low-volatility symbols.
Inputs you’ll actually care about
Timeframes: W, D, 4H, 1H, 30m, 5m (all fetched MTF, independent of chart TF).
Ichimoku lengths: Tenkan (9), Kijun (26), Span B (52) — standard defaults.
Bars for slope (ΔN): How many bars back the slope is measured. Higher = smoother, slower.
Threshold (°) for “strong”: Angle magnitude that qualifies as strong ↑/↓.
What you’ll see
Matrix/Table (top-right): For each TF, the angle (°) of Tenkan, Kijun, Span A, Span B + an emoji:
↑ above threshold, ↓ below −threshold, → in between.
Optional plots: Toggle “Plot angles” to visualize the chosen series’ angle across TFs.
Alerts included (ready to pick in “Create Alert”)
Sustained state: e.g., “Kijun 4H: strong ↑ angle” triggers while angle > threshold.
Threshold cross (one-shot): e.g., “Kijun 1H: upward threshold cross” fires on crossing.
Consensus (multi-TF): “Kijun consensus ↑ (D/4H/1H/30m/5m)” when all selected TFs align up (and the symmetric down case).
Messages are constant strings (TradingView requirement), so they compile cleanly. If you want dynamic text (current angle, threshold value, etc.), enable your own alert() calls—this script structure supports adding them.
How to use it (workflow)
Add to chart. No need to switch chart TF; the script pulls W/D/4H/1H/30m/5m internally.
Pick normalization. Start with ATR. Switch to %Price if you want more sensitivity.
Set ΔN & threshold.
Intraday momentum: try ΔN = 3–5 and threshold ≈ 4–8°.
Swing/position: ΔN = 5–9 and threshold ≈ 3–6° (with ATR).
Scan the table. Look for alignment (multiple TFs with ↑ or ↓ on Kijun/Spans).
Kijun + Span A up together → trending push.
Span B up/down → cloud baseline tilting (trend quality).
Turn on alerts that match your style: reactive cross for entries, sustained for trend follow, consensus to filter noise.
Reading tips
Kijun angle: great “trend backbone.” Strong ↑ on several TFs = higher-probability pullback buys.
Span A vs. Span B:
Span A reacts faster (momentum).
Span B is slower (structure).
When both tilt the same way, the cloud is genuinely rotating.
Mixed signals? Use higher TFs (W/D/4H) as bias, lower TFs (1H/30m/5m) for timing.
Good to know (limits & best practices)
Angles measure rate of change, not overbought/oversold. Combine with price structure and risk rules.
Extremely low volatility or illiquid symbols can produce tiny angles—%Price mode may help.
ΔN and thresholds are contextual: adapt per market (crypto vs FX vs equities).
Want me to bundle a “pro template” of alert presets (intraday / swing) and a heatmap color scale for the table? Happy to ship v2. 🚀
Dual Table Dashboard - Correct V3add RSI Data## 📈 Trading Applications
### 1. Trend Following Strategy
```
1. Check TABLE 1 for trend direction (AnEMA29 + PDMDR)
2. If both green → Look for longs
3. If both red → Look for shorts
4. Use TABLE 2 for entry levels
```
### 2. Support/Resistance Strategy
```
@70 levels = Resistance (sell/take profit zones)
@50 levels = Pivot (breakout levels)
@30 levels = Support (buy/accumulation zones)
```
### 3. Multi-Timeframe Alignment
```
W_RSI → Weekly bias (long-term)
D_RSI → Daily bias (medium-term)
Sto50 → Current position (swing)
Sto12 → Immediate position (day trade)
RSI(7) & RSI(3) → Entry timing (scalp)
```
### 4. Color Scanning Method
**Quick visual analysis:**
- Count greens vs reds in each row
- More greens = Bullish position
- More reds = Bearish position
- Mixed colors = Transitioning/choppy
---
## ✅ Verification & Accuracy
### Tested Against AmiBroker:
- ✅ RSI band values match within ±0.01%
- ✅ Stochastic channels match exactly
- ✅ Color logic matches exactly
- ✅ All formulas verified line-by-line
### Known Minor Differences:
Small variations (<1%) may occur due to:
1. **Platform calculation precision** - Different floating-point engines
2. **Historical data feeds** - Slight variations in past prices
3. **Weekly bar boundaries** - TradingView vs AmiBroker week definitions
4. **Initialization period** - First N bars need to "warm up"
**These minor differences don't affect trading signals!**
---
## ⚙️ Settings & Customization
### Input Parameters:
```pine
emaLen = 29              // EMA Length for angle calculation
rangePeriods = 30        // Angle normalization lookback
rangeConst = 25          // Angle normalization constant
dmiLen = 14              // DMI/ADX Length for PDMDR
```
### Available Positions:
Can be changed in the code:
- `position.top_left`
- `position.top_center`
- `position.top_right`
- `position.middle_left` (Table 2 default)
- `position.middle_center`
- `position.middle_right`
- `position.bottom_left` (Table 1 default)
- `position.bottom_center`
- `position.bottom_right`
### Text Sizes:
- `size.tiny`
- `size.small` (current default)
- `size.normal`
- `size.large`
- `size.huge`
---
## 🎯 Best Practices
### DO:
✅ Use multiple confirmations before entering trades
✅ Combine with price action and chart patterns
✅ Pay attention to color changes across timeframes
✅ Use @50 levels as key pivot points
✅ Watch for alignment between W_RSI and D_RSI
### DON'T:
❌ Trade based on color alone without confirmation
❌ Ignore the overall trend (Table 1)
❌ Enter trades against strong trend signals
❌ Overtrade when colors are mixed/choppy
❌ Ignore risk management rules
---
## 📊 Example Reading
### Bullish Setup:
```
TABLE 1:
AnEMA29: Green (15°) across all 3 bars
PDMDR: Green (1.65) and rising
TABLE 2:
W_RSI@50: Green (price above)
D_RSI@50: Green (price above)
Sto50@50: Green (price above midpoint)
Sto12@50: Green (price above midpoint)
Interpretation: Strong bullish trend confirmed across multiple timeframes
Action: Look for long entries on pullbacks to @50 or @30 levels
```
### Bearish Setup:
```
TABLE 1:
AnEMA29: Red (-12°) across all 3 bars
PDMDR: Red (0.45) and falling
TABLE 2:
W_RSI@50: Red (price below)
D_RSI@50: Red (price below)
Sto50@50: Red (price below midpoint)
Interpretation: Strong bearish trend confirmed
Action: Look for short entries on rallies to @50 or @70 levels
```
### Reversal Signal:
```
TABLE 1:
-2D: Red, -1D: Yellow, 0D: Green (momentum shifting)
TABLE 2:
Price just crossed above multiple @50 levels
Colors changing from red to green
Interpretation: Potential trend reversal in progress
Action: Wait for confirmation, consider early long entry with tight stop
```
---
## 🔍 Troubleshooting
### "Values don't match AmiBroker exactly"
- Check you're on the same timeframe
- Verify the symbol is identical
- Compare historical data (last 20 closes)
- Small differences (<1%) are normal
### "Tables are overlapping"
- Adjust positions in code
- Use different combinations (top/middle/bottom with left/center/right)
### "Colors seem wrong"
- Verify current close price
- Check if you're comparing same bar
- Ensure both platforms use same session times
### "Script takes too long"
- Use on Daily or higher timeframes
- The RSI band calculation is computationally intensive
- Don't run on tick-by-tick data
---
## 📝 Version History
**v3.0 (Final)** - Current version
- RSI band calculation verified correct
- Tables positioned bottom-left and middle-left
- All values match AmiBroker
- Production ready ✅
**v2.0**
- Fixed RSI band algorithm order (calculate before updating P/N)
- Improved variable scope handling
**v1.0**
- Initial implementation
- Had incorrect RSI band calculation
---
## 📄 Files in Package
Stock Fundamental Overlay [DarwinDarma]Stock Fundamental Overlay  
 Stock Fundamental Overlay  is a comprehensive valuation indicator that displays multiple fundamental analysis metrics directly on your price chart.
 Key Features: 
• Graham Number - Benjamin Graham's intrinsic value formula
• Book Value Per Share (BVPS) - Net asset value baseline
• DCF Valuation - Discounted Cash Flow analysis (non-financial stocks)
• DDM Valuation - Dividend Discount Model (dividend-paying stocks)
• Visual Value Zones - Color-coded undervalued/overvalued regions
• Real-time Fundamental Table - Live metrics and valuations
• Price vs Graham Comparison - Quick valuation assessment
• Built-in Alerts - Notification when price crosses key levels
 Valuation Models: 
• Graham Number: √(22.5 × EPS × BVPS)
• DCF: Customizable discount rate, growth rate, and forecast period
• DDM: Gordon Growth Model for dividend analysis
 Visual Elements: 
• Plot lines for BVPS, Graham Number, and DCF values
• Shaded value zone between BVPS and Graham Number
• Background coloring: Deep value (below BVPS), Undervalued (below Graham), Overvalued (>1.5x Graham)
• Dynamic table showing all metrics with theme-aware text colors
 Special Handling: 
• Financial sector detection - DCF disabled for banks/financials where FCF metrics are distorted
• Automatic light/dark theme adaptation
• TTM (Trailing Twelve Months) data for current metrics
 How to Use - Value Investing Approach: 
 1. Identifying Undervalued Stocks: 
• Look for price trading BELOW the Graham Number (green zone) - potential value opportunity
• Deep value: Price below BVPS indicates trading below net asset value
• Check "Price vs Graham" % in table - negative values suggest undervaluation
• Compare multiple models: When price is below Graham, DCF, and BVPS simultaneously, stronger buy signal
 2. Margin of Safety: 
• Benjamin Graham recommended buying at 2/3 of intrinsic value (33% margin of safety)
• Monitor the gap between current price and valuation lines
• Larger gaps = greater margin of safety = lower downside risk
• Use the shaded "Value Zone" as your target buying range
 3. Setting Alerts: 
• "Price Below Graham Number" - Notifies when stock enters value territory
• "Price Below Book Value" - Extreme value alert for deep value hunters
• "Price Below DCF Value" - Cash flow-based value signal
• Set alerts on watchlist stocks to catch value opportunities
 4. Customizing for Your Strategy: 
• Conservative investors: Use lower growth rates (3-4%) and higher discount rates (12-15%)
• Growth-value investors: Adjust growth rate (6-8%) for quality compounders
• Dividend investors: Focus on DDM value and Div/Share metrics
• Adjust forecast years based on business predictability (stable = 10 years, cyclical = 5 years)
 5. Red Flags to Avoid: 
• Negative EPS or FCF (red values in table) - proceed with caution
• Financial sector stocks - Use DDM and Graham, ignore DCF
• Price far above Graham (>1.5x) with red background = overvalued territory
• No fundamental data = "N/A" in table - stock may lack reporting or be too small
• Stock persistently below BVPS for extended periods - potential value trap or business in distress
• Price significantly above ALL models (BVPS, Graham, DCF) - sentiment-driven, lacks intrinsic value foundation (fragile)
 ⚠️ Important Value Investing Warnings: 
•  Value Trap Alert:  A stock staying below BVPS for months/years may signal fundamental deterioration, asset impairments, or dying industry - not just "cheap." Investigate WHY it's cheap before buying
•  Sentiment Bubble Risk:  When price trades far above BVPS, Graham Number, AND DCF simultaneously, the stock has no intrinsic value basis. Examples: commodity stocks during boom cycles (gold miners in gold rallies), meme stocks, hype-driven sectors. These are highly fragile and vulnerable to mean reversion
•  Cyclical Trap:  Commodity/cyclical stocks can appear "cheap" at peak earnings (low P/E, high FCF) but are actually expensive. Normalize earnings across the cycle before valuing
•  Quality Matters:  Some excellent businesses (asset-light, high ROIC) naturally trade above book value. Don't avoid quality - adjust expectations for business model
 6. Monitoring Positions: 
• Watch for price approaching or exceeding Graham Number - consider taking profits
• Track EPS and FCF trends quarter-to-quarter in the table
• If fundamentals deteriorate (falling BVPS, negative FCF), reassess thesis
• Use background colors for quick visual check: green = hold/buy, red = overvalued
 Perfect for: 
Value investors seeking multi-model fundamental analysis, long-term investors comparing intrinsic value to market price, dividend investors evaluating yield stocks, and fundamental traders looking for entry/exit signals.
 Note:  Only works with stocks that have financial data available. Not applicable to crypto, forex, or futures. This indicator provides analysis tools; always conduct thorough research and due diligence before investing.
WorldCup Dashboard + Institutional Sessions© 2025 NewMeta™ — Educational use only.
# Full, Premium Description 
## WorldCup Dashboard + Institutional Sessions
**A trade-ready, intraday framework that combines market structure, real flow, and institutional timing.**
This toolkit fuses **Institutional Sessions** with a **price–volume decision engine** so you can see *who is active*, *where value sits*, and *whether the drive is real*. You get: **CVD/Delta**, volume-weighted **Momentum**, **Aggression** spikes, **FVG (MTF)** with nearest side, **Daily Volume Profile (VAH/POC/VAL)**, **ATR regime**, a **24h position gauge**, classic **candle patterns**, IBH/IBL + **first-hour “true close”** lines, and a **10-vote confluence scoreboard**—all in one view.
---
## What’s inside (and how to trade it)
### 🌍 Institutional Sessions (Sydney • Tokyo • London • New York)
* Session boxes + a highlighted **first hour**.
* Plots the **true close** (first-hour close) as a running line with a label.
  **Use:** Many desks anchor risk to this print. Above = bullish bias; below = bearish. **IBH/IBL** breaks during London/NY carry the most signal.
### 📊 CVD / Delta (Flow)
* Net buyer vs seller pressure with smooth trend state.
  **Use:** **Rising CVD + acceptance above mid/POC** confirms continuation. Bearish price + rising CVD = caution (possible absorption).
### ⚡ Volume-Weighted Momentum
* Momentum adjusted by participation quality (volume).
  **Use:** Momentum>MA and >0 → trend drive is “real”; <0 and falling → distribution risk.
### 🔥 Aggression Detector
* ROC × normalized volume × wick factor to flag **forceful** candles.
  **Use:** On spikes, avoid fading blindly—wait for pullbacks into **aligned FVG** or for aggression to cool.
### 🟦🟪 Fair Value Gaps (with MTF)
* Detects up to 3 recent FVGs and marks the **nearest** side to price.
  **Use:** Trend pullbacks into **bullish FVG** for longs; bounces into **bearish FVG** for shorts. Optional threshold to filter weak gaps.
### 🧭 24h Gauge (positioning)
* Shows current price across the 24h low⇢high with a mid reference.
  **Use:** Above mid and pushing upper third = momentum continuation setups; below mid = sell the rips bias.
### 🧱 Daily Volume Profile (manual per day)
* **VAH / POC / VAL** derived from discretized rows.
  **Use:** **POC below** supports longs; **POC above** caps rallies. Fade VAH/VAL in ranges; treat them as break/hold levels in trends.
### 📈 ATR Regime
* **ATR vs ATR-avg** with direction and regime flag (**HIGH / NORMAL / LOW**).
  **Use:** HIGH ⇒ give trades room & favor trend following. LOW ⇒ fade edges, scale targets.
### 🕯️ Candle Patterns (contextual, not standalone)
* Engulfings, Morning/Evening Star, 3 Soldiers/Crows, Harami, Hammer/Shooting Star, Double Top/Bottom.
  **Use:** Only with session + flow + momentum alignment.
### 🤝 Price–Volume Classification
* Labels each bar as **continuation**, **exhaustion**, **distribution**, or **healthy pullback**.
  **Use:** Align continuation reads with trend; treat “Price↑ + Vol↓” as a caution flag.
### 🧪 Confluence Scoreboard & B/S Meter
* Ten elements vote: 🔵 bull, ⚪ neutral, 🟣 bear.
  **Use:** Execution filter—take setups when the board’s skew matches your trade direction.
---
## Playbooks (actionable)
**Trend Pullback (Long)**
1. London/NY active, Momentum↑, CVD↑, price above 24h mid & POC.
2. Pullback into **nearest bullish FVG**.
3. Invalidate under FVG low or **true-close** line.
4. Targets: IBH → VAH → 24h high.
**Range Fade (Short)**
1. Asia/quiet regime, **Price↑ + Vol↓** into **VAH**, ATR low.
2. Nearest FVG bearish or scoreboard skew bearish.
3. Invalidate above VAH/IBH.
4. Targets: POC → VAL.
**News/Impulse**
Aggression spike? Don’t chase. Let it pull back into the aligned FVG; require CVD/Momentum agreement before entry.
---
## Alerts (included)
* **Bull/Bear Confluence ≥ 7/10**
* **Intraday Target Achieved** / **Daily Target Achieved**
* **Session True-Close Retests** (Sydney/Tokyo/London/NY)
*(Keep alerts “Once per bar” unless you specifically want intrabar triggers.)*
---
## Setup Tips
* **UTC**: Choose the reference that matches how you track sessions (default UTC+2).
* **Volume threshold**: 2.0× is a strong baseline; raise for noisy alts, lower for majors.
* **CVD smoothing**: 14–24 for scalps; 24–34 for slower markets.
* **ATR lengths**: Keep defaults unless your asset has a persistent regime shift.
---
## Why this framework?
Because **timing (sessions)**, **truth (flow)**, and **location (value/FVG)** together beat any single signal. You get *who is trading*, *how strong the push is*, and *where risk lives*—on one screen—so execution is faster and cleaner.
---
**Disclaimer**: Educational use only. Not financial advice. Markets are risky—backtest and size responsibly.
VBE Pro - Advanced Volatility Bands with Zero Lag & PredictionVBE Pro: Zero-Lag Predictive Bands
A next-gen volatility envelope that blends zero-lag smoothing with forward-looking volatility models (EWMA/GARCH/HAR/ML) to keep bands tight in calm markets, responsive in shocks, and adaptive across regimes.
What it does
Builds volatility from multiple methods (ATR, StDev, Parkinson, Garman-Klass, Rogers-Satchell, Yang-Zhang).
Projects near-term vol with your choice of predictor, then blends it via a weight slider.
Applies zero-lag smoothing (ZLEMA/ZLMA/DEMA/TEMA/HMA/JMA/Ehlers/Kalman/T3) to cut delay without over-shoot.
Auto-adapts band width by regime (high/low/normal) and can expand dynamically with price acceleration.
Optional displacement to align with your execution style.
On-chart
Upper/Lower zero-lag bands with optional fill.
Middle line (ZL-smoothed source).
Regime-tinted background (High/Low).
Displacement marker (if used).
Compact top-right info table: current vs predicted vol, regime, squeeze, multiplier, methods, ZL gain, est. lag reduction.
Signals & Alerts
Break↑ / Break↓ when price crosses the bands.
Vol↑ / Vol↓ expansion/contraction sequences.
“Squeeze” when band width compresses vs its ZL average.
“ZL” marker when significant zero-lag is active.
Prediction divergence ⚠ when projected vol deviates > threshold.
Built-in alertconditions for all of the above.
Quick start
Method: ATR or Hybrid for robustness.
Smoothing: ZLEMA, length 5–8, ZL gain 2–3 (push higher only if you accept more projection).
Bands: Multiplier 2.0, Adaptive on, Dynamic off to start.
Prediction: EWMA, weight 0.25–0.35. Move to GARCH in mean-reverty tapes; HAR-RV for mixed regimes.
Regime lookback: 50.
PulseRPO Zero-Lag BandsPulseRPO is a momentum and volatility timing suite built on a zero-lag Relative Price Oscillator. It pairs an RPO (fast vs slow MA spread, in %) with adaptive volatility envelopes that tighten or widen as conditions change, so you can spot true momentum bursts, exhaustion and “quiet-before-the-move” squeezes—without the usual MA lag.
What it shows
Zero-Lag RPO: Choose EMA, SMA, WMA, RMA, HMA or ZLEMA for the base, then apply ZLEMA/DEMA/TEMA/HMA zero-lag smoothing to cut delay.
Adaptive Bands: StdDev, ATR, Range or Hybrid volatility; bands auto-tighten in high vol and widen in quiet regimes.
Dynamic OB/OS: Levels scale with current regime so extremes mean something even as volatility shifts.
Signal & Histogram: Classic signal cross plus histogram for quick read of acceleration vs deceleration.
Squeeze Paint: Subtle background highlight when band width compresses below its average.
Divergences & Triggers: Optional bullish/bearish divergence tags, plus band-cross and signal-cross alerts out of the box.
How to use it (general guide)
Momentum entries: Look for RPO crossing up its signal from below or snapping out of a squeeze; extra weight if it also re-enters from below the lower band.
Trend continuation: RPO riding outside the upper (or lower) band with rising histogram = power move; trail risk on pullbacks to the signal line.
Exhaustion / fades: Taps beyond dynamic OB/OS or band re-entries can mark mean-revert windows—confirm with price/volume.
Risk filter: During squeeze, size down and prepare for expansion; after expansion, respect extremes.
Tweak the MA type, band method and zero-lag strength to match your timeframe. PulseRPO is designed to be a self-contained read: regime → setup → trigger → alert.
Swing Breakout Strategy ver 1Overview
A multi-confirmation swing strategy that seeks trend breakouts and adds three optional confluence modules: candlestick patterns, RSI/MACD regular divergences, and simple chart patterns (double top/bottom). Built for clarity, fast testing, and togglable debug markers.
Core Logic
Trend filter: SMA(50) vs SMA(200) + price vs SMA(21).
Breakout engine: Close breaks prior N-bar high/low (lookback configurable).
Momentum: Stochastic cross (optional view), MACD cross/zone, RSI regime (>50 or <50).
Volume: Above SMA(volume) filter.
Optional Confluence Modules
Candlestick analysis (enable/disable):
Bull/Bear Engulfing, Hammer, Shooting Star, Inside Bar (bull/bear flavors).
Divergence (enable/disable):
Regular divergences on RSI and MACD histogram using confirmed pivots (HH/LH or LL/HL).
Chart patterns (enable/disable):
Double Bottom (two similar lows + neckline break).
Double Top (two similar highs + neckline break).
Tolerance and pivot width are configurable.
Entries & Exits
Entry Long: Any of (Base Breakout + Trend + Momentum + Volume) OR enabled confluences (candles / divergence / pattern).
Entry Short: Symmetric logic for downside.
Risk management: Optional ATR-based stop loss and take profit (configurable length & multipliers).
Note: If you prefer confluences to be filters (AND), change the final buySignal/sellSignal lines accordingly.
Inputs (key)
SMA lengths (21/50/200), RSI length, Stochastic lengths & smoothing, MACD (12/26/9).
Breakout lookback, Volume SMA.
ATR exits (on/off, ATR length, SL/TP multipliers).
Toggles for Candlesticks, Divergences, Patterns, plus per-module debug markers.
Plots & Markers
Plots SMA 21/50/200.
Buy/Sell arrows on chart.
Optional debug markers for each condition (global-scope safe).
Divergence/pattern markers offset to the actual pivot/neckline bars.
Good Practices
Test on multiple timeframes and instruments; tune lookbacks and ATR multipliers.
Consider using the modules as filters in trending markets to reduce whipsaws.
Always forward-test and combine with position sizing.
Disclaimer
For educational purposes only. This is not financial advice. Trading involves risk.
Version & Credits
Pine Script® v6 — Strategy.
Developed by: Mohammed Bedaiwi.
Swing Breakout Strategy — Candles + Divergences + Patterns (rev)Overview
A multi-confirmation swing strategy that seeks trend breakouts and adds three optional confluence modules: candlestick patterns, RSI/MACD regular divergences, and simple chart patterns (double top/bottom). Built for clarity, fast testing, and togglable debug markers.
Core Logic
Trend filter: SMA(50) vs SMA(200) + price vs SMA(21).
Breakout engine: Close breaks prior N-bar high/low (lookback configurable).
Momentum: Stochastic cross (optional view), MACD cross/zone, RSI regime (>50 or <50).
Volume: Above SMA(volume) filter.
Optional Confluence Modules
Candlestick analysis (enable/disable):
Bull/Bear Engulfing, Hammer, Shooting Star, Inside Bar (bull/bear flavors).
Divergence (enable/disable):
Regular divergences on RSI and MACD histogram using confirmed pivots (HH/LH or LL/HL).
Chart patterns (enable/disable):
Double Bottom (two similar lows + neckline break).
Double Top (two similar highs + neckline break).
Tolerance and pivot width are configurable.
Entries & Exits
Entry Long: Any of (Base Breakout + Trend + Momentum + Volume) OR enabled confluences (candles / divergence / pattern).
Entry Short: Symmetric logic for downside.
Risk management: Optional ATR-based stop loss and take profit (configurable length & multipliers).
Note: If you prefer confluences to be filters (AND), change the final buySignal/sellSignal lines accordingly.
Inputs (key)
SMA lengths (21/50/200), RSI length, Stochastic lengths & smoothing, MACD (12/26/9).
Breakout lookback, Volume SMA.
ATR exits (on/off, ATR length, SL/TP multipliers).
Toggles for Candlesticks, Divergences, Patterns, plus per-module debug markers.
Plots & Markers
Plots SMA 21/50/200.
Buy/Sell arrows on chart.
Optional debug markers for each condition (global-scope safe).
Divergence/pattern markers offset to the actual pivot/neckline bars.
Good Practices
Test on multiple timeframes and instruments; tune lookbacks and ATR multipliers.
Consider using the modules as filters in trending markets to reduce whipsaws.
Always forward-test and combine with position sizing.
Disclaimer
For educational purposes only. This is not financial advice. Trading involves risk.
Version & Credits
Pine Script® v6 — Strategy.
Developed by: Mohammed Bedaiwi.
Real Relative Strength Breakout & BreakdownReal Relative Strength Breakout & Breakdown Indicator
What It Does
Identifies high-probability trading setups by combining:
Technical Breakouts/Breakdowns - Price breaking support/resistance zones
Real Relative Strength (RRS) - Volatility-adjusted performance vs benchmark (SPY)
Key Insight: The strongest signals occur when price action contradicts market direction—breakouts during market weakness or breakdowns during market strength show exceptional buying/selling pressure.
Real Relative Strength (RRS) Calculation
RRS measures outperformance/underperformance on a volatility-adjusted basis:
Power Index = (Benchmark Price Move) / (Benchmark ATR)
RRS = (Stock Price Move - Power Index × Stock ATR) / Stock ATR
RRS (smoothed) = 3-period SMA of RRS
Interpretation:
RRS > 0 = Relative Strength (outperforming)
RRS < 0 = Relative Weakness (underperforming)
Signal Types
🟢 Large Green Triangle (Premium Long)
Condition: Breakout + RRS > 0
Meaning: Stock breaking resistance WHILE outperforming benchmark
Best when: Market is weak but stock breaks out anyway = exceptional strength
Use: High-conviction long entries
🔵 Small Blue Triangle (Standard Breakout)
Condition: Breakout + RRS ≤ 0
Meaning: Breaking resistance but underperforming benchmark
Typical: "Rising tide lifts all boats" scenario during market rally
Use: Lower conviction—may just be following market
🟠 Large Orange Triangle (Premium Short)
Condition: Breakdown + RRS < 0
Meaning: Stock breaking support WHILE underperforming benchmark
Best when: Market is strong but stock breaks down anyway = severe weakness
Use: High-conviction short entries
🔴 Small Red Triangle (Standard Breakdown)
Condition: Breakdown + RRS ≥ 0
Meaning: Breaking support but outperforming benchmark
Typical: Stock falling less than market during selloff
Use: Lower conviction—may recover when market does
Why Large Triangles Matter
Large signals show divergence = genuine institutional flow:
Stock breaking out while market falls → Aggressive buying despite headwinds
Stock breaking down while market rallies → Aggressive selling despite tailwinds
These setups reveal where real conviction lies, not just momentum-following behavior.
Quick Settings
RRS: 12-period lookback, 3-bar smoothing, vs SPY
Breakouts: 5-period pivots, 200-bar lookback, 3% zone width, 2 minimum tests






















