NNFX Baseline ToolNNFX All-in-One Baseline display / test tool.
This is usefull (hopefully) for the NNFX way of trading only. It's not intended to be used as a standalone tool.
Basically, this script displays and tests many types of Moving Averages as baselines.
It displays baseline signals, based on the NNFX ATR-related rule for baseline entries.
It can be used as a backtest tool, or plugged into the whole nnfx algo.
If signal display option is enabled, signals are displayed on chart : green for long, red for short, orange for crossovers beyond the ATR channel :
Many baselines available : SMA , EMA , WMA , VWMA , ALMA , AMA, SMMA , DEMA , FRAMA , HULL, KAMA , KIJUN, JURIK, LAGUERRE, MCGINLEY , TMA1, TMA2, VIDYA , MODULAR FILTER, VAMA , ZLEMA , T3, LSMA, etc.
Additional options :
- multiplying the ATR channel (and subsequent rule) by a factor (default = 1)
- plot the ATR channel (def = yes)
- fill it (def = yes)
- display signals (def = yes)
- option for add color to the baseline, for long/short territory (2 different options : baseline is colored, background is colored)
- darkmode / lightmode color option. (def = dark)
We also display panels, with general information and some test results. Tests are done within the test period.
I tried to test all the different MAs included in the script but some bugs might still be present, so use it at ur own risk.
If you'd like a new MA option added, please let me know in comments.
I included a "bad" signal detection, it can help for tweaking the settings. Signals are defined as "bad" when they are immediately followed by another signal.
When there is 2 or more bad signals next to another, you spotted a chopiness zone (a chopiness zone is defined as a zone where BL get eaten alive).
Example :
to do :
- plug it with the c1/c2 backtest tool (it's the whole point)
- add alerts,
- add more ma types
- stop to use the operator, it's not convenient at all
- add wr% calculation as a standalone feature (with TP / SL)
- add a way to measure chopiness in the test (dont know how yet)
- detect & display chopiness zones
I asked other users when I used their ideas (for some particular types of MAs). They all agreed.
Pesquisar nos scripts por "algo"
Best strategy for TradingView (fake)Hello everyone! I want to show you this strategy so you don't fall for the tricks of scammers. On TradingView, you can write an algorithm (probably more than one) that will show any profit you want: from 1% to 100,000% in one year (maybe more)! This can be done, for example, using the built-in linebreak () function and several conditions for opening long and short.
I am sure that sometimes scammers show up on TradingView showing their incredible strategies. Will a smart person sell a profitable quick strategy? When a lot of people start using the quick strategy, it stops working. Therefore, no smart person would sell you a quick strategy. It is acceptable to sell slow strategies: several transactions per month - this does not greatly affect the market.
So, don't fall for the tricks of scammers, write quick strategies yourself.
About this strategy, I can say that the linebreak () function does not work correctly in it. Accordingly, the lines are not drawn correctly on the chart. They are drawn in such a way as to show the maximum profit. I watched this algorithm on a 1m timeframe - no lines are drawn in real time. This is a fake!
Line breakI decided to help TradingView programmers and wrote code that converts a standard candles / bars to a line break chart. The built-in linebreak() and security() functions for constructing a Linear Break chart are bad, the chart is not built correctly, and does not correspond to the Line Breakout chart built into TradingView. I’m talking about simulating the Linear Break lines using the plotcandle() annotation, because these are the same candles without shadows. When you try to use the market simulator, when the gaps are turned on in the security() function, nothing is added to the chart, and when turned off, a completely different line break chart is drawn. Do not try to write strategies based on the built-in linebreak() function! The developers write in the manual: "Please note that you cannot plot Line Break boxes from Pine script exactly as they look. You can only get a series of numbers similar to OHLC values for Line Break charts and use them in your algorithms." However, it is possible to build a “Linear Breakthrough” chart exactly like the “Linear Breakthrough" chart built into TradingView. Personally, I had enough Pine Script functionality.
For a complete understanding of how such a graph is built, you can refer to Steve Nison's book “BEYOND JAPANESE CANDLES” and see the instructions for creating a “Three-Line Breakthrough” chart (the number of lines for a breakthrough is three):
Rule 1: if today's price is above the base price (closing the first candle), draw a white line from the base price to the new maximum price (before closing).
or Rule 2: if today's price is below the base price, draw a black line from the base price to the new low of prices (before closing).
Rule 3: if today's price is no different from the base, do not draw any line.
Rule 4: if today's price rises above the maximum of the first line, shift to the column to the right and draw a new white line from the previous maximum to the new maximum of prices.
Rule 5: if the price is below the low of the first line, move one column to the right and draw a new black line down from the previous low to the new low of prices.
Rule 6: if the price is kept in the range of the first line, nothing is applied to the chart.
Rule 7: if the market reaches a new maximum, surpassing the maximum of previous lines, move to the column to the right and draw a new white line up to a new maximum.
Rule 8: if today's price is below the low of previous lines (i.e. there is a new low), move to the right column and draw a new black line down to a new low.
Rule 9: if the price is in the range of the first two lines, nothing is applied to the chart.
Rule 10: if there is a series of three white lines, a new white line is drawn when a new maximum is reached (even if it is only one tick higher than the old one). Under the same conditions, for drawing a black reversal line, the price should fall below the minimum of the series of the last three white lines. Such a black line is called a black reversal line. It runs from the base of the highest white line to a new low of price.
Rule 11: if there is a series of three black lines, a new black line is drawn when a new minimum is reached. Under the same conditions, for drawing a white line, called a white reversal line, the price must exceed the maximum of the previous three black lines. This line is drawn from the top of the lowest black line to a new high of the price.
So, the script was not small, but the idea is extremely simple: if you need to break n lines to build a line, then among these n lines (or less, if this is the beginning of the chart), the maximum or minimum of closures and openings will be searched. If the current candles closed above or below these highs or lows, then a new line is added to the chart on the current candles (trend or breakout). According to my observations, this script draws a chart that is completely identical to the Line Breakout chart built into TradingView, but of course with gaps, as there is time in the candles / bar chart. I stuffed all the logic into a wrapper in the form of the get_linebreak() function, which returns a tuple of OHLC values. And these series with the help of the plotcandle() annotation can be converted to the "Linear Breakthrough" chart. I also want to note that with a large number of candles on the chart, outrages about the buffer size uncertainty are heard from the TradingView black box. Because of this, in the annotation study() set the value to the max_bars_back parameter.
In general, use it (for example, to write strategies)!
REVEREVE is abbreviation from Range Extension Volume Expansion. This indicator shows these against a background of momentum. The histogram and columns for the range and volume rises ara calculated with the same algorithm as I use in the Volume Range Events indicator, which I published before. Because this algorithm uses the same special function to assess 'normal' levels for volume and range and uses the same calculation for depicting the rises on a scale of zero through 100, it becomes possible to compare volume and range rises in the same chart panel and come to meaningful conclusions. Different from VolumeRangeEvents is that I don't attempt to show direction of the bars and columns by actually pointing up or down. However I did color the bars for range events according to direction if Close jumps more than 20 percent of ATR up or down either blue or red. If the wider range leads to nothing, i.e. a smaller jump than 20 percent, the color is black. You can teak this in the inputs. The volume colums ar colored according to two criteria, resulting in four colors (orange, blue, maroon, green). The first criterium is whether the expansion is climactic (orange, blue) or moderate (maroon, green). I assume that climactic (i.e. more than twice as much) volume marks the beginning or end of a trend. The second criterium looks at the range event that goes together with the volume event. If lots of volume lead to little change in range (blue, green), I assume that this volume originates from institutional traders who are accumulating or distributing. If wild price jumps occur with comparatively little volume (orange, maroon, or even no volume event) I assume that opportunistic are active, some times attributing to more volume.
For the background I use the same colors calculated with the same algorithm as in the Hull Agreement Indicator, which I published before. This way I try to predict trend changes by observation of REVE.
T3 ICL MACD STRATEGY
Backtested manually and received approx 60% winrate. Tradingview strategy tester is skewed because this program does not specify when to sell at profit target or at a stop loss.
Uses 1 min for entry and a longer time frame for confirmation (5,10,15, etc..) (Not sure what the yellow arrows are in the picture but they can be ignored)
Ideal Long Entry - The algo uses T3 moving average (T3) and the Ichimoku Conversion Line (ICL) to determine when to enter a long or short position. In this case we are going to showcase what causes the algo to alert long. It first checks to see if the the ICL is greater than T3. Once that condition is met T3 must be green in order to enter long and finally the last closing price has to be greater than the ICL. You can use the MACD to further verify a long trend as well!
Ideal Short Entry - The algo uses T3 moving average (T3) and the Ichimoku Conversion Line (ICL) to determine when to enter a long or short position. In this case we are going to showcase what causes the algo to alert short. It first checks to see if the the ICL is less than T3. Once that condition is met T3 must be red in order to enter short and finally the last closing price has to be less than the ICL. You can use the MACD to further verify a long trend as well!
[PX] Moon PhaseHello guys,
while scrolling through the public library, I was surprised that there was no Open-Source version of the Moon Phase indicator. All moon phase indicators in the public library were either protected or not exactly what I was looking for. There is a built-in "Moon Phase" indicator, but even for this one, we can't access its source code.
Therefore, I started searching for an algorithm that I could implement into PineScript.
So here we go, an Open-Source Moon Phase indicator. It comes with the option to color the background based on the recent moon. Compared to the built-in indicator, the moon is slightly shifted, because it is centered on the candle and not plotted between two candles like the built-in indicator is doing it.
Feel free to use the indicator for your analysis or build on top of it in an open-source fashion.
Happy trading,
paaax :)
Reference: This indicator is a converted and simplified version of the original javascript algorithm, which can be found here .
SMU Quantum Thermo BallsThis script is the enhanced version of Market Thermometer with one difference. This one has Quantum Thermo balls shooting out of the thermometer tube when overheated. Quantum psychology, Quantum observation, call it what you like
My scripts are designed to beat ALGO, so the behavior of indicators is not like traditional indicators. Don't try to overthink it and compare it to other established functions.
If you knew ALGo as much as I do, then you would also ditch old indicators and design your own weird scripts to match the ALGO's personality. Oh yes, each AlGo for each stock has its own programming personality. Most my scripts are tuned to beat SPX ALGO meniac
Enjoy and think outside the box, the only way to beat the ALGO
BERLIN Renegade - Baseline & RangeThis is the baseline and range candles part of a larger algorithm called the "BERLIN Renegade". It is based on the NNFX way of trading, with some modifications.
The baseline is used for price crossover signals, and consists of the LSMA. When price is below the baseline, the background turns red, and when it is above the baseline, the background turns green.
It also includes a modified version of the Range Identifier by LazyBear. This version calculates the same, but draws differently. It remove the baseline signal color if the Range Identifier signals there is a possible trading range forming.
The main way of identifying ranges is using the BERLIN Range Index. A panel version of this indicator is included in another part of the algorithm, but the bar color version is included here, to make the ranges even more visible and easier to avoid.
Low Frequency Fourier TransformThis Study uses the Real Discrete Fourier Transform algorithm to generate 3 sinusoids possibly indicative of future price.
I got information about this RDFT algorithm from "The Scientist and Engineer's Guide to Digital Signal Processing" By Steven W. Smith, Ph.D.
It has not been tested thoroughly yet, but it seems that that the RDFT isn't suited for predicting prices as the Frequency Domain Representation shows that the signal is similar to white noise, showing no significant peaks, indicative of very low periodicity of price movements.
Correlation MATRIX (Flexible version)Hey folks
A quick unrelated but interesting foreword
Hope you're all good and well and tanned
Me? I'm preparing the opening of my website where we're going to offer the Algorithm Builder Single Trend, Multiple Trends, Multi-Timeframe and plenty of others across many platforms (TradingView, FXCM, MT4, PRT). While others are at the beach and tanning (Yes I'm jealous, so what !?!), we're working our a** off to deliver an amazing looking website and great indicators and strategies for you guys.
Today I worked in including the Trade Manager Pro version and the Risk/Reward Pro version into all our Algorithm Builders. Here's a teaser
We're going to have a few indicators/strategies packages and subscriptions will open very soon.
The website should open in a few weeks and we still have loads to do ... (#no #summer #holidays #for #dave)
I see every message asking me to allow access to my Algorithm Builders but with the website opening shortly, it will be better for me to manage the trials from there - otherwise, it's duplicated and I can't follow all those requests
As you can probably all understand, it becomes very challenging to publish once a day with all that workload so I'll probably slow down (just a bit) and maybe posting once every 2/3 days until the website will be over (please forgive me for failing you). But once it will open, the daily publishing will resume again :) (here's when you're supposed to be clapping guys....)
While I'm so honored by all the likes, private messages and comments encouraging me, you have to realize that a script always takes me about 2/3 hours of work (with research, coding, debugging) but I'm doing it because I like it. Only pushing the brake a bit because of other constraints
INDICATOR OF THE DAY
I made a more flexible version of my Correlation Matrix .
You can now select the symbols you want and the matrix will update automatically !!! Let me repeat it once more because this is very cool... You can now select the symbols you want and the matrix will update automatically :)
Actually, I have nothing more to say about it... that's all :) Ah yes, I added a condition to detect negative correlation and they're being flagged with a black dot
Definition : Negative correlation or inverse correlation is a relationship between two variables whereby they move in opposite directions.
A negative correlation is a key concept in portfolio construction, as it enables the creation of diversified portfolios that can better withstand portfolio volatility and smooth out returns.
Correlation between two variables can vary widely over time. Stocks and bonds generally have a negative correlation, but in the decade to 2018, their correlation has ranged from -0.8 to 0.2. (Source : www.investopedia.com
See you maybe tomorrow or in a few days for another script/idea.
Be sure to hit the thumbs up to cheer me up as your likes will be the only sunlight I'll get for the next weeks.... because working on building a great offer for you guys.
Dave
____________________________________________________________
- I'm an officially approved PineEditor/LUA/MT4 approved mentor on codementor. You can request a coaching with me if you want and I'll teach you how to build kick-ass indicators and strategies
Jump on a 1 to 1 coaching with me
- You can also hire for a custom dev of your indicator/strategy/bot/chrome extension/python
SMA/pivot/Bollinger/MACD/RSI en pantalla gráficoMulti-indicador con los indicadores que empleo más pero sin añadir ventanas abajo.
Contiene:
Cruce de 3 medias móviles
La idea es no tenerlas en pantalla, pero están dibujadas también. Yo las dejo ocultas salvo que las quiera mirar para algo.
Lo que presento en pantalla es la media lenta con verde si el cruce de las 3 marca alcista, amarillo si no está claro y rojo si marca bajista.
Pivot
Normalmente los tengo ocultos pero los muestro cuando me interesa. Están todos aunque aparezcan 2 seguidos.
Bandas de Bollinger
No dibujo la línea central porque empleo la media como tal.
Parabollic SAR
Lo empleo para dibujar las ondas de Elliott como postula Matías Menéndez Larre en el capítulo 11 de su libro "Las ondas de Elliott". Así que, aunque se puede mostrar, lo mantengo oculto y lo que muestro es dónde cambia (SAR cambio).
MACD
No está dibujado porque necesitaría sacarlo del gráfico.
Marco en la parte superior cuándo la señal sobrepasa al MACD hacia arriba o hacia abajo con un flecha indicando el sentido de esta señal.
RSI
Similar al MACD pero en la parte inferior.
Probablemente, programe otro indicador para visualizar en una ventanita MACD, RSI y volumen todo junto. El volumen en la principal hay veces que no te permite ver bien alguna sombra y los otros 2 te quitan mucho espacio para graficar si los tienes permanentemente en 2 ventanas separadas.
DFT - Dominant Cycle Period 8-50 bars - John EhlerThis is the translation of discret cosine tranform (DCT) usage by John Ehler for finding dominant cycle period (DC).
The price is first filtered to remove aliasing noise(bellow 8 bars) and trend informations(above 50 bars), then the power is computed.
The trick here is to use a normalisation against the maximum power in order to get a good frequency resolution.
Current limitation in tradingview does not allow to display all of the periods, still the DC period is plot after beeing computed based on the center of gravity algo.
The DC period can be used to tune all of the indicators based on the cycles of the markets. For instance one can use this (DC period)/2 as an input for RSI.
Hope you find this of some interrest.
[naoligo] Simple ADXI'm publishing this indicator just for study purposes, because the result is exactly the same as DMI without the smoothing factor. It is exactly the same as ADX Wilder from MT5.
I was looking for the algorithm all over and it was a pain to find the right formula, meaning: one that would match with the built-in ones. After several study and comparison, I still didn't find the algorithm that match with the MT5's built-in simple ADX ...
Enjoy!
Patrones de entrada/salida V.1.0 -BETA-Este algoritmo intenta identificar patrones o fractales dentro de los movimientos de precios para dar señales de compra o venta de activos.
Zero Lag MACD Enhanced - Version 1.1ENHANCED ZERO LAG MACD
Version 1.1
Based on ZeroLag EMA - see Technical Analysis of Stocks and Commodities, April 2000
Original version by user Glaz. Thanks !
Ideas and code from @yassotreyo version.
Tweaked by Albert Callisto (AC)
New features:
Added original signal line formula
Added optional EMA on MACD
Added filling between the MACD and signal line
I looked at other versions of the zero lag and noticed that the histogram was slightly different. After looking at other zero lags on TV, I noticed that the algorithm implementation of Glanz generated a modified signal line. I decided to add the old version to be compliant with the original algorithm that you will find in other platforms like MT4, FXCM, etc.
So now you can choose if you want the original algorithm or Glanz version. It's up to you then to choose which one you prefer. I also added an extra EMA applied on the MACD. This is used in a system I am currently studying and can be of some interest to filter out false signals.
Acc/Dist. Cloud with Fractal Deviation Bands by @XeL_ArjonaACCUMULATION / DISTRIBUTION CLOUD with MORPHIC DEVIATION BANDS
Ver. 2.0.beta.23:08:2015
by Ricardo M. Arjona @XeL_Arjona
DISCLAIMER
The Following indicator/code IS NOT intended to be a formal investment advice or recommendation by the author, nor should be construed as such. Users will be fully responsible by their use regarding their own trading vehicles/assets.
The embedded code and ideas within this work are FREELY AND PUBLICLY available on the Web for NON LUCRATIVE ACTIVITIES and must remain as is.
Pine Script code MOD's and adaptations by @XeL_Arjona with special mention in regard of:
Buy (Bull) and Sell (Bear) "Power Balance Algorithm by Vadim Gimelfarb published at Stocks & Commodities V. 21:10 (68-72).
Custom Weighting Coefficient for Exponential Moving Average (nEMA) adaptation work by @XeL_Arjona with contribution help from @RicardoSantos at TradingView @pinescript chat room.
Morphic Numbers (PHI & Plastic) Pine Script adaptation from it's algebraic generation formulas by @XeL_Arjona
Fractal Deviation Bands idea by @XeL_Arjona
CHANGE LOG:
ACCUMULATION / DISTRIBUTION CLOUD: I decided to change it's name from the Buy to Sell Pressure. The code is essentially the same as older versions and they are the center core (VORTEX?) of all derived New stuff which are:
MORPHIC NUMBERS: The "Golden Ratio" expressed by the result of the constant "PHI" and the newer and same in characteristics "Plastic Number" expressed as "PN". For more information about this regard take a look at: HERE!
CUSTOM(K) EXPONENTIAL MOVING AVERAGE: Some code has cleaned from last version to include as custom function the nEMA , which use an additional input (K) to customise the way the "exponentially" is weighted from the custom array. For the purpose of this indicator, I implement a volatility algorithm using the Average True Range of last 9 periods multiplied by the morphic number used in the fractal study. (Golden Ratio as default) The result is very similar in response to classic EMA but tend to accelerate or decelerate much more responsive with wider bars presented in trending average.
FRACTAL DEVIATION BANDS: The main idea is based on the so useful Standard Deviation process to create Bands in favor of a multiplier (As John Bollinger used in it's own bands) from a custom array, in which for this case is the "Volume Pressure Moving Average" as the main Vortex for the "Fractallitly", so then apply as many "Child bands" using the older one as the new calculation array using the same morphic constant as multiplier (Like Fibonacci but with other approach rather than %ratios). Results are AWSOME! Market tend to accelerate or decelerate their Trend in favor of a Fractal approach. This bands try to catch them, so please experiment and feedback me your own observations.
EXTERNAL TICKER FOR VOLUME DATA: I Added a way to input volume data for this kind of study from external tickers. This is just a quicky-hack given that currently TradingView is not adding Volume to their Indexes so; maybe this is temporary by now. It seems that this part of the code is conflicting with intraday timeframes, so You are advised.
This CODE is versioned as BETA FOR TESTING PROPOSES. By now TradingView Admins are changing lot's of things internally, so maybe this could conflict with correct rendering of this study with special tickers or timeframes. I will try to code by itself just the core parts of this study in order to use them at discretion in other areas. ALL NEW IDEAS OR MODIFICATIONS to these indicator(s) are Welcome in favor to deploy a better and more accurate readings. I will be very glad to be notified at Twitter or TradingView accounts at: @XeL_Arjona
Unicorn Trade Indicator - Enhanced V1This code also contains pinescripts from iFVG (BPR) by Algorize and Visualizing displacement by tradeforopp who have kindly provided them as open source.
An ICT Unicorn is where a breaker block is traded through which incorporates a fair value gap. I decided to code this indicator as I couldn't find an existing free indicator on Trading View that performed adequately.
This indicator will highlight breaker blocks and when broken will post an Unicorn emoji and send an alert if requested. The last 3 breaker blocks are displayed, the prior boxes are labled PBB and are shown as red for bearish and green for bullish. After the main Unicorn is posted, the code continues to mark market structure shifts.
As all trading strategies work better with confluence I have added several other features which is very useful for people who are restricted on the number of indicators that can place on a single chart.
I have added iFVG (BPR) by Algoryze and Visualizing displacement by tradeforopp which have kindly been made open source by the authors. My thanks to them for their hard work.
Unicorn alerts will only be sent when a yellow displacement candle ( from the Visualizing displacement code) is present along with the Unicorn as this is the best type of Unicorn to trade.
The number of fvg's and bpr's from the code by Algoryze can be adjusted in the settings.
Also to add confluence I have used my own code to display liquidity depth boxes made popular by toodegrees.
I hope you find this indicator useful.
Advanced Multi-Timeframe Trend & Signal System═══════════════════════════════════════════════════════════════
ADVANCED MULTI-TIMEFRAME TREND & SIGNAL SYSTEM v1.0
═══════════════════════════════════════════════════════════════
Created by: Zakaria Safri
License: Mozilla Public License 2.0
A comprehensive technical analysis tool designed for traders seeking
multi-dimensional market insights. This indicator combines proven
technical analysis methods with modern visualization techniques.
═══════════════════════════════════════════════════════════════
KEY FEATURES
═══════════════════════════════════════════════════════════════
✓ SUPERTREND SIGNAL GENERATION
- Customizable sensitivity settings
- Clear long/short entry signals
- Automatic trend direction detection
- ATR-based dynamic calculations
✓ MULTI-TIMEFRAME DASHBOARD
- Real-time trend analysis across 6 timeframes
- Synchronized trend confirmation
- Customizable table position and size
- Current: 1M, 5M, 15M, 1H, 1D coverage
✓ QQE REVERSAL DETECTION
- Quantitative Qualitative Estimation algorithm
- Early reversal signal identification
- Adjustable RSI and smoothing parameters
- Confirmation-based plotting
✓ DYNAMIC SUPPORT & RESISTANCE
- Pivot-based level calculation
- Quick and standard pivot detection
- Color-coded zones (8 levels)
- Automatic level updates
✓ MOMENTUM BREAKOUT SIGNALS
- Ichimoku-inspired calculations
- Bullish and bearish breakout detection
- Visual zone highlighting
- Trend confirmation filters
✓ RISK MANAGEMENT SYSTEM
- ATR-based stop loss calculation
- Multiple take profit targets (TP1, TP2, TP3)
- Customizable risk-to-reward ratios
- Dynamic price level tracking
- Hit detection markers
✓ VOLATILITY BANDS
- Keltner Channel implementation
- Multiple band layers (3 levels)
- EMA-based calculations
- Adaptive to market conditions
✓ TREND CLOUD VISUALIZATION
- Dual moving average cloud
- Clear trend direction indication
- Customizable color scheme
- Trend bar coloring
═══════════════════════════════════════════════════════════════
HOW TO USE
═══════════════════════════════════════════════════════════════
SETUP:
1. Add indicator to your chart
2. Configure sensitivity in Core Signals section
3. Enable desired features (signals, reversals, breakouts)
4. Set up risk management levels if trading
5. Position MTF dashboard to preference
SIGNAL INTERPRETATION:
• LONG Signal: Price crosses above Supertrend
• SHORT Signal: Price crosses below Supertrend
• REV (Reversal): QQE indicates potential trend change
• Diamond Breakouts: Momentum shift confirmation
• T1/T2/T3: Take profit level hits
MULTI-TIMEFRAME ANALYSIS:
• Green (BULL): Higher timeframe supports uptrend
• Red (BEAR): Higher timeframe supports downtrend
• Use for trend alignment and confirmation
• Best results when multiple timeframes align
RISK MANAGEMENT:
• Enable Stop Loss for automatic SL calculation
• Activate TP levels based on trading style
• Adjust Risk-to-Reward ratio (1:1 to 1:10)
• Monitor hit detection circles for exits
═══════════════════════════════════════════════════════════════
TECHNICAL SPECIFICATIONS
═══════════════════════════════════════════════════════════════
CALCULATIONS:
• Supertrend: ATR-based with customizable multiplier
• QQE: Modified RSI with Wilders smoothing
• Keltner Channels: EMA basis with ATR bands
• Pivots: Standard left/right bar methodology
• Support/Resistance: Multi-level pivot analysis
PARAMETERS:
• Supertrend Sensitivity: 0.5 to 10.0 (default: 2.0)
• RSI Period: 5 to 50 (default: 14)
• QQE Multiplier: 1.0 to 10.0 (default: 4.238)
• Risk-to-Reward: 1 to 10 (default: 4)
TIMEFRAMES:
Compatible with all timeframes. MTF dashboard displays:
• 1 Minute (1M)
• 5 Minutes (5M)
• 15 Minutes (15M)
• 1 Hour (1H)
• 1 Day (1D)
• Current chart timeframe
═══════════════════════════════════════════════════════════════
CUSTOMIZATION OPTIONS
═══════════════════════════════════════════════════════════════
VISUAL:
• Professional color scheme (Cyan/Orange)
• Adjustable table position (9 positions)
• Table size options (tiny/small/normal/large)
• Transparent zone highlighting
• Clean, modern label design
TOGGLES:
• Enable/disable any feature independently
• Show/hide signals, reversals, breakouts
• Toggle S/R levels and zones
• Control trend cloud and bands
• Master trend line optional
ALERTS:
The indicator provides visual signals that can be used with
TradingView's alert system by setting alerts on the indicator.
═══════════════════════════════════════════════════════════════
BEST PRACTICES
═══════════════════════════════════════════════════════════════
✓ Combine signals for higher probability setups
✓ Use MTF dashboard for trend confirmation
✓ Respect S/R levels for entry/exit planning
✓ Monitor QQE reversals at key price levels
✓ Adjust sensitivity based on asset volatility
✓ Test on demo/paper trading first
✓ Use proper risk management always
═══════════════════════════════════════════════════════════════
IMPORTANT DISCLAIMER
═══════════════════════════════════════════════════════════════
This indicator is a technical analysis tool and does NOT:
• Guarantee profitable trades
• Provide financial advice
• Predict future price movements with certainty
• Replace proper risk management
• Substitute for personal due diligence
Past performance does not indicate future results. All trading
involves risk. Users should:
- Understand the indicator's logic
- Test thoroughly before live trading
- Use appropriate position sizing
- Never risk more than they can afford to lose
- Consult financial advisors if needed
═══════════════════════════════════════════════════════════════
CODING STANDARDS
═══════════════════════════════════════════════════════════════
This indicator follows PineCoders Coding Conventions:
✓ Proper variable naming (prefixes: i_, f_, c_)
✓ Clear function documentation
✓ Organized code structure
✓ Type declarations
✓ Efficient calculations
✓ No repainting (confirmed signals)
✓ Proper use of request.security
═══════════════════════════════════════════════════════════════
SUPPORT & UPDATES
═══════════════════════════════════════════════════════════════
Version: 1.0
Author: Zakaria Safri
License: MPL 2.0
Last Updated: 2024
For questions, feedback, or suggestions, please comment below.
═══════════════════════════════════════════════════════════════
#trading #signals #supertrend #multiTimeframe #QQE #reversals
#supportResistance #riskManagement #trendAnalysis #momentum
Liquidity Swap Detector Ultimate - Cedric JeanjeanAdvanced Smart Money Concepts indicator designed to detect high-probability liquidity sweeps and institutional order flow reversals. This professional-grade tool combines multiple ICT (Inner Circle Trader) strategies to identify optimal entry points.
═══════════════════════════════════════════════════════
📊 KEY FEATURES:
✅ Smart Swing Detection
- Identifies confirmed swing highs and lows using adaptive lookback periods
- Eliminates false signals through double-confirmation logic
- Detects liquidity grabs at key market structure points
✅ Fair Value Gap (FVG) Analysis
- Multi-timeframe FVG detection for enhanced accuracy
- Filters imbalances by minimum size threshold
- Combines current timeframe and higher timeframe FVGs
✅ Advanced Volatility Filter
- ATR-based volatility analysis to avoid low-quality setups
- Adjustable volatility threshold (default 0.35%)
- Ensures entries during optimal market conditions
✅ Precision Signal Generation
- LONG signals: Confirmed swing lows + FVG + volatility confirmation
- SHORT signals: Confirmed swing highs + FVG + volatility confirmation
- Clear visual markers with price labels
✅ Comprehensive Alert System
- Three alert types: Simple, Detailed, JSON (for webhooks)
- Separate LONG/SHORT alert controls
- Compatible with MT5 integration via webhooks
- TradingView native alertcondition support
✅ Professional Dashboard
- Real-time ATR monitoring
- Volatility percentage display
- FVG status indicator
- Alert status tracker
═══════════════════════════════════════════════════════
⚙️ CUSTOMIZABLE PARAMETERS:
🔹 Lookback Swing (1-50): Defines swing detection sensitivity
🔹 ATR Multiplier: Controls wick filter strength
🔹 Volatility Filter: Minimum required market volatility (%)
🔹 FVG Filter: Minimum fair value gap size (%)
🔹 FVG Timeframe: Higher timeframe for multi-TF analysis
🔹 Visual Options: Toggle swing marks, FVG zones, labels
🔹 Alert Controls: Enable/disable LONG/SHORT notifications
═══════════════════════════════════════════════════════
📈 HOW IT WORKS:
1. The indicator scans for confirmed swing points using a robust double-confirmation algorithm
2. Simultaneously analyzes Fair Value Gaps on both current and higher timeframes
3. Validates market volatility to ensure sufficient price movement
4. Generates precise entry signals when all conditions align
5. Triggers customizable alerts for instant notification
═══════════════════════════════════════════════════════
🎯 BEST PRACTICES:
- Use on liquid markets (Forex majors, indices, crypto)
- Recommended timeframes: 15m, 1H, 4H
- Combine with support/resistance for confirmation
- Adjust lookback period based on market volatility
- Test alert settings before live trading
- Use JSON alerts for automated trading integration
═══════════════════════════════════════════════════════
⚡ ALERT CONFIGURATION:
1. Click the Alert icon (bell) in TradingView
2. Select "Liquidity Swap Detector Ultimate - TITAN v6"
3. Choose your preferred alert condition:
- LONG Signal: Only bullish setups
- SHORT Signal: Only bearish setups
- ANY Signal: All trading opportunities
4. Set expiration and notification preferences
5. For MT5 integration: Select "JSON" message type and configure webhook URL
Smart MACD Volume Trader# Smart MACD Volume Trader
## Overview
Smart MACD Volume Trader is an enhanced momentum indicator that combines the classic MACD (Moving Average Convergence Divergence) oscillator with an intelligent high-volume filter. This combination significantly reduces false signals by ensuring that trading signals are only generated when price momentum is confirmed by substantial volume activity.
The indicator supports over 24 different instruments including major and exotic forex pairs, precious metals (gold and silver), energy commodities (crude oil, natural gas), and industrial metals (copper). For forex and commodity traders, the indicator automatically maps to CME and COMEX futures contracts to provide accurate institutional-grade volume data.
## Originality and Core Concept
Traditional MACD indicators generate signals based solely on price momentum, which can result in numerous false signals during low-activity periods or ranging markets. This indicator addresses this critical weakness by introducing a volume confirmation layer with automatic institutional volume integration.
**What makes this approach original:**
- Signals are triggered only when MACD crossovers coincide with elevated volume activity
- Implements a lookback mechanism to detect volume spikes within recent bars
- Automatically detects and maps 24+ forex pairs and commodities to their corresponding CME and COMEX futures contracts
- Provides real institutional volume data for forex pairs where spot volume is unreliable
- Combines two independent market dimensions (price momentum and volume) into a single, actionable signal
- Includes intelligent asset detection that works across multiple exchanges and ticker formats
**The underlying principle:** Volume validates price movement. When institutional money enters the market, it creates volume signatures. By requiring high volume confirmation and using actual institutional volume data from futures markets, this indicator filters out weak price movements and focuses on trades backed by genuine market participation. The automatic futures mapping ensures that forex and commodity traders always have access to the most accurate volume data available, without manual configuration.
## How It Works
### MACD Component
The indicator calculates MACD using standard methodology:
1. **Fast EMA (default: 12 periods)** - Tracks short-term price momentum
2. **Slow EMA (default: 26 periods)** - Tracks longer-term price momentum
3. **MACD Line** - Difference between Fast EMA and Slow EMA
4. **Signal Line (default: 9-period SMA)** - Smoothed average of MACD line
**Crossover signals:**
- **Bullish:** MACD line crosses above Signal line (momentum turning positive)
- **Bearish:** MACD line crosses below Signal line (momentum turning negative)
### Volume Filter Component
The volume filter adds an essential confirmation layer:
1. **Volume Moving Average** - Calculates exponential MA of volume (default: 20 periods)
2. **High Volume Threshold** - Multiplies MA by ratio (default: 2.0x or 200%)
3. **Volume Detection** - Identifies bars where current volume exceeds threshold
4. **Lookback Period** - Checks if high volume occurred in recent bars (default: 5 bars)
**Signal logic:**
- Buy/Sell signals only trigger when BOTH conditions are met:
- MACD crossover/crossunder occurs
- High volume detected within lookback period
### Automatic CME Futures Integration
For forex traders, spot FX volume data can be unreliable or non-existent. This indicator solves this problem by automatically detecting forex pairs and mapping them to corresponding CME futures contracts with real institutional volume data.
**Supported Major Forex Pairs (7):**
- EURUSD → CME:6E1! (Euro FX Futures)
- GBPUSD → CME:6B1! (British Pound Futures)
- AUDUSD → CME:6A1! (Australian Dollar Futures)
- USDJPY → CME:6J1! (Japanese Yen Futures)
- USDCAD → CME:6C1! (Canadian Dollar Futures)
- USDCHF → CME:6S1! (Swiss Franc Futures)
- NZDUSD → CME:6N1! (New Zealand Dollar Futures)
**Supported Exotic Forex Pairs (4):**
- USDMXN → CME:6M1! (Mexican Peso Futures)
- USDRUB → CME:6R1! (Russian Ruble Futures)
- USDBRL → CME:6L1! (Brazilian Real Futures)
- USDZAR → CME:6Z1! (South African Rand Futures)
**Supported Cross Pairs (6):**
- EURJPY → CME:6E1! (Uses Euro Futures)
- GBPJPY → CME:6B1! (Uses British Pound Futures)
- EURGBP → CME:6E1! (Uses Euro Futures)
- AUDJPY → CME:6A1! (Uses Australian Dollar Futures)
- EURAUD → CME:6E1! (Uses Euro Futures)
- GBPAUD → CME:6B1! (Uses British Pound Futures)
**Supported Precious Metals (2):**
- Gold (XAUUSD, GOLD) → COMEX:GC1! (Gold Futures)
- Silver (XAGUSD, SILVER) → COMEX:SI1! (Silver Futures)
**Supported Energy Commodities (3):**
- WTI Crude Oil (USOIL, WTIUSD) → NYMEX:CL1! (Crude Oil Futures)
- Brent Oil (UKOIL) → NYMEX:BZ1! (Brent Crude Futures)
- Natural Gas (NATGAS) → NYMEX:NG1! (Natural Gas Futures)
**Supported Industrial Metals (1):**
- Copper (COPPER) → COMEX:HG1! (Copper Futures)
**How the automatic detection works:**
The indicator intelligently identifies the asset type by analyzing:
1. Exchange name (FX, OANDA, TVC, COMEX, NYMEX, etc.)
2. Currency pair pattern (6-letter codes like EURUSD, GBPUSD)
3. Commodity identifiers (XAU for gold, XAG for silver, OIL for crude)
When a supported instrument is detected, the indicator automatically switches to the corresponding futures contract for volume analysis. For stocks, cryptocurrencies, and other assets, the indicator uses the native volume data from the current chart.
**Visual feedback:**
An information table appears in the top-right corner of the MACD pane showing:
- Current chart symbol
- Exchange name
- Currency pair or asset name
- Volume source being used (highlighted in orange for futures, yellow for native volume)
- Current high volume status
This provides complete transparency about which data source the indicator is using for its volume analysis.
## How to Use
### Basic Setup
1. Add the indicator to your chart
2. The indicator displays in a separate pane (MACD) and overlay (signals/volume bars)
3. Default settings work well for most assets, but can be customized
### Signal Interpretation
### Visual Signals
**Visual Signals:**
- **Green "BUY" label** - Bullish MACD crossover confirmed by high volume
- **Red "SELL" label** - Bearish MACD crossunder confirmed by high volume
- **Green/Red candles** - Highlight bars with volume exceeding the threshold
- **Light green/red background** - Emphasizes signal bars on the chart
**Information Table:**
A detailed information table appears in the top-right corner of the MACD pane, providing real-time transparency about the indicator's operation:
- **Chart:** Current symbol being analyzed
- **Exchange:** The exchange or data feed being used
- **Pair:** The currency pair or asset name extracted from the ticker
- **Volume From:** The actual symbol used for volume analysis
- Orange color indicates CME or COMEX futures are being used (automatic institutional volume)
- Yellow color indicates native volume from the chart symbol is being used
- Hover tooltip shows whether automatic futures mapping is active
- **High Volume:** Current status showing YES (green) when volume exceeds threshold, NO (gray) otherwise
This table ensures complete transparency and allows you to verify that the correct volume source is being used for your analysis.
**Volume Analysis:**
- Gray histogram bars = Normal volume
- Red histogram bars = High volume (exceeds threshold)
- Green line = Volume moving average baseline
**MACD Analysis:**
- Blue line = MACD line (momentum indicator)
- Orange line = Signal line (trend confirmation)
- Gray dotted line = Zero line (bullish above, bearish below)
### Parameter Customization
**MACD Parameters:**
- Adjust Fast/Slow EMA lengths for different sensitivities
- Shorter periods = More signals, faster response
- Longer periods = Fewer signals, less noise
**Volume Parameters:**
- **Volume MA Period:** Higher values smooth volume analysis
- **High Volume Ratio:** Lower values (1.5x) = More signals; Higher values (3.0x) = Fewer, stronger signals
- **Volume Lookback Bars:** Controls how recent the volume spike must be
**Direction Filters:**
- **Only Buy Signals:** Enables long-only strategy mode
- **Only Sell Signals:** Enables short-only strategy mode
### Alert Configuration
The indicator includes three alert types:
1. **Buy Signal Alert** - Triggers when bullish signal appears
2. **Sell Signal Alert** - Triggers when bearish signal appears
3. **High Volume Alert** - Triggers when volume exceeds threshold
To set up alerts:
1. Click the indicator name → "Add alert on Smart MACD Volume Trader"
2. Select desired alert condition
3. Configure notification method (popup, email, webhook, etc.)
## Trading Strategy Guidelines
### Best Practices
**Recommended markets:**
- Liquid stocks (large-cap, high daily volume)
- Major forex pairs (EURUSD, GBPUSD, USDJPY, AUDUSD, USDCAD, USDCHF, NZDUSD)
- Exotic forex pairs (USDMXN, USDRUB, USDBRL, USDZAR)
- Cross pairs (EURJPY, GBPJPY, EURGBP, AUDJPY, EURAUD, GBPAUD)
- Precious metals (Gold, Silver with automatic COMEX futures mapping)
- Energy commodities (Crude Oil, Natural Gas with automatic NYMEX futures mapping)
- Industrial metals (Copper with automatic COMEX futures mapping)
- Major cryptocurrency pairs
- Index futures and ETFs
**Timeframe recommendations:**
- **Day trading:** 5-minute to 15-minute charts
- **Swing trading:** 1-hour to 4-hour charts
- **Position trading:** Daily charts
**Risk management:**
- Use signals as entry confirmation, not standalone strategy
- Combine with support/resistance levels
- Consider overall market trend direction
- Always use stop-loss orders
### Strategy Examples
**Trend Following Strategy:**
1. Identify overall trend using higher timeframe (e.g., daily chart)
2. Trade only in trend direction
3. Use "Only Buy" filter in uptrends, "Only Sell" in downtrends
4. Enter on signal, exit on opposite signal or at resistance/support
**Volume Breakout Strategy:**
1. Wait for consolidation period (low volume, tight MACD range)
2. Enter when signal appears with high volume (confirms breakout)
3. Target previous swing highs/lows
4. Stop loss below/above recent consolidation
**Forex Scalping Strategy (with automatic CME futures):**
1. The indicator automatically detects forex pairs and uses CME futures volume
2. Trade during active sessions only (use session filter)
3. Focus on quick profits (10-20 pips)
4. Exit at opposite signal or profit target
**Commodities Trading Strategy (Gold, Silver, Oil):**
1. The indicator automatically maps to COMEX and NYMEX futures contracts
2. Trade during high-liquidity sessions (overlap of major markets)
3. Use the high volume confirmation to identify institutional entry points
4. Combine with key support and resistance levels for entries
5. Monitor the information table to confirm futures volume is being used (orange color)
6. Exit on opposite MACD signal or at predefined profit targets
## Why This Combination Works
### The Volume Advantage
Studies consistently show that price movements accompanied by high volume are more likely to continue, while low-volume movements often reverse. This indicator leverages this principle by requiring volume confirmation.
**Key benefits:**
1. **Reduced False Signals:** Eliminates MACD whipsaws during low-volume consolidation
2. **Confirmation Bias:** Two independent indicators (price momentum + volume) agreeing
3. **Institutional Alignment:** High volume often indicates institutional participation
4. **Trend Validation:** Volume confirms that price momentum has "conviction"
### Statistical Edge
By combining two uncorrelated signals (MACD crossovers and volume spikes), the indicator creates a higher-probability setup than either signal alone. The lookback mechanism ensures signals aren't missed if volume spike slightly precedes the MACD cross.
## Supported Exchanges and Automatic Detection
The indicator includes intelligent asset detection that works across multiple exchanges and ticker formats:
**Forex Exchanges (Automatic CME Mapping):**
- FX (TradingView forex feed)
- OANDA
- FXCM
- SAXO
- FOREXCOM
- PEPPERSTONE
- EASYMARKETS
- FX_IDC
**Commodity Exchanges (Automatic COMEX/NYMEX Mapping):**
- TVC (TradingView commodity feed)
- COMEX (directly)
- NYMEX (directly)
- ICEUS
**Other Asset Classes (Native Volume):**
- Stock exchanges (NASDAQ, NYSE, AMEX, etc.)
- Cryptocurrency exchanges (BINANCE, COINBASE, KRAKEN, etc.)
- Index providers (SP, DJ, etc.)
The detection algorithm analyzes three factors:
1. Exchange prefix in the ticker symbol
2. Pattern matching for currency pairs (6-letter codes)
3. Commodity identifiers in the symbol name
This ensures accurate automatic detection regardless of which data feed or exchange you use for charting. The information table in the top-right corner always displays which volume source is being used, providing complete transparency.
## Technical Details
**Calculations:**
- MACD Fast MA: EMA(close, fastLength)
- MACD Slow MA: EMA(close, slowLength)
- MACD Line: Fast MA - Slow MA
- Signal Line: SMA(MACD Line, signalLength)
- Volume MA: Exponential MA of volume
- High Volume: Current volume >= Volume MA × Ratio
**Signal logic:**
```
Buy Signal = (MACD crosses above Signal) AND (High volume in last N bars)
Sell Signal = (MACD crosses below Signal) AND (High volume in last N bars)
```
## Parameters Reference
| Parameter | Default | Description |
|-----------|---------|-------------|
| Volume Symbol | Blank | Manual override for volume source (leave blank for automatic detection) |
| Use CME Futures | False | Legacy option (automatic detection is now built-in) |
| Alert Session | 1530-2200 | Active session time range for alerts |
| Timezone | UTC+1 | Timezone for alert sessions |
| Volume MA Period | 20 | Number of periods for volume moving average |
| High Volume Ratio | 2.0 | Volume threshold multiplier (2.0 = 200% of average) |
| Volume Lookback | 5 | Number of bars to check for high volume confirmation |
| MACD Fast Length | 12 | Fast EMA period for MACD calculation |
| MACD Slow Length | 26 | Slow EMA period for MACD calculation |
| MACD Signal Length | 9 | Signal line SMA period |
| Only Buy | False | Filter to show only bullish signals |
| Only Sell | False | Filter to show only bearish signals |
| Show Signals | True | Display buy and sell labels on chart |
## Optimization Tips
**For volatile markets (crypto, small caps):**
- Increase High Volume Ratio to 2.5-3.0
- Reduce Volume Lookback to 3-4 bars
- Consider faster MACD settings (8, 17, 9)
**For stable markets (large-cap stocks, bonds):**
- Decrease High Volume Ratio to 1.5-1.8
- Increase Volume MA Period to 30-50
- Use standard MACD settings
**For forex (with automatic CME futures):**
- The indicator automatically uses CME futures when forex pairs are detected
- Set appropriate trading session based on your timezone
- Use Volume Lookback of 5-7 bars
- Consider session-based alerts only
- Monitor the information table to verify correct futures mapping
**For commodities (Gold, Silver, Oil, Copper):**
- The indicator automatically maps to COMEX and NYMEX futures
- Increase High Volume Ratio to 2.0-2.5 for metals
- Use slightly higher Volume MA Period (25-30) for smoother analysis
- Trade during active market hours for best volume data
- The information table will show the futures contract being used (orange highlight)
## Limitations and Considerations
**What this indicator does NOT do:**
- Does not predict future price direction
- Does not guarantee profitable trades
- Does not replace proper risk management
- Does not work well in extremely low-volume conditions
**Market conditions to avoid:**
- Pre-market and after-hours sessions (low volume)
- Major news events (volatile, unpredictable volume)
- Holidays and low-liquidity periods
- Extremely low float stocks
## Conclusion
Smart MACD Volume Trader represents a significant evolution of the traditional MACD indicator by combining volume confirmation with automatic institutional volume integration. This dual-confirmation approach significantly improves signal quality by filtering out low-conviction price movements and ensuring traders work with accurate volume data.
The indicator's automatic detection and mapping system supports over 24 instruments across forex, commodities, and metals markets. By intelligently switching to CME and COMEX futures contracts when appropriate, the indicator provides forex and commodity traders with the same quality of volume data that stock traders naturally have access to.
This indicator is particularly valuable for traders who want to:
- Align their entries with institutional money flow
- Avoid getting trapped in false breakouts
- Trade forex pairs with reliable volume data
- Access accurate volume information for gold, silver, and energy commodities
- Combine momentum and volume analysis in a single, streamlined tool
Whether you are day trading stocks, swing trading forex pairs, or positioning in commodities markets, this indicator provides a robust framework for identifying high-probability momentum trades backed by genuine institutional participation. The automatic futures mapping works seamlessly across all supported instruments, requiring no manual configuration or expertise in futures markets.
---
## Support and Updates
This indicator is actively maintained and updated based on user feedback and market conditions. For questions about implementation or custom modifications, please use the comments section below.
**Disclaimer:** This indicator is for educational and informational purposes only. Past performance does not guarantee future results. Always conduct your own analysis and risk management before trading.
Range Oscillator (Zeiierman)█ Overview
Range Oscillator (Zeiierman) is a dynamic market oscillator designed to visualize how far the price is trading relative to its equilibrium range. Instead of relying on traditional overbought/oversold thresholds, it uses adaptive range detection and heatmap coloring to reveal where price is trading within a volatility-adjusted band.
The oscillator maps market movement as a heat zone, highlighting when the price approaches the upper or lower range boundaries and signaling potential breakout or mean-reversion conditions.
Highlights
Adaptive range detection based on ATR and weighted price movement.
Heatmap-driven coloring that visualizes volatility pressure and directional bias.
Clear transition zones for detecting trend shifts and equilibrium points.
█ How It Works
⚪ Range Detection
The indicator identifies a dynamic price range using two main parameters:
Minimum Range Length: The number of bars required to confirm that a valid range exists.
Range Width Multiplier: Expands or contracts the detected range proportionally to the ATR (Average True Range).
This approach ensures that the oscillator automatically adapts to both trending and ranging markets without manual recalibration.
⚪ Weighted Mean Calculation
Instead of a simple moving average, the script calculates a weighted equilibrium mean based on the size of consecutive candle movements:
Larger price changes are given greater weight, emphasizing recent volatility.
⚪ Oscillator Formula
Once the range and equilibrium mean are defined, the oscillator computes:
Osc = 100 * (Close - Mean) / RangeATR
This normalizes price distance relative to the dynamic range size — producing consistent readings across volatile and quiet periods.
█ Heatmap Logic
The Range Oscillator includes a built-in heatmap engine that color-codes each oscillator value based on recent price interaction intensity:
Strong Bullish Zones: Bright green — price faces little resistance upward.
Weak Bullish Zones: Muted green — uptrend continuation but with minor hesitation.
Transition Zones: Blue — areas of uncertainty or trend shift.
Weak Bearish Zones: Maroon — downtrend pressure but soft momentum.
Strong Bearish Zones: Bright red — strong downside continuation with low resistance.
Each color band adapts dynamically using:
Number of Heat Levels: Controls granularity of the heatmap.
Minimum Touches per Level: Defines how reactive or “sensitive” each color zone is.
█ How to Use
⚪ Trend & Momentum Confirmation
When the oscillator stays above +0 with green coloring, it suggests sustained bullish pressure.
Similarly, readings below –0 with red coloring, it suggests sustained bearish pressure.
⚪ Range Breakouts
When the oscillator line breaks above +100 or below –100, the price is exceeding its normal volatility range, often signaling breakout potential or exhaustion extremes.
⚪ Mean Reversion Trades
Look for the oscillator to cross back toward zero after reaching an extreme. These transitions (often marked by blue tones) can identify early reversals or range resets.
⚪ Divergence
Use oscillator peaks and troughs relative to price action to spot hidden strength or weakness before the next move.
█ Settings
Minimum Range Length: Number of bars needed to confirm a valid range.
Range Width Multiplier: Expands or contracts range width based on ATR.
Number of Heat Levels: Number of gradient bands used in the oscillator.
Minimum Touches per Level: Sensitivity threshold for when a zone becomes “hot.”
-----------------
Disclaimer
The content provided in my scripts, indicators, ideas, algorithms, and systems is for educational and informational purposes only. It does not constitute financial advice, investment recommendations, or a solicitation to buy or sell any financial instruments. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
PINs & Engulfing fr ATR_DWhy do most Pin Bar detection indicators use a ratio of shadow to body size? It often leads to somewhat subjective settings. The indicator may signal on very small candles (since a tiny body can still meet the shadow-to-body ratio filter), while ignoring more significant ones (because the body size exceeds the predefined proportion limits).
What I need is a timely display of the simple fact that the current price movement has changed sharply (within one or two bars: a Pin Bar or an Engulfing pattern), indicating new market force. This shift can be used either as a signal to trade in that direction now (join the impulse) or to mark the price level of that pattern for future reference (e.g., if the level is broken later without reaction).
Therefore, I define candle parameters as percentages of ATR_D (average daily price range — a simple average over the last 30 days).
I typically use this indicator on H4, as I’m only interested in truly significant price reactions. That’s why the default input values are 30 and 35, reflecting my focus on larger movements. If you plan to use this algorithm on lower timeframes, you will need to adjust the parameters visually to suit smaller ranges.
USAGE
I use these patterns only as an additional signal at significant levels or in conjunction with other strong factors (e.g., overextension, divergences, etc.).
RUS:
Почему-то во всех индикаторах для определения ПИН-баров используется коэффициент отношения тени к телу свечи, и в итоге получаются какие-то не совсем объективные настройки. Индикатор начинает сигналить про мелкие свечки (ведь хвостик больше мизерного тельца, и соответствует фильтру отбора) и игнорировать нормальные (из-за того что тело свечи оказалось крупнее указанных пропорций )
Мне же нужно своевременно отобразить просто сам факт того, что текущее движение достаточно резко изменилось (в рамках одной или двух свечей ), и это изменение можно рассматривать как некую новую силу в рынке, и можно поработать в ее направлении сейчас , либо взять ценовой уровень этой фигуры на заметку/на будущее )
Поэтому я указываю параметры свечки в процентах от ATR_D (средний проход цены за день )
Я использую индикатор на H4,, т.к. мне интересны только реально существенные реакции в движениях цены, поэтому по умолчанию во входных параметрах стоят размеры свечек 30 и 35.
Если же понадобится этот алгоритм на меньших таймфреймах, то нужно будет визуально подобрать меньшие пропорции для вычисления фигур.
saodisengxiaoyu-lianghua-2.1- This indicator is a modular, signal-building framework designed to generate long and short signals by combining a chosen leading indicator with selectable confirmation filters. It runs on Pine Script version 5, overlays directly on price, and is built to be highly configurable so traders can tailor the signal logic to their market, timeframe, and trading style. It includes a dashboard to visualize which conditions are active and whether they validate a signal, and it outputs clear buy/sell labels and alert conditions so you can automate or monitor trades with confidence.
Core Design
- Leading Indicator: You choose one primary signal generator from a broad list (for example, Range Filter, Supertrend, MACD, RSI, Ichimoku, and many others). This serves as the anchor of the system and determines when a preliminary long or short setup exists.
- Confirmation Filters: You can enable additional filters that validate the leading signal before it becomes actionable. Each “respect…” input toggles a filter on or off. These filters include popular tools like EMA, 2/3 EMA crosses, RQK (Nadaraya Watson), ADX/DMI, Bollinger-based oscillators, MACD variations, QQE, Hull, VWAP, Choppiness Index, Damiani Volatility, and more.
- Signal Expiry: To avoid waiting indefinitely for confirmations, the indicator counts how many consecutive bars the leading condition holds. If confirmations do not align within a defined number of bars, the setup expires. This controls latency and helps reduce late or stale entries.
- Alternating Signals: An optional mode enforces alternation (long must follow short and vice versa), helping avoid repeated entries in the same direction without a meaningful reset.
- Aggregation Logic: The final long/short conditions are formed by combining the leading condition with all selected confirmation filters through logical conjunction. Only if all enabled filters validate the signal (within expiry constraints) does the indicator consider it a confirmed long or short.
- Visualization and Alerts: The script plots buy/sell labels at signal points, provides alert conditions for automation, and displays a compact dashboard summarizing the leading indicator’s status and each confirmation’s pass/fail result using checkmarks.
Leading Indicator Options
- The indicator includes a very large menu of leading tools, each with its own logic to determine uptrend or downtrend impulses. Highlights include:
- Range Filter: Uses a dynamic centerline and bands computed via conditional EMA/SMA and range sizing to define directional movement. It can operate in a default mode or an alternative “DW” mode.
- Rational Quadratic Kernel (RQK): Applies a kernel smoothing model (Nadaraya Watson) to detect uptrends and downtrends with a focus on noise reduction.
- Supertrend, Half Trend, SSL Channel: Classic trend-following tools that derive direction from ATR-based bands or moving average channels.
- Ichimoku Cloud and SuperIchi: Multi-component systems validating trend via cloud position, conversion/base line relationships, projected cloud, and lagging span.
- TSI (True Strength Index), DPO (Detrended Price Oscillator), AO (Awesome Oscillator), MACD, STC (Schaff Trend Cycle), QQE Mod: Momentum and cycle tools that parse direction from crossovers, zero-line behavior, and momentum shifts.
- Donchian Trend Ribbon, Chandelier Exit: Trend and exit tools that can validate breakouts or sustained trend strength.
- ADX/DMI: Measures trend strength and directional movement via +DI/-DI relationships and minimum ADX thresholds.
- RSI and Stochastic: Use crossovers, level exits, or threshold filters to gate entries based on overbought/oversold dynamics or relative strength trends.
- Vortex, Chaikin Money Flow, VWAP, Bull Bear Power, ROC, Wolfpack Id, Hull Suite: A diverse set of directional, momentum, and volume-based indicators to suit different markets and styles.
- Trendline Breakout and Range Detector: Price-behavior filters that confirm signals during breakouts or within defined ranges.
Confirmation Filters
- Each filter is optional. When enabled, it must validate the leading condition for a signal to pass. Examples:
- EMA Filter: Requires price to be above a specified EMA for longs and below for shorts, filtering signals that contradict broader trend or baseline levels.
- 2 EMA Cross and 3 EMA Cross: Enforce moving average cross conditions (fast above slow for long, the reverse for short) or a three-line stacking logic for more stringent trend alignment.
- RQK, Supertrend, Half Trend, Donchian, QQE, Hull, MACD (crossover vs. zero-line), AO (zero line or AC momentum variants), SSL: Each adds its characteristic validation pattern.
- RSI family (MA cross, exits OB/OS zones, threshold levels) plus RSI MA direction and RSI/RSI MA limits: Multiple ways to constrain signals via relative strength behavior and trajectories.
- Choppiness Index and Damiani Volatility: Prevent entries during ranging conditions or insufficient volatility; choppiness thresholds and volatility states gate the trade.
- VWAP, Volume modes (above MA, simple up/down, delta), Chaikin Money Flow: Volume and flow conditions that ensure signals happen in supportive liquidity or accumulation/distribution contexts.
- ADX/DMI thresholds: Demand a minimum trend strength and directional DI alignment to reduce whipsaw trades.
- Trendline Breakout and Range Detector: Confirm that the price is breaking structure or remains within active range consistent with the leading setup.
- By combining several filters you can create strict, conservative entries or looser setups depending on your goals.
Range Filter Engine
- A core building block, the Range Filter uses conditional EMA and SMA functions to compute adaptive bands around a dynamic centerline. It supports two types:
- Type 1: The centerline updates when price exceeds the band thresholds; bands define acceptable drift ranges.
- Type 2: Uses quantized steps (via floor operations) relative to the previous centerline to handle larger moves in discrete increments.
- The engine offers smoothing for range values using a secondary EMA and can switch between raw and averaged outputs. Its hi/lo bands and centerline compose a corridor that defines directional movement and potential breakout confirmation.
Signal Construction
- The script computes:
- leadinglongcond and leadingshortcond : The primary directional signals from the chosen leading indicator.
- longCond and shortCond : Final signals formed by combining the leading conditions with all enabled confirmations. Each confirmation contributes a boolean gate. If a filter is disabled, it contributes a neutral pass-through, keeping the logic intact without enforcing that condition.
- Expiry Logic: The code counts consecutive bars where the leading condition remains true. If confirmations do not line up within the user-defined “Signal Expiry Candle Count,” the setup is abandoned and the signal does not trigger.
- Alternation: An optional state ensures that long and short signals alternate. This can reduce repeated entries in the same direction without a clear reset.
- Finally, longCondition and shortCondition represent the actionable signals after expiry and alternation logic. These drive the label plotting and alert conditions.
Visualization
- Buy and Sell Labels: When longCondition or shortCondition confirm, the script plots annotated labels directly on the chart, making entries easy to see at a glance. The labels use color coding and clear text tags (“long” vs. “short”).
- Dashboard: A table summarizes the status of the leading indicator and all confirmations. Each row shows the indicator label and whether it passed (✔️) or failed (❌) on the current bar. This intensely practical UI helps you diagnose why a signal did or did not trigger, empowering faster strategy iteration and parameter tuning.
- Failed Confirmation Markers: If a setup expires (count exceeds the limit) and confirmations failed to align, the script can mark the chart with a small label and provide a tooltip listing which confirmations did not pass. It’s a helpful audit trail to understand missed trades or prevent “chasing” invalid signals.
- Data Window Values: The script outputs signal states to the data window, which can be useful for debugging or building composite conditions in multi-indicator templates.
Inputs and Parameters
- You control the indicator from a comprehensive input panel:
- Setup: Signal expiry count, whether to enforce alternating signals, and whether to display labels and the dashboard (including position and size).
- Leading Indicator: Choose the primary signal generator from the large list.
- Per-Filter Toggles: For each confirmation, a respect... toggle enables or disables it. Many include sub-options (like MACD type, Stochastic mode, RSI mode, ADX variants, thresholds for choppiness/volatility, etc.) to fine-tune behavior.
- Range Filter Settings: Choose type and behavior; select default vs. DW mode and smoothing. The underlying functions adjust band sizes using ATR, average change, standard deviation, or user-defined scales.
- Because everything is customizable, you can adapt the indicator to different assets, volatility regimes, and timeframes.
Alerts and Automation
- The script defines alert conditions tied to longCondition and shortCondition . You can set these alerts in your chart to trigger notifications or webhook calls for automated execution in external bots. The alert text is simple, and you can configure your own message template when creating alerts in the chart, including JSON payloads for algorithmic integration.
Typical Workflow
- Select a Leading Indicator aligned with your style. For trend following, Supertrend or SSL may be appropriate; for momentum, MACD or TSI; for range/trend-change detection, Range Filter, RQK, or Donchian.
- Add a few key Confirmation Filters that complement the leading signal. For example:
- Pair Supertrend with EMA Filter and RSI MA Direction to ensure trend alignment and positive momentum.
- Combine MACD Crossover with ADX/DMI and Volume Above MA to avoid signals in low-trend or low-liquidity conditions.
- Use RQK with Choppiness Index and Damiani Volatility to only act when the market is trending and volatile enough.
- Set a sensible Signal Expiry Candle Count. Shorter expiry keeps entries timely and reduces lag; longer expiry captures setups that mature slowly.
- Observe the Dashboard during live markets to see which filters pass or fail, then iterate. Tighten or loosen thresholds and filter combinations as needed.
- For automation, turn on alerts for the final conditions and use webhook payloads to notify your trading robot.
Strengths and Practical Notes
- Flexibility: The indicator is a toolkit rather than a single rigid model. It lets you test different combinations rapidly and visualize outcomes immediately.
- Clarity: Labels, dashboard, and failed-confirmation markers make it easy to audit behavior and refine settings without digging into code.
- Robustness: The expiry and alternation options add discipline, avoiding the temptation to enter late or repeatedly in one direction without a reset.
- Modular Design: The logical gates (“respect…”) make the behavior transparent: if a filter is on, it must pass; if it’s off, the signal ignores it. This keeps reasoning clean.
- Avoiding Overfitting: Because you can stack many filters, it’s tempting to over-constrain signals. Start simple (one leading indicator and one or two confirmations). Add complexity only if it demonstrably improves your edge across varied market regimes.
Limitations and Recommendations
- No single configuration is universally optimal. Markets change; tune filters for the instrument and timeframe you trade and revisit settings periodically.
- Trend filters can underperform in choppy markets; likewise, momentum filters can false-trigger in quiet periods. Consider using Choppiness Index or Damiani to gate signals by regime.
- Use expiry wisely. Too short may miss good setups that need a few bars to confirm; too long may cause late entries. Balance responsiveness and accuracy.
- Always consider risk management externally (position sizing, stops, profit targets). The indicator focuses on signal quality; combining it with robust trade management methods will improve results.
Example Configurations
- Trend-Following Setup:
- Leading: Supertrend uptrend for longs and downtrend for shorts.
- Confirmations: EMA Filter (price above 200 EMA for long, below for short), ADX/DMI (trend strength above threshold with +DI/-DI alignment), Volume Above MA.
- Expiry: 3–4 bars to keep entries timely.
- Result: Strong bias toward sustained moves while avoiding weak trends and thin liquidity.
- Mean-Reversion to Momentum Crossover:
- Leading: RSI exits from OB/OS zones (e.g., RSI leaves oversold for long and leaves overbought for short).
- Confirmations: 2 EMA Cross (fast crossing slow in the same direction), MACD zero-line behavior for added momentum validation.
- Expiry: 2–3 bars for responsive re-entry.
- Result: Captures momentum transitions after short-term extremes, with extra confirmation to reduce head-fakes.
- Range Breakout Focus:
- Leading: Range Filter Type 2 or Donchian Trend Ribbon to detect breakouts.
- Confirmations: Damiani Volatility (avoid low-volatility false breaks), Choppiness Index (prefer trend-ready states), ROC positive/negative threshold.
- Expiry: 1–3 bars to act on breakout windows.
- Result: Better alignment to breakout dynamics, gating trades by volatility and regime.
Conclusion
- This indicator is a comprehensive, configurable framework that merges a chosen leading signal with an array of corroborating filters, disciplined expiry handling, and intuitive visualization. It’s designed to help you build high-quality entry signals tailored to your approach, whether that’s trend-following, breakout trading, momentum capturing, or a hybrid. By surfacing pass/fail states in a dashboard and allowing alert-based automation, it bridges the gap between discretionary analysis and systematic execution. With sensible parameter tuning and thoughtful filter selection, it can serve as a robust backbone for signal generation across diverse instruments and timeframes.






















