Turtle N NormalizedSimple script that calculates the normalized value of N. Rules taken from an online PDF containing the original Turtle system:
"The Turtles used a volatility-based constant percentage risk position sizing algorithm. The Turtles used a concept that Richard Dennis and Bill Eckhardt called N to represent the underlying volatility of a particular market.
N is simply the 20-day exponential moving average of the True Range, which is now more commonly known as the ATR. Conceptually, N represents the average range in price movement that a particular market makes in a single day, accounting for opening gaps. N was measured in the same points as the underlying contract.
The Turtles built positions in pieces which we called Units. Units were sized so that 1 N represented 1% of the account equity. Thus, a unit for a given market or commodity can be calculated using the following formula:
Unit = 1% of Account/(N x Dollars per Point)"
To normalize the Unit formula, this script instead takes the value of (close/N). Dollars per point = 1 for stocks and crypto, but will change depending on the contract specifications for individual futures.
"Since the Turtles used the Unit as the base measure for position size, and since those units were volatility risk adjusted, the Unit was a measure of both the risk of a position, and of the entire portfolio of positions."
When the value of N is high, volatility is low and you should be more risk-on.
When the value of N is low, volatility is high and you should be more risk-off.
"gaps"に関するスクリプトを検索
Awesome Oscillator_VTX
Abbreviations:
AO - Awesome Oscillator
AC - Accelerator Oscillator
TP - TimePeriod (1m,2m,5m,1h....)
TP Steps - 1m,3m,12m,1h,5h,D (This steps i use)
Use-case:
Awesome Oscillator best used to find Divergence/Convergence what results in Weakening of Momentum and Price reversals.
This script calculates and plots AO/AC with minute precision, removing GAPS when projecting Higher Period AO/AC.
So you can accommodate all important information on one chart with best precision.
Made for Intraday Perioads.
Best used for DayTrading, when you need to make quick and efficient decisions.
Calculation = Preferred resolution * Length / Present resolution.
As Additional Function, this Awesome Oscillator has AC built in.
Settings:
Resolution - Most used TP included, plus some exclusive paid plans (1m, 2m, 3m, 5m, 12m, 15m, 1h, 4h, 5h, Daily). Default set to 1h
Use AO - You can switch between EMA and SMA for FastMA/SlowMA calculation. Default set to EMA
FastMA - standard function. Default set to 5
SlowMA - standard function. Default set to 34
Signal Line - Plots MA to show Momentum. Uses EMA/SMA based on "Use AO" selection. Default set to 5
Use AC - You can switch between EMA and SMA for AC calculation. Default set to SMA
Offset - standard function. Default set to 0
Accelerator - AC length. Default set to 5
Source - standard function. Default set to hlc3
Why to use it ?
Yes, i know that variable TP is standard now in TradingView. But there are some limitations, especially for DayTraders.
Problem:
Imagine you are trading/scalping on 1m.. 5m.. 15.. charts and you want to see where are your on Higher TP.
-- You can change to 1h and check it, but you will loose the picture from smaller TP.
-- You can use Standard TP function, but your data will update every 15m, 1h (depends on TP). And in result you have Gaps between bars.
Solution:
This script help to solve this problem, by breaking information down to 1m and building from there.
So whatever Intraday TP you choose to trade, your AO/AC will be updated with minute precision.
Limitations:
Sadly nothing without limitations.
1. For Best performance use only Higher TP dividable By Yours (ex. You use 3m chart, then you can plot 12m, 15m, 1h / You use 5m chart, then you can plot 15m, 1h. 12m will already have 3m of information lost using 5m Chart )
Kicker ScannerThe kicker pattern is deemed to be one of the most reliable reversal patterns and usually signifies a dramatic change in the fundamentals of the company in question.
It is a 2-candle pattern, whereby there is a significant gap between the body of the most recent candle and the previous candle.
A bullish kicker is one in which the most recent candle is bullish, and the previous candle is bearish.
A bearish kicker is one in which the most recent candle is bearish, and the previous candle is bullish.
I notice this works best for stocks, as there are many gaps in a stock chart. Currencies have few gaps, and thus few kickers.
From within the settings, you can set the minimum permitted gap between the two candles, specified in price, accurate to 6 decimal places; 0.000001.
Line breakI decided to help TradingView programmers and wrote code that converts a standard candles / bars to a line break chart. The built-in linebreak() and security() functions for constructing a Linear Break chart are bad, the chart is not built correctly, and does not correspond to the Line Breakout chart built into TradingView. I’m talking about simulating the Linear Break lines using the plotcandle() annotation, because these are the same candles without shadows. When you try to use the market simulator, when the gaps are turned on in the security() function, nothing is added to the chart, and when turned off, a completely different line break chart is drawn. Do not try to write strategies based on the built-in linebreak() function! The developers write in the manual: "Please note that you cannot plot Line Break boxes from Pine script exactly as they look. You can only get a series of numbers similar to OHLC values for Line Break charts and use them in your algorithms." However, it is possible to build a “Linear Breakthrough” chart exactly like the “Linear Breakthrough" chart built into TradingView. Personally, I had enough Pine Script functionality.
For a complete understanding of how such a graph is built, you can refer to Steve Nison's book “BEYOND JAPANESE CANDLES” and see the instructions for creating a “Three-Line Breakthrough” chart (the number of lines for a breakthrough is three):
Rule 1: if today's price is above the base price (closing the first candle), draw a white line from the base price to the new maximum price (before closing).
or Rule 2: if today's price is below the base price, draw a black line from the base price to the new low of prices (before closing).
Rule 3: if today's price is no different from the base, do not draw any line.
Rule 4: if today's price rises above the maximum of the first line, shift to the column to the right and draw a new white line from the previous maximum to the new maximum of prices.
Rule 5: if the price is below the low of the first line, move one column to the right and draw a new black line down from the previous low to the new low of prices.
Rule 6: if the price is kept in the range of the first line, nothing is applied to the chart.
Rule 7: if the market reaches a new maximum, surpassing the maximum of previous lines, move to the column to the right and draw a new white line up to a new maximum.
Rule 8: if today's price is below the low of previous lines (i.e. there is a new low), move to the right column and draw a new black line down to a new low.
Rule 9: if the price is in the range of the first two lines, nothing is applied to the chart.
Rule 10: if there is a series of three white lines, a new white line is drawn when a new maximum is reached (even if it is only one tick higher than the old one). Under the same conditions, for drawing a black reversal line, the price should fall below the minimum of the series of the last three white lines. Such a black line is called a black reversal line. It runs from the base of the highest white line to a new low of price.
Rule 11: if there is a series of three black lines, a new black line is drawn when a new minimum is reached. Under the same conditions, for drawing a white line, called a white reversal line, the price must exceed the maximum of the previous three black lines. This line is drawn from the top of the lowest black line to a new high of the price.
So, the script was not small, but the idea is extremely simple: if you need to break n lines to build a line, then among these n lines (or less, if this is the beginning of the chart), the maximum or minimum of closures and openings will be searched. If the current candles closed above or below these highs or lows, then a new line is added to the chart on the current candles (trend or breakout). According to my observations, this script draws a chart that is completely identical to the Line Breakout chart built into TradingView, but of course with gaps, as there is time in the candles / bar chart. I stuffed all the logic into a wrapper in the form of the get_linebreak() function, which returns a tuple of OHLC values. And these series with the help of the plotcandle() annotation can be converted to the "Linear Breakthrough" chart. I also want to note that with a large number of candles on the chart, outrages about the buffer size uncertainty are heard from the TradingView black box. Because of this, in the annotation study() set the value to the max_bars_back parameter.
In general, use it (for example, to write strategies)!
True Accumulation/DistributionAccumulation/Distribution is developed by Marc Chaikin to provide insight into strength of a trend by measuring flow of buy and sell volume.
The fact that A/D only factors current period's range for calculating the volume multiplier causes problem with price gaps. They are ignored or even misinterpreted.
True Accumulation/Distribution solves the problem by using True Range instead of only relying on current period's high and low.
In this example you can see when a gap has occurred in Amazon Inc.'s daily chart True A/D has handled it better than Accumulation/Distribution which a bearish close in period's range has caused it to misinterpret the strong buy pressure as sell volume.
GAP DETECTORGAP DETECTOR is an indicator displaying price gaps that have never been completely filled (only gaps >= 5 pips are considered).
Each gap is defined by two lines (the lower and upper bound of the gap), and a label giving information on its price range
#Parameters:
length: the number of candles being considered in the indicator (max is 3000).
width: the width of the gap lines.
[PX] VWAP Gap LevelHello guys,
another day, another method for detecting support and resistance level. This time it's all about the VWAP and daily gaps it might produce.
How does it work?
The indicator detects when a new daily candle begins and the VWAP makes a big move in either direction. Often it produces a gap and this is where the support or resistance level will be plotted. The idea behind it is, that those gaps get filled at some point in time. You can control how big a VWAP movement ("gap") has to be with the "VWAP Movement %" -setting. Also, you can adjust the style of the level.
If you find this indicator useful, please leave a "like" and hit that "follow" button :)
Have fun and happy trading :)))
OVL_Kikoocycle Beta_Pine3This script use :
- A custom Chande Kroll Stop for generate the channel
- Some custom Parabolic S.A.R for generate cycles
This script can be separated into 3 categories:
- Channel Kroll generator : one layer for the actual interval and a layer for a Large Timeframe .(with ratio)
- "Range" generator : one layer for actual Interval and a layer for a Large Timeframe.(with automique ratio)
-Targets generator : one layer for actual interval with different trend.
"Channel Kroll" :
- I "hijack" the Chande Kroll Stop formula with custom parameters for generate this channel. Overall, it works like other types of channels like BB, etc... A midline and two borders. The thickness of the borders are relatively important here. A thick border shows some resistance of the area. And so the probability of seeing the market return to its first contact is stronger. While a very thin and vertical border would rather play the role of a breach, a bit like the idea of gaps. Often the market seems to want to go after several cycles.
You can activate its Large TimeFrame version, its midline is strong and fine borders helps to judge the risk.
SARget + "SAR Limited" :
- (S.A.R + targets) The philosophy of this function is simple... When a small cycle is broken, it creates a mark on a higher cycle. So on until the SAR called "SAR Limited". For simplicity, imagine a fractal image but inverted ... Break the small figure, it will mark the larger figure at this time but to get there you still have to make the way to the small figure.
Targets are : cross ("+") for fast targets(hidden by default because, theire work only on lower interval), squares (for medium trend), Xcross(for large trend) and red cross(they try to find a large contexte). When a target proc, it is for later (market need some cycles for going to, but it is relative to your interval). This gives you speculative goals.
Why 2 targets for a same type and a triangle with a 90deg angle : This give a potential area for management.The triangle help to visualize the SAR and to juge the market reaction. You need to adapte your trade with that...
Targets may be slightly too far because I am a bad coder... Currently the targets appear at the moment of rupture but it would be necessary to wait for the end of the breaking movement. Which can bring a positional error if the break is violent.
RnG and LTF RnG :
- Attempt to generate a Fibo range for each cycle and see interressing areas to enter or exit. This is played with the same philosophy as the Fibo extensions and retracement.
When a new RnG is generated, do not rush. It appears showing 50/50 for both sides. When a new RnG is generated, do not rush. It appears showing 50/50 for both sides. As long as the market is out of the middle zone (the 3 lines) keep in mind the past RnG.
When the market is out of range, you can use the FibRetracement tool for have extensions. One point at each end, as on the presentation graph. (Values 1.14, 1.272, 1.414, 1.618, 1.786, 2, 2.4 and 4 work well.) If too extrem you can active the LTF version.
Never fomo a break, market like to pull a level... Observe and be patient.
It's easier to use than to explain xD
NB : Do not use the LTF as context. For this, it is better to look at a higher interval.
I invite you to look in the style tab of the script and deselect the plots named UNCHECKEME, this will ease your browser.
Volume Profile Free Ultra SLI (100 Levels Value Area VWAP) - RRBVolume Profile Free Ultra SLI by RagingRocketBull 2019
Version 1.0
This indicator calculates Volume Profile for a given range and shows it as a histogram consisting of 100 horizontal bars.
This is basically the MAX SLI version with +50 more Pinescript v4 line objects added as levels.
It can also show Point of Control (POC), Developing POC, Value Area/VWAP StdDev High/Low as dynamically moving levels.
Free accounts can't access Standard TradingView Volume Profile, hence this indicator.
There are several versions: Free Pro, Free MAX SLI, Free Ultra SLI, Free History. This is the Free Ultra SLI version. The Differences are listed below:
- Free Pro: 25 levels, +Developing POC, Value Area/VWAP High/Low Levels, Above/Below Area Dimming
- Free MAX SLI: 50 levels, 2x SLI modes for Buy/Sell or even higher res 150 levels
- Free Ultra SLI: 100 levels, packed to the limit, 2x SLI modes for Buy/Sell or even higher res 300 levels
- Free History: auto highest/lowest, historic poc/va levels for each session
Features:
- High-Res Volume Profile with up to 100 levels (line implementation)
- 2x SLI modes for even higher res: 300 levels with 3x vertical SLI, 100 buy/sell levels with 2x horiz SLI
- Calculate Volume Profile on full history
- POC, Developing POC Levels
- Buy/Sell/Total volume modes
- Side Cover
- Value Area, VAH/VAL dynamic levels
- VWAP High/Low dynamic levels with Source, Length, StdDev as params
- Show/Hide all levels
- Dim Non Value Area Zones
- Custom Range with Highlighting
- 3 Anchor points for Volume Profile
- Flip Levels Horizontally
- Adjustable width, offset and spacing of levels
- Custom Color for POC/VA/VWAP levels, Transparency for buy/sell levels
WARNING:
- Compilation Time: 1 min 20 sec
Usage:
- specify max_level/min_level/spacing (required)
- select range (start_bar, range length), confirm with range highlighting
- select volume type: Buy/Sell/Total
- select mode Value Area/VWAP to show corresponding levels
- flip/select anchor point to position the buy/sell levels
- use Horiz Buy/Sell SLI mode with 100 or Vertical SLI with 300 levels if needed
- use POC/Developing POC/VA/VWAP High/Low as S/R levels. Usually daily values from 1-3 days back are used as levels for the current day.
SLI:
use SLI modes to extend the functionality of the indicator:
- Horiz Buy/Sell 2x SLI lets you view 100 Buy/Sell Levels at the same time
- Vertical Max_Vol 3x SLI lets you increase the resolution to 300 levels
- you need at least 2 instances of the indicator attached to the same chart for SLI to work
1) Enable Horiz SLI:
- attach 2 indicator instances to the chart
- make sure all instances have the same min_level/max_level/range/spacing settings
- select volume type for each instance: you can have a buy/sell or buy/total or sell/total SLI. Make sure your buy volume instance is the last attached to be displayed on top of sell/total instances without overlapping.
- set buy_sell_sli_mode to true for indicator instances with volume_type = buy/sell, for type total this is optional.
- this basically tells the script to calculate % lengths based on total volume instead of individual buy/sell volumes and use ext offset for sell levels
- Sell Offset is calculated relative to Buy Offset to stack/extend sell after buy. Buy Offset = Zero - Buy Length. Sell Offset = Buy Offset - Sell Length = Zero - Buy Length - Sell Length
- there are no master/slave instances in this mode, all indicators are equal, poc/va levels are not affected and can work independently, i.e. one instance can show va levels, another - vwap.
2) Enable Vertical SLI:
- attach the first instance and evaluate the full range to roughly determine where is the highest max_vol/poc level i.e. 0..20000, poc is in the bottom half (third, middle etc) or
- add more instances and split the full vertical range between them, i.e. set min_level/max_level of each corresponding instance to 0..10000, 10000..20000 etc
- make sure all instances have the same range/spacing settings
- an instance with a subrange containing the poc level of the full range is now your master instance (bottom half). All other instances are slaves, their levels will be calculated based on the max_vol/poc of the master instance instead of local values
- set show_max_vol_sli to true for the master instance. for slave instances this is optional and can be used to check if master/slave max_vol values match and slave can read the master's value. This simply plots the max_vol value
- you can also attach all instances and set show_max_vol_sli to true in all of them - the instance with the largest max_vol should become the master
Auto/Manual Ext Max_Vol Modes:
- for auto vertical max_vol SLI mode set max_vol_sli_src in all slave instances to the max_vol of the master indicator: "VolumeProfileFree_MAX_RRB: Max Volume for Vertical SLI Mode". It can be tricky with 2+ instances
- in case auto SLI mode doesn't work - assign max_vol_sli_ext in all slave instances the max_vol value of the master indicator manually and repeat on each change
- manual override max_vol_sli_ext has higher priority than auto max_vol_sli_src when both values are assigned, when they are 0 and close respectively - SLI is disabled
- master/slave max_vol values must match on each bar at all times to maintain proper level scale, otherwise slave's levels will look larger than they should relative to the master's levels.
- Max_vol (red) is the last param in the long list of indicator outputs
- the only true max_vol/poc in this SLI mode is the master's max_vol/poc. All poc/va levels in slaves will be irrelevant and are disabled automatically. Slaves can only show VWAP levels.
- VA Levels of the master instance in this SLI mode are calculated based on the subrange, not the whole range and may be inaccurate. Cross check with the full range.
WARNING!
- auto mode max_vol_sli_src is experimental and may not work as expected
- you can only assign auto mode max_vol_sli_src = max_vol once due to some bug with unhandled exception/buffer overflow in Tradingview. Seems that you can clear the value only by removing the indicator instance
- sometimes you may see a "study in error state" error when attempting to set it back to close. Remove indicator/Reload chart and start from scratch
- volume profile may not finish to redraw and freeze in an ugly shape after an UI parameter change when max_vol_sli_src is assigned a max_vol value. Assign it to close - VP should redraw properly, but it may not clear the assigned max_vol value
- you can't seem to be able to assign a proper auto max_vol value to the 3rd slave instance
- 2x Vertical SLI works and tested in both auto/manual, 3x SLI - only manual seems to work (you can have a mixed mode: 2nd instance - auto, 3rd - manual)
Notes:
- This code uses Pinescript v3 compatibility framework
- This code is 20x-30x faster (main for cycle is removed) especially on lower tfs with long history - only 4-5 sec load/redraw time vs 30-60 sec of the old Pro versions
- Instead of repeatedly calculating the total sum of volumes for the whole range on each bar, vol sums are now increased on each bar and passed to the next in the range making it a per range vs per bar calculation that reduces time dramatically
- 100 levels consist of 50 main plot levels and 50 line objects used as alternate levels, differences are:
- line objects are always shown on top of other objects, such as plot levels, zero line and side cover, it's not possible to cover/move them below.
- all line objects have variable lengths, use actual x,y coords and don't need side cover, while all plot levels have a fixed length of 100 bars, use offset and require cover.
- all key properties of line objects, such as x,y coords, color can be modified, objects can be moved/deleted, while this is not possible for static plot levels.
- large width values cause line objects to expand only up/down from center while their length remains the same and stays within the level's start/end points similar to an area style.
- large width values make plot levels expand in all directions (both h/v), beyond level start/end points, sometimes overlapping zero line, making them an inaccurate % length representation, as opposed to line objects/plot levels with area style.
- large width values translate into different widths on screen for line objects and plot levels.
- you can't compensate for this unwanted horiz width expansion of plot levels because width uses its own units, that don't translate into bars/pixels.
- line objects are visible only when num_levels > 50, plot levels are used otherwise
- Since line objects are lines, plot levels also use style line because other style implementations will break the symmetry/spacing between levels.
- if you don't see a volume profile check range settings: min_level/max_level and spacing, set spacing to 0 (or adjust accordingly based on the symbol's precision, i.e. 0.00001)
- you can view either of Buy/Sell/Total volumes, but you can't display Buy/Sell levels at the same time using a single instance (this would 2x reduce the number of levels). Use 2 indicator instances in horiz buy/sell sli mode for that.
- Volume Profile/Value Area are calculated for a given range and updated on each bar. Each level has a fixed length. Offsets control visible level parts. Side Cover hides the invisible parts.
- Custom Color for POC/VA/VWAP levels - UI Style color/transparency can only change shape's color and doesn't affect textcolor, hence this additional option
- Custom Width - UI Style supports only width <= 4, hence this additional option
- POC is visible in both modes. In VWAP mode Developing POC becomes VWAP, VA High and Low => VWAP High and Low correspondingly to minimize the number of plot outputs
- You can't change buy/sell level colors from input (only transparency) - this requires 2x plot outputs => 2x reduces the number of levels to fit the max 64 limit. That's why 2 additional plots are used to dim the non Value Area zones
- You can change level transparency of line objects. Due to Pinescript limitations, only discrete values are supported.
- Inverse transp correlation creates the necessary illusion of "covered" line objects, although they are shown on top of the cover all the time
- If custom lines_transp is set the illusion will break because transp range can't be skewed easily (i.e. transp 0..100 is always mapped to 100..0 and can't be mapped to 50..0)
- transparency can applied to lines dynamically but nva top zone can't be completely removed because plot/mixed type of levels are still used when num_levels < 50 and require cover
- transparency can't be applied to plot levels dynamically from script this can be done only once from UI, and you can't change plot color for the past length bars
- All buy/sell volume lengths are calculated as % of a fixed base width = 100 bars (100%). You can't set show_last from input to change it
- Range selection/Anchoring is not accurate on charts with time gaps since you can only anchor from a point in the future and measure distance in time periods, not actual bars, and there's no way of knowing the number of future gaps in advance.
- Adjust Width for Log Scale mode now also works on high precision charts with small prices (i.e. 0.00001)
- in Adjust Width for Log Scale mode Level1 width extremes can be capped using max deviation (when level1 = 0, shift = 0 width becomes infinite)
- There's no such thing as buy/sell volume, there's just volume, but for the purposes of the Volume Profile method, assume: bull candle = buy volume, bear candle = sell volume
P.S. I am your grandfather, Luke! Now, join the Dark Side in your father's steps or be destroyed! Once more the Sith will rule the Galaxy, and we shall have peace...
CME Gap Finder - BitcoinOnly for Bitcoin!
This indicator locates weekly gaps created by the CME Futures market for Bitcoin.
As you can see, Bitcoin tends to close the weekly gaps created in the futures market so I thought this could be a very useful tool.
Instead of having to look between multiple charts, this simply overlays the past weeks open and close should a gap appear.
I hope you find this indicator useful!
Cheers!
Anchor ZonesL.A. Little, who wrote two books on trend trading, explained a key timing concept called anchor zones which was used, within his trading system, to enter and exit the market at appropriate times.
Anchor zones are formed from anchor bars. An anchor bar is a bar that has one or more of these components: wide range, high volume or gaps. For this script we're going to require two or more of the components. When an anchor bar forms, we'll note the high and low of the bar and draw a zone across time as prices develops. For this script, we'll also note the open and close of the candle to hint at other levels of support or resistance. The boundaries of these zones can act as support or resistance, but they also mark out the areas where price can often get trapped.
A breakout from these zones on high volume can suggest the beginning of a new trend. In general, anchor zones are a good compliment to price action strategies. For more information on how to use these, refer to L.A. Little's books.
References
onlinelibrary.wiley.com
www.tradingsetupsreview.com
Want to Learn?
If you'd like the opportunity to learn Pine but you have difficulty finding resources to guide you, take a look at this rudimentary list: docs.google.com
The list will be updated in the future as more people share the resources that have helped, or continue to help, them. Follow me on Twitter to keep up-to-date with the growing list of resources.
Suggestions or Questions?
Don't even kinda hesitate to forward them to me. My (metaphorical) door is always open.
T2-%Use a superposition of 30 avarages to stress-out trend changes (points in time where all possible frequencies that create the movment change their phase from prositive to negetive or the opposite). The indicator has one paramater that should be adjusted: 'os'.
By defult the 30 avarages that are tested range from 7 to 63 in gaps of 2. increasing the 'os' parameter moves the ranges by multiplications of 65. therefore if you add 5 indicators ontop of eachother, each scaled to left and set the os of each to another value (0,1,2,3,4) you will have a full spectum of avarages ranging from 7 to 325 in gaps of 2.
GapologyThis indicator can be used as a simple measure of price action tradability. It's an alternative to volume that focuses on the gaps between close and open candle prices. The bigger the gaps, the more spread and slippage you'll get when trading.
Hersheys Volume Pressure v2Hersheys Volume Pressure gives you very nice confirmation of trend starts and stops using volume and price.
For up bars...
If you have a large price change with low volume , that's very bullish .
If you have a small price change with low volume , that's bullish .
For down bars...
If you have a large price change with low volume , that's very bearish .
If you have a small price change with low volume , that's bearish .
Look at the chart and you'll see how trends start and end with a PINCH and widen in the middle of the moves.
You can set the moving average period, 14 is the default.
Good trading!
Brian Hershey
v2 change log...
- issue with price gaps - gaps at the open were sometimes showing incorrect colors
- scaling issues - sometimes a change is so large it scales down all nearby data and renders it hard to view. Code was added to clip those huge values.
v3 what's coming next...
- better scaling - sometimes with thinly traded stocks there is too much clipping. For now increase the chart interval to correct.
20 MA ReversionA mean reversion tactic with the 20 SMA:
the indicator is chcking specific parameters, such as the volume related to the last day's volume, distance from 20 SMA, CCI values and changes, trends, and recent gaps that will act as a magnet.
enjoy!
Technical Summary VWAP | RSI | VolatilityTechnical Summary VWAP | RSI | Volatility
The Quantum Trading Matrix is a multi-dimensional market-analysis dashboard designed as an educational and idea-generation tool to help traders read price structure, participation, momentum and volatility in one compact view. It is not an automated execution system; rather, it aggregates lightweight “quantum” signals — VWAP position, momentum oscillator behaviour, multi-EMA trend scoring, volume flow and institutional activity heuristics, market microstructure pivots and volatility measures — and synthesizes them into a single, transparent score and signal recommendation. The primary goal is to make explicit why a given market looks favourable or unfavourable by showing the individual ingredients and how they combine, enabling traders to learn, test and form rules based on observable market mechanics.
Each module of the matrix answers a distinct market question. VWAP and its percentage distance indicate whether the current price is trading above or below the intraday volume-weighted average — a proxy for intraday institutional control and value. The quantum momentum oscillator (fast and slow EMA difference scaled to percent) captures short-to-intermediate momentum shifts, providing a quickly responsive view of directional pressure. Multi-EMA trend scoring (8/21/50) produces a simple, transparent trend score by counting conditions such as price above EMAs and cross-EMAs ordering; this score is used to categorize market trend into descriptive buckets (e.g., STRONG UP, WEAK UP, NEUTRAL, DOWN). Volume analysis compares current volume to a recent moving average and computes a Z-score to detect spikes and unusual participation; additional buy/sell pressure heuristics (buyingPressure, sellingPressure, flowRatio) estimate whether upside or downside participation dominates the bar. Institutional activity is approximated by flagging large orders relative to volume baseline (e.g., volume > 2.5× MA) and estimating a dark pool proxy; this is a heuristic to highlight bars that likely had large players involved.
The dashboard also performs market-structure detection with small pivot windows to identify recent local support/resistance areas and computes price position relative to the daily high/low (dailyMid, pricePosition). Volatility is measured via ATR divided by price and bucketed into LOW/NORMAL/HIGH/EXTREME categories to help you adapt stop sizing and expectational horizons. Finally, all these pieces feed an interpretable scoring function that rewards alignment: VWAP above, strong flow ratio, bullish trend score, bullish momentum, and favorable RSI zone add to the overall score which is presented as a 0–100 metric and a colored emoji indicator for at-a-glance assessment.
The mashup is purposeful: each indicator covers a failure mode of the other. For example, momentum readings can be misleading during volatility spikes; VWAP informs whether institutions are on the bid or offer; volume Z-score detects abnormal participation that can validate a breakout; multi-EMA score mitigates single-EMA whipsaws by requiring a combination of price/EMA conditions. Combining these signals increases information content while keeping each component explainable — a key compliance requirement. The script intentionally emphasizes transparency: when it shows a BUY/SELL/HOLD recommendation, the dashboard shows the underlying sub-components so a trader can see whether VWAP, momentum, volume, trend or structure primarily drove the score.
For practical use, adopt a clear workflow: (1) check the matrix score and read the component tiles (VWAP position, momentum, trend and volume) to understand the drivers; (2) confirm market-structure support/resistance and pricePosition relative to the daily range; (3) require at least two corroborating components (for example, VWAP ABOVE + Momentum BULLISH or Volume spike + Trend STRONG UP) before considering entries; (4) use ATR-based stops or daily pivot distance for stop placement and size positions such that the trade risks a small, pre-defined percent of capital; (5) for intraday scalps shorten holding time and tighten stops, for swing trades increase lookback lengths and require multi-timeframe (higher TF) agreement. Treat the matrix as an idea filter and replay lab: when an alert triggers, replay the bars and observe which components anticipated the move and which lagged.
Parameter tuning matters. Shortening the momentum length makes the oscillator more sensitive (useful for scalping), while lengthening it reduces noise for swing contexts. Volume profile bars and MA length should match the instrument’s liquidity — increase the MA for low-liquidity stocks to reduce false institutional flags. The trend multiplier and signal sensitivity parameters let you calibrate how aggressively the matrix counts micro evidence into the score. Always backtest parameter sets across multiple periods and instruments; run walk-forward tests and keep a simple out-of-sample validation window to reduce overfitting risk.
Limitations and failure modes are explicit: institutional flags and dark-pool estimates are heuristics and cannot substitute for true tape or broker-level order flow; volume split by price range is an approximation and will not perfectly reflect signed volume; pivot detection with small windows may miss larger structural swings; VWAP is typically intraday-centric and less meaningful across multi-day swing contexts; the score is additive and may not capture non-linear relationships between features in extreme market regimes (e.g., flash crashes, circuit breaker events, or overnight gaps). The matrix is also susceptible to false signals during major news releases when price and volume behavior dislocate from typical patterns. Users should explicitly test behavior around earnings, macro data and low-liquidity periods.
To learn with the matrix, perform these experiments: (A) collect all BUY/SELL alerts over a 6-month period and measure median outcome at 5, 20 and 60 bars; (B) require additional gating conditions (e.g., only accept BUY when flowRatio>60 and trendScore≥4) and compare expectancy; (C) vary the institutional threshold (2×, 2.5×, 3× volumeMA) to see how many true positive spikes remain; (D) perform multi-instrument tests to ensure parameters are not tuned to a single ticker. Document every test and prefer robust, slightly lower returns with clearer logic rather than tuned “optimal” results that fail out of sample.
Originality statement: This script’s originality lies in the curated combination of intraday value (VWAP), multi-EMA trend scoring, momentum percent oscillator, volume Z-score plus buy/sell flow heuristics and a compact, interpretable scoring system. The script is not a simple indicator mashup; it is a didactic ensemble specifically designed to make internal rationale visible so traders can learn how each market characteristic contributes to actionable probability. The tool’s novelty is its emphasis on interpretability — showing the exact contributing signals behind a composite score — enabling reproducible testing and educational value.
Finally, for TradingView publication, include a clear description listing the modules, a short non-technical summary of how they interact, the tunable inputs, limitations and a risk disclaimer. Remove any promotional content or external contact links. If you used trademark symbols, either provide registration details or remove them. This transparent documentation satisfies TradingView’s requirement that mashups justify their composition and teach users how to use them.
Quantum Trading Matrix — multi-factor intraday dashboard (educational use only).
Purpose: Combines intraday VWAP position, a fast/slow EMA momentum percent oscillator, multi-EMA trend scoring (8/21/50), volume Z-score and buy/sell flow heuristics, pivot-based microstructure detection, and ATR-based volatility buckets to produce a transparent, componentized market score and trade-idea indicator. The mashup is intentional: VWAP identifies intraday value, momentum detects short bursts, EMAs provide structural trend bias, and volume/flow confirm participation. Signals require alignment of at least two components (for example, VWAP ABOVE + Momentum BULLISH + positive flow) for higher confidence.
Inputs: momentum period, volume MA/profile length, EMA configuration (8/21/50), trend multiplier, signal sensitivity, color and display options. Use shorter momentum lengths for scalps and longer for swing analysis. Increase volume MA for thinly traded instruments.
Limitations: Institutional/dark-pool estimates and flow heuristics are approximations, not actual exchange tape. VWAP is intraday-focused. Expect false signals during major news or low-liquidity sessions. Backtest and paper-trade before applying real capital.
Risk Disclaimer: For education and analysis only. Not financial advice. Use proper risk management. The author is not responsible for trading losses.
________________________________________
Risk & Misuse Disclaimer
This indicator is provided for education, analysis and idea generation only. It is not investment or financial advice and does not guarantee profits. Institutional activity flags, dark-pool estimates and flow heuristics are approximations and should not be treated as exchange tape. Backtest thoroughly and use demo/paper accounts before trading real capital. Always apply appropriate position sizing and stop-loss rules. The author is not responsible for any trading losses resulting from the use or misuse of this tool.
________________________________________
Risk Disclaimer: This tool is provided for education and analysis only. It is not financial advice and does not guarantee returns. Users assume all risk for trades made based on this script. Back test thoroughly and use proper risk management.
Pattern ScannerUltimate Pattern Scanner — multi-timeframe candlestick discovery tool (educational use only).
Purpose: This script scans user-selected timeframes for classical candlestick patterns (for example: engulfing, morning/evening stars, hammers, dojis, tasuki gaps, three soldiers/crows, tweezers, marubozu, and others) and reports pattern name, detection price, directional signal (Bull / Bear / Neutral), and a simple volume participation metric. It is intended as an idea-generation and training tool to help traders learn pattern mechanics, not as an automated trading system.
Main modules and rationale: 1) Pattern engine — applies classical candle structure rules to detect formations; 2) SMA trend filter (configurable length) — provides a directional bias to favor trade-with-trend setups; 3) Volume heuristic — approximates participation by separating candles into buy-like and sell-like volume and comparing total volume to a moving average; 4) Multi-timeframe aggregator — collects and presents pattern results from multiple timeframes; 5) Alerts — optional alerts list detected patterns and TFs. Combining these modules is intentional: patterns provide structure, SMA provides context, and volume supplies participation confirmation. Together they improve the educational value and practical relevance of each detected pattern.
How to use: Choose timeframes and SMA length that match your trading horizon. Use the scanner to locate pattern candidates, then confirm with higher-timeframe agreement and volume ratio before considering trade entry. Use structural stops (recent swing highs/lows or ATR-based stops) and define risk:reward rules. For learning, replay alerted bars and record outcomes over fixed horizons to build empirical statistics.
Limitations: Volume classification (close>open) is a heuristic and not a true bid/ask tape. SMA is a lagging trend proxy. Multi-timeframe agreement reduces but does not eliminate false signals, especially around news or in low-liquidity instruments. Use demo accounts and backtesting before live trading.
Inputs you can adjust: timeframe list, SMA length, volume MA length, which patterns to enable/disable, display options.
Compliance notes: This description explains why modules are combined and what the script does without exposing source code logic; it is non-promotional and contains no contact links. Remove any trademark symbols unless registration details are provided.
Risk Disclaimer: This tool is provided for education and analysis only. It is not financial advice and does not guarantee returns. Users assume all risk for trades made based on this script. Backtest thoroughly and use proper risk management.
Multi-RSI with Stochastic Oscillator - flack0xA sophisticated momentum analysis tool combining 4 customizable RSI oscillators with an innovative Close/Close Stochastic implementation. Designed for traders seeking comprehensive momentum insights across multiple timeframes in a single, organized indicator.
Key Features:
4 Independent RSI Oscillators with default periods: 2, 3, 9, 27
Innovative Close/Close Stochastic - Compares closing prices to closing price ranges (not high/low)
Complete Customization - Individual control over periods, colors, line widths, and visibility
Reference Levels - Customizable overbought (70), oversold (30), and midline (50) levels
Smart Alert System - Crossover notifications for key momentum shifts
Unique Close/Close Stochastic Methodology:
Unlike traditional Stochastic oscillators that use high/low ranges.
Benefits of Close/Close Approach:
Eliminates Gap Noise - Ignores overnight gaps and intraday wicks
Smoother Signals - Reduces whipsaws common in traditional Stochastic
Position-Relevant - Focuses on actual settlement prices traders care about
Cleaner Momentum Reading - Pure closing price momentum without intraday volatility
ICT Sweep + FVG Entry (v6) • Pro Pack 📌 ICT Sweep + FVG Entry Pro Pack
This indicator combines key ICT price action concepts with practical execution tools to help traders spot high-probability setups faster and more objectively. It’s designed for scalpers and intraday traders who want to keep their chart clean but never miss critical market structure events.
🔑 Features
Liquidity Pools (HTF)
• Auto-detects recent swing highs/lows from higher timeframes (5m/15m).
• Draws both lines and optional rectangles/zones for clear liquidity areas.
Liquidity Sweeps (BSL/SSL)
• Identifies when price sweeps above/below liquidity pools and rejects back.
• Optional Grade-A sweep filter (wick size + strong re-entry).
Fair Value Gaps (FVGs)
• Highlights bullish/bearish imbalances.
• Optional midline (50%) entry for precision.
• Auto-invalidation when price fully closes inside the gap.
Killzones (New York)
• Highlights AM (9:30–11:30) and PM (14:00–15:30) killzones.
• Option to block signals outside killzones for higher strike rate.
Bias Badge (DR50)
• Displays if price is trading in a Bull, Bear, or Range context based on displacement range midpoint.
SMT Assist (NQ vs ES)
• Detects simple divergences between indices:
Bearish SMT → NQ makes HH while ES doesn’t.
Bullish SMT → NQ makes LL while ES doesn’t.
SL/TP Helper & R:R Label
• Automatically draws stop loss (at sweep extreme) and target (opposite pool or recent swing).
• Displays expected Risk:Reward ratio and blocks entries if below your chosen minimum.
Filters
• ATR filter ensures signals only appear in sufficient volatility.
• Sweep quality filter avoids weak wicks and fake-outs.
🎯 How to Use
Start on HTF (5m/15m) → Identify liquidity zones and bias.
Drop to LTF (1m) → Wait for a liquidity sweep confirmation.
Check for FVG in the sweep’s direction → Look for retest entry.
Use the SL/TP helper to validate your risk/reward before taking the trade.
Focus entries during NY Killzones for maximum effectiveness.
✅ Why this helps
This tool reduces screen time and hesitation by automating repetitive ICT concepts:
Liquidity pools, sweeps, and FVGs are marked automatically.
Killzone timing and SMT divergence are simplified.
Clear visual signals for entries with built-in RR filter help keep your trading mechanical.
⚠️ Disclaimer: This script is for educational purposes only. It does not provide financial advice or guarantee results. Always use proper risk management.
ICT Sweep + FVG Entry (v6) • Antoine📌 ICT Sweep + FVG Entry (Antoine)
This indicator is designed for price action traders who follow ICT concepts and want a mechanical tool to spot liquidity sweeps, fair value gaps (FVGs), and precise entry signals.
🔎 Key Features
Liquidity Pools (HTF)
• Automatically plots recent swing highs/lows from a higher timeframe (5m/15m).
• These act as Buy Side Liquidity (BSL) and Sell Side Liquidity (SSL) levels where stop orders accumulate.
Sweep Detection
• Identifies when price breaks a pool (BSL/SSL) but closes back inside → a classic liquidity grab.
• Plots a triangle on the chart when a sweep is confirmed.
Fair Value Gap (FVG) Highlighting
• Detects bullish and bearish FVGs on the execution timeframe (ideal for 1m).
• Option to display active FVG zones with shaded boxes.
Entry Signals
• A signal (cross) appears when:
A liquidity sweep occurs.
An FVG forms in the direction of the rejection.
Price retests the FVG (entry at the 50% mid-level or edge).
Alerts Ready
• Get alerted for sweeps (bullish/bearish) and for entry confirmations (long/short FVG retests).
🎯 How to Use
Choose your HTF (5m or 15m) → The indicator maps major liquidity pools.
Drop to LTF (1m) → Wait for a sweep signal at one of the pools.
Confirm with FVG → If an FVG appears in the sweep’s direction, the indicator waits for a retest.
Entry → Enter on the retest of the FVG (edge or 50%).
Risk Management
Stop loss: just beyond the sweep’s wick.
Target: opposite liquidity pool.
Minimum recommended R:R: 1:2.
✅ Why this helps
This tool makes it easier to trade ICT-style setups without missing opportunities:
No need to manually draw every swing high/low.
Automatic FVG detection saves time.
Clear sweep + FVG + retest logic keeps your entries mechanical and disciplined.
⚠️ Disclaimer: This script is for educational purposes only. It does not guarantee profits. Always use proper risk management.
Swing Guardrail — 30-sec Midterm Check (EBITDA Margin & EV/EBITDWhat it does
Before a short-term swing entry, this indicator right-sizes positions by a quick midterm (3–12m) durability screen using two fundamentals:
EBITDA Margin (TTM) → earning power / operational resilience
EV/EBITDA (TTM) → price tag vs earning capacity (payback feel)
A high-contrast table (top-right) shows both metrics and a verdict:
PASS — both meet thresholds → normal size
HALF — only one meets → reduce size
FAIL — neither meets → avoid
Why check “midterm” for a short-term trade?
Short swings still face earnings/news gaps, failed breakouts, and regime shifts. Names with weak margins or stretched valuation tend to break faster and deeper. A 30-sec durability check helps you:
Filter fragile setups (avoid expensive + weakening names)
Stabilize drawdowns (size down when quality/price don’t align)
Keep timing unchanged while improving risk-adjusted returns
Inputs (defaults)
Min EBITDA Margin % (TTM): 8%
Max EV/EBITDA (TTM): 12
Dark chart? High-contrast colors
How to use with a swing system
Get your entry from price/volume (e.g., Ichimoku cloud break, Kijun reclaim, Tenkan>Kijun; or your A/B/C rules).
Run this check only to set size (not timing).
Optional alerts: Once per bar close for PASS / HALF / FAIL.
Size mapping & event guard
PASS → 100% of your planned size
HALF → ~50% size / tighter stops
FAIL → watchlist only
If earnings < ~10 JP business days, drop one tier; ≤3 days → avoid.
Sector guides (tweak as needed)
Software/Internet: Margin ≥ 15%, EV/EBITDA ≤ 18
Industrials/Consumer: Margin ≥ 8%, EV/EBITDA ≤ 12
Retail: Margin ≥ 5–7%, EV/EBITDA ≤ 10–12
Edge cases / substitutions
Banks/Insurers/REITs or net-cash/negative EBITDA: EV/EBITDA may mislead → consider Net Debt/EBITDA or sector metrics (CET1/LTV/DSCR).
Sparse data / fresh listings: numbers may be NA until updates.
Notes & limitations
Data via request.financial() (TTM/most-recent). Some tickers/regions can show NA until fundamentals refresh.
This is a risk-screen / sizing tool, not a buy/sell signal.
Disclaimer
Educational use only. Not investment advice.
日本語
タイトル
スイング用ガードレール―中期“壊れにくさ”30秒チェック(EBITDAマージン & EV/EBITDA, TTM)
概要
短期スイングのエントリー前に、中期(3〜12か月)の耐久性を2指標で素早く確認し、ポジションサイズを決めるためのツールです。
EBITDAマージン(TTM):事業の稼ぐ力・体力
EV/EBITDA(TTM):その体力に対する“値札”(回収年数の感覚)
右上の高コントラスト表に数値と判定を表示:
PASS:両方クリア → 通常サイズ
HALF:片方のみ → サイズ半分
FAIL:両方NG → 見送り
なぜ短期でも“中期”を確認?
短期でも決算・ニュースのギャップ、ブレイク失敗、地合い転換は起きます。マージンが弱い/割高すぎる銘柄は崩れやすく、戻りも鈍い傾向。30秒の耐久性チェックで
脆いセットアップを回避
ドローダウンを平準化(サイズで吸収)
タイミングは変えずに、リスク調整後リターンの改善を狙えます。
入力(既定)
最低EBITDAマージン:8%
最大EV/EBITDA:12
黒背景向け:高コントラスト表示
使い方(スイング手法と併用)
まずは価格シグナル(一目の雲上抜け/基準線回復/転換線>基準線、またはA/B/Cルール)。
本インジの判定でサイズのみ決定(エントリーのタイミングは出しません)。
任意でバー確定アラート(PASS/HALF/FAIL)を設定。
サイズ目安 & イベント抑制
PASS:計画サイズ100%
HALF:約50%(ストップもタイトに)
FAIL:見送り
決算まで≦10営業日なら1段階サイズダウン、≦3営業日は原則見送り。
セクター目安(調整推奨)
ソフト/ネット:マージン 15%以上、EV/EBITDA 18以下
工業/一般消費:マージン 8%以上、EV/EBITDA 12以下
小売:マージン 5〜7%以上、EV/EBITDA 10〜12以下
例外・代替
銀行・保険・REIT/ネットキャッシュ・EBITDAマイナス:EV/EBITDAは適さない場合 → Net Debt/EBITDAやCET1/LTV/DSCR等で補助。
新規上場・データ薄:更新までNAのことあり。
注意
データは request.financial() を使用。更新前はNAの可能性。
本ツールはリスク確認/サイズ調整用で、売買シグナルではありません。
免責
情報提供のみ。投資判断は自己責任で。