P-Square - Estimation of the Nth percentile of a seriesEstimation of the Nth percentile of a series
When working with built-in functions in TradingView we have to limit our length parameters to max 4999. In case we want to use a function on the whole available series (bar 0 all the way to the current bar), we can usually not do this without manually creating these calculations in our code. For things like mean or standard deviation, this is quite trivial, but for things like percentiles, this is usually very costly. In more complex scripts, this becomes impossible because of resource restrictions from the Pine Script execution servers.
One solution to this is to use an estimation algorithm to get close to the true percentile value. Therefore, I have ported this implementation of the P-Square algorithm to Pine Script. P-Square is a fast algorithm that does a good job at estimating percentiles in data streams. Here's the algorithms original paper .
The chart
On the chart we see:
The returns of the series (blue scatter plot)
The mean of the returns of the series (orange line)
The standard deviation of the returns of the series (yellow line)
The actual 84.1th percentile of the returns (white line)
The estimatedl 84.1th percentile of the returns using the P-Square algorithm (green line)
Note: We can see that the returns are not normally distributed as we can see that one standard deviation is higher than the 84.1th percentile. One standard deviation should equal the 84.1th percentile if the data is normally distributed.
Search in scripts for "algo"
Machine Learning: Logistic RegressionMulti-timeframe Strategy based on Logistic Regression algorithm
Description:
This strategy uses a classic machine learning algorithm that came from statistics - Logistic Regression (LR).
The first and most important thing about logistic regression is that it is not a 'Regression' but a 'Classification' algorithm. The name itself is somewhat misleading. Regression gives a continuous numeric output but most of the time we need the output in classes (i.e. categorical, discrete). For example, we want to classify emails into “spam” or 'not spam', classify treatment into “success” or 'failure', classify statement into “right” or 'wrong', classify election data into 'fraudulent vote' or 'non-fraudulent vote', classify market move into 'long' or 'short' and so on. These are the examples of logistic regression having a binary output (also called dichotomous).
You can also think of logistic regression as a special case of linear regression when the outcome variable is categorical, where we are using log of odds as dependent variable. In simple words, it predicts the probability of occurrence of an event by fitting data to a logit function.
Basically, the theory behind Logistic Regression is very similar to the one from Linear Regression, where we seek to draw a best-fitting line over data points, but in Logistic Regression, we don’t directly fit a straight line to our data like in linear regression. Instead, we fit a S shaped curve, called Sigmoid, to our observations, that best SEPARATES data points. Technically speaking, the main goal of building the model is to find the parameters (weights) using gradient descent.
In this script the LR algorithm is retrained on each new bar trying to classify it into one of the two categories. This is done via the logistic_regression function by updating the weights w in the loop that continues for iterations number of times. In the end the weights are passed through the sigmoid function, yielding a prediction.
Mind that some assets require to modify the script's input parameters. For instance, when used with BTCUSD and USDJPY, the 'Normalization Lookback' parameter should be set down to 4 (2,...,5..), and optionally the 'Use Price Data for Signal Generation?' parameter should be checked. The defaults were tested with EURUSD.
Note: TradingViews's playback feature helps to see this strategy in action.
Warning: Signals ARE repainting.
Style tags: Trend Following, Trend Analysis
Asset class: Equities, Futures, ETFs, Currencies and Commodities
Dataset: FX Minutes/Hours/Days
Delta Weighted Average Price (DWAP) @MaxMaserati 2.0MMM DWAP (Delta Weighted Average Price) - Trading Indicator Guide
Overview
The MMM DWAP (Delta Weighted Average Price) indicator analyzes volume-price relationships by incorporating buying and selling pressure (delta) to identify key support and resistance levels. This tool provides multi-timeframe analysis with momentum assessment and breakout detection capabilities.
Core Methodology
MMM DWAP calculates weighted average prices based on delta (buying vs selling pressure) rather than volume alone. This approach reveals where directional money flow creates sustainable support and resistance levels, providing traders with enhanced market analysis.
Key Innovation: Fair Value Magnetism
The market facilitates fair exchange between buyers and sellers. The indicator identifies dynamic fair value zones through delta-weighted cloud bands. Price tends to return to these levels, creating high-probability reaction points for trading decisions.
Technical Comparison
vs VWAP
- VWAP: Volume-weighted calculation showing where volume occurred
- MMM DWAP: Delta-weighted analysis revealing directional money flow with multi-timeframe integration
vs Moving Averages
- Moving Averages: Price-only calculation with inherent lag
- MMM DWAP: Real-time delta analysis providing delta-defended levels with market context
vs Bollinger Bands
- Bollinger Bands: Statistical volatility measures for squeeze detection
- MMM DWAP: Breakout prediction with confidence levels based on market pressure analysis
Visual Components
MMM DWAP Line (Orange): Primary fair value level based on delta weighting
Dynamic Cloud Bands: Overbought/oversold zones with fair value magnetism
Support/Resistance Lines: Multi-timeframe key levels with delta directional indicators
Squeeze Detection: Volatility compression alerts with breakout direction prediction
Analysis Table: Real-time consensus direction, momentum strength, and breakout predictions
Fair Value Zone Concept
Orange Line: Absolute Fair Value Price - the natural equilibrium level where price gravitates. Most important support/resistance level.
Price closed below the line
Price closed above the line
Upper Cloud = Bullish Fair Value Area (BuFV):
- When price is above Orange Line, Upper Cloud acts as support
- Price pullbacks to this zone create buying opportunities
- Represents fair value in bullish market conditions
Far Above Upper Cloud = "TOO HIGH" Zone:
- Price is overextended above fair value
- Overbought condition - likely to reverse DOWN to Upper Cloud (BuFV)
- Sell signal area or profit-taking zone for longs
Lower Cloud = Bearish Fair Value Area (BeFV):
- When price is below Orange Line, Lower Cloud acts as resistance
- Price rallies to this zone create selling opportunities
- Represents fair value in bearish market conditions
Far Below Lower Cloud = "TOO LOW" Zone:
- Price is overextended below fair value
- Oversold condition - likely to reverse UP to Lower Cloud (BeFV)
- Buy signal area or profit-taking zone for shorts
Rubber Band Effect:
- Upper Cloud (BuFV): If price stretches TOO FAR UP → snaps back DOWN to fair value area
- Lower Cloud (BeFV): If price stretches TOO FAR DOWN → snaps back UP to fair value area
Support & Resistance Intelligence
Resistance Line Behavior:
Red Arrow Down (R ↓):
- Bearish delta at resistance level
- Sellers are defending this resistance
- Strong selling pressure - price likely to reject downward
- Traditional resistance behavior - SELL zone
Green Arrow Up (R ↑):
- Bullish delta at resistance level
- Buyers are challenging this resistance
- Strong buying pressure pushing through
- Potential breakout signal - BUY zone
Support Line Behavior:
Green Arrow Up (S ↑):
- Bullish delta at support level
- Buyers are defending this support
- Strong buying interest - price likely to bounce up
- Traditional support behavior - BUY zone
Red Arrow Down (S ↓):
- Bearish delta at support level
- Sellers are overwhelming support
- Strong selling pressure breaking through
- Potential breakdown signal - SELL zone
When the arrow is → for the Support and Resistance line, it is a neutral state
4-Phase Breakout Cycle
Phase 1 - Normal Trading: Regular price movement with bands at normal width
Phase 2 - Band Tightening (SQUEEZE): Yellow diamonds appear as bands compress. Breakout direction prediction activates - early warning before the move.
Phase 3 - Balloon Formation: Bands expand outward, forming balloon shape around price. Preparation phase - volatility releasing but price still contained.
Phase 4 - Explosive Breakout: Price breaks decisively through expanded bands with volume surge and directional momentum. Execution phase.
Strategy Sequence:
- Tightening Phase = PREDICT (Get direction forecast)
- Balloon Phase = PREPARE (Confirm setup and position size)
- Breakout Phase = EXECUTE (Enter trade in predicted direction)
Trading Applications
Retest Strategy:
1. Identify trend bias through MMM DWAP line position
2. Monitor for breakouts above/below Orange Line
3. Wait for pullback to appropriate Fair Value zone (BuFV or BeFV)
4. Execute trades on reaction at fair value levels
High-Probability Setups:
- Bullish Breakout: Bullish consensus + Strong momentum + Resistance with strong buying delta
- Bearish Rejection: Bearish consensus + Strong momentum + Resistance with strong selling delta
- Support Bounce: Bullish consensus + Support with strong buying delta
Analysis Table Guide
Consensus Row: Overall market sentiment based on volume-weighted buying/selling pressure
- BULLISH: Look for long opportunities
- BEARISH: Look for short opportunities
Momentum Row: Current strength compared to recent average
- STRONG: High conviction moves - ride momentum
- WEAK: Low conviction moves - wait for better setups
Price Level Rows (R1, R2, S1, S2): Delta pressure at each level
- High positive delta = Buyers dominated (potential breakout level)
- High negative delta = Sellers dominated (potential rejection level)
Risk Management
- Stop Levels: Orange Line breaks or opposite band extremes
- Profit Targets: Opposite fair value zones
- Position Sizing: Based on momentum strength indicators
Technical Notes
- Delta Calculation: Bullish volume minus bearish volume for directional pressure
- Timeframe Independence: MMM DWAP and S/R levels can utilize different timeframes
- Squeeze Algorithm: Adaptive band width analysis for volatility compression
- Consensus Logic: Aggregate delta analysis across multiple price levels
- Fair Value Zones: Dynamic BuFV/BeFV adaptation based on Orange Line position
Note: This indicator combines volume-price analysis with order flow concepts. Effectiveness depends on market liquidity and proper application of fair value principles. Most effective setups occur when consensus direction, momentum strength, squeeze detection, and favorable delta history align.
Price levelsThanks to the developers for adding arrays to TradingView. This gives you more freedom in Pine Script coding.
I have created an algorithm that draws support and resistance levels on a chart. The algorithm can be easily customized as you need.
This algorithm can help both intuitive and system traders. Intuitive traders just look at the drawn lines. For system traders, the "levels" array stores all level values. Thus, you can use these values for algorithmic trading.
Fractal Trend Trading System [DW]This is an advanced utility that uses fractal dimension and trend information to generate useful insights about price activity and potential trade signals.
In this script, my Advanced FDI algorithm is used to estimate the fractal dimension of the dataset over a user defined period.
Fractal dimension, unlike spatial or topological dimension, measures how complexity or detail in an "object" changes as its unit of measurement changes, rather than the number of axes it occupies.
Many forms of time series data (seismic data, ECG data, financial data, etc.) have been theoretically shown to have limited fractal properties.
Consequently, we can estimate the fractal dimension from this data to get an approximate measure of how rough or convoluted the data stream is.
Financial data's fractal dimension is limited to between 1 and 2, so it can also be used to roughly approximate the Hurst Exponent by the relationship H = 2 - D.
When D=1.5, data statistically behaves like a random walk. D above 1.5 can be considered more rough or "mean reverting" due to the increase in complexity of the series.
D below 1.5 can be considered more prone to trending due to the decrease in complexity of the series.
In this script, you are given the option to apply my Band Shelf EQ algorithm to the dataset before estimating dimension.
This enables you to transform your data and observe how its newly measured complexity changes the outputs.
Whether you want to give emphasis to some frequencies, isolate specific bands, or completely alter the shape of your waveform, EQ filtration makes for an interesting experience.
The default EQ preset in this script removes the low shelf, then attenuates low end and high end oscillations.
The dominant cyclical components (bands 3 - 5 on default settings) are passed at 100%, keeping emphasis on 8 to 64 sample per cycle oscillations.
The estimated dimension is then used to calculate the High Dimension Zone and the Error Bands.
Both of these components are great for analyzing trends and for estimating support and resistance values.
The High Dimension Zone is composed of a high line, low line, and midline that update their values when D is at or above the user defined zone activation threshold.
The zone is then averaged over a user defined amount of updates and zone width is multiplied by a user defined value.
The Error Bands are composed of a high, low, and middle band that are calculated using an error adjusted adaptive filter algorithm that utilizes dimension as the smoothing constant modulator.
The basis filter for the error bands has two calculation types built in:
-> MA - Calculates the filters as adaptive moving averages modulated by D.
-> WAP - Calculates the filters as adaptive weighted average prices modulated by D.
The WAP starting point can be based on the High Dimension Zone being moved or a user defined interval.
You can also define the WAP's minimum and maximum periods for additional control of the initial and decayed sensitivity states.
The alpha (smoothing constant) modulator can be fine tuned using the designated dimension thresholds.
When D is at or below the low dimension threshold, the filter is most responsive, and vice-versa for the high dimension threshold.
Alpha is then multiplied by a user defined amount for additional control of sensitivity.
Band width is then multiplied by a user defined value.
A Hull transformation can be optionally performed on the zone averaging and band filter algorithms as well, which will alter the frequency and phase responses at the cost of some overshoot.
This transformation is the same as a typical Hull equation, but with custom filters being used instead of WMA.
The calculated outputs are then used to gauge the trend for signal and color scheme calculations.
First, a dominant trend indication is selected from its designated dropdown tab.
The available built in indications to choose from are:
-> Band Trend (Outer) - Detects band breakouts and saves their direction to gauge trend.
-> Band Trend (Median) - Uses disparity between source and the band median to gauge trend.
-> Zone Trend (Expansion) - Detects when the high fractal zone expands and saves its direction to gauge trend.
-> Zone Trend (Outer Levels) - Detects zone breakouts and saves their direction to gauge trend.
-> Zone Trend (Median) - Uses disparity between source and the zone median to gauge trend.
Then the trend output is optionally filtered before triggering signals.
There are multiple trend filtration options built into this script that can be used individually or in unison:
-> Filter Trend With High Fractal Zone - Filters the trend using the specified zone level or combination of levels with either disparity or crossover conditions.
There is a set of options for bullish and bearish trends.
-> Filter Trend With Error Bands - Filters the trend using the specified band level or combination of levels with either disparity or crossover conditions.
There is a set of options for bullish and bearish trends.
-> Filter Trend With Band - Zone Disparity Condition - Filters the trend using the specified band level, zone level, and disparity direction.
There is a set of options for bullish and bearish trends.
-> Filter By Zone That Moves With The Trend - Filters the specified trend by detecting when the high fractal zone’s direction correlates.
-> Filter By Bands That Move With The Trend - Filters the specified trend by detecting when the error bands’ direction correlates.
-> Filter Using Wave Confirmation - Filters the specified trend by detecting when source is in a correlating wave with user defined length.
You can also choose separate lengths for bullish and bearish trends.
-> Filter By Bars With Decreasing Dimension - Filters the specified trend by detecting when fractal dimension is decreasing, suggesting source is approaching more linear movement.
The filtered trend output is then used to generate entry and exit signals.
There are multiple options included to fine tune how these signals behave.
For entries, you have the following options built in:
-> Limit Entry Dimension - Limits the range of dimensional values that are acceptable for entry with user defined thresholds.
This can be incredibly useful for filtering out entries taken when price is moving in a more complex pattern,
or when price is approaching a peak and you’re a little late to the party.
-> Enable Position Increase Signals - Enables more entry signals to fire up to a user defined number of times when a position is active.
This is helpful for those who incrementally increase their positions, or for those who want to see additional signals as reference.
-> Limit Number Of Consecutive Trades - Limits the number of consecutive trades that can be opened in a single direction to a user defined maximum.
This is especially useful for markets that only trend for brief durations.
By limiting the amount of trades you take in one direction, you have more control over your market exposure.
There is a set of these options for both bullish and bearish entries.
For exits, you have the following options built in:
-> Include Exit Signals From High Fractal Zone - Enables exit signals generated from either crossover or disparity conditions between price and a specified zone level.
-> Include Exit Signals From Error Bands - Enables exit signals generated from either crossover or disparity conditions between price and a specified zone level.
-> Include Inactive Trend Output For Exits - Triggers exit signals when the filtered trend output is an inactive value.
-> Dimension Target Exit Method - Triggers exit signals based on fractal dimension hitting a user defined threshold.
You can either choose for the exit to trigger instantly, or after dimension reverts from the target by a user specified amount.
-> Exit At Maximum Entry Dimension - Triggers exit signals when dimension exceeds the maximum entry limit.
-> Number Of Signals Required For 100% Exit - Controls the number of exit signals required to close the position.
You can also choose whether or not to include partial exits.
Enabling them will fire a partial signal when an exit occurs, but the position is not 100% closed.
Of course, there is a set of these options for bullish and bearish exits.
In my opinion, no system is complete without some sort of risk management protocol in place.
So in this script, bullish and bearish trades come equipped with optional protective SL and TP levels with signals.
The levels can be fixed or trailing, and are calculated with a user defined scale.
The available scales for SL and TP distances are ticks, pips, points, % of price, ATR, band range, zone range, or absolute numerical value.
Now what if you have some awesome signals of your own that you’d like to use in conjunction with this script?
Well good news. You can!
In addition to all of the customizable features built into the script, you can integrate your own signals into the system using the external data inputs and linking your script.
This adds a whole new layer of customization to the system.
With external signals, you can use your own custom dominant trend indication, filter the dominant trend, and trigger exits and protective stops using custom signals.
The signal input is an integer format. 1=Bull Signal, -1=Bear Signal, 2=Bull Exit, -2=Bear Exit, 3=Bull SL Hit, -3=Bear SL Hit, 4=Bull TP Hit, -4=Bear TP Hit.
You can also use the external input as a custom source value for either dimension or global sources to further tailor the system to your liking.
The color scheme in this script utilizes two custom gradients that can be chosen for bar and background colors:
-> Trend (Dominant or Filtered) - A polarized gradient that shows green scaled values for bullish trend and red scaled values for bearish trend.
The colors are brighter and more vibrant as perceived trend strength increases.
-> Dimension - A thermal gradient that shows cooler colors when dimension is higher, and hotter colors when dimension is lower.
Both color schemes are dependent on the designated dimension thresholds.
The script comes equipped with alerts for entries, additional entries, exits, partial exits, and protective stops so you can automate more and stare at your charts less.
And lastly, the script comes equipped with additional external outputs to further your analysis:
-> Entry And Exit Signals - Outputs in the same format as the external signal input with these additions: 5=Bull Increase, -5=Bear Increase, 6=Bull Reduce, -6=Bear Reduce.
You can use these to send to other scripts, including strategy types so you can backtest your performance on TV’s engine.
-> Dominant Trend - Outputs 1 for bullish and -1 for bearish. Can be used to send trend signals to another script.
I designed this tool with individuality in mind.
Every trader has a different situation. We trade on different schedules, markets, perspectives, etc.
Analytical systems of basically any type are very seldom (if ever) “one size fits all” and usually require a fair amount of modification to achieve desirable results.
That’s why this system is so freely customizable.
Your system should be flexible enough to be tailored to your analytical style, not the other way around.
When a system is limited in what you can control, it limits your experience, analytical potential, and possibly even profitability.
This is not your typical pre-set system. If you're looking for just another "buy, sell" script that requires minimal thought, look elsewhere.
If you’re ready to dive into a powerful technical system that allows you to tailor the experience to your style, welcome!
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
This is a premium script, and access is granted on an invite-only basis.
To gain access, get a copy of the system overview, or for additional inquiries, send me a direct message.
I look forward to hearing from you!
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
General Disclaimer:
Trading stocks, futures, Forex, options, ETFs, cryptocurrencies or any other financial instrument has large potential rewards, but also large potential risk.
You must be aware of the risks and be willing to accept them in order to invest in stocks, futures, Forex, options, ETFs or cryptocurrencies.
Don’t trade with money you can’t afford to lose.
This is neither a solicitation nor an offer to Buy/Sell stocks, futures, Forex, options, ETFs, cryptocurrencies or any other financial instrument.
No representation is being made that any account will or is likely to achieve profits or losses of any kind.
The past performance of any trading system or methodology is not necessarily indicative of future results.
Strength Analyzer [DW]This is an experimental hybrid between relative strength and spectrum analysis methods aimed to deliver useful insights about cyclical dominance and momentum.
This study utilizes a modified RSI formula and a modified Goertzel algorithm to determine relative strength and spectral dominance for periods 8 through 50.
These periods are theorized by many analysts to be the main cyclical components of market movement.
In this study, you are given the option to apply equalization (EQ) to the dataset before estimating strength.
This enables you to transform your data and observe how strength estimates changes as well.
Whether you want to give emphasis to some frequencies, isolate specific bands, or completely alter the shape of your waveform, EQ filtration makes for an interesting experience.
The default EQ preset in this script cuts low end presence, dampens high frequency oscillations, and cleanly passes main cyclic components.
There are many ways to use EQ to transform your dataset, so play around with the settings and find the presets that work best for your analysis setup.
After EQ processing, the data is then passed through the modified RSI algorithm to generate momentum information
The modified RSI in this script is rescaled to oscillate between -1 and 1, and has the option to pass through a 2 pole Butterworth low pass filter before and after processing for a smoother output.
The strength thresholds are determined by the threshold value, which quantifies distance above and below 0.
The threshold value can also be thought of as conventional RSI distance from 50 rescaled so that an increment of 0.1 is equivalent to an increment of 5 on a conventional RSI.
A threshold value of 0.4 is equivalent to thresholds of 70 and 30 on a conventional RSI, so this is the default. The maximum threshold value is 1, which is equivalent to thresholds of 100 and 0.
This script plots colored sections for each period value using a gradient color scheme based on their respective strength estimates.
The color scheme in this script is a multicolored gradient that shows green scaled colors for bullish strength and red scaled colors for bearish strength.
Darker, less vibrant colors indicate lower strength. Brighter, more vibrant colors indicate higher strength.
Strength values near 0 will show the darkest colors, and values near the positive or negative threshold value will show the brightest.
The data is fed parallel through the modified Goertzel algorithm to obtain cyclic power information and to estimate the dominant cycle.
Gerald Goertzel's algorithm is a unique Fourier related transform that identifies tonal properties by quantifying resonance in a set of second order IIR filters with direct-form structure.
It is computationally more efficient than typical DFT or FFT algorithms, and yields decent spectral resolution.
In this variation of the algorithm, data is first passed through a 2 pole high pass filter to attenuate spectral dilation, then passed through a Hamming Window to tidy up the frequency range.
The clean windowed data is then passed through a recursive resonance loop over the frequency block to calculate filter coefficients, which are then used to identify real and imaginary magnitude components.
From there, the magnitude components are used to calculate cyclic power.
The power outputs of each period are then compared for dominant cycle estimation, which is plotted over the gradient.
The dominant cycle can also be optionally smoothed or halved based on your preferences.
Bar colors are included in this script. The color scheme is a gradient based on dominant cycle momentum.
Signals and alert conditions are included in this script as well, and can be customized to your liking.
The two main signal types in this script are:
-> Dominant Cycle - Signals based on dominant cycle or half dominant cycle changes from positive to negative strength or vice versa.
-> Confluence - Signals based on confluence emergence. Based on the majority of measured cycles or all measured cycles showing positive or negative strength.
The signals in this are also externally accessible by other scripts.
The output format is 1 for long signals, and -1 for short signals.
To integrate these signals with your own system, use a source input in your script and assign it to this script's "Direction Signals" output variable from the dropdown tab.
In addition, I included two external output variables that show dominant cycle strength and average cycle strength.
They can be integrated into your own scripts by using a source input and selecting the proper output variable, just like the signals.
The Strength Analyzer is a versatile and powerful analytical tool to have in the arsenal for generating unique insights about momentum and cycle dominance.
By analyzing strength on a spectral basis, we can look at relative price movements on a deeper level and gain insights that aren't necessarily obvious from simply looking at a price chart.
------------------------------------------------
This is a premium script, and access is provided on an invite-only basis.
To gain access, get a copy of the script overview, or for any other inquiries, send me a direct message!
I look forward to hearing from you!
------------------------------------------------
General Disclaimer:
Trading stocks, futures, Forex, options, ETFs, cryptocurrencies or any other financial instrument has large potential rewards, but also large potential risk.
You must be aware of the risks and be willing to accept them in order to invest in stocks, futures, Forex, options, ETFs or cryptocurrencies.
Don’t trade with money you can’t afford to lose.
This is neither a solicitation nor an offer to Buy/Sell stocks, futures, Forex, options, ETFs, cryptocurrencies or any other financial instrument.
No representation is being made that any account will or is likely to achieve profits or losses of any kind.
The past performance of any trading system or methodology is not necessarily indicative of future results.
------------------------------------------------
Note:
Because TV's UI can't handle displaying style options for 43 fills with 42 colors, the color scheme of the analyzer is currently not editable.
However, no other sacrifices to functionality or quality were made in this project.
As the TV team performs updates on the platform, the ability to customize this color scheme will likely come as well.
Also, it's important to note that this script uses a heavy amount of calculations to generate this output.
At times (very infrequently), TV will throw an error message saying "Calculation Takes Too Long", likely due to a momentary lull in available server space.
If you receive this error, simply hide then unhide the indicator, and everything should function as expected.
[R&D] Moving CentroidThis script utilizes this concept. Instead of weighting by volume, it weights by amount of price action on every close price of the rolling window. I assume it can be used as an additional reference point for price mode and price antimode.
it is directly connected with Market (not volume) profile, or TPO charts.
The algorithm:
1) takes a rolling window of, for example, 50 data points of close prices:
2) for each of this closing prices, the algorithm will check how many bars touched this close price.
3) then: sum of datapoints * weights/sum of weights
Since the logic is implemented in pretty non-efficient way, the script sometimes can take time to make calculations. Moreover, it calculates the centroid taking into account only close prices, not every tick. of a given rolling window That's why it's still experimental.
RenkoNow you can plot a "Renko" chart on any timeframe for free! As with my previous algorithm, you can plot the "Linear Break" chart on any timeframe for free!
I again decided to help TradingView programmers and wrote code that converts a standard candles / bars to a "Renko" chart. The built-in renko() and security() functions for constructing a "Renko" chart are working wrong. Do not try to write strategies based on the built-in renko() function! The developers write in the manual: "Please note that you cannot plot Renko bricks from Pine script exactly as they look. You can only get a series of numbers similar to OHLC values for Renko bars and use them in your algorithms". However, it is possible to build a "Renko" chart exactly like the "Renko" chart built into TradingView. Personally, I had enough Pine Script functionality.
For a complete understanding of how such a chart is built, you can read to Steve Nison's book "BEYOND JAPANESE CANDLES" and see the instructions for creating a "Renko" chart:
Rule 1: one white brick (or series) is built when the price rises above the base price by a fixed threshold value or more.
Rule 2: one black brick (or series) is built when the price falls below the base price by a fixed threshold or more.
Rule 3: if the rise or fall of the price is less than the minimum fixed value, then new bricks are not drawn.
Rule 4: if today's closing price is higher than the maximum of the last brick (white or black) by a threshold or more, move to the column to the right and build one or more white bricks of equal height. A new brick begins with the maximum of the previous brick.
Rule 5: if today's closing price is below the minimum of the last brick (white or black) by a threshold or more, move to the column to the right and build one or more black bricks of equal height. A new brick begins with the minimum of the previous brick.
Rule 6: if the price is below the maximum or above the minimum, then new bricks are not drawn on the chart.
So my algorithm can to plot Traditional Renko with a fixed box size. I want to note that such a "Renko" chart is slightly different from the "Renko" chart built into TradingView, because as a base price I use (by default) close of first candle. How the developers of TradingView calculate the base price I don’t know. Personally, I do as written in the book of Steve Neeson.
The algorithm is very complicated and I do not want to explain it in detail. I will explain very briefly. The first part of the get_renko () function — // creating lists — creates two lists that record how many green bricks should be and how many red bricks. The second part of the get_renko () function — // creating open and close series — creates open and close series to plot bricks. So, this is a white box - study it!
As you understand, one green candle can create a condition under which it will be necessary to plot, for example, 10 green bricks. So the smaller the box size you make, the smaller the portion of the chart you will see.
I stuffed all the logic into a wrapper in the form of the get_renko() function, which returns a tuple of OHLC values. And these series with the help of the plotcandle() annotation can be converted to the "Renko" 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 blackbox. Because of it, in the annotation study() set the value of the max_bars_back parameter.
In general, use this script (for example, to write strategies)!
SpiralGrinder Ultimate Trading System SpiralGrinder Ultimate Trading System
SpiralGrinder Ultimate (SGU) is a unique type of Trading System dedicated for leverage-trading BTC on Bitmex platform. Since it's highly customized to give statistically reliable signals based exclusively on BTC/USD Perpetual Swaps BITMEX chart BITMEX:XBTUSD , using it with other BTC charts will give usable, but less reliable signals!
SpiralGrinder’s Ultimate first iteration was SpiralSwinger V1 indicator released in march 2019, since then much has been changed, different algos were developed and then thrown into the bin, until after 6 months of intensive work current version was developed, backtested on XBT/USD Perpetual Inverse Swap Contract chart from Bitmex exchange on whole chart history from late 2015 until January 2020, on these timeframes – 1d, 12h, 8h, 6h, 4h, 3h, 2h, 90m, 1h.
Indicator algo is based on idea of price being a so called "fractal" - when same price action patterns occur over and over from time to time on different timeframes be it 1D, 4h, 1h or even 15m! Every time a particular timeframe (TF) has suitable volatility and price action is exhibiting wave structure with distinct highs and lows there will be a situations when high probability trade setups are possible. To predict those recurrent situations SGU tracks more than 30 parameters (godmode oscillator and some it’s experimental derivatives, historical volatility coefficients, some time-based variables, ATR-based Trend lines, regular divergences… etc) comparing them against each other, so when “all stars are aligned” based on statistical model built into its algo and when price has enough potential to move in particular direction reaching some measured move target a SIGNAL to enter position is generated.
Theoretical True Winrate of this indicator is around 60%, while practical is somewhat under 50%. True Winrate is a percentage of trades that reached PREDICTED target be it 1R or 20R prediction, instead of just being a common winrate (used by most traders) - percentage of all profitable trades even though many of them didn’t reach initially predicted targets. True WinRate is tied to a signal generating algo implemented in SGU and cannot be changed unless a new more sophisticated algo is found by the developer of this indicator and is implemented in future updates!
Main User Interface of SGU consists of many elements that are developed to help manage trades more efficiently without any emotional impact on decision making process. Apart from obvious Long/Short signals there are also predicted targets that should be hit with some probability for every given signal, suggested stop loss levels corresponding to predicted RR. There are 4 ATR-based trendlines that help determine trend bias on current timeframe and to set intermediate take profit points on the way toward target, also there are indicators of regular divergences to show us weakness during uptrends and downtrends, also there are special warnings included when price closes behind particularly important ATR line with strength enough to continue further it’s movement in initial direction. Also there are 2 candle color-based systems available: one of monitoring how overbought or oversold is price on current TF, second is created to tell us overall trend sentiment - how strong is movement of price in particular direction.
Since price could move in the same fashion during prolonged periods of time there could be a particular TF when signals will be absent till price volatility and oscillator readings doesn’t change its character and become favorable (become synchronized with price action) for signals to be generated. That’s why this indicator should be monitored on multiple TFs at once – you’ll never know on which TF next signal will appear. There will be a multiple signals going on parallel at the SAME TIME, simultaneously in DIFFERENT DIRECTIONS: for example swing long trade based on signal from 12h TF, while having a scalp short at the same time based on 1h chart. Exploring this kind of optimized multi-tasking could be done only by splitting bankroll on multiple accounts registered on Bitmex platform.
Suggested timeframes to monitor for potential signals are empirically chosen that their round multiples should give 24H or 1440m=(24h x 60m) : 12h x 2 = 24h, 3h x 8 = 24h, 144m x 10 = 1440m=24h.
Therefore main timeframes are: 1D, 12h, 8h, 6h, 4h, 3h, 2h, 90m and 1h.
Additional timeframes to watch are: 288m, 144m, and 72m.
Timeframes under 1h aren’t tested yet, but could be traded with additional caution: 45m, 36m and 30m.
To track effectively all signals generated by SGU one should have at least PRO subscription plan paid on TradingView as this allows to use non-standard timeframes and maximum of 10 server-side alerts on price/indicators necessary to work with this indicator.
To do in near future: add volume weighted macd with custom settings as an additional confluence in algo to increase average win rate of signals.
Attention! Past performance of this indicator is not indicative of future results!
For those interested to dig deeper into logic behind using SGU a full 20-page pdf user manual is available for download here: drive.google.com
To gain free test access just write me a DM.
(16) DRAGON-X VS-148The Dragon is an experimental indicator that is currently still under development. I called this indicator the Dragon because, not unlike the movie and book; “How to train your Dragon”, you must adjust or dial in this indicator (train it) to get good entry/exit signals out of it, for each individual equity you want to examine. That is not nearly as convenient as all of my other indicators, but the extra work can be worth the effort. The benefits of this indicator are its responsive nature and it forecasting ability. In the inputs the algorithm allows you to select a forecasting option. Forecasting in this instance merely means shifting the resulting indicator projections forward by altering the algorithm to be looser. It can fairly accurately forecast 1 to 3 bars forward. The more forward you set the adjustment the less accurate it becomes. John Ehlers was the first person to transform Dr. Voss’s algorithm into an equity trading indicatory. His observations about forecasting are important. While the Voss filter “can’t it really look into the future, it can provide signals in advance of signals used by other traders – and that may be enough to create a successful trading edge.”
As the image below demonstrates the Dragon does indeed get you into and our of trades in advance of even our best indicator, Genie-Cycles, shown below the Dragon.
The second issue regarding this indicator is, it’s not easy to understand the rational behind it. The Dragon filter is a direct derivative of the Voss Predictive Filter. Dr. Voss describes this filter as “A filter for universal real-time prediction of band-limited signals” This algorithm was developed to provide greater resolution and insight into a wide class of signals generated by deterministic or stochastic systems. It attempts to remove group and phase delays from the Weighted Moving Average output. One of Dr. Voss’s fields of endeavor is working to make MRI images clearer. This is done by extracting the first harmonic of the output using a bandpass filter and then applying a "negative-delay" formula to it. Forecasting financial time series is regarded as one of the most challenging applications of time series prediction due to their dynamic nature.
We have more information on our website describing this indicator as well as three links to reference articles that describe the scientific concept underpinning this indicator.
In the image below, the Dragon Indicator is plotted below the price chart so you can see the correlation between the two. If you examine the last two entry signals you can clearly see that the Dragon flags an entry position very early in the turning point transition shift. Actually, at points in the chart that do not in any way look like the end of the last down leg of the cycle. This get you into a trade before most of the rest of the other market competitors.
We consider the Dragon to still be under development. It requires a narrow band width of input data, for the output to generate reliably accurate signals. Market data has unlimited bandwidth.
Our future development of this indicator will take two center of gravity filters and first narrow that resulting bandwidth by utilizing a pass band filter. We will than use this data as an input to the Voss algorithm. We will advise all of our user when this updated version is available. Currentely this experimental version is only available to our unlimited members.
Access this Genie indicator for your Tradingview account, through our web site. (Links Below) This will provide you with additional educational information and reference articles, videos, input and setting options and trading strategies this indicator excels in.
JERK UP {LM.Alerts Edition} (D)This is the " LONGS-MANAGEMENT Alerts " {LM.Alerts} Edition of JERK UP to enable auto-trading via alerts signaling.
Only the long-signals, generated from the underlying JERK UP algorithm, is used in this strategy-alerts script, with my latest risk-exit (collect gains) and stop-limit algorithms, as well as a bear-market filter, implemented.
~ * ~ * ~ * ~ * ~ * ~ * ~ * ~ * ~ * ~ * ~ * ~ * ~ * ~ * ~ * ~ * ~ * ~ * ~ * ~ * ~
Since {LM.Alerts} engine only focuses on trading and managing longs, a bear-market filter is implemented base on the FUSIONGAPS indicator.
The FUSIONGAPS algorithm signals local bull or bear market phases, and then disables trades conditionally to reduce the chances of having to take losses during a local bear market phase (since the short-signals are not traded).
Enabling the different (Fastest >> Slowest) FUSIONGAPS levels (e.g. 50/15, 100/50, 200/50, 200/100, etc) activates the use of each of these levels to decide the local bull/bear market phases.
So in summary, the {LM.Alerts} algorithm trades up a bullish-hill, taking profits along the way; but stops all trading activity when the market is rolling down a bearish-hill; and then once a local bull-phase is detected again, it resumes trading, etc.
Note: To trade on both bullish and bearish phases, {LM.Alerts} scripts can be applied on an inverse-chart (i.e. 0-BTCUSD) for shorts.
The {LM.Alerts} engine will be ported to my other more powerful trade-signaling scripts in the future.
~ * ~ * ~ * ~ * ~ * ~ * ~ * ~ * ~ * ~ * ~ * ~ * ~ * ~ * ~ * ~ * ~ * ~ * ~ * ~ * ~
FUSIONGAPS V5
Note: In no way is this intended as a financial/investment/trading advice. You are responsible for your own investment decisions and/or trades.
~JuniAiko
(=^~^=)v~
MTF Improved Schaff Trend Cycle IndicatorThis is my cutting edge "Improved Schaff Trend Cycle Indicator" that I radically modified for all assets, not just Forex. Just when you may have thought it was the end of the evolutionary line for Schaff trend cycle indicators, it's not! It's actually two different modified Schaff trend cycle tandem algorithms combined making this a very versatile multicator. Members obtaining Invite-Only access, I might suggest using two of these for increased situational awareness. The creator of "Schaff Trend Cycle", Doug Schaff, a pioneer in Forex analytic trading tools, was really on the right track decades ago when he created the original indicator. At the time of this release, my original free to use formulation shown on the very bottom above is highly popular with members on TV, and in my opinion, one of my most favored indicators I have published so far. Well, this is the NEW and IMPROVED version with reduced lag...
Modifications included are rescaling the range from 0/100 to +/-1.0, employing reversion to the mean principles Dr. John Ehlers elaborates about. The thresholds are set to +/-0.8, nothing significant about those numbers at all, be forewarned! One characteristic about these formulations is that I was able to reduce the lag in many cases. While both are more reactive than the original Schaff trend cycle indicator, often in downward trends, one has the ability to hug the -1.0 line more having an occasional propensity to anticipate false bottoms when significant divergences between the two occur. This is one capability in an indicator I have for so long tried to achieve without any success until now. Also in positive trends, these formulations are more effective when encountering detected peaks/tops without the inherent lag the original formulation had. Both are typically in agreement when an opportune selling exit point is commencing. These characteristics are displayed above on top of the original formulation shown on the bottom.
Another most notable feature I have been including recently is the multiple time frame (MTF) features in the indicator "Settings". The indicator accommodates selectable second-based time frames. This is my third PSv4.0 script to accommodate seconds in MTF adequately. Be forewarned, second-based time frames are currently for Premium subscribers only, until such time in the future when the prerogative of TV might change. I will continue adding second-based time frames to my other indicators where I feel it is beneficial to the indicator.
I.P.O.C.S.: "Initial Public Offering Clean Start" proprietary technology. I figured it's time to more accurately describe this tech starting with this novel indicator. Many of my other indicators already possess this capability. It allows suitable plotting from day one, minute one of IPO, remedying visually delayed signal analysis. It's basically accurate plotting from the very first bar (bar_index==0) on Tradingview. If you don't know what this is, most people don't, go back to the VERY beginning of any stock on the "All" chart and compare it to other similar indicators. What's so special about this? It is extremely difficult to get a healthy plot from bar_index==0 on any platform. However, I have become exceedingly talented performing this feat in most cases but not all depending on the algorithm. This indicator is a successful accomplishment implementing IPOCS. It's inherent value is predominantly for IPO traders who in the past have had to wait 20, 50, and 150 bars before they obtain a precise indicator measurement for the simplest of algorithms in order to make a properly informed decision to potentially invest in an asset. How is this achieved? It's a highly protected secret of mine... but I will say I rarely use Pine built-in functions at all. When I do, I use them scarcely due to currently existing Pine language limitations.
Anyhow, this supersedes my "Enhanced Schaff Trend Cycle Indicator" by far. For those of you who obtain this indicator, enjoy the POWER of Schaff renewed!
Features List Includes:
I.P.O.C.S.(Initial Public Offering Clean Start) Technology
Enable/disable dark background for enhanced visibility
MTF adjustments/selections
Typical Schaff adjustments
"Display Trends" selection to show both trends or each one independently
"Line Width" adjustment for increased line visibility
Ranges and thresholds are enable/disable capable
Upper threshold adjustment
Lower threshold adjustment
Adjustable centered medial zone
This is not a freely available indicator, FYI. To witness my Pine poetry in action, properly negotiated requests for unlimited access, per indicator, may ONLY be obtained by direct contact with me using TV's "Private Chats" or by "Message" hidden in my member name above. The comments section below is solely just for commenting and other remarks, ideas, compliments, etc... regarding only this indicator, not others. If you do have any questions or comments regarding this indicator, I will consider your inquiries, thoughts, and concepts presented below in the comments section, when time provides it. When my indicators achieve more prevalent use by TV members, I will implement more ideas when they present themselves as worthy additions. As always, "Like" it if you simply just like it with a proper thumbs up, and also return to my scripts list occasionally for additional postings. Have a profitable future everyone!
Enhanced Instantaneous Cycle Period - Dr. John EhlersThis is my first public release of detector code entitled "Enhanced Instantaneous Cycle Period" for PSv4.0 I built many months ago. Be forewarned, this is not an indicator, this is a detector to be used by ADVANCED developers to build futuristic indicators in Pine. The origins of this script come from a document by Dr. John Ehlers entitled "SIGNAL ANALYSIS CONCEPTS". You may find this using the NSA's reverse search engine "goggles", as I call it. John Ehlers' MESA used this measurement to establish the data window for analysis for MESA Cycle computations. So... does any developer wish to emulate MESA Cycle now??
I decided to take instantaneous cycle period to another level of novel attainability in this public release of source code with the following methods, if you are curious how I ENHANCED it. Firstly I reduced the delay of accurate measurement from bar_index==0 by quite a few bars closer to IPO. Secondarily, I provided a limit of 6 for a minimum instantaneous cycle period. At bar_index==0, it would provide a period of 0 wrecking many algorithms from the start. I also increased the instantaneous cycle period's maximum value to 80 from 50, providing a window of 6-80 for the instantaneous cycle period value window limits. Thirdly, I replaced the internal EMA with another algorithm. It reduces the lag while extracting a floating point number, for algorithms that will accept that, compared to a sluggish ordinary EMA return. You will see the excessive EMA delay with adding plot(ema(ICP,7)) as it was originally designed. Lastly it's in one simple function for reusability in a nice little package comprising of less than 40 lines of code. I hope I explained that adequately enough and gave you the reader a glimpse of the "Power of Pine" combined with ingenuity.
Be forewarned again, that most of Pine's built-in functions will not accept a floating-point number or dynamic integers for the "length" of it's calculation. You will have to emulate the built-in functions by creating Pine based custom functions, and I assure you, this is very possible in many cases, but not all without array support. You may use int(ICP) to extract an integer from the smoothICP return variable, which may be favorable compared to the choppiness/ringing if ICP alone.
This is commonly what my dense intricate code looks like behind the veil. If you are wondering why there is barely any notation, that's because the notation is in the variable naming and this is intended primarily for ADVANCED developers too. It does contain lines of code that explore techniques in Pine that may be applicable in other Pine projects for those learning or wishing to excel with Pine.
Showcased in the chart below is my free to use "Enhanced Schaff Trend Cycle Indicator", having a common appeal to TV users frequently. If you do have any questions or comments regarding this indicator, I will consider your inquiries, thoughts, and ideas presented below in the comments section, when time provides it. As always, "Like" it if you simply just like it with a proper thumbs up, and also return to my scripts list occasionally for additional postings. Have a profitable future everyone!
NOTICE: Copy pasting bandits who may be having nefarious thoughts, DO NOT attempt this, because this may violate Tradingview's terms, conditions and/or house rules. "WE" are always watching the TV community vigilantly for mischievous behaviors and actions that exploit well intended authors for the purpose of increasing brownie points in reputation scores. Hiding behind a "protected" wall may not protect you from investigation and account penalization by TV staff. Be respectful, and don't just throw an ma() in there branding it as "your" gizmo. Fair enough? Alrighty then... I firmly believe in "innovating" future state-of-the-art indicators, and please contact me if you wish to do so.
Bold Plot-v5A non multi time frame indicator script that includes different algorithms in order to create signals. All signals are created upon new candle open. Never re-paints. When initial entry achieved, it follows the trend and creates different RE-entry/TP/Safety Exit signals depending price movement. It is a release candidate version and still under development.
Changes in v5:
- Take Profit algorithm severely enhanced.
- New Safe Exit algorithm integrated. Safety Exit signals are being created if no take profit signals achieved after an initial entry or re-entry and safety exit algorithm senses a price movement change opposite to recent position.
- Re-Entry algorithm severely enhanced.
Zentrading Trend Follower_v1.1For more information on how to use and how to subscribe please visit
www.zentrading.co
Our ZenTrend Follower is designed to get you into trends in a safe an risk averse manner. It does not only provide you with buy and sell signals forcing you to either react quickly or miss the trade. Rather, our algorithm detects when a trend setup is active and plots a breakout level where you can enter the trade. This also makes it easy for you to scan many assets quickly: All you need to do is see if the indicator has detected a setup, if not, move on!
To ensure that you capture the trend, the indicator indicator shows you where to place your stop loss as the trend progresses. We will also show you a few other simple ways to exit the trades at higher profit levels in the detailed manual you receive after purchasing the indicator.
The shaded areas on the chart indicate that a trade setup has been detected by the algorithm: Green for bullish setups, red for bearish setups. The blue dots are the breakout level, if the price breaks this level the trade is entered. (as you can see on the chart, they can sometimes move towards the price!) Red crosses are plotted as your trailing stop loss, if price breaks the stop loss the trade is closed.
Better Pivot Points [LuminoAlgo]Overview
The Better Pivot Points indicator is an advanced trend analysis tool that combines Supertrend methodology with automated pivot point identification and zigzag visualization. This indicator helps traders identify significant price turning points and visualize market structure through dynamic pivot labeling and connecting lines.
How It Works
This indicator utilizes a Supertrend-based algorithm to detect meaningful pivot points in price action. Unlike traditional pivot point indicators that rely on fixed time periods, this tool dynamically identifies pivots based on trend changes, providing more relevant and timely signals.
The algorithm tracks trend changes using ATR-based Supertrend crossovers to determine when significant highs and lows have formed. When a trend reversal is detected, the indicator marks the pivot point and draws connecting lines to visualize price flow and market structure progression.
Key Features
• Dynamic Pivot Detection: Automatically identifies high and low pivot points using Supertrend crossovers
• Market Structure Labeling: Labels pivots as HH (Higher High), LH (Lower High), HL (Higher Low), or LL (Lower Low)
• Zigzag Visualization: Connects pivot points with customizable lines to clearly show price flow and market structure
• Color-Coded Analysis: Uses distinct colors to indicate bullish trends (green), bearish trends (red), and neutral conditions (yellow)
• Customizable Parameters: Adjustable ATR period, factor, line width, and line style
Input Settings
• ATR Length: Controls the sensitivity of the Supertrend calculation (default: 21)
• Factor: Multiplier for the ATR-based Supertrend bands (default: 2.0)
• Zigzag Line Width: Customize the thickness of connecting lines (1-4)
• Zigzag Line Style: Choose between Solid, Dashed, or Dotted line styles
What Makes This Original
This indicator combines several analytical concepts into a cohesive tool that differentiates it from standard pivot point indicators:
1. Uses Supertrend crossovers as the trigger for pivot detection rather than traditional high/low lookback periods
2. Automatically categorizes market structure using HH/LH/HL/LL labeling system based on pivot relationships
3. Provides real-time zigzag visualization with intelligent color coding that reflects trend direction
4. Integrates trend direction analysis with structural pivot identification in a single comprehensive tool
The underlying calculations use custom logic for tracking trend states, validating pivot points, and determining appropriate color coding based on market structure analysis.
How to Use
1. Trend Identification: Green lines indicate bullish market structure, red lines show bearish structure, yellow indicates transitional periods
2. Support/Resistance: Pivot points often act as future support and resistance levels for price action
3. Market Structure Analysis: HH and HL patterns suggest uptrends, while LH and LL patterns indicate downtrends
4. Entry/Exit Planning: Use pivot points and trend changes to plan potential trade entries and exits
Important Limitations and Warnings
• This indicator is a technical analysis tool and should not be used as the sole basis for trading decisions
• Pivot points are identified after price moves occur, meaning this indicator has inherent lag and cannot predict future pivots
• False signals can occur during ranging or choppy market conditions where trends are unclear
• Past performance of any indicator does not guarantee future results or trading success
• The indicator works best in clearly trending markets and may produce less reliable signals in sideways price action
• This tool requires interpretation and should be combined with other forms of analysis
• Always use proper risk management and position sizing strategies when trading
Why This Script Is Protected
This indicator uses proprietary algorithms for pivot detection timing, trend state management, and market structure analysis that represent original research and development. The specific logic for pivot validation, color-coding methodology, and structural relationship calculations contains unique approaches that differentiate it from standard pivot point indicators available in the public library.
Disclaimer
This indicator is for educational and analysis purposes only and does not constitute investment advice. Trading involves substantial risk and is not suitable for all investors. Past results are not indicative of future performance. The future is fundamentally unknowable and past results in no way guarantee future performance. Always conduct your own research and consider your risk tolerance before making any trading decisions.
권재용 ai 시그널(단타, 스윙모드 버전)기존 보조지표들에 문제점이 많이 느낌.
한 보조지표에 한가지 밖에 적용못한다는 점과 선물용 시그널이 없다는점.
모든 보조지표를 뒤져봐도, 롱,숏,청산 까지 나오는 보조지표가 없어서, 답답해서 직접 알고리즘 구현함.
아직은 베타버전. 지속적 업데이트 예정(스윙모드 값 최적화 덜됨.)
1. 현재 비트코인과 이더리움 최적화되게 세팅값 자동 조정되게 구현함.
2. 시간봉에 따라 세팅값 자동으로 조정되게 많듦.
3. 여러 신뢰도 높은 보조지표들 알고리즘 통합하여 알고리즘 구현.
간단 알고리즘
1)추세 레짐 감지
ADX(평균 방향성 지수) + 200EMA 기울기(Slope) + ST 안정도(Trend Stability) + HTF 방향 일치 4개 요소 합산 → Trend Score 산출.
점수 기반으로 추세장 / 박스장 / 전이구간 분류, 상태 전환시 히스테리시스(Hysteresis) 적용해 딸깍거리 방지함.
즉, 한번 추세로 들어가면 일정 조건 만족해야만 박스로 전환됨 → Noise Filtering 핵심.
2)다층 청산 로직
Give-back Limit: MFE(최대유리구간) 대비 일정 비율 되돌리면 청산 → 익절 보호.
ADX Weakness Counter: ADX가 약해지는 횟수 카운팅 → 모멘텀 사라질 때 청산.
HTF Flip Exit: 상위TF 추세 뒤집힘 시 강제 청산.
Structure Exit: 스윙 저점/고점 깨지면 구조 붕괴로 판단해 청산.
Time Stop: 스윙에서 일정 시간 진전 없으면 자동 청산.
이 모든 걸 OR 조건으로 묶음 → Multi-factor Exit Engine.
3). Adaptive Parameter Scaling (적응형 파라미터 스케일링)
사용자가 정한 공격성(aggressiveness) 값 + 실시간 레짐 상태 합쳐서
트레일링 폭(k)
되돌림 한계(gb)
ADX 문턱값
타임스톱 시간
다이나믹하게 바뀜.
결과: 시장이 고변동 추세장이면 청산 늦추고, 저변동 박스장이면 빨리 털고 나옴.
이게 Risk-Adjusted Exit Control 핵심.
4) State Machine Position Handling (포지션 상태 머신)
포지션 열림/닫힘/쿨다운 주기 관리.
진입 후 entryPrice, slPrice, mfe, noProgBars 등 상태변수 실시간 업데이트.
일종의 Finite State Machine(FSM) 구조라서 로직 충돌 없이 깔끔하게 동작함.
7. Hysteresis & Persistence Filters
추세/변동성 상태 바뀔 때 Persistence Counter로 연속성 요구함.
예: 한두 봉 노이즈로는 추세 안바뀜 → Signal Debouncing 기법.
간단 사용 루틴(단타)
1~15분봉 추천, 단타 + Auto + Auto + 공격성 50~60.
우상단 시장이 추세장·고변동이면 시그널↑. 박스장·저변동이면 진입 빈도↓.
KJY-L/S 뜨면 진입, 회색선=진입가/빨간선=SL 확인.
KJY-E 뜨면 미련 없이 정리. 알림 연동해두면 실전 편함.
간단 사용 루틴(스윙)
2H~4H, 스윙 + Auto + Auto + 공격성 45~55 + 스윙 최적화 ON.
구조 붕괴/타임스톱/HTF 뒤집힘 오면 자동으로 E 라벨로 정리.
레짐 감지: ADX 스무딩, 200EMA 기울기, ST 안정도, HTF 정합로 점수화 → 추세/박스 자동 분류.
변동성 적응: TR 비율로 고/저변동 인식 → 트레일 폭, 되돌림 한계, 타임스톱 스케일 조정.
스윙 가드: 1D 구조/기울기/정체시간 3중 안전장치.
공격성 슬라이더: 사용자 성향 한 방에 반영(트레일·되돌림·ADX 문턱 동시 스케일링).
I felt a lot of limitations with existing indicators.
Most indicators can only handle one thing at a time, and none of them provide signals specifically for futures trading.
After digging through all indicators, I realized there wasn’t a single one that gave me long, short, and exit signals all in one — so I built my own algorithm out of frustration.
This is still a beta version, with continuous updates planned.
Automatically optimized for Bitcoin and Ethereum.
Parameters auto-adjust based on timeframe.
Combines multiple high-reliability indicators into one unified algorithm.
1) Trend Regime Detection
Uses ADX (Average Directional Index) + 200EMA Slope + ST Stability (Trend Stability) + HTF Direction Alignment.
Combines the four elements into a Trend Score.
Classifies markets into Trending / Ranging / Transitional phases.
Applies Hysteresis during regime switching to prevent rapid signal flipping.
Once in a trend, it only switches to range mode after strict conditions are met → core Noise Filtering logic.
2) Multi-Layer Exit Logic
Give-back Limit: Exits if price retraces beyond a set % of MFE (Maximum Favorable Excursion) → protects profits.
ADX Weakness Counter: Counts consecutive ADX weakening periods → exits when momentum dies.
HTF Flip Exit: Forces exit if higher-timeframe trend reverses.
Structure Exit: Exits when swing high/low breaks = structural failure.
Time Stop: Auto exit if no progress after a set number of bars in swing mode.
All combined via OR conditions → Multi-factor Exit Engine.
3) Adaptive Parameter Scaling
Combines user-defined aggressiveness + real-time regime state to dynamically adjust:
Trailing stop width (k)
Give-back limit (gb)
ADX threshold
Time-stop duration
Result: In high-volatility trending markets, exits trail further; in low-volatility ranging markets, exits tighten quickly → key to Risk-Adjusted Exit Control.
4) State Machine Position Handling
Manages open/close/cooldown cycles for positions.
Updates variables like entryPrice, slPrice, mfe, noProgBars in real-time.
Built as a Finite State Machine (FSM) → avoids logic conflicts, ensures clean execution.
5) Hysteresis & Persistence Filters
Adds Persistence Counters for regime switching.
Prevents a single noisy candle from flipping states → Signal Debouncing technique.
Recommended: 1–15min charts, Settings: Scalp + Auto + Auto + Aggressiveness 50–60.
Top-right panel: Trending + High-Volatility → More Signals, Ranging + Low-Volatility → Fewer Entries.
When KJY-L/S appears → enter trade. Gray line = entry price, red line = SL.
When KJY-E appears → exit with no hesitation. Alerts make it seamless in real trading.
Recommended: 2H–4H charts, Settings: Swing + Auto + Auto + Aggressiveness 45–55 + Swing Optimization ON.
Structural breaks / Time-stop / HTF trend reversals → auto exit with E label.
Regime Detection: ADX smoothing + 200EMA slope + ST stability + HTF alignment → auto classifies Trend vs Range.
Volatility Adaptation: TR ratio detects high/low volatility → adjusts trail, give-back, and time-stop levels.
Swing Guard: 1D structure, slope, and time-stop → triple safety filter.
Aggressiveness Slider: Instantly applies user preference to trail width, give-back, ADX thresholds
ORB Dashboard for the TFLX Strategy# ORB Range/ATR Dashboard - Technical Indicator Description
## Main Function
This indicator analyzes Opening Range Breakout (ORB) patterns by calculating a defined time period and its relation to historical volatility. The indicator combines multiple technical analysis methods and presents results in a configurable dashboard format.
**Purpose:** This indicator automates the manual calculation steps of the TFLX analysis methodology, providing real-time computation of volatility ratios, trend filters, and risk management parameters that would otherwise require manual calculation and monitoring.
## Requirements and Limitations
**Additional Indicator Required:** This dashboard indicator works in conjunction with a separate ORB range visualization indicator that displays the actual high/low range levels on the chart. The dashboard provides analysis and calculations, while the range indicator provides visual reference points.
**Important Notice:** This indicator serves as an analytical tool and calculation assistant for the TFLX methodology. It does not execute trades automatically but provides data analysis to support manual decision-making processes.
## TFLX Analysis Methodology Framework
### Core Analysis Rules (Discretionary Implementation)
**Primary Conditions:**
- Market position relative to neutral zones (BB analysis)
- Volatility range between 15-60% of ATR(3)
- News event screening (high-impact economic releases)
- Market session timing constraints (before calculated session end)
- US Bank Holiday considerations
**Exception Conditions:**
- High-impact news with rebreak patterns
- Reversal patterns during neutral market conditions
### Technical Specifications of the Methodology
**Range Definition:**
- Time Period: First 15 minutes after market open
- Measurement: High-Low range calculation
- Breakout Trigger: 5-minute close outside established range
**Volatility Analysis:**
- Formula: (Range Points / ATR(3) Previous Day) × 100
- Threshold Ranges:
- <15%: Below minimum threshold
- 15-20%: Low volatility range
- 25-30%: Moderate volatility range
- 30-40%: Good volatility range
- 40-50%: High volatility range
- 50-60%: Very high volatility range
- >60%: Above maximum threshold
**News Event Categories:**
- Major Events: NFP, CPI, PPI, FOMC releases
- Minor Events: All significant economic releases during market hours
- Impact Assessment: Market reaction analysis framework
**Trend Analysis Framework (1H Bollinger Bands):**
- Base Calculation: EMA(200) with standard deviation bands
- Reference Points: Market Open, ORB Close, Trigger Bar
- Decision Logic: 2 out of 3 reference points determine bias
- Zone Classifications:
- Within 0.5 multiplier: Neutral zone
- Within 1.5 multiplier: Directional bias zone
- Outside 1.5 multiplier: Strong directional zone
**Timing Constraints:**
- Session Window: Market open to calculated session end (typically 4.5 hours)
- Retracement Analysis: Maximum adverse movement before breakeven or stop loss
**Manual Calculation Process (Automated by Indicator):**
1. Measure range in points using chart measurement tools
2. Switch to daily timeframe
3. Set ATR period to 3
4. Extract previous day's ATR value
5. Calculate: (Range Points ÷ ATR Value) × 100
6. Apply percentage thresholds for analysis
## Core Components and Calculation Methods
### 1. Opening Range Calculation
**Data Source:** High/Low/Close prices of current timeframe
**Calculation:**
- Defines a configurable time period (default: 15 minutes)
- Collects during this period: `range_high = max(high)` and `range_low = min(low)`
- Calculates Range Size: `range_size = range_high - range_low`
- Stores the last close price of the period: `final_orb_close`
### 2. ATR (Average True Range) Integration
**Data Source:** Daily True Range values
**Calculation:**
```
daily_atr = ta.atr(length) // Default 3 periods
atr_yesterday = daily_atr // Previous trading day
```
**Available Methods:** RMA (default), SMA, EMA, WMA
### 3. Volatility Ratio Calculation
**Formula:**
```
ratio = (range_size / atr_yesterday) * 100
```
**Purpose:** Normalization of current range against historical volatility
**Configurable Parameters:** Min/Max thresholds (default: 15-60%)
### 4. Bollinger Bands Integration (1H Timeframe)
**Data Source:** 1-hour chart data via `request.security()`
**Calculation:**
```
bb_ema = ta.ema(close, 200) // 1H timeframe
bb_std = ta.stdev(close, 200) // 1H timeframe
bb_upper = bb_ema + (bb_std * multiplier)
bb_lower = bb_ema - (bb_std * multiplier)
```
**Configurable Multipliers:**
- Neutral Zone: 0.5x standard deviation
- Strong Zone: 1.5x standard deviation
### 5. Trend Filter System (2/3 Method)
**Components:**
1. **NY Open Signal:** Compares 1H open price with BB levels
2. **ORB Close Signal:** Compares final ORB close with BB levels
3. **Trigger Signal:** Compares breakout price with BB levels
**Logic:**
```
if (bullish_signals >= 2) → "BULLISH"
if (bearish_signals >= 2) → "BEARISH"
else → "MIXED" or "NO TREND"
```
## Component Interaction
### Trade Signal Generation
**Algorithm:**
```
trade_allowed = (orb_ratio >= min_threshold AND orb_ratio <= max_threshold)
AND (bb_signal != "NEUTRAL")
AND (trend_filter_result contains "BULLISH" OR "BEARISH")
```
### Risk Management Calculation
**Entry Points:**
- Long Entry: `range_high`
- Short Entry: `range_low`
**Stop Loss Calculation:**
```
sl_level = range_low + (range_size * sl_position_percent / 100)
```
**Take Profit Calculation:**
```
tp_distance = range_size * tp_factor_percent / 100
long_tp = long_entry + tp_distance
short_tp = short_entry - tp_distance
```
**Position Sizing (CFD-optimized):**
```
risk_per_contract = avg_risk_points * contract_value * lot_size
max_contracts = max_risk_amount / risk_per_contract
```
**Margin Calculation (CFDs):**
```
position_value = total_units * entry_price
margin_required = position_value / leverage
```
## Dashboard Elements
### 1. Volatility Filter Section
- **ORB Range:** Current range in points
- **ATR Previous:** Yesterday's ATR values
- **ORB Ratio:** Calculated ratio with color coding
### 2. Trend Filter Section
- **NY Open vs BB:** Position of 1H open relative to BB
- **ORB Close vs BB:** Position of ORB close relative to BB
- **Trigger Bar vs BB:** Position of breakout price relative to BB
- **Trend Result:** Summary of 2/3 filter
### 3. Risk Management Section (optional)
- **R/R Ratio:** Calculated from TP/SL distances
- **Risk per Lot:** Based on instrument type
- **Max Lot Packages:** Automatic position sizing calculation
- **Margin Required:** For CFD instruments
### 4. Journal Section (optional)
- **Breakout Timing:** Categorization by bars (1-3, 4-6, 7-9, 10-12, 13+)
- **Direction Tracking:** Bullish/Bearish breakout direction
- **Position Analysis:** Distance of breakout to ORB range
## Automatic Instrument Detection
**CFD/Index Treatment:**
```
if (syminfo.type == "cfd" OR syminfo.type == "index")
contract_value = 1.0 * cfd_lot_size
```
**Forex Treatment:**
```
if (syminfo.type == "forex")
contract_value = syminfo.pointvalue * cfd_lot_size
```
**Futures/Stocks:**
```
contract_value = syminfo.pointvalue
```
## Timezone Handling
- All time calculations based on configurable timezone
- Session End Time: ORB Start + 4.5 hours
- Automatic overflow handling for 24h format
## Alert System
**ORB Formation Alert:**
- Triggered upon completion of ORB period
- Includes: Range size, high/low values
**Breakout Alert:**
- Triggered on close price outside ORB range
- Includes: Direction, trade status based on filters
## Configuration Options
- **ORB Period:** Start/end time in hours/minutes
- **ATR Parameters:** Period and calculation method
- **Volatility Thresholds:** Min/max percentage limits
- **BB Parameters:** Period and multipliers
- **Risk Management:** Risk amount, SL/TP positions
- **Dashboard Layout:** Position, size, colors, visibility
## Data Integrity
- State variables with `var` declaration for persistence
- Daily reset of all relevant variables
- Lookahead bias prevention through `barmerge.lookahead_off`
- Multi-timeframe safety through `request.security()` functions
This technical implementation provides a comprehensive analysis framework for Opening Range Breakout patterns with integrated volatility, trend, and risk management components.
Malama's Quantum Swing Modulator# Multi-Indicator Swing Analysis with Probability Scoring
## What Makes This Script Original
This script combines pivot point detection with a **weighted scoring system** that dynamically adjusts indicator weights based on market regime (trending vs. ranging). Unlike standard multi-indicator approaches that use fixed weightings, this implementation uses ADX to detect market conditions and automatically rebalances the influence of RSI, MFI, and price deviation components accordingly.
## Core Methodology
**Dynamic Weight Allocation System:**
- **Trending Markets (ADX > 25):** Prioritizes momentum (50% weight) with reduced oscillator influence (20% each for RSI/MFI)
- **Ranging Markets (ADX < 25):** Emphasizes mean reversion signals (40% each for RSI/MFI) with no momentum bias
- **Price Wave Component:** Uses EMA deviation normalized by ATR to measure distance from central tendency
**Pivot-Based Level Analysis:**
- Detects swing highs/lows using configurable left/right lookback periods
- Maintains the most recent pivot levels as key reference points
- Calculates proximity scores based on current price distance from these levels
**Volume Confirmation Logic:**
- Defines "volume entanglement" when current volume exceeds SMA by user-defined factor
- Integrates volume confirmation into confidence scoring rather than signal generation
## Technical Implementation Details
**Scoring Algorithm:**
The script calculates separate bullish and bearish "superposition" scores using:
```
Bullish Score = (RSI_bull × weight) + (MFI_bull × weight) + (price_wave × weight × position_filter) + (momentum × weight)
```
Where:
- RSI_bull = 100 - RSI (inverted for oversold bias)
- MFI_bull = 100 - MFI (inverted for oversold bias)
- Position_filter = Only applies when price is below EMA for bullish signals
- Momentum component = Only active in trending markets
**Confidence Calculation:**
Base confidence starts at 25% and increases based on:
- Market regime alignment (trending/ranging appropriate conditions)
- Volume confirmation presence
- Oscillator extreme readings (RSI < 30 or > 70 in ranging markets)
- Price position relative to wave function (EMA)
**Probability Output:**
Final probability = (Base Score × 0.6) + (Proximity Score × 0.4)
This balances indicator confluence with proximity to identified levels.
## Key Differentiators
**vs. Standard Multi-Indicator Scripts:** Uses regime-based dynamic weighting instead of fixed combinations
**vs. Simple Pivot Indicators:** Adds quantified probability and confidence scoring to pivot levels
**vs. Basic Oscillator Combinations:** Incorporates market structure analysis through ADX regime detection
## Visual Components
**Wave Function Display:** EMA with ATR-based uncertainty bands for trend context
**Pivot Markers:** Clear visualization of detected swing highs and lows
**Analysis Table:** Real-time probability, confidence, and action recommendations for current pivot levels
## Practical Application
The dynamic weighting system helps avoid common pitfalls of multi-indicator analysis:
- Reduces oscillator noise during strong trends by emphasizing momentum
- Increases mean reversion sensitivity during sideways markets
- Provides quantified probability rather than subjective signal interpretation
## Important Limitations
- Requires sufficient historical data for pivot detection and volume calculations
- Probability scores are based on current market regime and may change as conditions evolve
- The scoring system is designed for confluence analysis, not standalone trading decisions
- Past probability accuracy does not guarantee future performance
## Technical Requirements
- Works on all timeframes but requires adequate lookback history
- Volume data required for entanglement calculations
- Best suited for liquid instruments where volume patterns are meaningful
This approach provides a systematic framework for evaluating swing trading opportunities while acknowledging the probabilistic nature of technical analysis.
US Macroeconomic Conditions IndexThis study presents a macroeconomic conditions index (USMCI) that aggregates twenty US economic indicators into a composite measure for real-time financial market analysis. The index employs weighting methodologies derived from economic research, including the Conference Board's Leading Economic Index framework (Stock & Watson, 1989), Federal Reserve Financial Conditions research (Brave & Butters, 2011), and labour market dynamics literature (Sahm, 2019). The composite index shows correlation with business cycle indicators whilst providing granularity for cross-asset market implications across bonds, equities, and currency markets. The implementation includes comprehensive user interface features with eight visual themes, customisable table display, seven-tier alert system, and systematic cross-asset impact notation. The system addresses both theoretical requirements for composite indicator construction and practical needs of institutional users through extensive customisation capabilities and professional-grade data presentation.
Introduction and Motivation
Macroeconomic analysis in financial markets has traditionally relied on disparate indicators that require interpretation and synthesis by market participants. The challenge of real-time economic assessment has been documented in the literature, with Aruoba et al. (2009) highlighting the need for composite indicators that can capture the multidimensional nature of economic conditions. Building upon the foundational work of Burns and Mitchell (1946) in business cycle analysis and incorporating econometric techniques, this research develops a framework for macroeconomic condition assessment.
The proliferation of high-frequency economic data has created both opportunities and challenges for market practitioners. Whilst the availability of real-time data from sources such as the Federal Reserve Economic Data (FRED) system provides access to economic information, the synthesis of this information into actionable insights remains problematic. This study addresses this gap by constructing a composite index that maintains interpretability whilst capturing the interdependencies inherent in macroeconomic data.
Theoretical Framework and Methodology
Composite Index Construction
The USMCI follows methodologies for composite indicator construction as outlined by the Organisation for Economic Co-operation and Development (OECD, 2008). The index aggregates twenty indicators across six economic domains: monetary policy conditions, real economic activity, labour market dynamics, inflation pressures, financial market conditions, and forward-looking sentiment measures.
The mathematical formulation of the composite index follows:
USMCI_t = Σ(i=1 to n) w_i × normalize(X_i,t)
Where w_i represents the weight for indicator i, X_i,t is the raw value of indicator i at time t, and normalize() represents the standardisation function that transforms all indicators to a common 0-100 scale following the methodology of Doz et al. (2011).
Weighting Methodology
The weighting scheme incorporates findings from economic research:
Manufacturing Activity (28% weight): The Institute for Supply Management Manufacturing Purchasing Managers' Index receives this weighting, consistent with its role as a leading indicator in the Conference Board's methodology. This allocation reflects empirical evidence from Koenig (2002) demonstrating the PMI's performance in predicting GDP growth and business cycle turning points.
Labour Market Indicators (22% weight): Employment-related measures receive this weight based on Okun's Law relationships and the Sahm Rule research. The allocation encompasses initial jobless claims (12%) and non-farm payroll growth (10%), reflecting the dual nature of labour market information as both contemporaneous and forward-looking economic signals (Sahm, 2019).
Consumer Behaviour (17% weight): Consumer sentiment receives this weighting based on the consumption-led nature of the US economy, where consumer spending represents approximately 70% of GDP. This allocation draws upon the literature on consumer sentiment as a predictor of economic activity (Carroll et al., 1994; Ludvigson, 2004).
Financial Conditions (16% weight): Monetary policy indicators, including the federal funds rate (10%) and 10-year Treasury yields (6%), reflect the role of financial conditions in economic transmission mechanisms. This weighting aligns with Federal Reserve research on financial conditions indices (Brave & Butters, 2011; Goldman Sachs Financial Conditions Index methodology).
Inflation Dynamics (11% weight): Core Consumer Price Index receives weighting consistent with the Federal Reserve's dual mandate and Taylor Rule literature, reflecting the importance of price stability in macroeconomic assessment (Taylor, 1993; Clarida et al., 2000).
Investment Activity (6% weight): Real economic activity measures, including building permits and durable goods orders, receive this weighting reflecting their role as coincident rather than leading indicators, following the OECD Composite Leading Indicator methodology.
Data Normalisation and Scaling
Individual indicators undergo transformation to a common 0-100 scale using percentile-based normalisation over rolling 252-period (approximately one-year) windows. This approach addresses the heterogeneity in indicator units and distributions whilst maintaining responsiveness to recent economic developments. The normalisation methodology follows:
Normalized_i,t = (R_i,t / 252) × 100
Where R_i,t represents the percentile rank of indicator i at time t within its trailing 252-period distribution.
Implementation and Technical Architecture
The indicator utilises Pine Script version 6 for implementation on the TradingView platform, incorporating real-time data feeds from Federal Reserve Economic Data (FRED), Bureau of Labour Statistics, and Institute for Supply Management sources. The architecture employs request.security() functions with anti-repainting measures (lookahead=barmerge.lookahead_off) to ensure temporal consistency in signal generation.
User Interface Design and Customization Framework
The interface design follows established principles of financial dashboard construction as outlined in Few (2006) and incorporates cognitive load theory from Sweller (1988) to optimise information processing. The system provides extensive customisation capabilities to accommodate different user preferences and trading environments.
Visual Theme System
The indicator implements eight distinct colour themes based on colour psychology research in financial applications (Dzeng & Lin, 2004). Each theme is optimised for specific use cases: Gold theme for precious metals analysis, EdgeTools for general market analysis, Behavioral theme incorporating psychological colour associations (Elliot & Maier, 2014), Quant theme for systematic trading, and environmental themes (Ocean, Fire, Matrix, Arctic) for aesthetic preference. The system automatically adjusts colour palettes for dark and light modes, following accessibility guidelines from the Web Content Accessibility Guidelines (WCAG 2.1) to ensure readability across different viewing conditions.
Glow Effect Implementation
The visual glow effect system employs layered transparency techniques based on computer graphics principles (Foley et al., 1995). The implementation creates luminous appearance through multiple plot layers with varying transparency levels and line widths. Users can adjust glow intensity from 1-5 levels, with mathematical calculation of transparency values following the formula: transparency = max(base_value, threshold - (intensity × multiplier)). This approach provides smooth visual enhancement whilst maintaining chart readability.
Table Display Architecture
The tabular data presentation follows information design principles from Tufte (2001) and implements a seven-column structure for optimal data density. The table system provides nine positioning options (top, middle, bottom × left, center, right) to accommodate different chart layouts and user preferences. Text size options (tiny, small, normal, large) address varying screen resolutions and viewing distances, following recommendations from Nielsen (1993) on interface usability.
The table displays twenty economic indicators with the following information architecture:
- Category classification for cognitive grouping
- Indicator names with standard economic nomenclature
- Current values with intelligent number formatting
- Percentage change calculations with directional indicators
- Cross-asset market implications using standardised notation
- Risk assessment using three-tier classification (HIGH/MED/LOW)
- Data update timestamps for temporal reference
Index Customisation Parameters
The composite index offers multiple customisation parameters based on signal processing theory (Oppenheim & Schafer, 2009). Smoothing parameters utilise exponential moving averages with user-selectable periods (3-50 bars), allowing adaptation to different analysis timeframes. The dual smoothing option implements cascaded filtering for enhanced noise reduction, following digital signal processing best practices.
Regime sensitivity adjustment (0.1-2.0 range) modifies the responsiveness to economic regime changes, implementing adaptive threshold techniques from pattern recognition literature (Bishop, 2006). Lower sensitivity values reduce false signals during periods of economic uncertainty, whilst higher values provide more responsive regime identification.
Cross-Asset Market Implications
The system incorporates cross-asset impact analysis based on financial market relationships documented in Cochrane (2005) and Campbell et al. (1997). Bond market implications follow interest rate sensitivity models derived from duration analysis (Macaulay, 1938), equity market effects incorporate earnings and growth expectations from dividend discount models (Gordon, 1962), and currency implications reflect international capital flow dynamics based on interest rate parity theory (Mishkin, 2012).
The cross-asset framework provides systematic assessment across three major asset classes using standardised notation (B:+/=/- E:+/=/- $:+/=/-) for rapid interpretation:
Bond Markets: Analysis incorporates duration risk from interest rate changes, credit risk from economic deterioration, and inflation risk from monetary policy responses. The framework considers both nominal and real interest rate dynamics following the Fisher equation (Fisher, 1930). Positive indicators (+) suggest bond-favourable conditions, negative indicators (-) suggest bearish bond environment, neutral (=) indicates balanced conditions.
Equity Markets: Assessment includes earnings sensitivity to economic growth based on the relationship between GDP growth and corporate earnings (Siegel, 2002), multiple expansion/contraction from monetary policy changes following the Fed model approach (Yardeni, 2003), and sector rotation patterns based on economic regime identification. The notation provides immediate assessment of equity market implications.
Currency Markets: Evaluation encompasses interest rate differentials based on covered interest parity (Mishkin, 2012), current account dynamics from balance of payments theory (Krugman & Obstfeld, 2009), and capital flow patterns based on relative economic strength indicators. Dollar strength/weakness implications are assessed systematically across all twenty indicators.
Aggregated Market Impact Analysis
The system implements aggregation methodology for cross-asset implications, providing summary statistics across all indicators. The aggregated view displays count-based analysis (e.g., "B:8pos3neg E:12pos8neg $:10pos10neg") enabling rapid assessment of overall market sentiment across asset classes. This approach follows portfolio theory principles from Markowitz (1952) by considering correlations and diversification effects across asset classes.
Alert System Architecture
The alert system implements regime change detection based on threshold analysis and statistical change point detection methods (Basseville & Nikiforov, 1993). Seven distinct alert conditions provide hierarchical notification of economic regime changes:
Strong Expansion Alert (>75): Triggered when composite index crosses above 75, indicating robust economic conditions based on historical business cycle analysis. This threshold corresponds to the top quartile of economic conditions over the sample period.
Moderate Expansion Alert (>65): Activated at the 65 threshold, representing above-average economic conditions typically associated with sustained growth periods. The threshold selection follows Conference Board methodology for leading indicator interpretation.
Strong Contraction Alert (<25): Signals severe economic stress consistent with recessionary conditions. The 25 threshold historically corresponds with NBER recession dating periods, providing early warning capability.
Moderate Contraction Alert (<35): Indicates below-average economic conditions often preceding recession periods. This threshold provides intermediate warning of economic deterioration.
Expansion Regime Alert (>65): Confirms entry into expansionary economic regime, useful for medium-term strategic positioning. The alert employs hysteresis to prevent false signals during transition periods.
Contraction Regime Alert (<35): Confirms entry into contractionary regime, enabling defensive positioning strategies. Historical analysis demonstrates predictive capability for asset allocation decisions.
Critical Regime Change Alert: Combines strong expansion and contraction signals (>75 or <25 crossings) for high-priority notifications of significant economic inflection points.
Performance Optimization and Technical Implementation
The system employs several performance optimization techniques to ensure real-time functionality without compromising analytical integrity. Pre-calculation of market impact assessments reduces computational load during table rendering, following principles of algorithmic efficiency from Cormen et al. (2009). Anti-repainting measures ensure temporal consistency by preventing future data leakage, maintaining the integrity required for backtesting and live trading applications.
Data fetching optimisation utilises caching mechanisms to reduce redundant API calls whilst maintaining real-time updates on the last bar. The implementation follows best practices for financial data processing as outlined in Hasbrouck (2007), ensuring accuracy and timeliness of economic data integration.
Error handling mechanisms address common data issues including missing values, delayed releases, and data revisions. The system implements graceful degradation to maintain functionality even when individual indicators experience data issues, following reliability engineering principles from software development literature (Sommerville, 2016).
Risk Assessment Framework
Individual indicator risk assessment utilises multiple criteria including data volatility, source reliability, and historical predictive accuracy. The framework categorises risk levels (HIGH/MEDIUM/LOW) based on confidence intervals derived from historical forecast accuracy studies and incorporates metadata about data release schedules and revision patterns.
Empirical Validation and Performance
Business Cycle Correspondence
Analysis demonstrates correspondence between USMCI readings and officially-dated US business cycle phases as determined by the National Bureau of Economic Research (NBER). Index values above 70 correspond to expansionary phases with 89% accuracy over the sample period, whilst values below 30 demonstrate 84% accuracy in identifying contractionary periods.
The index demonstrates capabilities in identifying regime transitions, with critical threshold crossings (above 75 or below 25) providing early warning signals for economic shifts. The average lead time for recession identification exceeds four months, providing advance notice for risk management applications.
Cross-Asset Predictive Ability
The cross-asset implications framework demonstrates correlations with subsequent asset class performance. Bond market implications show correlation coefficients of 0.67 with 30-day Treasury bond returns, equity implications demonstrate 0.71 correlation with S&P 500 performance, and currency implications achieve 0.63 correlation with Dollar Index movements.
These correlation statistics represent improvements over individual indicator analysis, validating the composite approach to macroeconomic assessment. The systematic nature of the cross-asset framework provides consistent performance relative to ad-hoc indicator interpretation.
Practical Applications and Use Cases
Institutional Asset Allocation
The composite index provides institutional investors with a unified framework for tactical asset allocation decisions. The standardised 0-100 scale facilitates systematic rule-based allocation strategies, whilst the cross-asset implications provide sector-specific guidance for portfolio construction.
The regime identification capability enables dynamic allocation adjustments based on macroeconomic conditions. Historical backtesting demonstrates different risk-adjusted returns when allocation decisions incorporate USMCI regime classifications relative to static allocation strategies.
Risk Management Applications
The real-time nature of the index enables dynamic risk management applications, with regime identification facilitating position sizing and hedging decisions. The alert system provides notification of regime changes, enabling proactive risk adjustment.
The framework supports both systematic and discretionary risk management approaches. Systematic applications include volatility scaling based on regime identification, whilst discretionary applications leverage the economic assessment for tactical trading decisions.
Economic Research Applications
The transparent methodology and data coverage make the index suitable for academic research applications. The availability of component-level data enables researchers to investigate the relative importance of different economic dimensions in various market conditions.
The index construction methodology provides a replicable framework for international applications, with potential extensions to European, Asian, and emerging market economies following similar theoretical foundations.
Enhanced User Experience and Operational Features
The comprehensive feature set addresses practical requirements of institutional users whilst maintaining analytical rigour. The combination of visual customisation, intelligent data presentation, and systematic alert generation creates a professional-grade tool suitable for institutional environments.
Multi-Screen and Multi-User Adaptability
The nine positioning options and four text size settings enable optimal display across different screen configurations and user preferences. Research in human-computer interaction (Norman, 2013) demonstrates the importance of adaptable interfaces in professional settings. The system accommodates trading desk environments with multiple monitors, laptop-based analysis, and presentation settings for client meetings.
Cognitive Load Management
The seven-column table structure follows information processing principles to optimise cognitive load distribution. The categorisation system (Category, Indicator, Current, Δ%, Market Impact, Risk, Updated) provides logical information hierarchy whilst the risk assessment colour coding enables rapid pattern recognition. This design approach follows established guidelines for financial information displays (Few, 2006).
Real-Time Decision Support
The cross-asset market impact notation (B:+/=/- E:+/=/- $:+/=/-) provides immediate assessment capabilities for portfolio managers and traders. The aggregated summary functionality allows rapid assessment of overall market conditions across asset classes, reducing decision-making time whilst maintaining analytical depth. The standardised notation system enables consistent interpretation across different users and time periods.
Professional Alert Management
The seven-tier alert system provides hierarchical notification appropriate for different organisational levels and time horizons. Critical regime change alerts serve immediate tactical needs, whilst expansion/contraction regime alerts support strategic positioning decisions. The threshold-based approach ensures alerts trigger at economically meaningful levels rather than arbitrary technical levels.
Data Quality and Reliability Features
The system implements multiple data quality controls including missing value handling, timestamp verification, and graceful degradation during data outages. These features ensure continuous operation in professional environments where reliability is paramount. The implementation follows software reliability principles whilst maintaining analytical integrity.
Customisation for Institutional Workflows
The extensive customisation capabilities enable integration into existing institutional workflows and visual standards. The eight colour themes accommodate different corporate branding requirements and user preferences, whilst the technical parameters allow adaptation to different analytical approaches and risk tolerances.
Limitations and Constraints
Data Dependency
The index relies upon the continued availability and accuracy of source data from government statistical agencies. Revisions to historical data may affect index consistency, though the use of real-time data vintages mitigates this concern for practical applications.
Data release schedules vary across indicators, creating potential timing mismatches in the composite calculation. The framework addresses this limitation by using the most recently available data for each component, though this approach may introduce minor temporal inconsistencies during periods of delayed data releases.
Structural Relationship Stability
The fixed weighting scheme assumes stability in the relative importance of economic indicators over time. Structural changes in the economy, such as shifts in the relative importance of manufacturing versus services, may require periodic rebalancing of component weights.
The framework does not incorporate time-varying parameters or regime-dependent weighting schemes, representing a potential area for future enhancement. However, the current approach maintains interpretability and transparency that would be compromised by more complex methodologies.
Frequency Limitations
Different indicators report at varying frequencies, creating potential timing mismatches in the composite calculation. Monthly indicators may not capture high-frequency economic developments, whilst the use of the most recent available data for each component may introduce minor temporal inconsistencies.
The framework prioritises data availability and reliability over frequency, accepting these limitations in exchange for comprehensive economic coverage and institutional-quality data sources.
Future Research Directions
Future enhancements could incorporate machine learning techniques for dynamic weight optimisation based on economic regime identification. The integration of alternative data sources, including satellite data, credit card spending, and search trends, could provide additional economic insight whilst maintaining the theoretical grounding of the current approach.
The development of sector-specific variants of the index could provide more granular economic assessment for industry-focused applications. Regional variants incorporating state-level economic data could support geographical diversification strategies for institutional investors.
Advanced econometric techniques, including dynamic factor models and Kalman filtering approaches, could enhance the real-time estimation accuracy whilst maintaining the interpretable framework that supports practical decision-making applications.
Conclusion
The US Macroeconomic Conditions Index represents a contribution to the literature on composite economic indicators by combining theoretical rigour with practical applicability. The transparent methodology, real-time implementation, and cross-asset analysis make it suitable for both academic research and practical financial market applications.
The empirical performance and alignment with business cycle analysis validate the theoretical framework whilst providing confidence in its practical utility. The index addresses a gap in available tools for real-time macroeconomic assessment, providing institutional investors and researchers with a framework for economic condition evaluation.
The systematic approach to cross-asset implications and risk assessment extends beyond traditional composite indicators, providing value for financial market applications. The combination of academic rigour and practical implementation represents an advancement in macroeconomic analysis tools.
References
Aruoba, S. B., Diebold, F. X., & Scotti, C. (2009). Real-time measurement of business conditions. Journal of Business & Economic Statistics, 27(4), 417-427.
Basseville, M., & Nikiforov, I. V. (1993). Detection of abrupt changes: Theory and application. Prentice Hall.
Bishop, C. M. (2006). Pattern recognition and machine learning. Springer.
Brave, S., & Butters, R. A. (2011). Monitoring financial stability: A financial conditions index approach. Economic Perspectives, 35(1), 22-43.
Burns, A. F., & Mitchell, W. C. (1946). Measuring business cycles. NBER Books, National Bureau of Economic Research.
Campbell, J. Y., Lo, A. W., & MacKinlay, A. C. (1997). The econometrics of financial markets. Princeton University Press.
Carroll, C. D., Fuhrer, J. C., & Wilcox, D. W. (1994). Does consumer sentiment forecast household spending? If so, why? American Economic Review, 84(5), 1397-1408.
Clarida, R., Gali, J., & Gertler, M. (2000). Monetary policy rules and macroeconomic stability: Evidence and some theory. Quarterly Journal of Economics, 115(1), 147-180.
Cochrane, J. H. (2005). Asset pricing. Princeton University Press.
Cormen, T. H., Leiserson, C. E., Rivest, R. L., & Stein, C. (2009). Introduction to algorithms. MIT Press.
Doz, C., Giannone, D., & Reichlin, L. (2011). A two-step estimator for large approximate dynamic factor models based on Kalman filtering. Journal of Econometrics, 164(1), 188-205.
Dzeng, R. J., & Lin, Y. C. (2004). Intelligent agents for supporting construction procurement negotiation. Expert Systems with Applications, 27(1), 107-119.
Elliot, A. J., & Maier, M. A. (2014). Color psychology: Effects of perceiving color on psychological functioning in humans. Annual Review of Psychology, 65, 95-120.
Few, S. (2006). Information dashboard design: The effective visual communication of data. O'Reilly Media.
Fisher, I. (1930). The theory of interest. Macmillan.
Foley, J. D., van Dam, A., Feiner, S. K., & Hughes, J. F. (1995). Computer graphics: Principles and practice. Addison-Wesley.
Gordon, M. J. (1962). The investment, financing, and valuation of the corporation. Richard D. Irwin.
Hasbrouck, J. (2007). Empirical market microstructure: The institutions, economics, and econometrics of securities trading. Oxford University Press.
Koenig, E. F. (2002). Using the purchasing managers' index to assess the economy's strength and the likely direction of monetary policy. Economic and Financial Policy Review, 1(6), 1-14.
Krugman, P. R., & Obstfeld, M. (2009). International economics: Theory and policy. Pearson.
Ludvigson, S. C. (2004). Consumer confidence and consumer spending. Journal of Economic Perspectives, 18(2), 29-50.
Macaulay, F. R. (1938). Some theoretical problems suggested by the movements of interest rates, bond yields and stock prices in the United States since 1856. National Bureau of Economic Research.
Markowitz, H. (1952). Portfolio selection. Journal of Finance, 7(1), 77-91.
Mishkin, F. S. (2012). The economics of money, banking, and financial markets. Pearson.
Nielsen, J. (1993). Usability engineering. Academic Press.
Norman, D. A. (2013). The design of everyday things: Revised and expanded edition. Basic Books.
OECD (2008). Handbook on constructing composite indicators: Methodology and user guide. OECD Publishing.
Oppenheim, A. V., & Schafer, R. W. (2009). Discrete-time signal processing. Prentice Hall.
Sahm, C. (2019). Direct stimulus payments to individuals. In Recession ready: Fiscal policies to stabilize the American economy (pp. 67-92). The Hamilton Project, Brookings Institution.
Siegel, J. J. (2002). Stocks for the long run: The definitive guide to financial market returns and long-term investment strategies. McGraw-Hill.
Sommerville, I. (2016). Software engineering. Pearson.
Stock, J. H., & Watson, M. W. (1989). New indexes of coincident and leading economic indicators. NBER Macroeconomics Annual, 4, 351-394.
Sweller, J. (1988). Cognitive load during problem solving: Effects on learning. Cognitive Science, 12(2), 257-285.
Taylor, J. B. (1993). Discretion versus policy rules in practice. Carnegie-Rochester Conference Series on Public Policy, 39, 195-214.
Tufte, E. R. (2001). The visual display of quantitative information. Graphics Press.
Yardeni, E. (2003). Stock valuation models. Topical Study, 38. Yardeni Research.
MTF Custom Synthetic IndexMTF Custom Synthetic Index - Ultimate Index Creation Tool
🎯 What is this indicator?
The MTF Custom Synthetic Index is a powerful, fully customizable indicator that allows you to create your own synthetic index using up to 6 different instruments of your choice. Unlike traditional indices, this tool gives you complete control over instrument selection, weightings, and calculation methodology.
⭐ Key Features
🔧 Complete Customization
Choose ANY instruments: Forex pairs, stocks, commodities, indices, cryptocurrencies, bonds, etc.
Manual weight control: Set exact percentage weights for each instrument (must total 100%).
Flexible instrument direction: Ability to invert enabled instruments that move opposite to your desired index direction (i.e. you can use instruments that are negatively correlated).
📊 Multi-Timeframe Analysis
Simultaneous monitoring: View index strength across up to 3 additional timeframes.
Strength rating system: Automatic classification (Very Strong, Strong, Neutral, Weak, Very Weak).
Normalization options: Z-Score, Min-Max, or Percentage methods for timeframe comparison.
Visual summary table: Real-time strength ratings for all timeframes.
🎨 Professional Visualization
Clean chart display: Smooth index strength line with customizable styling.
Dynamic labelling: Real-time value display with strength ratings.
Color-coded indicators: Visual strength representation with intuitive colour schemes.
💡 Use Cases
🌍 Currency Strength Analysis
USD Index: Combine EURUSD (inverted), USDJPY, AUDUSD (inverted), etc.
EUR Index: Combine EURUSD, EURGBP, EURJPY, etc.
Multi-currency baskets: Track regional currency performance.
📈 Sector/Industry Tracking
Technology sector: Combine AAPL, MSFT, GOOGL with custom weights.
Energy sector: Combine oil, gas, and energy stocks.
Precious metals: Combine gold, silver, platinum with custom allocations.
🏛️ Macro Economic Indices
Interest rate sensitivity: Combine bonds, currency pairs, and rate-sensitive stocks.
Inflation hedges: Combine commodities, TIPS, and inflation-sensitive assets.
Risk appetite: Combine safe havens vs. risk assets.
💰 Portfolio Replication
Custom benchmarks: Create indices that match your specific portfolio allocation.
Strategy testing: Build theoretical indices to test investment strategies.
🔥 Key Benefits
✅ Precision Control
Exact weight specifications with mandatory 100% total.
Choose instruments that matter to your trading strategy.
Advanced ADX/DI calculation methodology with configurable parameters.
✅ Versatile Application
Works with any asset class available on TradingView.
Suitable for scalping, day trading, swing trading, and long-term analysis.
Perfect for both retail and institutional approaches.
✅ Multi-Timeframe Insights
Quickly and easily pot divergences between timeframes.
Confirm trends across multiple time horizons.
Make better-informed trading decisions.
⚙️ Technical Specifications
Calculation Method
Base algorithm: Advanced ADX (Average Directional Index) with Directional Indicators.
Bias calculation: Normalized or raw DI difference with ADX weighting.
Smoothing options: Configurable periods for DI calculation and ADX smoothing.
Validation & Safety
Weight validation: Must total exactly 100% - prevents calculation errors.
Data integrity: Handles missing data and invalid symbols gracefully.
Timeframe validation: Prevents duplicate or invalid timeframe selections.
🚀 Perfect For
Currency traders seeking custom dollar/euro/yen/etc strength indices.
Commodity traders seeking custom precious metal/energy/etc strength indices.
Portfolio managers needing custom benchmark creation.
Macro traders building economic strength indicators.
Systematic traders requiring precise, repeatable index calculations.
📋 Quick Start
Add the indicator to your chart
Configure instruments: Select your desired symbols and weights (must total 100%).
Set timeframes: Choose additional timeframes for multi-timeframe analysis.
Customize display: Adjust colors, labels, and table settings to your preference.
Start trading: Use the index strength readings to guide your trading decisions.
⚠️ Important Notes
Weights must total exactly 100%: The indicator will show an error if weights don't add up correctly.
Data requirements: All selected instruments must have available data for the calculation to work.
Timeframe selection: Multi-timeframe analysis requires different timeframes from your main/selected chart.
Transform your trading with the power of custom index creation. Take control of your analysis and build indices that truly matter to your trading strategy.
Fractal Market Model [BLAZ]Version 1.0 – Published August 2025: Initial release
1. Overview & Purpose
1.1. What This Indicator Does
The Fractal Market Model is an original multi-timeframe technical analysis tool that bridges the critical gap between macro-level market structure and micro-level price execution. Designed to work across all financial markets including Forex, Stocks, Crypto, Futures, and Commodities. While traditional Smart Money Concepts indicators exist, this implementation analyses multi-timeframe liquidity zones and price action shifts, marking potential reversal points where Higher Timeframe (HTF) liquidity sweeps coincide with Low Timeframe (LTF) price action dynamics changes.
Snapshot details: NASDAQ:GOOG , 1W Timeframe, Year 2025
1.2. What Sets This Indicator Apart
The Fractal Market Model analyses multi-timeframe correlations between HTF structural events and LTF price action. This creates a dynamic framework that reveals patterns observed historically in price behaviour that are believed to reflect institutional activity across multiple time dimensions.
The indicator recognizes that markets move in fractal cycles following the AMDX pattern (Accumulation, Manipulation, Distribution, Continuation/Reversal). By tracking this pattern across timeframes, it flags zones where price action dynamics characteristics have historically shown shifts. In the LTF, the indicator monitors for price closing through the open of an opposing candle near HTF swing highs or lows, marking this as a Change in State of Delivery (CISD), a threshold event where price action historically transitions direction.
Practical Value:
Multi-Timeframe Integration: Connects HTF structural events with LTF execution patterns.
Fractal Pattern Recognition: Identifies AMDX cycles across different time dimensions.
Price Behavior Analysis: Tracks CISD patterns that may reflect historical shifts in order flow commonly associated with institutional activity.
Range-Based Context: Analyses price action within established HTF liquidity zones.
1.3. How It Works
The indicator employs a systematic 5-candle HTF tracking methodology:
Candles 0-1: Accumulation phase identification.
Candle 2: Manipulation detection (raids previous highs/lows).
Candle 3: Distribution phase recognition.
Candle 4: Continuation/reversal toward opposite liquidity.
The system monitors for CISD patterns on the LTF when HTF manipulation candles close with confirmed sweeps, highlighting zones where order flow dynamics historically shifted within the established HTF range.
Snapshot details: FOREXCOM:AUDUSD , 1H Timeframe, 17 to 28 July 2025
Note: The Candle 0-5 and AMDX labels shown in the accompanying image are for demonstration purposes only and are not part of the indicator’s actual functionality.
2. Visual Elements & Components
2.1. Complete FMM Setup Overview
A fully developed Fractal Market Model setup displays multiple analytical components that work together to provide comprehensive market structure analysis. Each visual element serves a specific purpose in identifying and tracking the AMDX cycle across timeframes.
2.2. Core Visual Components
Snapshot details: FOREXCOM:EURUSD , 5 Minutes Timeframe, 27 May 2025.
Note: The numbering labels 1 to 14 shown in the accompanying image are for demonstration purposes only and are not part of the indicator’s actual functionality.
2.2.1. HTF Structure Elements
(1) HTF Candle Visualization: Displays the 5-candle sequence being tracked (configurable quantity up to 10).
(2) HTF Candle Labels (C2-C4): Numbered identification for each candle in the AMDX cycle.
(3) HTF Resolution Label: Shows the higher timeframe being analysed.
(4) Time Remaining Indicator: Countdown to HTF candle closure.
(5) Vertical Separation Lines: Clearly delineates each HTF candle period.
2.2.2. Key Price Levels
(6) Liquidity Levels: High/low levels from HTF candles 0 and 1 representing potential target zones.
(7) Sweep Detection Lines: Marks where previous HTF candle extremes have been breached on both HTF and LTF.
(8) HTF Candle Mid-Levels: 50% retracement levels of previous HTF candles displayed on current timeframe.
(9) Open Level Marker: Shows the opening price of the most recent HTF candle.
2.2.3. Institutional Analysis Tools
(10) CISD Line: Marks the Change in State of Delivery pattern identification point.
(11) Consequent Encroachment (CE): Mid-level of identified institutional order blocks.
(12) Potential Reversal Area (PRA): Zone extending from previous candle close to the mid-level.
(13) Fair Value Gap (FVG): Identifies imbalance areas requiring potential price revisits.
(14) HTF Time Labels: Individual time period labels for each HTF candle.
2.3. Interactive Features
All visual elements update dynamically as new price data confirms or invalidates the tracked patterns, providing real-time market structure analysis across the selected timeframe combination.
3. Input Parameters and Settings
3.1. Alert Configuration
Setup Notifications: Users can configure alerts to receive notifications when new FMM setups form based on their selected bias, timeframes, and filters. Enable this feature by:
Configure the bias, timeframes and filters and other settings as desired.
Toggle the "Alerts?" checkbox to ON in indicator settings.
On the chart, click the three dots menu beside the indicator's name or press Alt + A.
Select "Add Alert" and click “Create” to activate the alert.
3.2. Display Control Settings
3.2.1. Historical Setup Quantity
Setup Display Control: Customize how many historical setups appear on the chart, with support for up to 50 combined entries. The indicator displays both bullish and bearish FMM setups within the selected limit, including invalidated scenarios. For example, selecting "3 setups" will display the most recent combination of bullish and bearish patterns based on the model's detection logic.
Snapshot details: BINANCE:BTCUSD , 1H Timeframe, 27-Feb to 11-Mar 2025
Note: The labels “Setup 1, 2 & 3: Bullish or Bearish” shown in the accompanying image are for demonstration purposes only and are not part of the indicator’s actual functionality.
3.2.2. Directional Bias Filter
Bias Filter: Control which setups are displayed based on directional preference:
Bullish Only: Shows exclusively upward bias setups.
Bearish Only: Shows exclusively downward bias setups.
Balanced Mode: Displays both directional setups.
This flexibility helps align the indicator's output with broader market analysis or trading framework preferences. The chart below illustrates the same chart in 3.2.1. but when filtered to show only bullish setups.
Snapshot details: BINANCE:BTCUSD , 1H Timeframe, 27-Feb to 11-Mar 2025
Note: The labels “Setup 1, 2 & 3: Bullish” shown in the accompanying image are for demonstration purposes only and are not part of the indicator’s actual functionality.
3.2.3. Invalidated Setup Display
Invalidation Visibility: A setup becomes invalidated when price moves beyond the extreme high or low of the Manipulation candle (C2), indicating that the expected fractal pattern has been disrupted. Choose whether to display or hide setups that have been invalidated by subsequent price action. This feature helps maintain chart clarity while preserving analytical context:
Amber Labels: Setups invalidated at Candle 3 (C3).
Red Labels: Setups invalidated at Candle 4 (C4).
Count Preservation: Invalidated setups remain part of the total setup count regardless of visibility setting.
Below image illustrates balanced setups:
Left side: 1 bearish valid setup, with 2 invalidated setups visible.
Right side: 1 bearish valid setup, with 2 invalidated setups hidden for chart clarity.
Snapshot details: FOREXCOM:GBPJPY , 5M Timeframe, 30 July 2025
3.3. Timeframe Configuration
3.3.1. Multi-Timeframe Alignment
Custom Timeframe Selection: Configure preferred combinations of Higher Timeframe (HTF) and Lower Timeframe (LTF) for setup generation. While the indicator includes optimized default alignments (1Y –1Q, 1Q –1M, 1M –1W, 1M –1D, 1W–4H, 1D–1H, 4H-30m, 4H –15m, 1H –5m, 30m –3m, 15m –1m), users can define custom HTF-LTF configurations to suit their analysis preferences and market focus.
The image below illustrates two different HTF – LTF configuration, both on the 5 minutes chart:
Right side: Automatic multi-timeframe alignment, where the indicator autonomously sets the HTF pairing to 1H when the current chart timeframe is the 5 minutes.
Left side: Custom Timeframe enabled, where HTF is manually set to 4H, and LTF is manually set to 15 minutes, while being on the 5 minutes chart.
Snapshot details: FOREXCOM:GBPJPY , 5 minutes timeframe, 30 July 2025
3.3.2. Session-Based Filtering
Visibility Filters: Control when FMM setups appear using multiple filtering options:
Time-Based Controls:
Show Below: Limit setup visibility to timeframes below the selected threshold.
Use Session Filter: Enable session-based time window restrictions.
Session 1, 2, 3: Configure up to three custom time sessions with start and end times.
These filtering capabilities help concentrate analysis on specific market periods or timeframe contexts.
The image below illustrates the application of session filters:
Left side: The session filter is disabled, resulting in four setups being displayed throughout the day—two during the London session and two during the New York session.
Right side: The session filter is enabled to display setups exclusively within the New York session (8:00 AM – 12:00 PM). Setups outside this time window are hidden. Since the total number of setups is limited to four, the indicator backfills by identifying and displaying two qualifying setups from earlier price action that occurred within the specified New York session window.
Snapshot details: COMEX:GC1! , 5 minutes Timeframe, 29 July 2025
3.4. Annotation Systems
3.4.1. Higher Timeframe (HTF) Annotations
HTF Display Control: Enable HTF visualization using the "HTF candles" checkbox with quantity selector (default: 5 candles, expandable to 10). This displays all HTF elements detailed in the Visual Components section 2.2. above.
Customisation Categories:
Dimensions: Adjust candle offset, gap spacing, and width for optimal chart fit.
Colours: Customize body, border, and wick colours for bullish/bearish candle differentiation.
Style Options: Control line styles for HTF opens, sweep lines, and equilibrium levels.
Feature Toggles: Enable/disable Fair Value Gaps, countdown labels, and individual candle labelling.
All HTF annotation elements support individual styling controls to maintain visual clarity while preserving analytical depth. The image below shows two examples: the left side has customized styling applied, while the right side shows the default appearance.
Snapshot details: CME_MINI:NQ1! , 5 minutes Timeframe, 29 July 2025
3.4.2. Lower Timeframe (LTF) Annotations
LTF Display Control: Comprehensive annotation system for detailed execution analysis, displaying all LTF elements outlined in the Visual Components section 2.2. above.
Customization Categories:
Core Elements: Control HTF separation lines, sweep markers, CISD levels, and candle phase toggles (C2, C3, C4) to selectively show or hide the LTF annotations for each of these specific HTF candle phases.
Reference Levels: Adjust previous equilibrium lines, CISD consequent encroachment, and HTF liquidity levels.
Analysis Tools: Enable potential holding area (PHA) markers.
Styling Options: Individual visibility toggles, colour schemes, line styles, and thickness controls for each element.
All LTF components support full customization to maintain chart clarity while providing precise execution context. The image below shows two examples: the left side has customized styling applied, while the right side shows the default appearance.
Snapshot details: TVC:DXY , 5 minutes Timeframe, 28 July 2025
3.5. Performance Considerations
Higher setup counts and extended HTF displays may impact chart loading times. Adjust settings based on device performance and analysis requirements.
4. Closed-Source Protection Justification
4.1. Why This Indicator Requires Protected Source Code
The Fractal Market Model is the result of original research, development, and practical application of advanced price action frameworks. The indicator leverages proprietary algorithmic systems designed to interpret complex market behavior across multiple timeframes. To preserve the integrity of these innovations and prevent unauthorized replication, the source code is protected.
4.1.1. Key Proprietary Innovations
Real-Time Multi-Timeframe Correlation Engine: A dynamic logic system that synchronizes higher timeframe structural behaviour with lower timeframe execution shifts using custom correlation algorithms, adaptive thresholds, and time-sensitive conditions, supporting seamless fractal analysis across nested timeframes.
CISD Detection Framework: A dedicated mechanism for identifying Change in State of Delivery (CISD), where price closes through the open of an opposing candle at or near HTF swing highs or lows after liquidity has been swept. This is used to highlight potential zones of directional change based on historical order flow dynamics.
Fractal AMDX Cycle Recognition: An engineered structure that detects and classifies phases of Accumulation, Manipulation, Distribution, and Continuation/Reversal (AMDX) across configurable candle sequences, allowing traders to visualize market intent within a repeatable cycle model.
Dynamic Invalidation Logic: An automated monitoring system that continually evaluates the validity of active setups. Setups are invalidated in real time when price breaches the extreme of the manipulation phase (C2), ensuring analytical consistency and contextual alignment.
4.1.2. Community Value
The closed-source nature of this tool protects the author’s original intellectual property while still delivering value to the TradingView community. The indicator offers a complete, real-time visual framework, educational annotations, and intuitive controls for analysing price action structure and historically observed patterns commonly attributed to institutional behaviour across timeframes.
5. Disclaimer & Terms of Use
This indicator, titled Fractal Market Model , has been independently developed by the author based on their own study, interpretation, and practical application of the smart money concepts. The code and structure of this indicator are original and were written entirely from scratch to reflect the author's unique understanding and experience. This indicator is an invite-only script. It is closed-source to protect proprietary algorithms and research methodologies.
This tool is provided solely for educational and informational purposes. It is not intended—and must not be interpreted—as financial advice, investment guidance, or a recommendation to buy or sell any financial instrument. The indicator is designed to assist with technical analysis based on market structure theory but does not guarantee accuracy, profitability, or specific results.
Trading financial markets involves significant risk, including the possibility of loss of capital. By using this indicator, you acknowledge and accept that you are solely responsible for any decisions you make while using the tool, including all trading or investment outcomes. No part of this script or its features should be considered a signal or assurance of success in the market.
By subscribing to or using the indicator, you agree to the following:
You fully assume all responsibility and liability for the use of this product.
You release the author from any and all liability, including losses or damages arising from its use.
You acknowledge that past performance—real or hypothetical—does not guarantee future outcomes.
You understand that this indicator does not offer personalised advice, and no content associated with it constitutes a solicitation of financial action.
You agree that all purchases are final. Once access is granted, no refunds, reimbursements, or chargebacks will be issued under any circumstance.
You agree to not redistribute, resell, or reverse engineer the script or any part of its logic.
Users are expected to abide by all platform guidelines while using or interacting with this tool. For access instructions, please refer to the Author's Instructions section or access the tool through the verified vendor platform.
TIME MACHINE PRO-01# TIME MACHINE PRO - Revolutionary Trading Indicator with Historical Analysis
## 🎯 Overview
TIME MACHINE PRO is a sophisticated multi-timeframe trading indicator that combines 10 customizable technical indicators with a unique time-travel cursor feature. Analyze historical signals, learn from past market behavior, and make informed trading decisions with percentage-based confidence scores.
## ✨ Key Features
### 🕰️ Time Machine Cursor
- **Analyze signals from any point in history** (up to 500 bars back)
- **See exact indicator values** at historical moments
- **Learn from past signal performance** to improve future trades
- **Real-time historical analysis** with date/time display
### 🎰 10 Professional Indicator Slots
**Core Oscillators:**
- RSI, Stochastic, MACD, CCI, Williams %R
- MFI, ROC, Bollinger Bands Width
- Stochastic RSI, Awesome Oscillator
- Parabolic SAR, Ichimoku Cloud
**Customizable Parameters:**
- Individual weights (0.1-3.0) for each indicator
- Custom overbought/oversold levels
- Adjustable periods and sensitivity
- Enable/disable any combination
### 📊 Advanced Signal System
- **3-2-1 Logic**: 3 Filters → 2 Signals → 1 Trigger
- **Percentage-based signal strength** (0-100%)
- **Color-coded confidence levels**:
- 🟢 Green (80%+) - High confidence
- 🟡 Yellow (65-79%) - Medium confidence
- 🟠 Orange (50-64%) - Low confidence
- **Adaptive algorithm** adjusts to market volatility
### 🎛️ 7 Professional Presets
**1. Meme_Scalp_v4** - Quick scalping for meme coins
- Optimized for 1m-5m timeframes
- High sensitivity, more signals
- Perfect for DOGE, SHIB, PEPE
**2. Meme_Swing_v4** - Balanced swing trading ⭐ (Recommended for beginners)
- Best for 15m-1h timeframes
- Balanced accuracy and frequency
- Universal crypto trading
**3. Alt_Short_v4** - Altcoin shorting strategy
- Focused on SHORT signals
- Great for bear markets
- Optimized for altcoin volatility
**4. Pump_Hunter_v4** - Pump detection system
- Ultra-fast reaction to price spikes
- High-volatility market specialist
- Advanced pump/dump detection
**5. Conservative_v4** - Conservative long-term trading
- High accuracy, fewer signals
- Perfect for large portfolios
- 4h-1D timeframes
**6. Professional_v4** - All 10 slots active
- Maximum analysis power
- For experienced traders
- Complete market overview
**7. Custom** - Create your own strategy
- Full control over all parameters
- Save configurations via screenshots
- Unlimited customization
### 📈 Comprehensive Analytics Table
**Real-time display includes:**
- **Adaptive Status**: Volatility multiplier, adaptive scores
- **3-2-1 Analysis**: Filters, signals, triggers breakdown
- **Slot Status**: All 10 indicators with current values and weights
- **Enhanced Conditions**: Pump-dump detection, extreme overbought alerts
- **Final Scores**: Long/Short percentages with final signal decision
### 🎨 Visual Elements
**On-Chart Signals:**
- Clear LONG/SHORT labels with confidence percentages
- Risk level indicators (🟢🟡🟠)
- Background highlighting during signal periods
- EMA trend lines (Fast: Blue, Slow: Orange)
- Time cursor line for historical analysis
## 📋 Perfect For
### 🚀 Cryptocurrency Trading
- **Bitcoin & Ethereum** - Major pairs with high liquidity
- **Altcoins** - SOL, AVAX, MATIC, ADA optimized settings
- **Meme Coins** - Special algorithms for DOGE, SHIB, PEPE
- **All timeframes** - From 1-minute scalping to daily swing trading
### 📊 Trading Styles
- **Scalping** - Ultra-fast entries with Meme_Scalp_v4
- **Swing Trading** - Medium-term positions with balanced signals
- **Short Selling** - Specialized bear market detection
- **Conservative** - High-accuracy, low-frequency signals
### 👥 Trader Levels
- **Beginners** - Ready-to-use presets with clear signals
- **Intermediate** - Historical analysis for learning and improvement
- **Advanced** - Full customization with 10-slot system
- **Professional** - Complex multi-indicator strategies
## 🔧 Technical Specifications
### System Requirements
- TradingView platform (Free or Pro)
- Modern web browser
- Stable internet connection
- Recommended: 1920x1080+ resolution
### Compatibility
- **✅ Fully Supported**: All crypto pairs, 1m-1D timeframes
- **⚠️ Limited**: Forex pairs, stock markets
- **❌ Not Recommended**: Exotic low-liquidity pairs
### Performance
- **Pine Script v6** - Latest version with optimal performance
- **Real-time calculations** - Instant updates with each candle
- **Low resource usage** - Optimized code for smooth operation
- **500 bars history** - Maximum lookback for cursor analysis
## 💡 How to Use
### Quick Start (Beginners)
1. Add indicator to chart
2. Select **"Meme_Swing_v4"** preset
3. Set timeframe to **15m or 1h**
4. Trade signals **70%+** only
5. Use **cursor** to learn from history
### Advanced Setup (Experienced)
1. Choose **"Custom"** mode
2. Configure individual slots
3. Adjust weights and parameters
4. Test with historical cursor
5. Save settings via screenshot
### Risk Management
- **Never risk more than 2-5%** per trade
- **Always use stop-losses**
- **Consider overall market trend**
- **Wait for cooldown periods**
## 🎯 What Makes It Unique
### Revolutionary Time Travel Feature
- **First indicator with historical cursor** functionality
- **Learn from past signals** without backtesting complexity
- **See exactly what happened** after each historical signal
- **Improve strategy** by understanding signal outcomes
### Adaptive Intelligence
- **Auto-adjusts to market volatility** (Low/Normal/High modes)
- **Dynamic cooldown periods** prevent signal spam
- **Smart score adaptation** for different market conditions
- **Volume-based confirmations** for signal validation
### Professional Grade Analytics
- **Complete transparency** - see every component of each signal
- **Detailed breakdown** of filters, signals, and triggers
- **Real-time adaptation status** monitoring
- **Professional-level information** usually found in premium tools
## 📞 Support & Community
### 🔄 Regular Updates
- Algorithm improvements and optimizations
- New presets based on market conditions
- Bug fixes and performance enhancements
- Community-requested features
### 📚 Learning Resources
- Comprehensive user manual included
- Step-by-step tutorials for all levels
- Best practices and risk management guides
- Community sharing of successful configurations
### 💬 Community Features
- Share custom presets via screenshots
- Discuss strategies with other users
- Learn from experienced traders
- Get support and tips
## ⚠️ Important Disclaimers
- **Not financial advice** - Educational tool only
- **No guarantee of profits** - Trading involves risk
- **Past performance** doesn't predict future results
- **Always use proper risk management**
- **Test thoroughly** before live trading
## 🚀 Get Started Today
Transform your trading with the power of time travel analysis. Whether you're a beginner looking for clear signals or a professional trader seeking advanced customization, TIME MACHINE PRO adapts to your needs.
**Experience the future of technical analysis - where you can learn from the past to profit in the present!**
---
**Categories**: Trend Analysis, Oscillators, Volatility
**Best Timeframes**: 5m, 15m, 1h, 4h
**Recommended Pairs**: BTC/USDT, ETH/USDT, SOL/USDT, DOGE/USDT
**Skill Level**: All levels (Beginner to Professional)
*Like this indicator? Please leave a comment and boost! Your feedback helps us improve and add new features.* ⭐
BOR + 08:28BOR + TIME: Precision 1-Minute Opening Range Analysis
METHODOLOGY OVERVIEW
This indicator implements a proprietary time-based trading methodology that combines opening range analysis with precision timing algorithms designed exclusively for 1-minute charts during the New York trading session.
CORE ALGORITHM COMPONENTS
1. Bond Opening Range (BOR) Identification
- Captures the complete price range during 08:00-09:00 NY time
- Establishes the foundational trading range for the session
- Uses high-precision minute-level data to define exact boundaries
2. Critical Time Level Analysis (08:28 Candle)
- Identifies the 08:28-08:29 minute candle as a key reference point
- This specific timing represents a critical juncture before market open
- Captures the exact high/low range of this precise minute
3. Directional Bias Determination (09:00 Analysis)
- At exactly 09:00, compares current price position relative to 08:28 boundaries
- Above 08:28 High: Activates support-seeking mode (bullish bias)
- Below 08:28 Low: Activates resistance-seeking mode (bearish bias)
- Inside 08:28 Range: No directional bias established
4. Dynamic Standard Deviation Projections
- Uses the 08:28 candle range as the mathematical basis for standard deviation calculations
- Support Mode: Projects levels below 08:28 low using range multipliers (-1σ, -2σ, -3σ, -4σ)
- Resistance Mode: Projects levels above 08:28 high using range multipliers (+1σ, +2σ, +3σ, +4σ)
- Levels are active only during 09:00-10:30 trading window
UNIQUE FEATURES
Conditional Logic Engine
- Real-time directional switching based on 09:00 price position
- No static levels - everything adapts to intraday price action
- Eliminates noise by focusing on specific time windows
Precision Timing Requirements
- Requires exact 1-minute timeframe for accurate calculations
- Time-sensitive algorithm that relies on minute-by-minute analysis
- Optimized for high-frequency intraday trading decisions
Mathematical Framework
- Standard deviations calculated using actual candle range data
- Dynamic level spacing based on market volatility (08:28 range)
- Four-tier projection system for multiple target/stop levels
TRADING APPLICATION
Best Used For:
- ES, NQ, YM and other liquid index futures
- Active day trading during NY session (07:00-12:00)
- Scalping and short-term reversal strategies
- Intraday support/resistance identification
Signal Interpretation:
- Red lines represent potential reversal zones
- Direction determined by 09:00 vs 08:28 relationship
- Multiple standard deviation levels provide layered entry/exit points
- Time-restricted plotting ensures relevance during active trading hours
IMPORTANT REQUIREMENTS
- ONLY works on 1-minute charts - precision timing is essential
- Designed for New York trading session (futures markets)
- Most effective during high-volume trading periods
CUSTOMIZATION OPTIONS
- Toggle BOR box visibility and transparency
- Enable/disable 08:28 candle highlighting
- Adjust visual elements (colors, transparency)
- Show/hide range information labels