KryptOkib Supply and Demand with AlertsAs the name suggests, this is a supply and demand indicator script with alerts that i have made based on sole price actions. I have used 3 different methods of identifying supply and demand zones and tested to make sure they work. Nonetheless some zones will fail as no strategy is 100% and some zone will fail due to other reasons.
How this works:
As a basic rule, demand and supply zones can easily be identified from the base of a drop to a rally or vice versa and the base of a rally to a new rally, hence rally base rally, drop base rally for demand zones and rally base drop and drop base drop for supply zones.
While that is true, i basically search for areas where demand/bulls overpower supply/bears and vice versa with a strong move away. So not all the base are a consideration in this script unless we see a clear sign of bulls overpowering bears, or say demand overpowering supply and bears overpowering bulls or say supply overpowering demand. Several rules has been put in place to identify and filter this out so you may have a Rally Base Drop get ignored by this indicator as it do not meet my requirement.
Once this pattern is detected by the script using either of the 3 price action methods, and then a breakout of the basing candles occurs, the indicator paints the candlestick that broke out of the range/base with a different color, which is blue for demand breakout candle, and orange for a supply breakdown candle as circled on the chart.
The algorithm makes sure that this breakout candles follow strict rules set by mean of which 1 is a very bullishly closing breakout candle for demand or a very bearishly closing candle for a supply, with a follow through candle which is the next trading period /candle.
it is strongly recommended that you wait for the close of the next candlestick before attempting to take the demand/supply zone formed as there are further calculations done on the follow through breakout candle to make sure the demand/supply is a good one, the candle might be painted before the close of the next candle but after the close, the paint will be removed due to the fact that the zone no longer meets strict criteria as defined by me.
It is also suggested that you use the alert function that comes with script and wait for the alert to come through before taking the demand if you cannot wait for the second breakout candle to close as the alert will be fired only on close of the second follow through breakout candle.
One of the strict rules is wanting to see strong bullish/bearish presence apart from the way the breakout candle closes, there are many rules to filter out ugly zones, even though some good zones get caught up in this as well.
Identification of Zones:
Demand Zone: the previous candle open or high(based on personal preference) will be the proximal, where you start to draw your demand zone and the low of the basing/ranging candles or swing low will be the distal, where you end your demand zone as seen on the chart. Stop loss goes under this.
Supply Zone: The previous candle open or low will be the proximal, where the supply zone starts and the high of the range/basing candles or swing will be the distal where the supply zone ends as seen on the chart. Stop loss goes above this
Note that some zones with a-lot of basing candles tend to fail, while some tend to work, i have not algorithmically filtered this as i prefer to examine with eyes the zones alerted to me and take the ones with lesser basing candles.
Generally, Rally Base Rally and Drop Base Drop zones are mostly weaker than the other type of zones but sometimes works perfectly.
How to use Alert Function:
- Go on the ticker you will like to set alert for
- Go on the timeframe you wish to be alerted for
- Right Click on the chart and select Add Alert or Alt + A (keyboard combination)
- Under Condition, click the arrow down and select "KryptOkib SAND"
- Under Options, select "Once Per Bar Close"
- Set Expiration and Alert Actions as you prefer.
- Click on "Create" Button
That is it.
You can repeat this process for all other tickers you wish to have alerts for and you will be notified once price movement has met the conditions outlined in the script.
This is an invite only indicator, to request access to it, kindly do the following:
- Add indicator to favorite
- Make Sure you follow me
- Send me a PM requesting access.
Once this is done and PM received, access will be granted.
Further updates will come along once there are changes to be made or new calculations to add.
Works on any market of choice.
Search in scripts for "bear"
Combo VIX and DXYHello traders
It's been a while :)
I wanted to share a cool script that you can use for any asset class.
The script isn't really special - though what it displays is super helpful
Volatility Index $VIX
(Source: Wikipedia)
VIX is the ticker symbol and the popular name for the Chicago Board Options Exchange's CBOE Volatility Index, a popular measure of the stock market's expectation of volatility based on S&P 500 index options.
It is calculated and disseminated on a real-time basis by the CBOE, and is often referred to as the fear index or fear gauge.
I consider that a $VIX above 30% is a very bearish signal.
Above 30% translating investors selling in masse their assets. #blood #on #the #street
Dollar Index $DXY
(Source: Wikipedia)
The U.S. Dollar Index (USDX, DXY, DX, or, informally, the "Dixie") is an index (or measure) of the value of the United States dollar relative to a basket of foreign currencies, often referred to as a basket of U.S. trade partners' currencies.
The Index goes up when the U.S. dollar gains "strength" (value) when compared to other currencies.
The index is designed, maintained, and published by ICE (Intercontinental Exchange, Inc.), with the name "U.S. Dollar Index" a registered trademark.
It is a weighted geometric mean of the dollar's value relative to following select currencies:
Euro (EUR), 57.6% weight
Japanese yen (JPY) 13.6% weight
Pound sterling (GBP), 11.9% weight
Canadian dollar (CAD), 9.1% weight
Swedish krona (SEK), 4.2% weight
Swiss franc (CHF) 3.6% weight
In "bear markets", the $DXY usually goes up.
People are selling their hard assets to get some $USD in return - pumping the $DXY higher
Corollary
I'm not sure which one happens first between a bearish $DXY or bearish $DXY... though both are usually correlated
If:
- $VIX goes above 30%, usually $DXY increases and assets versus the good old' $USD drop
- $VIX goes below 30%, usually $DXY decreases and assets versus the good old' $USD increases
This is a nice lever effect between both the $VIX, $DXY and the assets versus the $USD
That's being said, I don't only use those 2 information to enter in a trade.
It gives me though a strong confirmation whenever I'm long or short
Imagine I get a LONG signal but the combo $VIX + $DXY is bearish... this tells me to be cautious and to:
- enter at a pullback
- protect my position quickly at breakeven
- take my profit quick
For a mega bull market (some called it hyperinflation), you want your fiat to drop in value for the counter-asset to increase in value.
And before you ask.... yes I look at what $DXY is doing before taking a trade on $BTCUSD :)
In other words, $DXY going down is quite bullish for Bitcoin.
Settings and Alerts
The settings by default are the ones I use for my trading.
The background colors will be colored whenever the COMBO is bullish (green) or bearish (red)
Alerts are enabled using the brand new alert function published last week by @TradingView
That's it for today, I hope you'll like it :)
PS: In this chart above, I'm using the Supertrend indicator from @KivancOzbilgic
Dave
Traders Dynamic Index(TDI) + Momentum Candles[CW_Trades]The Traders Dynamic Index(TDI) is a trend, momentum and volatility indicator. The TDI is comprised of a standard Relative Strength Index(RSI) line, but also includes an RSI signal line, Bollinger Bands of the RSI and adjusted horizontal overbought/oversold levels. This version of the TDI offers the ability to color the RSI line based on RSI momentum. This version colors the horizontal background levels of the RSI depending on whether price is in a bull trend or bear trend. This version also allows you to color the price candles based on RSI momentum.
When reading the TDI the first line you want to look at is the RSI line, which is the line that changes color. The RSI line in this indicator is set to a lookback period of 13 rather than 14 as in the standard RSI indicator.
-The RSI line color is derived from the line's horizontal position(0-100). When the RSI line is between 45-55 the RSI line will be gray which indicates no momentum, or that price is neutral.
-When the RSI line is above 55 the line will be colored shades of green which indicate bullish price momentum:
--55-60 = dark green = weak bullish momentum
--60-70 = green = bullish momentum
--70-80 = light green = strong bullish momentum
--above 80 = bright green = extreme/overbought bullish momentum
---The brighter the shade of green the stronger the bullish momentum.
-When the RSI line is below 45 the line will be colored shades of purple which indicate bearish price momentum:
--45-40 = dark purple = weak bearish momentum
--40-30 = purple = bearish momentum
--30-20 = light purple = strong bearish momentum
--below 20 = bright purple = extreme/oversold bearish momentum
---The brighter the shade of purple the stronger the bearish momentum.
The next line in the TDI is the RSI Signal Line and it is an 8-period average of the RSI. The RSI Signal Line shows short-term trend in momentum. When the RSI line is above the RSI signal line the short-term momentum trend is considered bullish. When the RSI line is below the RSI signal line the short-term momentum trend is considered bullish.
The next set of lines you want to look at after the RSI line are the Bollinger Bands of the RSI, which are preset to the color blue. The RSI Bollinger Bands are read just as standard price Bollinger Bands in that the RSI trending above the middle of the bands is considered bullish and an RSI line trending below the middle of the bands is considered bearish. Breaches above the upper Bollinger Band and breaches below the lower Bollinger Band are considered to be signs of extreme volatility. A breach of the upper band indicates that momentum is extremely volatile to upside and price could potentially reverse, or make a short-term top. When this occurs the RSI line is colored yellow. When the RSI line breaches the lower Bollinger Band it indicates that momentum is extremely volatile to the downside and price could potentially reverse, or make a short-term bottom. When this occurs the RSI line is colored red.
Along with watching where the RSI line is relative to the Bollinger Bands, you also want to watch where the middle Bollinger Band is on the horizontal range(0-100). When the middle Bollinger Band is above 50 it indicates intermediate-term bullish momentum. When the middle Bollinger Band gets near or above 70 it usually marks a short-term top or end of a bull rally. When the middle Bollinger Band is below 50 it indicates intermediate-term bearish momentum. When the middle Bollinger Band gets near or below 30 it usually marks a short-term bottom or end of a bear rally.
When the middle Bollinger Band crosses above and below the horizontal 50 level it changes the color of the TDI background. When the middle band is above 50 the background is colored green and when the middle band is below 50 the background is colored purple. The green background will fill the 40-80 levels and is where you want to see most of the RSI line action during a bull trend in price. When the RSI is mostly trending between 40-80 the overall trend behind price is considered bullish. The purple background will fill the 20-60 levels and is where most of the RSI line action will be during a bear trend in price. When the RSI line is mostly trending between 20-60 the overall trend behind price is considered bearish.
The TDI is a great tool for any trader, especially if you already use the RSI indicator since the TDI is basically and improved/advanced RSI.
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.
FiFT Pro---- INTRODUCTION ----
This indicator is to measure the strength of BULL and BEAR.
The formulars are based on Price Change and Volume for period of time.
On top of that, Overbought (OB) and Oversold (OS) signal is included which is based on stochastic calculation.
FiFT is come with BoD signal which indicating Potential Buy on Dip setup.
FiFT Pro is further enhance to detect BULL "is about to rally" on Uptrend chart. It is a potential "further buy" signal.
---- HOW TO READ ----
GREEN BAR = BULL is stronger than BEAR
RED BAR = BEAR is stronger than BULL
BLUE BAR = POTENTIAL BoD Signal
BoD (Buy on Dip)
BOD on GREEN (With Star) = Price is oversold, Fast Turtle Buy in BULLISH environment (Strong Buy)
BOD on RED = Price is oversold, Fast Turtle Buy in BEARISH environment (Risk Buy/Do not buy/Monitor)
OB (Overbought) = Fast Turtle Sell with OverBought condition.
OB on GREEN = Price is overbought, Fast Turtle Sell in BULLISH environment (Cautious/Do not sell/Monitor)
OB on RED = Price is overbought, Fast Turtle Sell in BEARISH environment (Strong Sell)
+ve Sign = Potential BULLISH activities (Can consider further Buy IF it's uptrend EMA20 > EMA50)
-ve Sig n = Potential BEARISH activities (Can consider take profit/Sell)
Note : Best use with " EMA Indicators with BUY sell Signal " indicator
Average Sentiment OscillatorDescription of this indicator from its author:
Average Sentiment Oscillator
Momentum oscillator of averaged bull/bear percentages.
We suggest using it as a relatively accurate way to gauge the sentiment of a given period of candles, as a trend filter or for entry/exit signals.
It’s a combination of two algorithms, both essentially the same but applied in a different way. The first one analyzes the bullish/bearishness of each bar using OHLC prices then averages all percentages in the period group of bars (eg. 10) to give the final % value. The second one treats the period group of bars as one bar and then determines the sentiment percentage with the OHLC points of the group. The first one is noisy but more accurate in respect to intra-bar sentiment, whereas the second gives a smoother result and adds more weight to the range of price movement. They can be used separately as Mode 1 and Mode 2 in the indicator settings, or combined as Mode 0.
Original indicator idea from Benjamin Joshua Nash, converted from MT4 version
Usage:
The blue line is Bulls %, red line is Bears %. As they are both percentages of 100, they mirror each other. The higher line is the dominating sentiment. The lines crossing the 50% centreline mark the shift of power between bulls and bears, and this often provides a good entry or exit signal, i.e. if the blue line closes above 50% on the last bar, Buy or exit Sell, if the red line closes above 50% on the last bar, Sell or exit Buy. These entries are better when average volume is high.
It's also possible to see the relative strength of the swings/trend, i.e. a blue peak is higher than the preceding red one. A clear divergence can be seen in the picture as the second bullish peak registers as a lower strength on the oscillator but moved higher on the price chart. By setting up levels at the 70% and 30% mark the oscillator can also be used for trading overbought/oversold levels similar to a Stochastic or RSI. As is the rule with most indicators, a smaller period gives more leading signals and a larger period gives less false signals.
TradeChartist PowerTracer™TradeChartist PowerTracer is an exceptionally well designed and functional indicator, requiring minimal user input to trace the asset's Bull and Bear Power. The indicator makes it visually engaging with its various color schemes and intelligent positioning of the PowerTracer Bar, tracking not just the current trend, but also the developing trend using a visually easy to understand Power plots.
What does ™TradeChartist PowerTracer do?
1. Tracks Bull and Bear Power and plots the information visually on chart using one of the following 3 Power plot options based on high or low power detection sensitivity.
𝗣𝗼𝘄𝗲𝗿𝗧𝗿𝗮𝗰𝗲𝗿 - Plot of the Bull and Bear Power Oscillator, pivotal to this script that tracks the true Bull and Bear Power along with Bull/Bear oscillator reading, calculated dynamically using a unique and original formula. Values beyond 50 and -50 are quite rare, but theoretically, they can go beyond 80 and -80. 𝗣𝗼𝘄𝗲𝗿𝗧𝗿𝗮𝗰𝗲𝗿's highs and lows are also tracked and updated real-time using labels placed exactly at the Highs and Lows with their readings.
Bar-wise Power Holder - Absolute Bull and Bear power of each bar. It is plotted by calculating the difference between Bull and Bear Power or each bar. The values can swing between -100 and +100 even though values above 90 and below 90 are rare. The bar color on the chart will be painted using this value to visually display the Bull/Bear strength if "Paint Bars on Chart" is enabled from the indicator settings.
Bar-wise Power Fight - Plot of Maximum Bull and Bear Power of every bar that helps visualize the fight between Bulls and Bears in each bar.
2. Visually displays the Balance of Power between the Bulls and the Bears using Opponent Power Gain background fill when it is 50% or over. For example, if the current PowerTracer plot is a Bull zone, enabling this setting with Opponent Power Gain % set at 75, will paint the background when Bear Power increases beyond 75% using the Bear Power Intensity fill based on Color Scheme the user opts from the settings. This option can be enabled or disabled from settings and the Opponent Power gain % (minimum 50%) can also be adjusted to spot the change in price trend early on.
3. Uses an accompanying 𝗣𝗼𝘄𝗲𝗿𝗧𝗿𝗮𝗰𝗲𝗿 bar that helps spot the true bull and bear power using simple linear blocks, displaying the power level using power intensity colors based on the color scheme.
4. Paints price bars and PowerTracer background using Power intensity colors based on Color Scheme from the indicator settings, which helps spot the increase or decrease in Bull and Bear Power.
5. Inverts bar colors, background fill and PowerTracer bar color to help see price using the Opponent's Point of View.
What markets can this indicator be used on?
-- Forex
-- Stocks - works best with 4hr or above and prices calculated taking gaps into account.
-- Commodities
-- Cryptocurrencies
and almost any asset on Trading View
What time-frames can this indicator be used on?
This indicator can be used on all timeframes. If the asset has very little volume/volatility or is far low in comparative value against the base currency, power detection can be choppy, but with most assets, this won't be an issue.
Does this indicator repaint?
-- No. Real-time Power plots can change colors and values based on current bar close as values get calculated dynamically. Once the bar closes, plots and power intensity colors don't repaint.
-- This can be verified using Bar Replay to check if the plots and fills stay in the same bar in real time as the Bar Replay
Does the indicator send alerts when the power shifts from Bull to Bear or from Bear to Bull?
Yes. Users can get alerts when Power gets shifted using Trading View alerts. This can be done by choosing '™TradeChartist PowerTracer' and 'Powershift to Bulls' or 'Powershift to Bears' under Trading View Alert condition and by using 'Once per bar close' as user needs to wait for candle close for Power shift confirmation.
Example Charts
In this split screen chart of Bitcoin, it can be seen how the 30m chart on left is Bearish and 5m chart on right is Bullish based on Power changes. The trend can be spotted on PowerTracer by spotting the Opponent's background fill that started showing when Opponent's power gained by over 75%. This is a good example using the script for scalping/swing trading using 2 timeframes. Note that the chart on the left shows Price bars and PowerTracer bar with inverted colors to show Opponent's point of view.
In this 15m chart of GBP-USD, 100% Power gain for Entries and Exits is used. This is a more conservative approach and is suited for less aggressive traders based on complete change of trend.
In this 2hr chart of Ethereum, all 3 Power plots are used to identify the trend using low sensitivity using 100% Power Gain entries and this shows how a trade can be held longer to maximise gains using entries with Power shift confirmations.
===================================================================================================================
This is not a free to use indicator. Get in touch with me (PM me directly if you would like trial access to test the indicator)
Premium Scripts - Trial access and Information
Trial access offered on all Premium scripts.
PM me directly to request trial access to the scripts or for more information.
===================================================================================================================
Bar Balance [LucF]Bar Balance extracts the number of up, down and neutral intrabars contained in each chart bar, revealing information on the strength of price movement. It can display stacked columns representing raw up/down/neutral intrabar counts, or an up/down balance line which can be calculated and visualized in many different ways.
WARNING: This is an analysis tool that works on historical bars only. It does not show any realtime information, and thus cannot be used to issue alerts or for automated trading. When realtime bars elapse, the indicator will require a browser refresh, a change to its Inputs or to the chart's timeframe/symbol to recalculate and display information on those elapsed bars. Once a trader understands this, the indicator can be used advantageously to make discretionary trading decisions.
Traders used to work with my Delta Volume Columns Pro will feel right at home in this indicator's Inputs . It has lots of options, allowing it to be used in many different ways. If you value the bar balance information this indicator mines, I hope you will find the time required to master the use of Bar Balance well worth the investment.
█ OVERVIEW
The indicator has two modes: Columns and Line .
Columns
• In Columns mode you can display stacked Up/Down/Neutral columns.
• The "Up" section represents the count of intrabars where `close > open`, "Down" where `close < open` and "Neutral" where `close = open`.
• The Up section always appears above the centerline, the Down section below. The Neutral section overlaps the centerline, split halfway above and below it.
The Up and Down sections start where the Neutral section ends, when there is one.
• The Up and Down sections can be colored independently using 7 different methods.
• The signal line plotted in Line mode can also be displayed in Columns mode.
Line
• Displays a single balance line using a zero centerline.
• A variable number of independent methods can be used to calculate the line (6), determine its color (5), and color the fill (5).
You can thus evaluate the state of 3 different components with this single line.
• A "Divergence Levels" feature will use the line to automatically draw expanding levels on divergence events.
Features available in both modes
• The color of all components can be selected from 15 base colors, with 16 gradient levels used for each base color in the indicator's gradients.
• A zero line can show a 6-state aggregate value of the three main volume balance modes.
• The background can be colored using any of 5 different methods.
• Chart bars can be colored using 5 different methods.
• Divergence and large neutral count ratio events can be shown in either Columns or Line mode, calculated in one of 4 different methods.
• Markers on 6 different conditions can be displayed.
█ CONCEPTS
Intrabar inspection
Intrabar inspection means the indicator looks at lower timeframe bars ( intrabars ) making up a given chart bar to gather its information. If your chart is on a 1-hour timeframe and the intrabar resolution determined by the indicator is 5 minutes, then 12 intrabars will be analyzed for each chart bar and the count of up/down/neutral intrabars among those will be tallied.
Bar Balances and calculation methods
The indicator uses a variety of methods to evaluate bar balance and to derive other calculations from them:
1. Balance on Bar : Uses the relative importance of instant Up and Down counts on the bar.
2. Balance Averages : Uses the difference between the EMAs of Up and Down counts.
3. Balance Momentum : Starts by calculating, separately for both Up and Down counts, the difference between the same EMAs used in Balance Averages and an SMA of double the period used for the EMAs. These differences are then aggregated and finally, a bounded momentum of that aggregate is calculated using RSI.
4. Markers Bias : It sums the bull/bear occurrences of the four previous markers over a user-defined period (the default is 14).
5. Combined Balances : This is the aggregate of the instant bull/bear bias of the three main bar balances.
6. Dual Up/Down Averages : This is a display mode showing the EMA calculated for each of the Up and Down counts.
Interpretation of neutral intrabars
What do neutral intrabars mean? When price does not change during a bar, it can be because there is simply no interest in the market, or because of a perfect balance between buyers and sellers. The latter being more improbable, Bar Balance assumes that neutral bars reveal a lack of interest, which entails uncertainty. That is the reason why the option is provided to interpret ratios of neutral intrabars greater than 50% as divergences. It is also the rationale behind the option to dampen signal lines on the inverse ratio of neutral intrabars, so that zero intrabars do not affect the signal, and progressively larger proportions of neutral intrabars will reduce the signal's amplitude, as the balance calcs using the up/down counts lose significance. The impact of the dampening will vary with markets. Weaker markets such as cryptos will often contain greater numbers of neutral intrabars, so dampening the Line in that sector will have a greater impact than in more liquid markets.
█ FEATURES
1 — Columns
• While the size of the Up/Down columns always represents their respective importance on the bar, their coloring mode is independent. The default setup uses a standard coloring mode where the Up/Down columns over/under the zero line are always in the bull/bear color with a higher intensity for the winning side. Six other coloring modes allow you to pack more information in the columns. When choosing to color the top columns using a bull/bear gradient on Balance Averages, for example, you will end up with bull/bear colored tops. In order for the color of the bottom columns to continue to show the instant bar balance, you can then choose the "Up/Down Ratio on Bar — Dual Solid Colors" coloring mode to make those bars the color of the winning side for that bar.
• Line mode shows only the line, but Columns mode allows displaying the line along with it. If the scale of the line is different than that of the scale of the columns, the line will often appear flat. Traders may find even a flat line useful as its bull/bear colors will be easily distinguishable.
2 — Line
• The default setup for Line mode uses a calculation on "Balance Momentum", with a fill on the longer-term "Balance Averages" and a line color based on the "Markers Bias". With the background set on "Line vs Divergence Levels" and the zero line on the hard-coded "Combined Bar Balances", you have access to five distinct sources of information at a glance, to which you can add divergences, divergences levels and chart bar coloring. This provides powerful potential in displaying bar balance information.
• When no columns are displayed, Line mode can show the full scale of whichever line you choose to calculate because the columns' scale no longer interferes with the line's scale.
• Note that when "Balance on Bar" is selected, the Neutral count is also displayed as a ratio of the balance line. This is the only instance where the Neutral count is displayed in Line mode.
• The "Dual Up/Down Averages" is an exception as it displays two lines: one average for the Up counts and another for the Down counts. This mode will be most useful when Columns are also displayed, as it provides a reference for the top and bottom columns.
3 — Zero Line
The zero line can be colored using two methods, both based on the Combined Balances, i.e., the aggregate of the instant bull/bear bias of the three main bar balances.
• In "Six-state Dual Color Gradient" mode, a dot appears on every bar. Its color reflects the bull/bear state of the Combined Balances, and the dot's brightness reflects the tally of balance biases.
• In "Dual Solid Colors (All Bull/All Bear Only)" a dot only appears when all three balances are either bullish or bearish. The resulting pattern is identical to that of Marker 1.
4 — Divergences
• Divergences are displayed as a small circle at the top of the scale. Four different types of divergence events can be detected. Divergences occur whenever the bull/bear bias of the method used diverges with the bar's price direction.
• An option allows you to include in divergence events instances where the count of neutral intrabars exceeds 50% of the total intrabar count.
• The divergence levels are dynamic levels that automatically build from the line's values on divergence events. On consecutive divergences, the levels will expand, creating a channel. This implementation of the divergence levels corresponds to my view that divergences indicate anomalies, hesitations, points of uncertainty if you will. It excludes any association of a pre-determined bullish/bearish bias to divergences. Accordingly, the levels merely take note of divergence events and mark those points in time with levels. Traders then have a reference point from which they can evaluate further movement. The bull/bear/neutral colors used to plot the levels are also congruent with this view in that they are determined by price's position relative to the levels, which is how I think divergences can be put to the most effective use.
5 — Background
• The background can show a bull/bear gradient on four different calculations. You can adjust its brightness to make its visual importance proportional to how you use it in your analysis.
6 — Chart bars
• Chart bars can be colored using five different methods.
• You have the option of emptying the body of bars where volume does not increase, as does my TLD indicator, the idea behind this being that movement on bars where volume does not increase is less relevant.
7 — Intrabar Resolution
You can choose between three modes. Two of them are automatic and one is manual:
a) Fast, Longer history, Auto-Steps (~12 intrabars) : Optimized for speed and deeper history. Uses an average minimum of 12 intrabars.
b) More Precise, Shorter History Auto-Steps (~24 intrabars) : Uses finer intrabar resolution. It is slower and provides less history. Uses an average minimum of 24 intrabars.
c) Fixed : Uses the fixed resolution of your choice.
Auto-Steps calculations vary for 24/7 and conventional markets in order to achieve the proper target of minimum intrabars.
You can choose to view the intrabar resolution currently used to calculate delta volume. It is the default.
The proper selection of the intrabar resolution is important. It must achieve maximal granularity to produce precise results while not unduly slowing down calculations, or worse, causing runtime errors.
8 — Markers
Six markers are available:
1. Combined Balances Agreement : All three Bar Balances are either bullish or bearish.
2. Up or Down % Agrees With Bar : An up marker will appear when the percentage of up intrabars in an up chart bar is greater than the specified percentage. Conditions mirror to down bars.
3. Divergence confirmations By Price : One of the four types of balance calculations can be used to detect divergences with price. Confirmations occur when the bar following the divergence confirms the balance bias. Note that the divergence events used here do not include neutral intrabar events.
4. Balance Transitions : Bull/bear transitions of the selected balance.
5. Markers Bias Transitions : Bull/bear transitions of the Markers Bias.
6. Divergence Confirmations By Line : Marks points where the line first breaches a divergence level.
Markers appear when the condition is detected, without delay. Since nothing is plotted in realtime, markers do not appear on the realtime bar.
9 — Settings
• Two modes can be selected to dampen the line on the ratio of neutral intrabars.
• A distinct weight can be attributed to the count of the latter half of intrabars, on the assumption that later intrabars may be more important in determining the outcome of chart bars.
• Allows control over the periods of the different moving averages used in calculations.
• The default periods used for the various calculations define the following hierarchy from slow to fast:
Balance Averages: 50,
Balance Momentum: 20,
Dual Up/Down Averages: 20,
Marker Bias: 10.
█ LIMITATIONS
• This script uses a special characteristic of the `security()` function allowing the inspection of intrabars—which is not officially supported by TradingView.
• The method used does not work on the realtime bar—only on historical bars.
• The indicator only works on some chart resolutions: 3, 5, 10, 15 and 30 minutes, 1, 2, 4, 6, and 12 hours, 1 day, 1 week and 1 month. The script’s code can be modified to run on other resolutions, but chart resolutions must be divisible by the lower resolution used for intrabars and the stepping mechanism could require adaptation.
• When using the "Line vs Divergence Levels — Dual Color Gradient" color mode to fill the line, background or chart bars, keep in mind that a line calculation mode must be defined for it to work, as it determines gradients on the movement of the line relative to divergence levels. If the line is hidden, it will not work.
• When the difference between the chart’s resolution and the intrabar resolution is too great, runtime errors will occur. The Auto-Steps selection mechanisms should avoid this.
• Alerts do not work reliably when `security()` is used at intrabar resolutions. Accordingly, no alerts are configured in the indicator.
• The color model used in the indicator provides for fancy visuals that come at a price; when you change values in Inputs , it can take 20 seconds for the changes to materialize. Luckily, once your color setup is complete, the color model does not have a large performance impact, as in normal operation the `security()` calls will become the most important factor in determining response time. Also, once in a while a runtime error will occur when you change inputs. Just making another change will usually bring the indicator back up.
█ RAMBLINGS
Is this thing useful?
I'll let you decide. Bar Balance acts somewhat like an X-Ray on bars. The intrabars it analyzes are no secret; one can simply change the chart's resolution to see the same intrabars the indicator uses. What the indicator brings to traders is the precise count of up/down/neutral intrabars and, more importantly, the calculations it derives from them to present the information in a way that can make it easier to use in trading decisions.
How reliable is Bar Balance information?
By the same token that an up bar does not guarantee that more up bars will follow, future price movements cannot be inferred from the mere count of up/down/neutral intrabars. Price movement during any chart bar for which, let's say, 12 intrabars are analyzed, could be due to only one of those intrabars. One can thus easily see how only relying on bar balance information could be very misleading. The rationale behind Bar Balance is that when the information mined for multiple chart bars is aggregated, it can provide insight into the history behind chart bars, and thus some bias as to the strength of movements. An up chart bar where 11/12 intrabars are also up is assumed to be stronger than the same up bar where only 2/12 intrabars are up. This logic is not bulletproof, and sometimes Bar Balance will stray. Also, keep in mind that balance lines do not represent price momentum as RSI would. Bar Balance calculations have no idea where price is. Their perspective, like that of any historian, is very limited, constrained that it is to the narrow universe of up/down/neutral intrabar counts. You will thus see instances where price is moving up while Balance Momentum, for example, is moving down. When Bar Balance performs as intended, this indicates that the rally is weakening, which does necessarily imply that price will reverse. Occasionally, price will merrily continue to advance on weakening strength.
Divergences
Most of the divergence detection methods used here rely on a difference between the bias of a calculation involving a multi-bar average and a given bar's price direction. When using "Bar Balance on Bar" however, only the bar's balance and price movement are used. This is the default mode.
As usual, divergences are points of interest because they reveal imbalances, which may or may not become turning points. I do not share the overwhelming enthusiasm traders have for the purported ability of bullish/bearish divergences to indicate imminent reversals.
Superfluity
In "The Bed of Procrustes", Nassim Nicholas Taleb writes: To bankrupt a fool, give him information . Bar Balance can display lots of information. While learning to use a new indicator inevitably requires an adaptation period where we put it through its paces and try out all its options, once you have become used to Bar Balance and decide to adopt it, rigorously eliminate the components you don't use and configure the remaining ones so their visual prominence reflects their relative importance in your analysis. I tried to provide flexible options for traders to control this indicator's visuals for that exact reason—not for window dressing.
█ NOTES
For traders
• To avoid misleading traders who don't read script descriptions, the indicator shows nothing in the realtime bar.
• The Data Window shows key values for the indicator.
• All gradients used in this indicator determine their brightness intensities using advances/declines in the signal—not their relative position in a fixed scale.
• Note that because of the way gradients are optimized internally, changing their brightness will sometimes require bringing down the value a few steps before you see an impact.
• Because this indicator does not use volume, it will work on all markets.
For coders
• For those interested in gradients, this script uses an advanced version of the Advance/Decline gradient function from the PineCoders Color Gradient (16 colors) Framework . It allows more precise control over the range, steps and min/max values of the gradients.
• I use the PineCoders Coding Conventions for Pine to write my scripts.
• I used functions modified from the PineCoders MTF Selection Framework for the selection of timeframes.
█ THANKS TO:
— alexgrover who helped me think through the dampening method used to attenuate signal lines on high ratios of neutral intrabars.
— A guy called Kuan who commented on a Backtest Rookies presentation of their Volume Profile indicator . The technique I use to inspect intrabars is derived from Kuan's code.
— theheirophant , my partner in the exploration of the sometimes weird abysses of `security()`’s behavior at intrabar resolutions.
— midtownsk8rguy , my brilliant companion in mining the depths of Pine graphics. He is also the co-author of the PineCoders Color Gradient Frameworks .
888 BOT #alerts█ 888 BOT #alerts
This is an Expert Advisor 'EA' or Automated trading script for ‘longs’ and ‘shorts’, which uses only a Take Profit or, in the worst case, a Stop Loss to close the trade.
It's a much improved version of the previous ‘Repanocha’. It doesn`t use 'Trailing Stop' or 'security ()' functions (although using a security function doesn`t mean that the script repaints) and all signals are confirmed, therefore the script doesn`t repaint in alert mode and is accurate in backtest mode.
Apart from the previous indicators, some more and other functions have been added for Stop-Loss, re-entry and leverage.
It uses 8 indicators, (many of you already know what they are, but in case there is someone new), these are the following:
1. Jurik Moving Average
It's a moving average created by Mark Jurik for professionals which eliminates the 'lag' or delay of the signal. It's better than other moving averages like EMA, DEMA, AMA or T3.
There are two ways to decrease noise using JMA. Increasing the 'LENGTH' parameter will cause JMA to move more slowly and therefore reduce noise at the expense of adding 'lag'
The 'JMA LENGTH', 'PHASE' and 'POWER' parameters offer a way to select the optimal balance between 'lag' and over boost.
Green: Bullish, Red: Bearish.
2. Range filter
Created by Donovan Wall, its function is to filter or eliminate noise and to better determine the price trend in the short term.
First, a uniform average price range 'SAMPLING PERIOD' is calculated for the filter base and multiplied by a specific quantity 'RANGE MULTIPLIER'.
The filter is then calculated by adjusting price movements that do not exceed the specified range.
Finally, the target ranges are plotted to show the prices that will trigger the filter movement.
Green: Bullish, Red: Bearish.
3. Average Directional Index (ADX Classic) and (ADX Masanakamura)
It's an indicator designed by Welles Wilder to measure the strength and direction of the market trend. The price movement is strong when the ADX has a positive slope and is above a certain minimum level 'ADX THRESHOLD' and for a given period 'ADX LENGTH'.
The green color of the bars indicates that the trend is bullish and that the ADX is above the level established by the threshold.
The red color of the bars indicates that the trend is down and that the ADX is above the threshold level.
The orange color of the bars indicates that the price is not strong and will surely lateralize.
You can choose between the classic option and the one created by a certain 'Masanakamura'. The main difference between the two is that in the first it uses RMA () and in the second SMA () in its calculation.
4. Parabolic SAR
This indicator, also created by Welles Wilder, places points that help define a trend. The Parabolic SAR can follow the price above or below, the peculiarity that it offers is that when the price touches the indicator, it jumps to the other side of the price (if the Parabolic SAR was below the price it jumps up and vice versa) to a distance predetermined by the indicator. At this time the indicator continues to follow the price, reducing the distance with each candle until it is finally touched again by the price and the process starts again. This procedure explains the name of the indicator: the Parabolic SAR follows the price generating a characteristic parabolic shape, when the price touches it, stops and turns (SAR is the acronym for 'stop and reverse'), giving rise to a new cycle. When the points are below the price, the trend is up, while the points above the price indicate a downward trend.
5. RSI with Volume
This indicator was created by LazyBear from the popular RSI.
The RSI is an oscillator-type indicator used in technical analysis and also created by Welles Wilder that shows the strength of the price by comparing individual movements up or down in successive closing prices.
LazyBear added a volume parameter that makes it more accurate to the market movement.
A good way to use RSI is by considering the 50 'RSI CENTER LINE' centerline. When the oscillator is above, the trend is bullish and when it is below, the trend is bearish.
6. Moving Average Convergence Divergence (MACD) and (MAC-Z)
It was created by Gerald Appel. Subsequently, the histogram was added to anticipate the crossing of MA. Broadly speaking, we can say that the MACD is an oscillator consisting of two moving averages that rotate around the zero line. The MACD line is the difference between a short moving average 'MACD FAST MA LENGTH' and a long moving average 'MACD SLOW MA LENGTH'. It's an indicator that allows us to have a reference on the trend of the asset on which it is operating, thus generating market entry and exit signals.
We can talk about a bull market when the MACD histogram is above the zero line, along with the signal line, while we are talking about a bear market when the MACD histogram is below the zero line.
There is the option of using the MAC-Z indicator created by LazyBear, which according to its author is more effective, by using the parameter VWAP (volume weighted average price) 'Z-VWAP LENGTH' together with a standard deviation 'STDEV LENGTH' in its calculation.
7. Volume Condition
Volume indicates the number of participants in this war between bulls and bears, the more volume the more likely the price will move in favor of the trend. A low trading volume indicates a lower number of participants and interest in the instrument in question. Low volumes may reveal weakness behind a price movement.
With this condition, those signals whose volume is less than the volume SMA for a period 'SMA VOLUME LENGTH' multiplied by a factor 'VOLUME FACTOR' are filtered. In addition, it determines the leverage used, the more volume, the more participants, the more probability that the price will move in our favor, that is, we can use more leverage. The leverage in this script is determined by how many times the volume is above the SMA line.
The maximum leverage is 8.
8. Bollinger Bands
This indicator was created by John Bollinger and consists of three bands that are drawn superimposed on the price evolution graph.
The central band is a moving average, normally a simple moving average calculated with 20 periods is used. ('BB LENGTH' Number of periods of the moving average)
The upper band is calculated by adding the value of the simple moving average X times the standard deviation of the moving average. ('BB MULTIPLIER' Number of times the standard deviation of the moving average)
The lower band is calculated by subtracting the simple moving average X times the standard deviation of the moving average.
the band between the upper and lower bands contains, statistically, almost 90% of the possible price variations, which means that any movement of the price outside the bands has special relevance.
In practical terms, Bollinger bands behave as if they were an elastic band so that, if the price touches them, it has a high probability of bouncing.
Sometimes, after the entry order is filled, the price is returned to the opposite side. If price touch the Bollinger band in the same previous conditions, another order is filled in the same direction of the position to improve the average entry price, (% MINIMUM BETTER PRICE ': Minimum price for the re-entry to be executed and that is better than the price of the previous position in a given %) in this way we give the trade a chance that the Take Profit is executed before. The downside is that the position is doubled in size. 'ACTIVATE DIVIDE TP': Divide the size of the TP in half. More probability of the trade closing but less profit.
█ STOP LOSS and RISK MANAGEMENT.
A good risk management is what can make your equity go up or be liquidated.
The % risk is the percentage of our capital that we are willing to lose by operation. This is recommended to be between 1-5%.
% Risk: (% Stop Loss x % Equity per trade x Leverage) / 100
First the strategy is calculated with Stop Loss, then the risk per operation is determined and from there, the amount per operation is calculated and not vice versa.
In this script you can use a normal Stop Loss or one according to the ATR. Also activate the option to trigger it earlier if the risk percentage is reached. '% RISK ALLOWED' wich is calculated according with: '%EQUITY ON EACH ENTRY'. Only works with Stop Loss on 'NORMAL' or 'BOTH' mode.
'STOP LOSS CONFIRMED': The Stop Loss is only activated if the closing of the previous bar is in the loss limit condition. It's useful to prevent the SL from triggering when they do a ‘pump’ to sweep Stops and then return the price to the previous state.
█ ALERTS
There is an alert for each leverage, therefore a maximum of 8 alerts can be set for 'long' and 8 for 'short', plus an alert to close the trade with Take Profit or Stop Loss in market mode. You can also place Take Profit limit and Stop Loss limit orders a few seconds after filling the position entry order.
- 'MAXIMUM LEVERAGE': It is the maximum allowed multiplier of the % quantity entered on each entry for 1X according to the volume condition.
- 'ADVANCE ALERTS': There is always a time delay from when the alert is triggered until it reaches the exchange and can be between 1-15 seconds. With this parameter, you can advance the alert by the necessary seconds to activate it earlier. In this way it can be synchronized with the exchange so that the execution time of the entry order to the position coincides with the opening of the bar.
The settings are for Bitcoin at Binance Futures (BTC: USDTPERP) in 30 minutes.
For other pairs and other timeframes, the settings have to be adjusted again. And within a month, the settings will be different because we all know the market and the trend are changing.
█ 888 BOT (SPANISH)
Este es un Expert Advisor 'EA' o script de trading automatizado para ‘longs’ y ‘shorts’, el cual, utiliza solo un Take Profit o, en el peor de los casos, un Stop Loss para cerrar el trade.
Es una versión muy mejorada del anterior ‘Repanocha’. No utiliza ‘Trailing Stop’, ni funciones ‘security()’ (aunque usar una función security no significa que el script repinte) y todas las señales son confirmadas, por consiguiente, el script no repinta en modo alertas y es preciso en en el modo backtest.
Aparte de los anteriores indicadores se han añadido algunos más y otras funciones para Stop-Loss, de re-entrada y apalancamiento.
Utiliza 8 indicadores, (muchos ya sabéis sobradamente lo que son, pero por si hay alguien nuevo), son los siguientes:
1. Jurik Moving Average
Es una media móvil creada por Mark Jurik para profesionales la cual elimina el ‘lag’ o retardo de la señal. Es mejor que otras medias móviles como la EMA, DEMA, AMA o T3.
Hay dos formas de disminuir el ruido utilizando JMA. El aumento del parámetro 'LENGTH' hará que JMA se mueva más lentamente y, por lo tanto, reducirá el ruido a expensas de añadir ‘lag’
Los parámetros 'JMA LENGTH', 'PHASE' y 'POWER' ofrecen una forma de seleccionar el equilibrio óptimo entre ‘lag’ y sobre impulso.
Verde : Alcista, Rojo: Bajista.
2. Range filter
Creado por Donovan Wall, su función es la de filtrar o eliminar el ruido y poder determinar mejor la tendencia del precio a corto plazo.
Primero, se calcula un rango de precio promedio uniforme 'SAMPLING PERIOD' para la base del filtro y se multiplica por una cantidad específica 'RANGE MULTIPLIER'.
A continuación, el filtro se calcula ajustando los movimientos de precios que no exceden el rango especificado.
Por último, los rangos objetivo se trazan para mostrar los precios que activarán el movimiento del filtro.
Verde : Alcista, Rojo: Bajista.
3. Average Directional Index (ADX Classic) y (ADX Masanakamura)
Es un indicador diseñado por Welles Wilder para medir la fuerza y dirección de la tendencia del mercado. El movimiento del precio tiene fuerza cuando el ADX tiene pendiente positiva y está por encima de cierto nivel mínimo 'ADX THRESHOLD' y para un periodo dado 'ADX LENGTH'.
El color verde de las barras indica que la tendencia es alcista y que el ADX está por encima del nivel establecido por el threshold.
El color Rojo de las barras indica que la tendencia es bajista y que el ADX está por encima del nivel de threshold.
El color naranja de las barras indica que el precio no tiene fuerza y seguramente lateralizará.
Se puede elegir entre la opción clásica y la creada por un tal 'Masanakamura'. La diferencia principal entre los dos es que en el primero utiliza RMA() y en el segundo SMA() en su cálculo.
4. Parabolic SAR
Este indicador, creado también por Welles Wilder, coloca puntos que ayudan a definir una tendencia. El Parabolic SAR puede seguir al precio por encima o por debajo, la particularidad que ofrece es que cuando el precio toca al indicador, este salta al otro lado del precio (si el Parabolic SAR estaba por debajo del precio salta arriba y viceversa) a una distancia predeterminada por el indicador. En este momento el indicador vuelve a seguir al precio, reduciendo la distancia con cada vela hasta que finalmente es tocado otra vez por el precio y se vuelve a iniciar el proceso. Este procedimiento explica el nombre del indicador: el Parabolic SAR va siguiendo al precio generando una característica forma parabólica, cuando el precio lo toca, se para y da la vuelta (SAR son las siglas en inglés de ‘stop and reverse’), dando lugar a un nuevo ciclo. Cuando los puntos están por debajo del precio, la tendencia es alcista, mientras que los puntos por encima del precio indica una tendencia bajista.
5. RSI with Volume
Este indicador lo creo un tal LazyBear de TV a partir del popular RSI.
El RSI es un indicador tipo oscilador utilizado en análisis técnico y creado también por Welles Wilder que muestra la fuerza del precio mediante la comparación de los movimientos individuales al alza o a la baja de los sucesivos precios de cierre.
LazyBear le añadió un parámetro de volumen que lo hace más preciso al movimiento del mercado.
Una buena forma de usar el RSI es teniendo en cuenta la línea central de 50 'RSI CENTER LINE'. Cuando el oscilador está por encima, la tendencia es alcista y cuando está por debajo la tendencia es bajista.
6. Moving Average Convergence Divergence (MACD) y (MAC-Z)
Fue creado por Gerald Appel. Posteriormente se añadió el histograma para anticipar el cruce de medias. A grandes rasgos podemos decir que el MACD es un oscilador consistente en dos medias móviles que van girando en torno a la línea de cero. La línea del MACD no es más que la diferencia entre una media móvil corta 'MACD FAST MA LENGTH' y una media móvil larga 'MACD SLOW MA LENGTH'. Es un indicador que nos permite tener una referencia sobre la tendencia del activo sobre el cual se está operando, generando de este modo señales de entrada y salida del mercado.
Podemos hablar de mercado alcista cuando el histograma del MACD se sitúe por encima de la línea cero, junto con la línea de señal, mientras que hablaremos de mercado bajista cuando el histograma MACD se situará por debajo de la línea cero.
Está la opción de utilizar el indicador MAC-Z creado por LazyBear que según su autor es más eficaz, por utilizar el parámetro VWAP (precio medio ponderado por volumen) 'Z-VWAP LENGTH' junto con una desviación standard 'STDEV LENGTH' en su cálculo.
7. Volume Condition
El volumen indica el número de participantes en esta guerra entre toros y osos, cuanto más volumen más probabilidad de que se mueva el precio a favor de la tendencia. Un volumen bajo de negociación indica un menor número de participantes e interés por el instrumento en cuestión. Los bajos volúmenes pueden revelar debilidad detrás de un movimiento de precios.
Con esta condición se filtran aquellas señales cuyo volumen es inferior a la SMA de volumen para un periodo 'SMA VOLUME LENGTH' multiplicado por un factor 'VOLUME FACTOR'. Además, determina el apalancamiento utilizado, a más volumen, más participantes, más probabilidad de que se mueva el precio a nuestro favor, es decir, podemos utilizar más apalancamiento. El apalancamiento en este script lo determina las veces que está el volumen por encima de la línea de la SMA.
El apalancamiento máximo es de 8.
8. Bollinger Bands
Este indicador fue creado por John Bollinger y consiste en tres bandas que se dibujan superpuestas al gráfico de evolución del precio.
La banda central es una media móvil, normalmente se emplea una media móvil simple calculada con 20 períodos. ('BB LENGTH' Número de periodos de la media móvil)
La banda superior se calcula sumando al valor de la media móvil simple X veces la desviación típica de la media móvil. ('BB MULTIPLIER' Número de veces la desviación típica de la media móvil)
La banda inferior de calcula restando a la media móvil simple X veces la desviación típica de la media móvil.
la franja comprendida entre las bandas superior e inferior contiene, estadísticamente, casi un 90% de las posibles variaciones del precio, lo que significa que cualquier movimiento del precio fuera de las bandas tiene especial relevancia.
En términos prácticos, las bandas de Bollinguer se comporta como si de una banda elástica se tratara de manera que, si el precio las toca, éste tiene mucha probabilidad de rebotar.
En ocasiones, después de rellenarse la orden de entrada, el precio se devuelve hacia el lado contrario. Si toca la banda de Bollinger se rellena otra orden en la misma dirección de la posición para mejorar el precio medio de entrada, (% MINIMUM BETTER PRICE': Precio mínimo para que se ejecute la re-entrada y que sea mejor que el precio de la posición anterior en un % dado) de esta manera damos una oportunidad al trade de que el Take Profit se ejecute antes. La desventaja es que se dobla el tamaño de la posición. 'ACTIVATE DIVIDE TP': Divide el tamaño del TP a la mitad. Más probabilidad de que se cierre el trade pero menos ganancias.
█ STOP LOSS y RISK MANAGEMENT.
Una buena gestión de las pérdidas o gestión del riesgo es lo que puede hacer que tu cuenta suba o se liquide en poco tiempo.
El % de riesgo es el porcentaje de nuestro capital que estamos dispuestos a perder por operación. Este se aconseja que debe estar comprendido entre un 1-5%.
% Risk = (% Stop Loss x % Equity per trade x Leverage) / 100
Primero se calcula la estrategia con Stop Loss, después se determina el riesgo por operación y a partir de ahí se calcula el monto por operación y no al revés.
En este script puedes usar un Stop Loss normal o uno según el ATR. También activar la opción de que salte antes si se alcanza el porcentaje de riesgo. '% RISK ALLOWED' que se calcula según el porcentaje de tu capital para 1X '% EQUITY ON EACH ENTRY'.
'STOP LOSS CONFIRMED': Solamente se activa el Stop Loss si el cierre de la barra anterior se encuentra en la condición de límite de pérdidas. Es útil para evitar que se dispare el SL cuando hacen un ‘pump’ para barrer Stops y luego se devuelve el precio a la normalidad.
█ ALERTAS
Hay una alerta por cada apalancamiento por consiguiente como máximo se pueden poner 8 alertas para 'long' y 8 para 'short', más una alerta para cerrar el trade con Take Profit o Stop Loss en modo market. Tambien puedes colocar las ordenes Take Profit limit y Stop Loss limit unos segundos despues de rellenar la orden de entrada de la posición.
- 'MAXIMUM LEVERAGE': Es el máximo multiplicador permitido de la cantidad introducida para 1X según la condición de volumen.
- 'ADVANCE ALERTS': Siempre existe un retardo de tiempo desde que se activa la alerta hasta que llega al exchange y que puede ser de entre 1-15 segundos. Con este párametro se puede adelantar la alerta los segundos necesarios para que se active antes. De este modo se puede sincronizar con el exchange para que el tiempo de ejecución de la orden de entrada a la posición coincida con la de apertura de la barra.
Los settings son para Bitcoin en Binance Futures (BTC:USDTPERP) en 30 minutos.
Para otro pares y otras temporalidades se tienen que ajustar las opciones de nuevo. Además para dentro de un mes, los ajustes serán otros distintos ya que el mercado y la tendencia es cambiante.
888 BOT #backtest█ 888 BOT #backtest
This is an Expert Advisor 'EA' or Automated trading script for ‘longs’ and ‘shorts’, which uses only a Take Profit or, in the worst case, a Stop Loss to close the trade.
It's a much improved version of the previous ‘Repanocha’. It doesn`t use 'Trailing Stop' or 'security()' functions (although using a security function doesn`t mean that the script repaints) and all signals are confirmed, therefore the script doesn`t repaint in alert mode and is accurate in backtest mode.
Apart from the previous indicators, some more and other functions have been added for Stop-Loss, re-entry and leverage.
It uses 8 indicators, (many of you already know what they are, but in case there is someone new), these are the following:
1. Jurik Moving Average
It's a moving average created by Mark Jurik for professionals which eliminates the 'lag' or delay of the signal. It's better than other moving averages like EMA, DEMA, AMA or T3.
There are two ways to decrease noise using JMA. Increasing the 'LENGTH' parameter will cause JMA to move more slowly and therefore reduce noise at the expense of adding 'lag'
The 'JMA LENGTH', 'PHASE' and 'POWER' parameters offer a way to select the optimal balance between 'lag' and over boost.
Green: Bullish, Red: Bearish.
2. Range filter
Created by Donovan Wall, its function is to filter or eliminate noise and to better determine the price trend in the short term.
First, a uniform average price range 'SAMPLING PERIOD' is calculated for the filter base and multiplied by a specific quantity 'RANGE MULTIPLIER'.
The filter is then calculated by adjusting price movements that do not exceed the specified range.
Finally, the target ranges are plotted to show the prices that will trigger the filter movement.
Green: Bullish, Red: Bearish.
3. Average Directional Index (ADX Classic) and (ADX Masanakamura)
It's an indicator designed by Welles Wilder to measure the strength and direction of the market trend. The price movement is strong when the ADX has a positive slope and is above a certain minimum level 'ADX THRESHOLD' and for a given period 'ADX LENGTH'.
The green color of the bars indicates that the trend is bullish and that the ADX is above the level established by the threshold.
The red color of the bars indicates that the trend is down and that the ADX is above the threshold level.
The orange color of the bars indicates that the price is not strong and will surely lateralize.
You can choose between the classic option and the one created by a certain 'Masanakamura'. The main difference between the two is that in the first it uses RMA () and in the second SMA () in its calculation.
4. Parabolic SAR
This indicator, also created by Welles Wilder, places points that help define a trend. The Parabolic SAR can follow the price above or below, the peculiarity that it offers is that when the price touches the indicator, it jumps to the other side of the price (if the Parabolic SAR was below the price it jumps up and vice versa) to a distance predetermined by the indicator. At this time the indicator continues to follow the price, reducing the distance with each candle until it is finally touched again by the price and the process starts again. This procedure explains the name of the indicator: the Parabolic SAR follows the price generating a characteristic parabolic shape, when the price touches it, stops and turns (SAR is the acronym for 'stop and reverse'), giving rise to a new cycle. When the points are below the price, the trend is up, while the points above the price indicate a downward trend.
5. RSI with Volume
This indicator was created by LazyBear from the popular RSI.
The RSI is an oscillator-type indicator used in technical analysis and also created by Welles Wilder that shows the strength of the price by comparing individual movements up or down in successive closing prices.
LazyBear added a volume parameter that makes it more accurate to the market movement.
A good way to use RSI is by considering the 50 'RSI CENTER LINE' centerline. When the oscillator is above, the trend is bullish and when it is below, the trend is bearish.
6. Moving Average Convergence Divergence (MACD) and (MAC-Z)
It was created by Gerald Appel. Subsequently, the histogram was added to anticipate the crossing of MA. Broadly speaking, we can say that the MACD is an oscillator consisting of two moving averages that rotate around the zero line. The MACD line is the difference between a short moving average 'MACD FAST MA LENGTH' and a long moving average 'MACD SLOW MA LENGTH'. It's an indicator that allows us to have a reference on the trend of the asset on which it is operating, thus generating market entry and exit signals.
We can talk about a bull market when the MACD histogram is above the zero line, along with the signal line, while we are talking about a bear market when the MACD histogram is below the zero line.
There is the option of using the MAC-Z indicator created by LazyBear, which according to its author is more effective, by using the parameter VWAP (volume weighted average price) 'Z-VWAP LENGTH' together with a standard deviation 'STDEV LENGTH' in its calculation.
7. Volume Condition
Volume indicates the number of participants in this war between bulls and bears, the more volume the more likely the price will move in favor of the trend. A low trading volume indicates a lower number of participants and interest in the instrument in question. Low volumes may reveal weakness behind a price movement.
With this condition, those signals whose volume is less than the volume SMA for a period 'SMA VOLUME LENGTH' multiplied by a factor 'VOLUME FACTOR' are filtered. In addition, it determines the leverage used, the more volume, the more participants, the more probability that the price will move in our favor, that is, we can use more leverage. The leverage in this script is determined by how many times the volume is above the SMA line.
The maximum leverage is 8.
8. Bollinger Bands
This indicator was created by John Bollinger and consists of three bands that are drawn superimposed on the price evolution graph.
The central band is a moving average, normally a simple moving average calculated with 20 periods is used. ('BB LENGTH' Number of periods of the moving average)
The upper band is calculated by adding the value of the simple moving average X times the standard deviation of the moving average. ('BB MULTIPLIER' Number of times the standard deviation of the moving average)
The lower band is calculated by subtracting the simple moving average X times the standard deviation of the moving average.
the band between the upper and lower bands contains, statistically, almost 90% of the possible price variations, which means that any movement of the price outside the bands has special relevance.
In practical terms, Bollinger bands behave as if they were an elastic band so that, if the price touches them, it has a high probability of bouncing.
Sometimes, after the entry order is filled, the price is returned to the opposite side. If price touch the Bollinger band in the same previous conditions, another order is filled in the same direction of the position to improve the average entry price, (% MINIMUM BETTER PRICE ': Minimum price for the re-entry to be executed and that is better than the price of the previous position in a given %) in this way we give the trade a chance that the Take Profit is executed before. The downside is that the position is doubled in size. 'ACTIVATE DIVIDE TP': Divide the size of the TP in half. More probability of the trade closing but less profit.
█ STOP LOSS and RISK MANAGEMENT.
A good risk management is what can make your equity go up or be liquidated.
The % risk is the percentage of our capital that we are willing to lose by operation. This is recommended to be between 1-5%.
% Risk: (% Stop Loss x % Equity per trade x Leverage) / 100
First the strategy is calculated with Stop Loss, then the risk per operation is determined and from there, the amount per operation is calculated and not vice versa.
In this script you can use a normal Stop Loss or one according to the ATR. Also activate the option to trigger it earlier if the risk percentage is reached. '% RISK ALLOWED'
'STOP LOSS CONFIRMED': The Stop Loss is only activated if the closing of the previous bar is in the loss limit condition. It's useful to prevent the SL from triggering when they do a ‘pump’ to sweep Stops and then return the price to the previous state.
█ BACKTEST
The objective of the Backtest is to evaluate the effectiveness of our strategy. A good Backtest is determined by some parameters such as:
- RECOVERY FACTOR: It consists of dividing the 'net profit' by the 'drawdown’. An excellent trading system has a recovery factor of 10 or more; that is, it generates 10 times more net profit than drawdown.
- PROFIT FACTOR: The ‘Profit Factor’ is another popular measure of system performance. It's as simple as dividing what win trades earn by what loser trades lose. If the strategy is profitable then by definition the 'Profit Factor' is going to be greater than 1. Strategies that are not profitable produce profit factors less than one. A good system has a profit factor of 2 or more. The good thing about the ‘Profit Factor’ is that it tells us what we are going to earn for each dollar we lose. A profit factor of 2.5 tells us that for every dollar we lose operating we will earn 2.5.
- SHARPE: (Return system - Return without risk) / Deviation of returns.
When the variations of gains and losses are very high, the deviation is very high and that leads to a very poor ‘Sharpe’ ratio. If the operations are very close to the average (little deviation) the result is a fairly high 'Sharpe' ratio. If a strategy has a 'Sharpe' ratio greater than 1 it is a good strategy. If it has a 'Sharpe' ratio greater than 2, it is excellent. If it has a ‘Sharpe’ ratio less than 1 then we don't know if it is good or bad, we have to look at other parameters.
- MATHEMATICAL EXPECTATION: (% winning trades X average profit) + (% losing trades X average loss).
To earn money with a Trading system, it is not necessary to win all the operations, what is really important is the final result of the operation. A Trading system has to have positive mathematical expectation as is the case with this script: ME = (0.87 x 30.74$) - (0.13 x 56.16$) = (26.74 - 7.30) = 19.44$ > 0
The game of roulette, for example, has negative mathematical expectation for the player, it can have positive winning streaks, but in the long term, if you continue playing you will end up losing, and casinos know this very well.
PARAMETERS
'BACKTEST DAYS': Number of days back of historical data for the calculation of the Backtest.
'ENTRY TYPE': For '% EQUITY' if you have $ 10,000 of capital and select 7.5%, for example, your entry would be $ 750 without leverage. If you select CONTRACTS for the 'BTCUSDT' pair, for example, it would be the amount in 'Bitcoins' and if you select 'CASH' it would be the amount in $ dollars.
'QUANTITY (LEVERAGE 1X)': The amount for an entry with X1 leverage according to the previous section.
'MAXIMUM LEVERAGE': It's the maximum allowed multiplier of the quantity entered in the previous section according to the volume condition.
The settings are for Bitcoin at Binance Futures (BTC: USDTPERP) in 30 minutes.
For other pairs and other timeframes, the settings have to be adjusted again. And within a month, the settings will be different because we all know the market and the trend are changing.
█ 888 BOT (SPANISH)
Este es un Expert Advisor 'EA' o script de trading automatizado para ‘longs’ y ‘shorts’, el cual, utiliza solo un Take Profit o, en el peor de los casos, un Stop Loss para cerrar el trade.
Es una versión muy mejorada del anterior ‘Repanocha’. No utiliza ‘Trailing Stop’, ni funciones ‘security()’ (aunque usar una función security no significa que el script repinte) y todas las señales son confirmadas, por consiguiente, el script no repinta en modo alertas y es preciso en en el modo backtest.
Aparte de los anteriores indicadores se han añadido algunos más y otras funciones para Stop-Loss, de re-entrada y apalancamiento.
Utiliza 8 indicadores, (muchos ya sabéis sobradamente lo que son, pero por si hay alguien nuevo), son los siguientes:
1. Jurik Moving Average
Es una media móvil creada por Mark Jurik para profesionales la cual elimina el ‘lag’ o retardo de la señal. Es mejor que otras medias móviles como la EMA, DEMA, AMA o T3.
Hay dos formas de disminuir el ruido utilizando JMA. El aumento del parámetro 'LENGTH' hará que JMA se mueva más lentamente y, por lo tanto, reducirá el ruido a expensas de añadir ‘lag’
Los parámetros 'JMA LENGTH', 'PHASE' y 'POWER' ofrecen una forma de seleccionar el equilibrio óptimo entre ‘lag’ y sobre impulso.
Verde : Alcista, Rojo: Bajista.
2. Range filter
Creado por Donovan Wall, su función es la de filtrar o eliminar el ruido y poder determinar mejor la tendencia del precio a corto plazo.
Primero, se calcula un rango de precio promedio uniforme 'SAMPLING PERIOD' para la base del filtro y se multiplica por una cantidad específica 'RANGE MULTIPLIER'.
A continuación, el filtro se calcula ajustando los movimientos de precios que no exceden el rango especificado.
Por último, los rangos objetivo se trazan para mostrar los precios que activarán el movimiento del filtro.
Verde : Alcista, Rojo: Bajista.
3. Average Directional Index (ADX Classic) y (ADX Masanakamura)
Es un indicador diseñado por Welles Wilder para medir la fuerza y dirección de la tendencia del mercado. El movimiento del precio tiene fuerza cuando el ADX tiene pendiente positiva y está por encima de cierto nivel mínimo 'ADX THRESHOLD' y para un periodo dado 'ADX LENGTH'.
El color verde de las barras indica que la tendencia es alcista y que el ADX está por encima del nivel establecido por el threshold.
El color Rojo de las barras indica que la tendencia es bajista y que el ADX está por encima del nivel de threshold.
El color naranja de las barras indica que el precio no tiene fuerza y seguramente lateralizará.
Se puede elegir entre la opción clásica y la creada por un tal 'Masanakamura'. La diferencia principal entre los dos es que en el primero utiliza RMA() y en el segundo SMA() en su cálculo.
4. Parabolic SAR
Este indicador, creado también por Welles Wilder, coloca puntos que ayudan a definir una tendencia. El Parabolic SAR puede seguir al precio por encima o por debajo, la particularidad que ofrece es que cuando el precio toca al indicador, este salta al otro lado del precio (si el Parabolic SAR estaba por debajo del precio salta arriba y viceversa) a una distancia predeterminada por el indicador. En este momento el indicador vuelve a seguir al precio, reduciendo la distancia con cada vela hasta que finalmente es tocado otra vez por el precio y se vuelve a iniciar el proceso. Este procedimiento explica el nombre del indicador: el Parabolic SAR va siguiendo al precio generando una característica forma parabólica, cuando el precio lo toca, se para y da la vuelta (SAR son las siglas en inglés de ‘stop and reverse’), dando lugar a un nuevo ciclo. Cuando los puntos están por debajo del precio, la tendencia es alcista, mientras que los puntos por encima del precio indica una tendencia bajista.
5. RSI with Volume
Este indicador lo creo un tal LazyBear de TV a partir del popular RSI.
El RSI es un indicador tipo oscilador utilizado en análisis técnico y creado también por Welles Wilder que muestra la fuerza del precio mediante la comparación de los movimientos individuales al alza o a la baja de los sucesivos precios de cierre.
LazyBear le añadió un parámetro de volumen que lo hace más preciso al movimiento del mercado.
Una buena forma de usar el RSI es teniendo en cuenta la línea central de 50 'RSI CENTER LINE'. Cuando el oscilador está por encima, la tendencia es alcista y cuando está por debajo la tendencia es bajista.
6. Moving Average Convergence Divergence (MACD) y (MAC-Z)
Fue creado por Gerald Appel. Posteriormente se añadió el histograma para anticipar el cruce de medias. A grandes rasgos podemos decir que el MACD es un oscilador consistente en dos medias móviles que van girando en torno a la línea de cero. La línea del MACD no es más que la diferencia entre una media móvil corta 'MACD FAST MA LENGTH' y una media móvil larga 'MACD SLOW MA LENGTH'. Es un indicador que nos permite tener una referencia sobre la tendencia del activo sobre el cual se está operando, generando de este modo señales de entrada y salida del mercado.
Podemos hablar de mercado alcista cuando el histograma del MACD se sitúe por encima de la línea cero, junto con la línea de señal, mientras que hablaremos de mercado bajista cuando el histograma MACD se situará por debajo de la línea cero.
Está la opción de utilizar el indicador MAC-Z creado por LazyBear que según su autor es más eficaz, por utilizar el parámetro VWAP (precio medio ponderado por volumen) 'Z-VWAP LENGTH' junto con una desviación standard 'STDEV LENGTH' en su cálculo.
7. Volume Condition
El volumen indica el número de participantes en esta guerra entre toros y osos, cuanto más volumen más probabilidad de que se mueva el precio a favor de la tendencia. Un volumen bajo de negociación indica un menor número de participantes e interés por el instrumento en cuestión. Los bajos volúmenes pueden revelar debilidad detrás de un movimiento de precios.
Con esta condición se filtran aquellas señales cuyo volumen es inferior a la SMA de volumen para un periodo 'SMA VOLUME LENGTH' multiplicado por un factor 'VOLUME FACTOR'. Además, determina el apalancamiento utilizado, a más volumen, más participantes, más probabilidad de que se mueva el precio a nuestro favor, es decir, podemos utilizar más apalancamiento. El apalancamiento en este script lo determina las veces que está el volumen por encima de la línea de la SMA.
El apalancamiento máximo es de 8.
8. Bollinger Bands
Este indicador fue creado por John Bollinger y consiste en tres bandas que se dibujan superpuestas al gráfico de evolución del precio.
La banda central es una media móvil, normalmente se emplea una media móvil simple calculada con 20 períodos. ('BB LENGTH' Número de periodos de la media móvil)
La banda superior se calcula sumando al valor de la media móvil simple X veces la desviación típica de la media móvil. ('BB MULTIPLIER' Número de veces la desviación típica de la media móvil)
La banda inferior de calcula restando a la media móvil simple X veces la desviación típica de la media móvil.
la franja comprendida entre las bandas superior e inferior contiene, estadísticamente, casi un 90% de las posibles variaciones del precio, lo que significa que cualquier movimiento del precio fuera de las bandas tiene especial relevancia.
En términos prácticos, las bandas de Bollinger se comporta como si de una banda elástica se tratara de manera que, si el precio las toca, éste tiene mucha probabilidad de rebotar.
En ocasiones, después de rellenarse la orden de entrada, el precio se devuelve hacia el lado contrario. Si toca la banda de Bollinger se rellena otra orden en la misma dirección de la posición para mejorar el precio medio de entrada, (% MINIMUM BETTER PRICE': Precio mínimo para que se ejecute la re-entrada y que sea mejor que el precio de la posición anterior en un % dado) de esta manera damos una oportunidad al trade de que el Take Profit se ejecute antes. La desventaja es que se dobla el tamaño de la posición. 'ACTIVATE DIVIDE TP': Divide el tamaño del TP a la mitad. Más probabilidad de que se cierre el trade pero menos ganancias.
█ STOP LOSS y RISK MANAGEMENT.
Una buena gestión de las pérdidas o gestión del riesgo es lo que puede hacer que tu cuenta suba o se liquide en poco tiempo.
El % de riesgo es el porcentaje de nuestro capital que estamos dispuestos a perder por operación. Este se aconseja que debe estar comprendido entre un 1-5%.
% Risk = (% Stop Loss x % Equity per trade x Leverage) / 100
Primero se calcula la estrategia con Stop Loss, después se determina el riesgo por operación y a partir de ahí se calcula el monto por operación y no al revés.
En este script puedes usar un Stop Loss normal o uno según el ATR. También activar la opción de que salte antes si se alcanza el porcentaje de riesgo. '% RISK ALLOWED'
'STOP LOSS CONFIRMED': Solamente se activa el Stop Loss si el cierre de la barra anterior se encuentra en la condición de límite de pérdidas. Es útil para evitar que se dispare el SL cuando hacen un ‘pump’ para barrer Stops y luego se devuelve el precio a la normalidad.
█ BACKTEST
El objetivo del Backtest es evaluar la eficacia de nuestra estrategia. Un buen Backtest lo determinan algunos parámetros como son:
- RECOVERY FACTOR: Consiste en dividir el ‘beneficio neto’ entre el ‘drawdown’. Un excelente sistema de trading tiene un recovery factor de 10 o más; es decir, genera 10 veces más beneficio neto que drawdown.
- PROFIT FACTOR: El ‘Profit Factor’ es otra medida popular del rendimiento de un sistema. Es algo tan simple como dividir lo que ganan las operaciones con ganancias entre lo que pierden las operaciones con pérdidas. Si la estrategia es rentable entonces por definición el ‘Profit Factor’ va a ser mayor que 1. Las estrategias que no son rentables producen factores de beneficio menores que uno. Un buen sistema tiene un profit factor de 2 o más. Lo bueno del ‘Profit Factor’ es que nos dice lo que vamos a ganar por cada dolar que perdemos. Un profit factor de 2.5 nos dice que por cada dolar que perdamos operando vamos a ganar 2.5.
- SHARPE: (Retorno sistema – Retorno sin riesgo) / Desviación de los retornos.
Cuando las variaciones de ganancias y pérdidas son muy altas, la desviación es muy elevada y eso conlleva un ratio de ‘Sharpe’ muy pobre. Si las operaciones están muy cerca de la media (poca desviación) el resultado es un ratio de ‘Sharpe’ bastante elevado. Si una estrategia tiene un ratio de ‘Sharpe’ mayor que 1 es una buena estrategia. Si tiene un ratio de ‘Sharpe’ mayor que 2, es excelente. Si tiene un ratio de ‘Sharpe’ menor que 1 entonces no sabemos si es buena o mala, hay que mirar otros parámetros.
- MATHEMATICAL EXPECTATION:(% operaciones ganadoras X ganancia media) + (% operaciones perdedoras X pérdida media).
Para ganar dinero con un sistema de Trading, no es necesario ganar todas las operaciones, lo verdaderamente importante es el resultado final de la operativa. Un sistema de Trading tiene que tener esperanza matemática positiva como es el caso de este script.
El juego de la ruleta, por ejemplo, tiene esperanza matemática negativa para el jugador, puede tener rachas positivas de ganancias, pero a la larga, si se sigue jugando se acabará perdiendo, y esto los casinos lo saben muy bien.
PARAMETROS
'BACKTEST DAYS': Número de días atrás de datos históricos para el calculo del Backtest.
'ENTRY TYPE': Para % EQUITY si tienes 10000$ de capital y seleccionas 7.5% tu entrada sería de 750$ sin apalancamiento. Si seleccionas CONTRACTS para el par BTCUSDT sería la cantidad en Bitcoins y si seleccionas CASH sería la cantidad en dólares.
'QUANTITY (LEVERAGE 1X)': La cantidad para una entrada con apalancamiento X! según el apartado anterior.
'MAXIMUM LEVERAGE': Es el máximo multiplicador permitido de la cantidad introducida en el apartado anterior según la condición de volumen.
Los settings son para Bitcoin en Binance Futures (BTC:USDTPERP) en 30 minutos.
Para otro pares y otras temporalidades se tienen que ajustar las opciones de nuevo. Además para dentro de un mes, los ajustes serán otros distintos ya que el mercado y la tendencia es cambiante.
Delta Volume Columns Pro [LucF]█ OVERVIEW
This indicator displays volume delta information calculated with intrabar inspection on historical bars, and feed updates when running in realtime. It is designed to run in a pane and can display either stacked buy/sell volume columns or a signal line which can be calculated and displayed in many different ways.
Five different models are offered to reveal different characteristics of the calculated volume delta information. Many options are offered to visualize the calculations, giving you much leeway in morphing the indicator's visuals to suit your needs. If you value delta volume information, I hope you will find the time required to master Delta Volume Columns Pro well worth the investment. I am confident that if you combine a proper understanding of the indicator's information with an intimate knowledge of the volume idiosyncrasies on the markets you trade, you can extract useful market intelligence using this tool.
█ WARNINGS
1. The indicator only works on markets where volume information is available,
Please validate that your symbol's feed carries volume information before asking me why the indicator doesn't plot values.
2. When you refresh your chart or re-execute the script on the chart, the indicator will repaint because elapsed realtime bars will then recalculate as historical bars.
3. Because the indicator uses different modes of calculation on historical and realtime bars, it's critical that you understand the differences between them. Details are provided further down.
4. Calculations using intrabar inspection on historical bars can only be done from some chart timeframes. See further down for a list of supported timeframes.
If the chart's timeframe is not supported, no historical volume delta will display.
█ CONCEPTS
Chart bars
Three different types of bars are used in charts:
1. Historical bars are bars that have already closed when the script executes on them.
2. The realtime bar is the current, incomplete bar where a script is running on an open market. There is only one active realtime bar on your chart at any given time.
The realtime bar is where alerts trigger.
3. Elapsed realtime bars are bars that were calculated when they were realtime bars but have since closed.
When a script re-executes on a chart because the browser tab is refreshed or some of its inputs are changed, elapsed realtime bars are recalculated as historical bars.
Why does this indicator use two modes of calculation?
Historical bars on TradingView charts contain OHLCV data only, which is insufficient to calculate volume delta on them with any level of precision. To mine more detailed information from those bars we look at intrabars , i.e., bars from a smaller timeframe (we call it the intrabar timeframe ) that are contained in one chart bar. If your chart Is running at 1D on a 24x7 market for example, most 1D chart bars will contain 24 underlying 1H bars in their dilation. On historical bars, this indicator looks at those intrabars to amass volume delta information. If the intrabar is up, its volume goes in the Buy bin, and inversely for the Sell bin. When price does not move on an intrabar, the polarity of the last known movement is used to determine in which bin its volume goes.
In realtime, we have access to price and volume change for each update of the chart. Because a 1D chart bar can be updated tens of thousands of times during the day, volume delta calculations on those updates is much more precise. This precision, however, comes at a price:
— The script must be running on the chart for it to keep calculating in realtime.
— If you refresh your chart you will lose all accumulated realtime calculations on elapsed realtime bars, and the realtime bar.
Elapsed realtime bars will recalculate as historical bars, i.e., using intrabar inspection, and the realtime bar's calculations will reset.
When the script recalculates elapsed realtime bars as historical bars, the values on those bars will change, which means the script repaints in those conditions.
— When the indicator first calculates on a chart containing an incomplete realtime bar, it will count ALL the existing volume on the bar as Buy or Sell volume,
depending on the polarity of the bar at that point. This will skew calculations for that first bar. Scripts have no access to the history of a realtime bar's previous updates,
and intrabar inspection cannot be used on realtime bars, so this is the only to go about this.
— Even if alerts only trigger upon confirmation of their conditions after the realtime bar closes, they are repainting alerts
because they would perhaps not have calculated the same way using intrabar inspection.
— On markets like stocks that often have different EOD and intraday feeds and volume information,
the volume's scale may not be the same for the realtime bar if your chart is at 1D, for example,
and the indicator is using an intraday timeframe to calculate on historical bars.
— Any chart timeframe can be used in realtime mode, but plots that include moving averages in their calculations may require many elapsed realtime bars before they can calculate.
You might prefer drastically reducing the periods of the moving averages, or using the volume columns mode, which displays instant values, instead of the line.
Volume Delta Balances
This indicator uses a variety of methods to evaluate five volume delta balances and derive other values from those balances. The five balances are:
1 — On Bar Balance : This is the only balance using instant values; it is simply the subtraction of the Sell volume from the Buy volume on the bar.
2 — Average Balance : Calculates a distinct EMA for both the Buy and Sell volumes, and subtracts the Sell EMA from the Buy EMA.
3 — Momentum Balance : Starts by calculating, separately for both Buy and Sell volumes, the difference between the same EMAs used in "Average Balance" and
an SMA of double the period used for the "Average Balance" EMAs. The difference for the Sell side is subtracted from the difference for the Buy side,
and an RSI of that value is calculated and brought over the −50/+50 scale.
4 — Relative Balance : The reference values used in the calculation are the Buy and Sell EMAs used in the "Average Balance".
From those, we calculate two intermediate values using how much the instant Buy and Sell volumes on the bar exceed their respective EMA — but with a twist.
If the bar's Buy volume does not exceed the EMA of Buy volume, a zero value is used. The same goes for the Sell volume with the EMA of Sell volume.
Once we have our two intermediate values for the Buy and Sell volumes exceeding their respective MA, we subtract them. The final "Relative Balance" value is an ALMA of that subtraction.
The rationale behind using zero values when the bar's Buy/Sell volume does not exceed its EMA is to only take into account the more significant volume.
If both instant volume values exceed their MA, then the difference between the two is the signal's value.
The signal is called "relative" because the intermediate values are the difference between the instant Buy/Sell volumes and their respective MA.
This balance flatlines when the bar's Buy/Sell volumes do not exceed their EMAs, which makes it useful to spot areas where trader interest dwindles, such as consolidations.
The smaller the period of the final value's ALMA, the more easily you will see the balance flatline. These flat zones should be considered no-trade zones.
5 — Percent Balance : This balance is the ALMA of the ratio of the "On Bar Balance" value, i.e., the volume delta balance on the bar (which can be positive or negative),
over the total volume for that bar.
From the balances and marker conditions, two more values are calculated:
1 — Marker Bias : It sums the up/down (+1/‒1) occurrences of the markers 1 to 4 over a period you define, so it ranges from −4 to +4, times the period.
Its calculation will depend on the modes used to calculate markers 3 and 4.
2 — Combined Balances : This is the sum of the bull/bear (+1/−1) states of each of the five balances, so it ranges from −5 to +5.
█ FEATURES
The indicator has two main modes of operation: Columns and Line .
Columns
• In Columns mode you can display stacked Buy/Sell volume columns.
• The buy section always appears above the centerline, the sell section below.
• The top and bottom sections can be colored independently using eight different methods.
• The EMAs of the Buy/Sell values can be displayed (these are the same EMAs used to calculate the "Average Balance").
Line
• Displays one of seven signals: the five balances or one of two complementary values, i.e., the "Marker Bias" or the "Combined Balances".
• You can color the line and its fill using independent calculation modes to pack more information in the display.
You can thus appraise the state of 3 different values using the line itself, its color and the color of its fill.
• A "Divergence Levels" feature will use the line to automatically draw expanding levels on divergence events.
Default settings
Using the indicator's default settings, this is the information displayed:
• The line is calculated on the "Average Balance".
• The line's color is determined by the bull/bear state of the "Percent Balance".
• The line's fill gradient is determined by the advances/declines of the "Momentum Balance".
• The orange divergence dots are calculated using discrepancies between the polarity of the "On Bar Balance" and the chart's bar.
• The divergence levels are determined using the line's level when a divergence occurs.
• The background's fill gradient is calculated on advances/declines of the "Marker Bias".
• The chart bars are colored using advances/declines of the "Relative Balance". Divergences are shown in orange.
• The intrabar timeframe is automatically determined from the chart's timeframe so that a minimum of 50 intrabars are used to calculate volume delta on historical bars.
Alerts
The configuration of the marker conditions explained further is what determines the conditions that will trigger alerts created from this script. Note that simply selecting the display of markers does not create alerts. To create an alert on this script, you must use ALT-A from the chart. You can create multiple alerts triggering on different conditions from this same script; simply configure the markers so they define the trigger conditions for each alert before creating the alert. The configuration of the script's inputs is saved with the alert, so from then on you can change them without affecting the alert. Alert messages will mention the marker(s) that triggered the specific alert event. Keep in mind, when creating alerts on small chart timeframes, that discrepancies between alert triggers and markers displayed on your chart are to be expected. This is because the alert and your chart are running two distinct instances of the indicator on different servers and different feeds. Also keep in mind that while alerts only trigger on confirmed conditions, they are calculated using realtime calculation mode, which entails that if you refresh your chart and elapsed realtime bars recalculate as historical bars using intrabar inspection, markers will not appear in the same places they appeared in realtime. So it's important to understand that even though the alert conditions are confirmed when they trigger, these alerts will repaint.
Let's go through the sections of the script's inputs.
Columns
The size of the Buy/Sell columns always represents their respective importance on the bar, but the coloring mode for tops and bottoms is independent. The default setup uses a standard coloring mode where the Buy/Sell columns are always in the bull/bear color with a higher intensity for the winning side. Seven other coloring modes allow you to pack more information in the columns. When choosing to color the top columns using a bull/bear gradient on "Average Balance", for example, you will have bull/bear colored tops. In order for the color of the bottom columns to continue to show the instant bar balance, you can then choose the "On Bar Balance — Dual Solid Colors" coloring mode to make those bars the color of the winning side for that bar. You can display the averages of the Buy and Sell columns. If you do, its coloring is controlled through the "Line" and "Line fill" sections below.
Line and Line fill
You can select the calculation mode and the thickness of the line, and independent calculations to determine the line's color and fill.
Zero Line
The zero line can display dots when all five balances are bull/bear.
Divergences
You first select the detection mode. Divergences occur whenever the up/down direction of the signal does not match the up/down polarity of the bar. Divergences are used in three components of the indicator's visuals: the orange dot, colored chart bars, and to calculate the divergence levels on the line. The divergence levels are dynamic levels that automatically build from the line's values on divergence events. On consecutive divergences, the levels will expand, creating a channel. This implementation of the divergence levels corresponds to my view that divergences indicate anomalies, hesitations, points of uncertainty if you will. It precludes any attempt to identify a directional bias to divergences. Accordingly, the levels merely take note of divergence events and mark those points in time with levels. Traders then have a reference point from which they can evaluate further movement. The bull/bear/neutral colors used to plot the levels are also congruent with this view in that they are determined by the line's position relative to the levels, which is how I think divergences can be put to the most effective use. One of the coloring modes for the line's fill uses advances/declines in the line after divergence events.
Background
The background can show a bull/bear gradient on six different calculations. As with other gradients, you can adjust its brightness to make its importance proportional to how you use it in your analysis.
Chart bars
Chart bars can be colored using seven different methods. You have the option of emptying the body of bars where volume does not increase, as does my TLD indicator, and you can choose whether you want to show divergences.
Intrabar Timeframe
This is the intrabar timeframe that will be used to calculate volume delta using intrabar inspection on historical bars. You can choose between four modes. The three "Auto-steps" modes calculate, from the chart's timeframe, the intrabar timeframe where the said number of intrabars will make up the dilation of chart bars. Adjustments are made for non-24x7 markets. "Fixed" mode allows you to select the intrabar timeframe you want. Checking the "Show TF" box will display in the lower-right corner the intrabar timeframe used at any given moment. The proper selection of the intrabar timeframe is important. It must achieve maximal granularity to produce precise results while not unduly slowing down calculations, or worse, causing runtime errors. Note that historical depth will vary with the intrabar timeframe. The smaller the timeframe, the shallower historical plots you will be.
Markers
Markers appear when the required condition has been confirmed on a closed bar. The configuration of the markers when you create an alert is what determines when the alert will trigger. Five markers are available:
• Balances Agreement : All five balances are either bullish or bearish.
• Double Bumps : A double bump is two consecutive up/down bars with +/‒ volume delta, and rising Buy/Sell volume above its average.
• Divergence confirmations : A divergence is confirmed up/down when the chosen balance is up/down on the previous bar when that bar was down/up, and this bar is up/down.
• Balance Shifts : These are bull/bear transitions of the selected signal.
• Marker Bias Shifts : Marker bias shifts occur when it crosses into bull/bear territory.
Periods
Allows control over the periods of the different moving averages used to calculate the balances.
Volume Discrepancies
Stock exchanges do not report the same volume for intraday and daily (or higher) resolutions. Other variations in how volume information is reported can also occur in other markets, namely Forex, where volume irregularities can even occur between different intraday timeframes. This will cause discrepancies between the total volume on the bar at the chart's timeframe, and the total volume calculated by adding the volume of the intrabars in that bar's dilation. This does not necessarily invalidate the volume delta information calculated from intrabars, but it tells us that we are using partial volume data. A mechanism to detect chart vs intrabar timeframe volume discrepancies is provided. It allows you to define a threshold percentage above which the background will indicate a difference has been detected.
Other Settings
You can control here the display of the gray dot reminder on realtime bars, and the display of error messages if you are using a chart timeframe that is not greater than the fixed intrabar timeframe, when you use that mode. Disabling the message can be useful if you only use realtime mode at chart timeframes that do not support intrabar inspection.
█ RAMBLINGS
On Volume Delta
Volume is arguably the best complement to interpret price action, and I consider volume delta to be the most effective way of processing volume information. In periods of low-volatility price consolidations, volume will typically also be lower than normal, but slight imbalances in the trend of the buy/sell volume balance can sometimes help put early odds on the direction of the break from consolidation. Additionally, the progression of the volume imbalance can help determine the proximity of the breakout. I also find volume delta and the number of divergences very useful to evaluate the strength of trends. In trends, I am looking for "slow and steady", i.e., relatively low volatility and pauses where price action doesn't look like world affairs are being reassessed. In my personal mythology, this type of trend is often more resilient than high-volatility breakouts, especially when volume balance confirms the general agreement of traders signaled by the low-volatility usually accompanying this type of trend. The volume action on pauses will often help me decide between aggressively taking profits, tightening a stop or going for a longer-term movement. As for reversals, they generally occur in high-volatility areas where entering trades is more expensive and riskier. While the identification of counter-trend reversals fascinates many traders to no end, they represent poor opportunities in my view. Volume imbalances often precede reversals, but I prefer to use volume delta information to identify the areas following reversals where I can confirm them and make relatively low-cost entries with better odds.
On "Buy/Sell" Volume
Buying or selling volume are misnomers, as every unit of volume transacted is both bought and sold by two different traders. While this does not keep me from using the terms, there is no such thing as “buy only” or “sell only” volume. Trader lingo is riddled with peculiarities.
Divergences
The divergence detection method used here relies on a difference between the direction of a signal and the polarity (up/down) of a chart bar. When using the default "On Bar Balance" to detect divergences, however, only the bar's volume delta is used. You may wonder how there can be divergences between buying/selling volume information and price movement on one bar. This will sometimes be due to the calculation's shortcomings, but divergences may also occur in instances where because of order book structure, it takes less volume to increase the price of an asset than it takes to decrease it. As usual, divergences are points of interest because they reveal imbalances, which may or may not become turning points. To your pattern-hungry brain, the divergences displayed by this indicator will — as they do on other indicators — appear to often indicate turnarounds. My opinion is that reality is generally quite sobering and I have no reliable information that would tend to prove otherwise. Exercise caution when using them. Consequently, I do not share the overwhelming enthusiasm of traders in identifying bullish/bearish divergences. For me, the best course of action when a divergence occurs is to wait and see what happens from there. That is the rationale underlying how my divergence levels work; they take note of a signal's level when a divergence occurs, and it's the signal's behavior from that point on that determines if the post-divergence action is bullish/bearish.
Superfluity
In "The Bed of Procrustes", Nassim Nicholas Taleb writes: To bankrupt a fool, give him information . This indicator can display lots of information. While learning to use a new indicator inevitably requires an adaptation period where we put it through its paces and try out all its options, once you have become used to it and decide to adopt it, rigorously eliminate the components you don't use and configure the remaining ones so their visual prominence reflects their relative importance in your analysis. I tried to provide flexible options for traders to control this indicator's visuals for that exact reason — not for window dressing.
█ LIMITATIONS
• This script uses a special characteristic of the `security()` function allowing the inspection of intrabars — which is not officially supported by TradingView.
It has the advantage of permitting a more robust calculation of volume delta than other methods on historical bars, but also has its limits.
• Intrabar inspection only works on some chart timeframes: 3, 5, 10, 15 and 30 minutes, 1, 2, 3, 4, 6, and 12 hours, 1 day, 1 week and 1 month.
The script’s code can be modified to run on other resolutions.
• When the difference between the chart’s timeframe and the intrabar timeframe is too great, runtime errors will occur. The Auto-Steps selection mechanisms should avoid this.
• All volume is not created equally. Its source, components, quality and reliability will vary considerably with sectors and instruments.
The higher the quality, the more reliably volume delta information can be used to guide your decisions.
You should make it your responsibility to understand the volume information provided in the data feeds you use. It will help you make the most of volume delta.
█ NOTES
For traders
• The Data Window shows key values for the indicator.
• While this indicator displays some of the same information calculated in my Delta Volume Columns ,
I have elected to make it a separate publication so that traders continue to have a simpler alternative available to them. Both code bases will continue to evolve separately.
• All gradients used in this indicator determine their brightness intensities using advances/declines in the signal—not their relative position in a pre-determined scale.
• Volume delta being relative, by nature, it is particularly well-suited to Forex markets, as it filters out quite elegantly the cyclical volume data characterizing the sector.
If you are interested in volume delta, consider having a look at my other "Delta Volume" indicators:
• Delta Volume Realtime Action displays realtime volume delta and tick information on the chart.
• Delta Volume Candles builds volume delta candles on the chart.
• Delta Volume Columns is a simpler version of this indicator.
For coders
• I use the `f_c_gradientRelativePro()` from the PineCoders Color Gradient Framework to build my gradients.
This function has the advantage of allowing begin/end colors for both the bull and bear colors. It also allows us to define the number of steps allowed for each gradient.
I use this to modulate the gradients so they perform optimally on the combination of the signal used to calculate advances/declines,
but also the nature of the visual component the gradient applies to. I use fewer steps for choppy signals and when the gradient is used on discrete visual components
such as volume columns or chart bars.
• I use the PineCoders Coding Conventions for Pine to write my scripts.
• I used functions modified from the PineCoders MTF Selection Framework for the selection of timeframes.
█ THANKS TO:
— The devs from TradingView's Pine and other teams, and the PineCoders who collaborate with them. They are doing amazing work,
and much of what this indicator does could not be done without their recent improvements to Pine.
— A guy called Kuan who commented on a Backtest Rookies presentation of their Volume Profile indicator using a `for` loop.
This indicator started from the intrabar inspection technique illustrated in Kuan's snippet.
— theheirophant , my partner in the exploration of the sometimes weird abysses of `security()`’s behavior at intrabar timeframes.
— midtownsk8rguy , my brilliant companion in mining the depths of Pine graphics.
[Zekis]Donchian Price Channels Strategy with AlertsClassic Donchian(Price) Channels, I added alerts for entries and re-entries and labels for upper and lower bands of the channel.
# Investopedia
" What are Donchian Channels?
Donchian Channels are three lines generated by moving average calculations that comprise an indicator formed by upper and lower bands around a mid-range or median band. The upper band marks the highest price of a security over N periods while the lower band marks the lowest price of a security over N periods. The area between the upper and lower bands represents the Donchian Channel.
The indicator seeks to identify bullish and bearish extremes that favor reversals as well as breakouts, breakdowns and emerging trends, higher and lower.
The Formula for Donchian Channels Is:
UC = Highest High in Last N Periods
Middle Channel=((UC−LC)/2)
LC = Lowest Low in Last N periods
where:
UC = Upper channel
N = Number of minutes, hours, days, weeks, months...
Period = Minutes, hours, days, weeks, months...
LC=Lower channel
What Do Donchian Channels Tell You?
Donchian Channels identify comparative relationships between current price and trading ranges over predetermined periods. Three values build a visual map of price over time, similar to Bollinger Bands, indicating the extent of bullishness and bearishness for the chosen period. The top line identifies the extent of bullish energy, highlighting the highest price achieved for the period through the bull-bear conflict. The center line identifies the median or mean reversion price for the period, highlighting the middle ground achieved for the period through the bull-bear conflict. The bottom line identifies the extent of bearish energy, highlighting the lowest price achieved for the period through the bull-bear conflict.
Limitations of Using Donchian Channels
Markets move according to many cycles of activity. An arbitrary or commonly used N period value for Donchian Channels may not reflect current market conditions, generating false signals that can undermine trading and investment performance
"
⚛WPZO - Wave Period Zone Oscillator by Cryptorhythms⚛WPZO - Wave Period Zone Oscillator by Cryptorhythms
Intro
Based upon Akram El Sherbini's article "Time Cycle Oscillators" published in IFTA journal 2018.
Companion indicator to the Wave Period Oscillator, this is simply a transformation to display in a familiar manner like an RSI. Occasionally WPO can exceed the upper and lower boundary lines in strong moves. With WPZO, it will never go below -80 or above +80.
Description
In the Authors words....
"The wave period zone oscillator (WPZO) is a bounded oscillator for the wave period oscillator (WPO) and calculates the period of the market’s cycle. In other words, the wave period refers to the time taken by buyers or sellers to complete one cycle. The oscillator moves within a range of -100 to 100 percent.
The WPZO has overbought and oversold levels at +40 and -40 respectively. At extreme periods, the oscillator may reach the levels of +60 and -60. The zero level demonstrates an equilibrium between the periods of bulls and bears. The WPZO oscillates between +40 and -40. The crossover at those levels creates buy and sell signals. In an uptrend, the WPZO fluctuates between 0 and +40 where the bulls are controlling the market.
On the contrary, the WPZO fluctuates between 0 and -40 during downtrends where the bears control the market. Reaching the extreme level of -60 in an uptrend is a sign of weakness. Mostly, the oscillator will retrace from its centerline rather than the upper boundary of +40. On the other hand, reaching +60 in a downtrend is a sign of strength, and the oscillator will not be able to reach its lower boundary of -40.
During an ideal uptrend, the WPZO does not reach the lower boundary of -40 and usually rebounds from a higher level than -40. This means that the bulls have taken control earlier. Hence, a zeroline crossover generates a buy signal. The WPZO crosses the upper boundary at +40, then pulls back again below +40 to generate a sell signal. During sideways, the WPZO fluctuates between the lower and upper boundaries of -40 and +40. This tactic is also used in an uptrend where corrections are strong enough to drive the WPZO line below the lower boundary. During downtrends, the WPZO fails to reach the upper boundary and oscillates between the 0 and -40 levels.
The bears enter early, indicating an obvious weakness in the market. Therefore, crossing the zero level generates a sell signal. The exit at weakness tactic is used during uptrend reversals and downtrends. The WPZO oscillates between the centerline and the lower boundary of -40. The bears are controlling the market and move in wide cycle periods, while the bull’s strength is almost absent. An exit signal is triggered once the WPZO crosses -40. When prices decline, the WPZO may cross its extreme lower boundary at -60. Therefore, a swift exit signal is triggered once the WPZO crosses -40.
The WPZO gives an insight about the relation between time and price movements. In this article, we used the oscillator to differentiate between the time taken by bulls and bears to complete one cycle. Due to the boundaries effect, the WPZO may diverge less than the WPO with prices."
TL:DR
More strategy discussed above, but heres the short version:
Bullish signals are generated when WPZO crosses over 0
Bearish signals are generated when WPZO crosses under 0
OverBought level is 40
OverSold level is -40
ExtremeOB level is 60
ExtremeOS level is -60
👍 Enjoying this indicator or find it useful? Please give me a like and follow! I post crypto analysis, price action strategies and free indicators regularly.
💬 Questions? Comments? Want to get access to an entire suite of proven trading indicators? Come visit us on telegram and chat, or just soak up some knowledge. We make timely posts about the market, news, and strategy everyday. Our community isn't open only to subscribers - everyone is welcome to join.
For Trialers & Chat: t.me
[BoTo] ATH/2 OverlayThan this indicator is useful?
Can help you to understand this indicator who main in the market now. Bulls or bears.
How it works
All-Time-High ('ATH') - the highest point in price that a cryptocurrency has been in history.
Step 1: The 'ATH' line is drawn
Step 2: 'ATH/2' line is drawn.
Step 3: If the price became more than 'ATH' it means the market bulls have taken, and the price it will be more probable to increase. And vice versa. If the price became less than 'ATH/2' it means that the market was taken by bears, and the price it will be more probable to fall.
Step 4: If it is the bull market, then the green background is drawn. And vice versa. If it is the bear market, then the red background is drawn. If the market has changed, then the background will be gray color. Only one candle.
How to use it
It is possible to use any timeframes, and any symbol.
It is possible to use chart type only the japanese candles, the line or bars. Don't use Kagi, Renko or Haiken Ashi!
The background can be not shown. You can make 1 or 2 lines. If you have chosen only 1 line, then in the bull market you will see only 'ATH/2' line. And vice versa. In the bear market you will see only the 'ATH' line.
You need just to turn on this indicator once to understand what to wait in this market, big falling or big rockets for. And to switch off it that he didn't prevent to analyze.
It is the good help for long-term investments (the position can be longer than 1 year)
For an example
'Ethereum'
'Ripple'
We tried for you. We want to receive your like for good work.
Bill Williams Divergent BarsBill William Bull/Bear divergent bars
See: Book, Trading Chaos by Bill Williams
Coded by polyclick
A bullish (green) divergent bar, signals a trend switch from bear -> bull
-> The current bar has a lower low than the previous bar, but closes in the upper half of the candle.
-> This means the bulls are pushing from below and are trying to take over, potentially resulting in a trend switch to bullish.
-> We also check if this bar is below the three alligator lines to avoid false positives.
A bearish (red) divergent bar, signals a trend switch from bull -> bear
-> The current bar has a higher high than the previous bar, but closes in the lower half of the candle.
-> This means the bears are pushing the price down and are taking over, potentially resulting in a trend switch to bearish.
-> We also check if this bar is above the three alligator lines to avoid false positives.
Best used in combination with the Bill Williams Alligator indicator.
RSI Cloud v1.0 [PriceBlance] RSI Cloud v1.0 — Ichimoku-style Cloud on RSI(14), not on price.
Recalibrated baselines: EMA9 (Tenkan) for speed, WMA45 (Kijun) for stability.
Plus ADX-on-RSI to grade strength so you know when momentum persists or fades.
1. Introduction
RSI Cloud v1.0 applies an Ichimoku Cloud directly on RSI(14) to reveal momentum regimes earlier and cleaner than price-based views. We replaced Tenkan with EMA9 (faster, more responsive) and Kijun with WMA45 (slower, more stable) to fit a bounded oscillator (0–100). Forward spans (+26) and a lagging line (−26) provide a clear framework for trend bias and transitions.
To qualify signals, the indicator adds ADX computed on RSI—highlighting whether strength is weak, strong, or very strong, so you can decide when to follow, fade, or stand aside.
2. Core Mapping (Hook + Bullets)
At a glance: Ichimoku on RSI(14) with recalibrated baselines for a bounded oscillator.
Source: RSI(14)
Tenkan → EMA9(RSI) (fast, responsive)
Kijun → WMA45(RSI) (slow, stable)
Span A: classic Ichimoku midline, displaced +26
Span B: classic Ichimoku baseline, displaced +26
Lagging line: RSI shifted −26
3. Key Benefits (Why traders care)
Momentum regimes on RSI: position vs. Cloud = bull / bear / transition at a glance.
Cleaner confirmations: EMA9/WMA45 pairing cuts noise vs. raw 30/70 flips.
Earlier warnings: Cloud breaks on RSI often lead price-based confirmations.
4. ADX on RSI (Enhanced Strength Normalization)
Grade strength inside the RSI domain using ADX from ΔRSI:
ADX ≤ 20 → Weak (transparency = 60)
ADX ≤ 40 → Strong (transparency = 15)
ADX > 40 → Very strong (transparency = 0)
Use these tiers to decide when to trust, fade, or ignore a signal.
5. How to Read (Quick rules)
Bias / Regime
Bullish: RSI above Cloud and RSI > WMA45
Bearish: RSI below Cloud and RSI < WMA45
Neutral / Transition: all other cases
6. Settings (Copy & use)
RSI Length: 14 (default)
Tenkan: EMA9 on RSI · Kijun: WMA45 on RSI
Displacement: +26 (Span A/B) · −26 (Lagging)
Theme: PriceBlance Dark/Light
Visibility toggles: Cloud, Baselines, Lagging, labels/panel, Overbought/Oversold, Divergence, ADX-on-RSI (via transparency coloring)
7. Credits & License
Author/Brand: PriceBlance
Version: v1.0 (Free)
Watermark: PriceBlance • RSI Cloud v1.0
Disclaimer: Educational content; not financial advice.
8. CTA
If this helps, please ⭐ Star and Follow for updates & new tools.
Feedback is welcome—comment what you’d like added next (alerts, presets, visuals).
ZTCRYPTOLAB - HAMMER TIME (FREE)ZTCRYPTOLAB — HAMMER TIME
3× EMA Alignment • MTF Trend Table • HTF FVGs • Session Windows
What this tool does
HAMMER TIME blends classic trend structure (EMAs) with a fast multi-timeframe read and high-probability HTF fair-value gaps. Optional session windows (NYSE, London, Asia) highlight “caution” periods around cash opens and plot clean dashed open/start/end markers.
1) 3×EMA Alignment (20/50/200)
What it shows: Three EMAs (default 20, 50, 200) plus optional dynamic coloring when price is above/below each EMA.
How to use it
Bullish structure: EMA20 > EMA50 > EMA200.
Bearish structure: EMA20 < EMA50 < EMA200.
Turn on “Line Color by Price vs EMA” to see each EMA flip red/green as price crosses.
Optional candle coloring highlights when price is above/below all three while the EMAs are aligned—useful for quick “go/no-go” context.
Inputs
EMA lengths and colors
Toggle dynamic EMA colors and candle coloring
snapshot
2) Background Heat (EMA Alignment)
What it shows: A subtle background when the three EMAs are cleanly aligned.
How to use it
Green tint when stacked bullish, maroon when stacked bearish.
Great for scanning or keeping bias in peripheral vision.
Inputs
Enable/disable background
Custom bull/bear background colors (with transparency)
snapshot
3) Multi-Timeframe Trend Table (MTF)
What it shows: A compact table with the EMA-based bias on four timeframes (defaults: 5m, 15m, 1h, 4h). Each row says BULLISH / BEARISH / NEUTRAL based on source > EMA(length) at that TF.
How to use it
Look for stacked agreement across intraday + swing TFs.
Turn on the optional Confluence Score (0–4) to quantify alignment at a glance.
Place the table anywhere (Top-Right by default) and adjust text size.
Inputs
4 timeframes, EMA length used for MTF test (default 200)
Table position, size, colors, and optional score
4) Sessions: NYSE, London, Asia
What it shows: For each session you enable:
A shaded warning window centered on the cash open (configured in inputs).
Three dashed vertical markers: Start (orange), Open (solid session color), End (lime).
How the NYSE Open line is detected
Dual method for robustness:
First bar inside 09:30–16:00 New York (chart TF).
A 1-minute ping window (default 09:30–09:31 NY) to catch precise opens on higher TFs.
If either hits, the red dashed Open line prints once.
How to use it
Expect volatility spikes near the dashed Open line; the warning shade helps you manage pre/post-open noise.
Use with your EMA/MTF bias: e.g., trade in direction of higher-TF alignment but wait for post-open structure.
Inputs
Per-session toggle
Session warning window times (per time zone):
NYSE – America/New_York
London – Europe/London
Asia – Asia/Tokyo
Dashed Start/Open/End color toggles
NYSE: editable 1-minute open ping window
Note: Time zones include DST behavior. Crypto trades 24/7, so sessions are for context rather than market hours.
snapshot
5) HTF FVG (Fair-Value Gaps)
What it shows: HTF ICT 3-bar FVGs brought down to your chart TF as shaded boxes with optional “FVG” label.
Detection
Bullish gap: low > high (gap below current bar).
Bearish gap: high < low (gap above current bar).
You choose the detection timeframe (default 1H) via input.
Mitigation Modes (how gaps invalidate)
Touch: any touch mitigates.
Close: a close back into the gap mitigates.
Full Bar (Wick spans gap): a single candle wicks across top/bottom.
Full Bar Close (Close beyond): body closes beyond the far edge.
Box Management
Extend options: Extend right, Cap N Bars, or None.
Keep Most-Recent: caps total boxes for a clean chart.
Optional border; separate bull/bear box colors & transparency; optional center label.
How to use it
Combine HTF FVG zones with your EMA/MTF bias for pullback entries.
Prefer confluence with session timing (e.g., NYSE open sweeps into HTF FVG + trend alignment).
6) Alerts (built-in)
EMA Alignment: Bullish/Bearish – fires when the 20/50/200 stack flips.
Price Above/Below All (Aligned) – fires when price crosses all three while aligned.
SMART Trigger – a single alert that covers any of the above flips.
How to use it
Set SMART on your watchlist symbols; open the chart when it pings.
Use session windows and HTF FVGs to refine timing.
snapshot
Tips & Best Practices
Timeframes: scalp on 1–15m with 1H FVGs, or swing on 1H–4H with 4H/D FVGs.
Performance: If charts feel heavy, disable borders/labels or lower Keep Most-Recent.
Colors: Adjust EMA/box background transparency to match your theme.
Reading the table: Aim for 3–4/4 confluence; fade signals when it’s 1/4 or mixed.
Disclaimers
This is educational tooling, not financial advice. Past performance ≠ future results. Always validate on a demo account and manage risk.
Trade PullBack - EMA Pullback System with Auto Risk-Reward# Trade Pull Back - Professional Pullback Trading System
## 📊 Overview
**Trade Pull Back** is a comprehensive pullback trading system that combines trend-following principles with precise entry timing using candlestick pattern confirmation. This indicator is designed for traders who want to enter trending markets at optimal retracement levels with pre-calculated risk-reward ratios.
---
## 🎯 Core Methodology
### Why This System Works
Most traders struggle with two key challenges:
1. **Entering too early** - jumping into trades before the pullback completes
2. **Entering too late** - missing the momentum after the pullback reverses
This system solves both problems by using a **3-Phase Confirmation Process**:
**Phase 1: Trend Identification** → **Phase 2: Pullback Detection** → **Phase 3: Reversal Confirmation**
---
## 🔧 How It Works
### 1. Triple EMA Framework (The Foundation)
Unlike traditional single EMA systems, this indicator uses **3 separate EMAs** with different purposes:
- **EMA Trend (default: 50)** - Determines the overall market direction
- Source: HL/2 for balanced trend reading
- Acts as the primary filter - we only trade in its direction
- **EMA High (default: 20)** - Dynamic resistance in uptrends
- Source: High prices for accurate resistance mapping
- Entry trigger for bullish setups when price closes above it
- **EMA Low (default: 20)** - Dynamic support in downtrends
- Source: Low prices for accurate support mapping
- Entry trigger for bearish setups when price closes below it
**Why 3 EMAs?**
- Single EMA can't distinguish between trend and pullback zones
- Two EMAs (like MACD) don't provide clear entry/exit levels
- Three EMAs create a **channel system** that identifies both trend direction AND optimal entry zones
### 2. Pattern Recognition Engine
The system detects two high-probability reversal patterns:
#### Engulfing Patterns
- **Bullish Engulfing**: Previous bearish candle completely engulfed by bullish candle
- **Bearish Engulfing**: Previous bullish candle completely engulfed by bearish candle
- Validates: Strong momentum reversal with volume confirmation
#### Pin Bar Patterns
- **Bullish Pin Bar (Hammer)**: Long lower wick (60%+ of total range) rejecting lower prices
- **Bearish Pin Bar (Inverted Hammer)**: Long upper wick (60%+ of total range) rejecting higher prices
- Validates: Institutional rejection at support/resistance levels
**Pattern Quality Filter:**
- Body-to-wick ratio must meet minimum standards
- Checks previous candle momentum
- Requires trend alignment before signaling
### 3. Pullback Confirmation System
The system includes **5 mandatory conditions** before generating a signal:
#### For Bullish Signals (BUY):
1. ✅ Close > EMA Trend (uptrend confirmed)
2. ✅ EMA High > EMA Trend AND EMA Low > EMA Trend (healthy trend structure)
3. ✅ Bullish Engulfing OR Bullish Pin Bar (pattern detected)
4. ✅ Close > EMA High (breakout confirmation)
5. ✅ Optional: Low < EMA High (pullback occurred)
#### For Bearish Signals (SELL):
1. ✅ Close < EMA Trend (downtrend confirmed)
2. ✅ EMA High < EMA Trend AND EMA Low < EMA Trend (healthy trend structure)
3. ✅ Bearish Engulfing OR Bearish Pin Bar (pattern detected)
4. ✅ Close < EMA Low (breakdown confirmation)
5. ✅ Optional: High > EMA Low (pullback occurred)
**Additional Filters:**
- **Consecutive Bars Check**: Ensures pullback had momentum (1-5 bearish/bullish bars)
- **Signal Spacing**: Minimum 4 bars between signals to avoid noise
- **Confirmation Delay**: Signal appears only AFTER bar closes (no repainting)
---
## 💰 Automatic Risk-Reward Calculator
### Smart Position Sizing
When a signal triggers, the system automatically calculates:
**For Long Positions:**
- **Entry**: High of signal candle
- **Stop Loss**: Lower of last 2 candle lows (protects against false breakouts)
- **Target 1 (1R)**: Entry + 1x Risk
- **Target 2 (2R)**: Entry + 2x Risk
- **Target 3 (3R)**: Entry + 3x Risk
**For Short Positions:**
- **Entry**: Low of signal candle
- **Stop Loss**: Higher of last 2 candle highs
- **Targets**: Calculated based on risk multiple
### Auto-Remove Feature
Lines and labels automatically disappear when:
- Price hits Stop Loss (trade invalidated)
- Price reaches 3R target (trade complete)
This keeps your chart clean and focuses only on active trades.
---
## 📈 Multi-Timeframe Trend Analysis
### Confluence Trading
The built-in MTF trend box shows trend status across 7 timeframes simultaneously:
- M1, M5, M15, M30, H1, H4, D1
**Color Coding:**
- 🟢 **Green**: Uptrend (Price > EMA Trend AND EMAs aligned bullish)
- 🔴 **Red**: Downtrend (Price < EMA Trend AND EMAs aligned bearish)
- ⚪ **Gray**: No clear trend
**Why This Matters:**
- Trade with higher timeframe trends for better win rate
- Avoid counter-trend trades when all timeframes show same direction
- Identify divergences between timeframes for reversal opportunities
---
## 🎨 Customization Options
### EMA Settings
- Adjust periods for different trading styles (scalping vs swing trading)
- Choose price sources (HL/2, Close, HLC/3) for sensitivity tuning
### Pattern Selection
- Enable/disable Engulfing patterns
- Enable/disable Pin Bar patterns
- Trade only your preferred pattern type
### Signal Filters
- **Require Pullback**: Force pullback condition (stricter entries)
- **Consecutive Bars**: Set momentum requirement (1-5 bars)
### Display Options
- Show/hide EMA lines
- Show/hide signals
- Enable/disable alerts
- Customize Risk-Reward line styles and extensions
---
## 📋 How to Use This Indicator
### Step 1: Identify the Trend
- Wait for price to establish clear direction relative to EMA Trend (50)
- Check MTF box to confirm higher timeframe alignment
### Step 2: Wait for Pullback
- In uptrend: Watch for price to pull back toward EMA High
- In downtrend: Watch for price to pull back toward EMA Low
### Step 3: Pattern Confirmation
- Look for Engulfing or Pin Bar pattern (triangle/diamond markers)
- Ensure pattern forms at or near the EMA High/Low zone
### Step 4: Entry & Risk Management
- Enter when signal appears (after bar closes)
- Use displayed Stop Loss and Take Profit levels
- Consider partial profits at 1R and 2R, let remainder run to 3R
### Step 5: Trade Management
- If price hits SL, lines disappear automatically (trade invalidated)
- If price reaches 3R, lines disappear (trade complete)
- Consider trailing stop after 1R is reached
---
## ⚙️ Recommended Settings
### For Scalping (M1-M5)
- EMA Trend: 20-30
- EMA High/Low: 10-15
- Require Pullback: OFF
- Consecutive Bars: 1
### For Day Trading (M15-H1)
- EMA Trend: 50 (default)
- EMA High/Low: 20 (default)
- Require Pullback: ON
- Consecutive Bars: 2-3
### For Swing Trading (H4-D1)
- EMA Trend: 100-200
- EMA High/Low: 50
- Require Pullback: ON
- Consecutive Bars: 3-5
---
## ✅ What Makes This Script Original
### 1. Systematic Approach
This isn't just a collection of indicators. It's a **complete trading system** with:
- Defined entry rules (5-point confirmation checklist)
- Automatic risk management (SL/TP calculation)
- Trade validation (consecutive bars, signal spacing)
### 2. Smart EMA Framework
The 3-EMA system creates a **dynamic channel** that adapts to market conditions:
- Trend EMA = Direction filter
- High/Low EMAs = Entry/Exit zones
- Together they form a "trade zone" that standard EMAs can't provide
### 3. Pattern Quality Control
Not all Engulfing or Pin Bar patterns are equal. This system:
- Validates body-to-wick ratios
- Checks previous candle momentum
- Requires trend alignment before signaling
### 4. Auto Risk-Reward Management
Most indicators just show signals. This one:
- Calculates exact entry prices
- Places stop loss at optimal location (lower of 2 lows)
- Projects 3 profit targets based on risk
- Auto-removes when trade is complete/invalidated
### 5. No Repainting
- All signals appear AFTER bar closes
- No future data leaking
- What you see in backtest = what you get in real-time
---
## 🚨 Alerts
Built-in alerts notify you when:
- Bullish signal confirmed
- Bearish signal confirmed
Alerts fire once per bar (no spam) and only after bar closes (no false alerts).
---
## 📊 Best Practices
### ✅ DO:
- Trade in direction of higher timeframe trends
- Wait for full confirmation (all 5 conditions met)
- Use proper position sizing (1-2% risk per trade)
- Let winners run to at least 2R
### ❌ DON'T:
- Trade against major trend on MTF box
- Enter before signal bar closes
- Ignore the Stop Loss level
- Overtrade - respect the 4-bar minimum spacing
---
## 🔍 Limitations
This indicator is a **tool**, not a crystal ball:
- No indicator wins 100% of the time
- False signals occur in choppy/ranging markets
- Best results in trending conditions
- Requires proper risk management
- Should be combined with fundamental analysis and market context
---
## 📚 Educational Value
This script teaches:
- How to combine trend following with mean reversion
- Pattern recognition and validation
- Risk-reward ratio calculation
- Multi-timeframe analysis
- Proper trade entry timing
---
## 🎓 Credits & Disclaimer
**Original Work**: All code written from scratch
**Methodology**: Based on classical technical analysis principles (EMA crossovers, candlestick patterns, support/resistance)
**Disclaimer**: This indicator is for educational purposes. Past performance does not guarantee future results. Always practice proper risk management.
---
## 📞 Support
If you find this indicator helpful:
- Leave a review
- Share with fellow traders
- Provide feedback for improvements
**Note**: This is a closed-source script to protect the proprietary signal logic and filtering algorithms. The description above provides comprehensive understanding of the methodology without revealing exact implementation details.
---
**Version**: 1.0
**Pine Script Version**: 5
**Type**: Indicator (Overlay)
**Category**: Trend Following + Pattern Recognition
---
*Happy Trading! 🚀*
# 🇹🇭 คู่มือภาษาไทย / Thai Guide
# Trade Pull Back - คู่มือภาษาไทย
## 📊 ภาพรวม
**Trade Pull Back** เป็นระบบเทรด Pullback ที่ผสมผสานการเทรดตามเทรนด์กับการจับจังหวะเข้าออเดอร์ด้วย Candlestick Pattern พร้อมคำนวณ Risk-Reward อัตโนมัติ
---
## 🎯 หลักการทำงาน
### ทำไมระบบนี้ได้ผล?
แก้ปัญหา 2 ข้อหลักของเทรดเดอร์:
1. **เข้าเร็วเกินไป** - เข้าก่อน Pullback เสร็จ
2. **เข้าช้าเกินไป** - พลาดโมเมนตัมหลังกลับตัว
**วิธีแก้**: ใช้กระบวนการยืนยัน 3 ขั้นตอน
- **ขั้น 1**: ระบุเทรนด์ → **ขั้น 2**: ตรวจจับ Pullback → **ขั้น 3**: ยืนยันการกลับตัว
---
## 🔧 ส่วนประกอบหลัก
### 1. ระบบ EMA 3 เส้น
ต่างจาก EMA ทั่วไป ระบบนี้ใช้ 3 เส้นที่มีหน้าที่แยกกัน:
- **EMA Trend (50)** - กำหนดทิศทางเทรนด์หลัก
- **EMA High (20)** - แนวต้านไดนามิก (สำหรับ Buy)
- **EMA Low (20)** - แนวรับไดนามิก (สำหรับ Sell)
**ทำไมต้อง 3 เส้น?**
- 1 เส้น = แยกเทรนด์กับ Pullback ไม่ได้
- 2 เส้น = ไม่มีจุด Entry/Exit ชัดเจน
- 3 เส้น = สร้าง Channel ที่บอกทั้งเทรนด์และโซนเข้าออเดอร์
### 2. ตรวจจับ Pattern
ระบบตรวจจับ 2 Pattern หลัก:
**Engulfing (แท่งกลืน)**
- Bullish: แท่งเขียวกลืนแท่งแดงทั้งหมด
- Bearish: แท่งแดงกลืนแท่งเขียวทั้งหมด
**Pin Bar (แท่งหาง)**
- Bullish: หางล่างยาว 60%+ ของช่วงทั้งหมด
- Bearish: หางบนยาว 60%+ ของช่วงทั้งหมด
### 3. เงื่อนไขยืนยันสัญญาณ (5 ข้อ)
**สัญญาณ Buy:**
1. ✅ ราคาปิด > EMA Trend (เทรนด์ขาขึ้น)
2. ✅ EMA High และ Low เหนือ EMA Trend (โครงสร้างดี)
3. ✅ เกิด Bullish Engulfing หรือ Pin Bar
4. ✅ ราคาปิด > EMA High (ยืนยัน Breakout)
5. ✅ ตัวเลือก: มี Pullback มาแตะ EMA High
**สัญญาณ Sell:**
1. ✅ ราคาปิด < EMA Trend (เทรนด์ขาลง)
2. ✅ EMA High และ Low ใต้ EMA Trend (โครงสร้างดี)
3. ✅ เกิด Bearish Engulfing หรือ Pin Bar
4. ✅ ราคาปิด < EMA Low (ยืนยัน Breakdown)
5. ✅ ตัวเลือก: มี Pullback มาแตะ EMA Low
**ตัวกรองเพิ่มเติม:**
- ต้องมีแท่งติดกัน 1-5 แท่ง (กำหนดได้)
- ห่างสัญญาณก่อนหน้าอย่างน้อย 4 แท่ง
- สัญญาณปรากฏหลังแท่งปิดเท่านั้น (ไม่ Repaint)
---
## 💰 คำนวณ Risk-Reward อัตโนมัติ
เมื่อสัญญาณเกิด ระบบคำนวณให้อัตโนมัติ:
**Long Position:**
- Entry = High ของแท่งสัญญาณ
- Stop Loss = Low ที่ต่ำกว่าของ 2 แท่งล่าสุด
- Target = 1R, 2R, 3R
**Short Position:**
- Entry = Low ของแท่งสัญญาณ
- Stop Loss = High ที่สูงกว่าของ 2 แท่งล่าสุด
- Target = 1R, 2R, 3R
**ลบอัตโนมัติ:** เส้นหายเมื่อราคาชน SL หรือถึง 3R
---
## 📈 กล่องเทรนด์หลาย Timeframe
แสดงเทรนด์พร้อมกัน 7 Timeframe:
- M1, M5, M15, M30, H1, H4, D1
**สีแสดงผล:**
- 🟢 เขียว = Uptrend
- 🔴 แดง = Downtrend
- ⚪ เทา = ไม่มีเทรนด์
**ประโยชน์:** เทรดตาม Timeframe ใหญ่เพื่อเพิ่ม Win Rate
---
## 📋 วิธีใช้งาน (5 ขั้นตอน)
1. **ระบุเทรนด์** - เช็คราคาเทียบกับ EMA Trend และกล่อง MTF
2. **รอ Pullback** - เฝ้าราคา Pullback มาที่ EMA High/Low
3. **เช็ค Pattern** - มองหาลูกศรสามเหลี่ยม (Engulfing) หรือเพชร (Pin Bar)
4. **เข้าออเดอร์** - เข้าเมื่อสัญญาณปรากฏ ใช้ SL/TP ที่แสดง
5. **จัดการเทรด** - เส้นจะหายเองเมื่อชน SL หรือถึง 3R
---
## ⚙️ การตั้งค่าแนะนำ
**Scalping (M1-M5)**
- EMA Trend: 20-30
- EMA High/Low: 10-15
- Require Pullback: ปิด
**Day Trading (M15-H1)**
- EMA Trend: 50 (ค่าเริ่มต้น)
- EMA High/Low: 20 (ค่าเริ่มต้น)
- Require Pullback: เปิด
**Swing Trading (H4-D1)**
- EMA Trend: 100-200
- EMA High/Low: 50
- Require Pullback: เปิด
---
## ✅ จุดเด่นที่แตกต่าง
1. **เป็นระบบสมบูรณ์** - ไม่ใช่แค่รวม Indicator
2. **EMA 3 เส้นสร้าง Channel** - บอกทั้งเทรนด์และโซนเข้า
3. **ตรวจสอบคุณภาพ Pattern** - ไม่ใช่ทุก Pattern ที่ให้สัญญาณ
4. **คำนวณ RR อัตโนมัติ** - วาง SL/TP ให้เลย
5. **ไม่ Repaint** - สัญญาณปรากฏหลังแท่งปิดเท่านั้น
---
## 📊 ควรทำ / ไม่ควรทำ
### ✅ ควรทำ:
- เทรดตามเทรนด์ Timeframe ใหญ่
- รอยืนยันครบ 5 เงื่อนไข
- เสี่ยง 1-2% ต่อเทรด
- ปล่อยกำไรไปอย่างน้อย 2R
### ❌ ไม่ควรทำ:
- เทรดทวนเทรนด์ในกล่อง MTF
- เข้าก่อนแท่งปิด
- ละเลย Stop Loss
- เทรดบ่อยเกินไป
---
## 🔍 ข้อจำกัด
- ไม่มี Indicator ไหนชนะ 100%
- สัญญาณผิดพลาดเกิดในตลาด Sideways
- ผลดีสุดในตลาดที่มีเทรนด์ชัด
- ต้องใช้ Money Management
- ควรดูปัจจัยพื้นฐานประกอบ
---
## 🎓 คำเตือน
**Disclaimer**: อินดิเคเตอร์นี้สำหรับการศึกษา ผลในอดีตไม่รับประกันอนาคต ใช้ Risk Management ที่เหมาะสมเสมอ
---
**เวอร์ชั่น**: 1.0
**Pine Script**: v5
**ประเภท**: Indicator (Overlay)
*Happy Trading! 🚀*
## Screenshots
**Bearish Signals with Risk-Reward:**
! (drive.google.com)
**Bullish Signal with Risk-Reward:**
! (drive.google.com)
**Multi-Timeframe Trend Box:**
! (drive.google.com)
**Settings Panel:**
! (drive.google.com)
SCREENER Excess Combo — First-Hour Excess + MTF Candles + GOLDWhat it does
This study hunts for excess (failed pushes that leave long wicks) and higher-quality reversal bars, then rolls them into two compact states you can scan for on the Pine Screener:
Screener — 15m Bull Excess State → 1 when the rolling 15-minute streak condition for bull excess is met
Screener — 15m Bear Excess State → 1 when the rolling 15-minute streak condition for bear excess is met
Everything else in the script builds those states:
Module A — First-Hour Excess: Looks only inside a configurable first-hour session (default 09:30–10:30). Optional gap filter (by % or Daily ATR). Detects excess low (bullish) and excess high (bearish) probes using ATR-scaled range/wick/close placement thresholds + cooldown.
Module B — MTF Candles: Three pattern families with ATR floors: Pin/Excess tail, Engulfing, Outside. Priority is Engulf → Outside → Pin. Optional RTH gating and early-bar ignore.
GOLD consensus: If ≥2 out of 4 “bull forms” (A/B: Pin/Engulf/Outside) fire on a bar → GOLD Bull. Same for bears. Ties are broken using wick dominance.
Module D — 15m Streak States: Creates the two screener outputs by counting 15m events (A and/or B patterns, optionally including GOLD). Opposite-side event resets the active streak. Streaks persist across days (no daily reset) so you can require multiple consecutive events across sessions.
How to use it in the Pine Screener
Add this indicator to your chart once (no special timeframe required).
Open Pine Screener → choose this study.
Add these two columns (they’re included as hidden plot() series):
Screener — 15m Bull Excess State
Screener — 15m Bear Excess State
Filter for = 1 on either column to get candidates that currently meet your streak target.
(Optional) Turn on “Use in Pine Screener” toggle inside the script if you don’t want any drawings/tables on charts while scanning.
Key Inputs (quick guide)
Streak Target (15m): How many counted events in a row are required for state = 1. Increase to demand more confirmation across sessions.
Count GOLD as ‘excess’: If on, GOLD bars also contribute to the streak.
Module A thresholds: ATR-scaled Min range, Min wick, and Close in fraction set how strict first-hour probes must be; optional Gap filter (by % or Daily ATR).
Module B thresholds: Separate ATR floors for intraday/D/W/M; wick:body ratio for Pins; min body ATR for Engulf/Outside; optional RTH session and “ignore first N” bars.
Tip: If you get too many signals, raise ATR floors or the streak target. If you get too few, lower them or allow GOLD to count.
On-chart visuals (optional)
Bar color merges A + B, with GOLD shown in gold.
Small arrows show which module fired (15m).
A compact badge can display the live streak count (when not in Screener mode).
Turn these off with “Use in Pine Screener” to keep scans lightweight.
Logic Notes
All sizing is normalized by ATR so the behavior is comparable across symbols.
First-hour gap logic can be % or Daily ATR based.
When both sides fire on the same 15m bar (rare), the streaks neutralize for that bar.
Streak counters do not reset at the next trading day—they carry across sessions.
Disclaimers
This tool is for research and education. It does not constitute financial advice. Always validate signals in context (trend, liquidity, news) and manage risk. Settings that work on one asset may not generalize—tune thresholds and the streak target to your universe.
Scalper - Pattern Recognition & Price Action with Divergence Scalper - Pattern Recognition & Price Action with Divergence
Overview
An educational indicator designed to demonstrate comprehensive technical analysis concepts through integrated pattern recognition, price action analysis, and divergence detection. This tool combines traditional candlestick patterns with modern institutional concepts and advanced divergence analysis for educational market study.
Educational Purpose & Originality
Core Educational Concepts
This indicator serves as a learning platform for understanding:
- **Pattern Recognition Methodology**: Systematic identification of candlestick formations
- **Price Action Theory**: Modern institutional footprint analysis
- **Divergence Analysis**: Momentum divergence detection across multiple oscillators
- **Confluence Systems**: Multi-signal integration and validation techniques
Original Implementation Features
1. Enhanced Pattern Detection Library
- **Volatility-Filtered Patterns**: ATR-based validation for pattern significance
- **Volume-Confirmed Formations**: Integration of volume analysis with pattern detection
- **Multi-Candle Pattern Recognition**: Three-candle formations and complex patterns
- **Context-Aware Detection**: Patterns validated against market structure
2. Advanced Divergence System
- **Multi-Oscillator Analysis**: RSI, CCI, and MACD divergence detection
- **Four Divergence Types**: Regular bullish/bearish and hidden bullish/bearish
- **Pivot-Based Detection**: Systematic swing high/low identification
- **Weighted Signal Integration**: Divergences integrated into confluence scoring
3. Modern Price Action Concepts
- **Fair Value Gaps (FVG)**: Identification of institutional inefficiencies
- **Order Block Detection**: Volume-validated accumulation/distribution zones
- **Dynamic Support/Resistance**: Touch-count validated levels with ATR tolerance
- **Breakout Analysis**: Volume-confirmed price breakouts
4. Intelligent Confluence System
- **Multi-Signal Aggregation**: Combines patterns, oscillators, divergences, and breakouts
- **Weighted Scoring Algorithm**: Different signal types receive appropriate weighting
- **Visual Confluence Display**: Clear indication of high-probability setups
- **Reason Tracking**: Shows which signals contribute to confluence
How to Use
Initial Configuration
1. **Enable Desired Components**: Toggle individual analysis modules based on learning focus
2. **Adjust Sensitivity Settings**: Configure pattern detection parameters for your market
3. **Select Divergence Options**: Choose oscillators and divergence types to monitor
4. **Set Confluence Requirements**: Define minimum signals needed for confirmation
Component Settings
Moving Average Configuration
- Four customizable MA lines for multi-timeframe trend analysis
- Selectable MA types (SMA, EMA, WMA, VWMA, HMA)
- Independent timeframe settings for each MA
Pattern Recognition Settings
- **Engulfing Patterns**: Strong engulfing with ATR validation
- **Doji Variations**: Standard, gravestone, and dragonfly detection
- **Hammer/Hanging Man**: Context-validated reversal patterns
- **Star Formations**: Morning and evening star patterns
- **Three Soldiers/Crows**: Momentum continuation patterns
Divergence Detection Parameters
- **Lookback Period**: Adjustable swing detection range
- **Minimum Pivot Strength**: Percentage threshold for valid pivots
- **Oscillator Selection**: RSI, CCI, MACD, or combination
- **Divergence Types**: Regular and hidden divergences
Signal Interpretation
Visual Indicators
- **Pattern Labels**: Clear marking of detected formations
- **Divergence Lines**: Visual connection between price and oscillator pivots
- **Support/Resistance Levels**: Dynamic horizontal levels with validation
- **Confluence Signals**: Large "BULL" or "BEAR" labels for high-probability setups
Dashboard Information
- Real-time oscillator values (RSI, CCI, MACD)
- Current signal count for bulls and bears
- Active divergence status
- Confluence confirmation status
Important Educational Considerations
Learning Focus
- **Pattern Study**: Understand how traditional patterns form and their limitations
- **Divergence Concepts**: Learn to identify momentum shifts before price reversals
- **Confluence Theory**: Practice combining multiple analysis techniques
- **Risk Awareness**: No pattern or signal guarantees future price movement
Limitations for Learning
- **Historical Analysis**: Patterns are identified after formation
- **No Predictive Guarantee**: Educational tool for understanding concepts, not predictions
- **Market Context Required**: Patterns should be considered within broader market context
- **Practice Required**: Effective use requires study and practice
Educational Best Practices
1. **Start Simple**: Enable one component at a time to understand each concept
2. **Paper Trade**: Practice identifying signals without real money risk
3. **Study Failed Signals**: Learn why patterns fail to improve understanding
4. **Combine with Other Analysis**: Use alongside fundamental and sentiment analysis
5. **Document Observations**: Keep a journal of pattern occurrences and outcomes
Technical Components
Indicator Architecture
- **Modular Design**: Independent modules for different analysis types
- **Performance Optimization**: Efficient calculation methods for smooth operation
- **Visual Management**: Controlled use of Pine Script drawing objects
- **Array-Based Storage**: Efficient data management for historical analysis
Calculation Methods
- **ATR-Based Validation**: Volatility-adjusted pattern filtering
- **Volume Analysis**: Comparative volume assessment for confirmation
- **Pivot Detection**: Mathematical identification of swing points
- **Statistical Validation**: Touch-count and tolerance-based S/R levels
Divergence Detection Methodology
Regular Divergences (Reversal Signals)
- **Bullish**: Price lower low + Oscillator higher low
- **Bearish**: Price higher high + Oscillator lower high
Hidden Divergences (Continuation Signals)
- **Hidden Bullish**: Price higher low + Oscillator lower low
- **Hidden Bearish**: Price lower high + Oscillator higher high
Validation Criteria
- Minimum pivot strength requirement (percentage-based)
- Lookback period for swing detection
- Multiple oscillator confirmation option
Confluence Scoring System
Signal Categories
1. **Pattern Signals** (Weight: 1): Candlestick formations
2. **Oscillator Signals** (Weight: 1): RSI/CCI extremes
3. **Breakout Signals** (Weight: 1): Volume-confirmed breaks
4. **Regular Divergences** (Weight: 2): Higher probability reversals
5. **Hidden Divergences** (Weight: 1): Trend continuation signals
Confluence Thresholds
- Adjustable minimum signal requirement (2-6 signals)
- Visual indication when threshold is met
- Detailed reason display for educational understanding
Educational Dashboard
Real-Time Metrics
- Oscillator readings (RSI, CCI, MACD)
- ATR volatility measurement
- Bull/Bear signal counts
- Divergence status
- Confluence confirmation
Customization Options
- Position selection (6 screen locations)
- Color customization for all elements
- Enable/disable individual components
Version Information
- **Version 1.1**: Added comprehensive divergence detection system
- **Educational Focus**: Designed for learning technical analysis concepts
- **Integration**: All components work together in confluence system
Disclaimer
This indicator is designed exclusively for educational purposes to demonstrate technical analysis concepts. It is not financial advice and should not be used as the sole basis for trading decisions. Past patterns and signals do not guarantee future results. Trading involves substantial risk of loss. Users should conduct their own research, practice with demo accounts, and consider seeking advice from qualified professionals before making investment decisions.
Learning Resources
The indicator includes extensive inline comments explaining each calculation and concept. Users are encouraged to study the source code to understand the methodology behind each component. This transparency aids in learning how technical indicators work and their limitations.
---
**Note**: This is an educational tool meant to help traders learn pattern recognition and technical analysis concepts. Success requires practice, additional analysis, and proper risk management.
BayesStack RSI [CHE]BayesStack RSI — Stacked RSI with Bayesian outcome stats and gradient visualization
Summary
BayesStack RSI builds a four-length RSI stack and evaluates it with a simple Bayesian success model over a rolling window. It highlights bull and bear stack regimes, colors price with magnitude-based gradients, and reports per-regime counts, wins, and estimated win rate in a compact table. Signals seek to be more robust through explicit ordering tolerance, optional midline gating, and outcome evaluation that waits for events to mature by a fixed horizon. The design focuses on readable structure, conservative confirmation, and actionable context rather than raw oscillator flips.
Motivation: Why this design?
Classical RSI signals flip frequently in volatile phases and drift in calm regimes. Pure threshold rules often misclassify shallow pullbacks and stacked momentum phases. The core idea here is ordered, spaced RSI layers combined with outcome tracking. By requiring a consistent order with a tolerance and optionally gating by the midline, regime identification becomes clearer. A horizon-based maturation check and smoothed win-rate estimate provide pragmatic feedback about how often a given stack has recently worked.
What’s different vs. standard approaches?
Reference baseline: Traditional single-length RSI with overbought and oversold rules or simple crossovers.
Architecture differences:
Four fixed RSI lengths with strict ordering and a spacing tolerance.
Optional requirement that all RSI values stay above or below the midline for bull or bear regimes.
Outcome evaluation after a fixed horizon, then rolling counts and a prior-smoothed win rate.
Dispersion measurement across the four RSIs with a percent-rank diagnostic.
Gradient coloring of candles and wicks driven by stack magnitude.
A last-bar statistics table with counts, wins, win rate, dispersion, and priors.
Practical effect: Charts emphasize sustained momentum alignment instead of single-length crosses. Users see when regimes start, how strong alignment is, and how that regime has recently performed for the chosen horizon.
How it works (technical)
The script computes RSI on four lengths and forms a “stack” when they are strictly ordered with at least the chosen tolerance between adjacent lengths. A bull stack requires a descending set from long to short with positive spacing. A bear stack requires the opposite. Optional gating further requires all RSI values to sit above or below the midline.
For evaluation, each detected stack is checked again after the horizon has fully elapsed. A bull event is a success if price is higher than it was at event time after the horizon has passed. A bear event succeeds if price is lower under the same rule. Rolling sums over the training window track counts and successes; a pair of priors stabilizes the win-rate estimate when sample sizes are small.
Dispersion across the four RSIs is measured and converted to a percent rank over a configurable window. Gradients for bars and wicks are normalized over a lookback, then shaped by gamma controls to emphasize strong regimes. A statistics table is created once and updated on the last bar to minimize overhead. Overlay markers and wick coloring are rendered to the price chart even though the indicator runs in a separate pane.
Parameter Guide
Source — Input series for RSI. Default: close. Tips: Use typical price or hlc3 for smoother behavior.
Overbought / Oversold — Guide levels for context. Defaults: seventy and thirty. Bounds: fifty to one hundred, zero to fifty. Tips: Narrow the band for faster feedback.
Stacking tolerance (epsilon) — Minimum spacing between adjacent RSIs to qualify as a stack. Default: zero point twenty-five RSI points. Trade-off: Higher values reduce false stacks but delay entries.
Horizon H — Bars ahead for outcome evaluation. Default: three. Trade-off: Longer horizons reduce noise but delay success attribution.
Rolling window — Lookback for counts and wins. Default: five hundred. Trade-off: Longer windows stabilize the win rate but adapt more slowly.
Alpha prior / Beta prior — Priors used to stabilize the win-rate estimate. Defaults: one and one. Trade-off: Larger priors reduce variance with sparse samples.
Show RSI 8/13/21/34 — Toggle raw RSI lines. Default: on.
Show consensus RSI — Weighted combination of the four RSIs. Default: on.
Show OB/OS zones — Draw overbought, oversold, and midline. Default: on.
Background regime — Pane background tint during bull or bear stacks. Default: on.
Overlay regime markers — Entry markers on price when a stack forms. Default: on.
Show statistics table — Last-bar table with counts, wins, win rate, dispersion, priors, and window. Default: on.
Bull requires all above fifty / Bear requires all below fifty — Midline gate. Defaults: both on. Trade-off: Stricter regimes, fewer but cleaner signals.
Enable gradient barcolor / wick coloring — Gradient visuals mapped to stack magnitude. Defaults: on. Trade-off: Clearer regime strength vs. extra rendering cost.
Collection period — Normalization window for gradients. Default: one hundred. Trade-off: Shorter values react faster but fluctuate more.
Gamma bars and shapes / Gamma plots — Curve shaping for gradients. Defaults: zero point seven and zero point eight. Trade-off: Higher values compress weak signals and emphasize strong ones.
Gradient and wick transparency — Visual opacity controls. Defaults: zero.
Up/Down colors (dark and neon) — Gradient endpoints. Defaults: green and red pairs.
Fallback neutral candles — Directional coloring when gradients are off. Default: off.
Show last candles — Limit for gradient squares rendering. Default: three hundred thirty-three.
Dispersion percent-rank length / High and Low thresholds — Window and cutoffs for dispersion diagnostics. Defaults: two hundred fifty, eighty, and twenty.
Table X/Y, Dark theme, Text size — Table anchor, theme, and typography. Defaults: right, top, dark, small.
Reading & Interpretation
RSI stack lines: Alignment and spacing convey regime quality. Wider spacing suggests stronger alignment.
Consensus RSI: A single line that summarizes the four lengths; use as a smoother reference.
Zones: Overbought, oversold, and midline provide context rather than standalone triggers.
Background tint: Indicates active bull or bear stack.
Markers: “Bull Stack Enter” or “Bear Stack Enter” appears when the stack first forms.
Gradients: Brighter tones suggest stronger stack magnitude; dull tones suggest weak alignment.
Table: Count and Wins show sample size and successes over the window. P(win) is a prior-stabilized estimate. Dispersion percent rank near the high threshold flags stretched alignment; near the low threshold flags tight clustering.
Practical Workflows & Combinations
Trend following: Enter only on new stack markers aligned with structure such as higher highs and higher lows for bull, or lower lows and lower highs for bear. Use the consensus RSI to avoid chasing into overbought or oversold extremes.
Exits and stops: Consider reducing exposure when dispersion percent rank reaches the high threshold or when the stack loses ordering. Use the table’s P(win) as a context check rather than a direct signal.
Multi-asset and multi-timeframe: Defaults travel well on liquid assets from intraday to daily. Combine with higher-timeframe structure or moving averages for regime confirmation. The script itself does not fetch higher-timeframe data.
Behavior, Constraints & Performance
Repaint and confirmation: Stack markers evaluate on the live bar and can flip until close. Alert behavior follows TradingView settings. Outcome evaluation uses matured events and does not look into the future.
HTF and security: Not used. Repaint paths from higher-timeframe aggregation are avoided by design.
Resources: max bars back is two thousand. The script uses rolling sums, percent rank, gradient rendering, and a last-bar table update. Shapes and colored wicks add draw overhead.
Known limits: Lag can appear after sharp turns. Very small windows can overfit recent noise. P(win) is sensitive to sample size and priors. Dispersion normalization depends on the collection period.
Sensible Defaults & Quick Tuning
Start with the shipped defaults.
Too many flips: Increase stacking tolerance, enable midline gates, or lengthen the collection period.
Too sluggish: Reduce stacking tolerance, shorten the collection period, or relax midline gates.
Sparse samples: Extend the rolling window or increase priors to stabilize P(win).
Visual overload: Disable gradient squares or wick coloring, or raise transparency.
What this indicator is—and isn’t
This is a visualization and context layer for RSI stack regimes with simple outcome statistics. It is not a complete trading system, not predictive, and not a signal generator on its own. Use it with market structure, risk controls, and position management that fit your process.
Metadata
- Pine version: v6
- Overlay: false (price overlays are drawn via forced overlay where applicable)
- Primary outputs: Four RSI lines, consensus line, OB/OS guides, background tint, entry markers, gradient bars and wicks, statistics table
- Inputs with defaults: See Parameter Guide
- Metrics and functions used: RSI, rolling sums, percent rank, dispersion across RSI set, gradient color mapping, table rendering, alerts
- Special techniques: Ordered RSI stacking with tolerance, optional midline gating, horizon-based outcome maturation, prior-stabilized win rate, gradient normalization with gamma shaping
- Performance and constraints: max bars back two thousand, rendering of shapes and table on last bar, no higher-timeframe data, no security calls
- Recommended use-cases: Regime confirmation, momentum alignment, post-entry management with dispersion and recent outcome context
- Compatibility: Works across assets and timeframes that support RSI
- Limitations and risks: Sensitive to parameter choices and market regime changes; not a standalone strategy
- Diagnostics: Statistics table, dispersion percent rank, gradient intensity
Disclaimer
The content provided, including all code and materials, is strictly for educational and informational purposes only. It is not intended as, and should not be interpreted as, financial advice, a recommendation to buy or sell any financial instrument, or an offer of any financial product or service. All strategies, tools, and examples discussed are provided for illustrative purposes to demonstrate coding techniques and the functionality of Pine Script within a trading context.
Any results from strategies or tools provided are hypothetical, and past performance is not indicative of future results. Trading and investing involve high risk, including the potential loss of principal, and may not be suitable for all individuals. Before making any trading decisions, please consult with a qualified financial professional to understand the risks involved.
By using this script, you acknowledge and agree that any trading decisions are made solely at your discretion and risk.
Best regards and happy trading
Chervolino.
Do not use this indicator on Heikin-Ashi, Renko, Kagi, Point-and-Figure, or Range charts, as these chart types can produce unrealistic results for signal markers and alerts.
2-Rule Buy/Sell -JesseHow it works
Runs (sets) of candles: The script groups contiguous bullish and bearish “sets.” Doji handling is configurable (exclude, join bears, or join bulls).
Rule 1 (swing qualification):
BUY: The last bearish candle before the first bullish must be the lowest of its run and lower than both the previous bullish set’s lows and the previous bearish set’s lows.
SELL (mirror): The last bullish candle before the first bearish must be the highest of its run and higher than both the previous bearish set’s highs and the previous bullish set’s highs.
Rule 2 (BOS confirmation):
BUY: The first bullish candle must not trade below that last bear’s low and must close above a BOS level.
BOS level = previous bullish set’s highest high; override to the last bear’s high if that high is higher than the previous bull highs.
SELL (mirror): The first bearish candle must not trade above that last bull’s high and must close below a BOS level.
BOS level = previous bearish set’s lowest low; override to the last bull’s low if that low is lower than the previous bear lows.
VMS Momentum Trend Matrix Indicator [09.15 to 15.30]VMS Momentum Trend Matrix Indicator - Detailed Explanation
🎯 Overview & Core Philosophy
This is a multi-dimensional trading and a multi-confirmation system that combines 4 independent analytical approaches into one unified framework. The indicator operates on the principle of "consensus trading" - where signals are only considered reliable when multiple systems confirm each other. The system is designed for 9:15 AM to 3:30 PM trading sessions (Indian Market) with dynamic support/resistance levels.
Five Pillars of Analysis:
1. Trend Matrix – Multiple indicator voting system
2. Momentum Suite – Multiple Hybrid oscillator
3. Volume Analysis - Buy/sell pressure quantification
4. Key Level Identification - Dynamic support/resistance
5. EMA Trend: Indicates the overall long-term direction.
📊 DASHBOARD INTERPRETATION - ROW BY ROW
ROW 1: Indicator Name and Cell background colour changes with Trend Matrix
ROW 2: EMA ANALYSIS (It analyses independently and does not combine this analysis with the Combined Analysis and Trading View. Background Colour on price chart is based on this)
Purpose: Long-term trend identification using Exponential Moving Averages
What to Watch:
• Major Trend: Overall market direction (Bullish/Bearish/Neutral)
• Bullish Condition: All EMAs aligned upward
• Bearish Condition: All EMAs aligned downward
• Neutral: Mixed alignment
Trading Significance:
• Trading Condition: Current bias based on EMA alignment
• Bullish Market: Focus on LONG positions only
• Bearish Market: Focus on SHORT positions only
• Neutral Market: Wait for clearer direction
ROW 3-4: KEY LEVELS
Purpose: Dynamic support and resistance identification
Levels to Monitor:
• VMS Line-1 (Support): Dynamic Support for long positions
• VMS Line-2 (Resistance): Dynamic Resistance for short positions
• Up/Down: Daily base levels from opening price calculations
• Up: Daily support level based on opening price
• Down: Daily resistance level based on opening price
How Levels Work:
• Wait for Line-1 and 2 Crossing
• In the Upward movement, Line-1 will move with the price, and Line-2 will be moved as a straight line
• In the Downward movement, Line-2 will move with the price, and Line-2 will be moved as a straight line
• Provide clear entry/exit points
• If the price is between these levels, it is mostly a sideways market. After the Upward movement, if the price crosses Line-1 and other bearish conditions are supported, a short position can be taken. And in the Downward movement, it is the reverse condition.
• If the price is above the up level, it can be considered as bullish and below as bearish
ROW 5-6: VOLUME ANALYSIS
Purpose: Measure buying vs selling pressure
Key Metrics:
• Total Buy Volume: Cumulative buying pressure
• Total Sell Volume: Cumulative selling pressure
• Bullish Candles: Number of up-candles in session
• Bearish Candles: Number of down-candles in session
Interpretation:
• Buy Volume > Sell Volume: Bullish sentiment
• Sell Volume > Buy Volume: Bearish sentiment
• Bullish Candles Dominating: Upward momentum
• Bearish Candles Dominating: Downward momentum
ROW 7-8: MOMENTUM SUITE (Background colour of Oscillator is based on this)
Purpose: Short-term momentum strength and direction
Critical Components:
• Direction: Current momentum (BULLISH/BEARISH)
• Strength: 0-100% strength measurement
• Bullish Height: Positive momentum magnitude
• Bearish Height: Negative momentum magnitude
Strength Classification:
• 80-100%: Very Strong - High conviction trades
• 60-80%: Strong - Good trading opportunities
• 40-60%: Moderate - Caution advised
• 20-40%: Weak - Avoid trading
• 0-20%: Very Weak - No trade zone
ROW 9-11: TREND MATRIX
Purpose: Consensus from Multiple technical indicators
Matrix Scoring:
• Bullish Signals: Number voting UP
• Bearish Signals: Number voting DOWN
• Neutral Signals: Non-committed indicators
• Net Score: Bullish - Bearish signals
Trend Classification:
• Strong Uptrend: Net Score ≥ +5
• Uptrend: Net Score +1 to +4
• Neutral: Net Score = 0
• Downtrend: Net Score -1 to -4
• Strong Downtrend: Net Score ≤ -5
ROW 12: COMBINED ANALYSIS
Purpose: Final integrated signal from all systems
Bias Levels:
• STRONG BULLISH: All systems aligned upward
• BULLISH: Majority systems upward
• NEUTRAL: Mixed or weak signals
• BEARISH: Majority systems downward
• STRONG BEARISH: All systems aligned downward
Confidence Score: 0-100% reliability measurement
ROW 13: TRADING VIEW
Purpose: Clear action recommendations
Possible Actions:
• STRONG LONG: High conviction buy signal
• MODERATE LONG: Medium conviction buy signal
• WAIT FOR CONFIRMATION: No clear signal
• MODERATE SHORT: Medium conviction sell signal
• STRONG SHORT: High conviction sell signal
🎯 COMPLETE TRADING RULES
BUY ENTRY CONDITIONS (All Must Be True)
Primary Conditions:
1. Combined Bias: BULLISH or STRONG BULLISH
2. Trading Action: MODERATE LONG or STRONG LONG
3. Momentum Strength: ≥ 40% (≥60% for STRONG LONG)
4. Trend Matrix: Net Score ≥ +3
5. 6-EMA Trend: Bullish or Neutral
Confirmation Conditions:
6. Price Position: Above VMS Line-1 AND Base Up
7. Volume Confirmation: Buy Volume > Sell Volume
8. Bullish Candles: More bullish than bearish candles
Risk Management:
9. Stop Loss: Below VMS Line-1 OR Base Down (whichever is lower)
10. Position Size: Based on confidence score (higher score = larger position)
11. Take Profit: When Combined Bias turns "NEUTRAL" or momentum strength drops below 20%
12. Exit Signal: Trading Action shows "WAIT FOR CONFIRMATION"
SELL/SHORT ENTRY CONDITIONS (All Must Be True)
Primary Conditions:
1. Combined Bias: BEARISH or STRONG BEARISH
2. Trading Action: MODERATE SHORT or STRONG SHORT
3. Momentum Strength: ≥ 40% (≥60% for STRONG SHORT)
4. Bearish Signals: ≥ 12 in Trend Matrix
5. Trend Matrix: Net Score ≤ -3
6. EMA Trend: Bearish or Neutral
Confirmation Conditions:
6. Price Position: Below VMS Line-2 AND Base Down
7. Volume Confirmation: Sell Volume > Buy Volume
8. Bearish Candles: More bearish than bullish candles
Risk Management:
9. Stop Loss: Above VMS Line-2 OR Base Up (whichever is higher)
10. Position Size: Based on confidence score
11. Take Profit: When Combined Bias turns "NEUTRAL" or momentum strength drops below 20%
12. Exit Signal: Trading Action shows "WAIT FOR CONFIRMATION"
⏰ ENTRY/EXIT TIMING
Best Entry Times:
• 9:30-10:00 AM: Early session momentum established
• 11:00-11:30 AM: Mid-session confirmation
• 1:30-2:00 PM: Afternoon momentum shifts
Avoid Trading:
• First 15 minutes: Excessive volatility
• 12:00-1:00 PM: Low liquidity period
• After 3:00 PM: Session closing volatility
Exit Triggers:
Profit Taking:
• Target 1: 1:1 Risk-Reward (exit 50% position)
• Target 2: 1.5:1 Risk-Reward (exit remaining 50%)
• Trailing Stop: Move stop to breakeven after Target 1
Stop Loss Triggers:
• Price crosses opposite VMS line
• Combined Bias changes to NEUTRAL
• Momentum Strength drops below 20%
• Volume confirmation reverses
•
Emergency Exit:
• Trend Matrix Net Score reverses direction
• 6-EMA trend changes direction
• Key support/resistance breaks against position
📈 TRADING SCENARIOS
Scenario 1: STRONG BULLISH SETUP
- Combined Bias: STRONG BULLISH
- Trading Action: STRONG LONG
- Momentum Strength: 75%
- Trend Matrix: Net Score +8
- Price: Above VMS Line-1 and Base Up
- Volume: Strong buy volume dominance
ACTION: Enter LONG with full position size
STOP LOSS: Below VMS Line-1
TARGET: 1.5:1 Risk-Reward ratio
Scenario 2: MODERATE BEARISH SETUP
- Combined Bias: BEARISH
- Trading Action: MODERATE SHORT
- Momentum Strength: 55%
- Trend Matrix: Net Score -4
- Price: Below VMS Line-2 but above Base Down
- Volume: Moderate sell volume dominance
ACTION: Enter SHORT with half position size
STOP LOSS: Above VMS Line-2
TARGET: 1:1 Risk-Reward ratio
Scenario 3: NEUTRAL/WAIT SETUP
- Combined Bias: NEUTRAL
- Trading Action: WAIT FOR CONFIRMATION
- Momentum Strength: 35%
- Trend Matrix: Net Score 0
- Mixed volume signals
ACTION: NO TRADE - Wait for clearer signals
________________________________________
⚠️ RISK MANAGEMENT RULES
Position Sizing:
• STRONG Signals (80-100% confidence): 100% normal position
• MODERATE Signals (60-79% confidence): 50-75% position
• WEAK Signals (40-59% confidence): 25% position or avoid
• VERY WEAK (<40% confidence): NO TRADE
Daily Loss Limits:
• Maximum 2% capital loss per day
• Maximum 3 consecutive losing trades
• Stop trading after the daily limit is reached
Trade Management:
• Never move the stop loss against a position
• Take partial profits at predetermined levels
• Never average down losing positions
• Respect all exit signals immediately
________________________________________
🔄 SIGNAL CONFIRMATION PROCESS
Step 1: Trend Direction
Check EMA alignment and Combined Bias
Step 2: Momentum Strength
Verify Momentum Strength ≥ 40% and direction matches trend
Step 3: Volume Confirmation
Confirm volume supports the direction
Step 4: Matrix Consensus
Ensure Trend Matrix agrees (Net Score ≥ |3|)
Step 5: Price Position
Verify price is on the correct side of key levels
Step 6: Entry Execution
Enter on a pullback to support/resistance with a stop loss
________________________________________
This system works best when you wait for all conditions to align. Patience is key - only trade when all systems confirm the same direction with adequate strength. The multiple confirmation layers significantly increase the probability of success but reduce trading frequency.