Sharktank - Pi Cycle PredictionThe Pi Cycle indicator has called tops in Bitcoin quite accurately. Assuming history repeats itself, knowledge about when it might happen again could benefit you.
The indicator is fairly simple:
- A daily moving average of 350 ("long_ma" in script)
- A daily moving average of 111 ("short_ma" in script)
The value of the long moving average is multiplied by two. This way the longer moving average appears above the shorter one.
When the shorter one (orange colored) crosses above the longer (green colored) one, it could mean the top is in.
These moving averages rise at a certain rate. Using these rates we could try to estimate a possible crossover moment.  That's exactly what this indicator does!  It gives the user a prediction of when a crossover might happen.
Special thanks to:
- Ninorigo, for making his indicator public. This one uses his as a starting point.
- The_Caretaker, for coming up with this idea about calling a top. Yet, his is more price-based, this one is more time-based.
Cari dalam skrip untuk "one一季度财报"
Price Action - Support & Resistance by DGTSᴜᴘᴘᴏʀᴛ ᴀɴᴅ Rᴇꜱɪꜱᴛᴀɴᴄᴇ , is undoubtedly one of the key concepts of technical analysis
█  Sᴜᴘᴘᴏʀᴛ ᴀɴᴅ Rᴇꜱɪꜱᴛᴀɴᴄᴇ Dᴇꜰɪɴɪᴛɪᴏɴ 
Support and Resistance terms are used by traders to refer to price levels on charts that tend to act as barriers, preventing the price of an financial instrument from getting pushed in a certain direction. 
A  support level  is a price level where buyers are more aggressive than sellers. This means that the price is more likely to "bounce" off this level rather than break through it. However, once the price has breached this level it is likely to continue falling until meeting another support level. 
A  resistance level  is the opposite of a support level. It is where the price tends to find resistance as it rises. Again, this means that the price is more likely to "bounce" off this level rather than break through it. However, once the price has breached this level it is likely to continue rising until meeting another resistance level.
A previous support level will sometimes become a resistance level when the price attempts to move back up, and conversely, a resistance level will become a support level as the price temporarily falls back.
█  Iᴅᴇɴᴛɪꜰʏɪɴɢ Sᴜᴘᴘᴏʀᴛ ᴀɴᴅ Rᴇꜱɪꜱᴛᴀɴᴄᴇ 
Support and resistance can come in various forms, and the concept is more difficult to master than it first appears. Identification of key support and resistance levels is an essential ingredient to successful technical analysis. 
If the price stalls and reverses in the same price area on minimum of two different occasions, then a horizontal line is drawn to show that the market is struggling to move past that area. Those areas are static barriers, one of the most popular forms of support/resistance and are highlighted with horizontal lines. 
   Repeated test , the more often a support/resistance level is "tested" over an extended period of time (touched and bounced off by price), the more significance is given to that specific level
   High volume , the more buying and selling that has occurred at a particular price level, the stronger the support or resistance level is likely to be
   Market psychology , plays a major role as traders and investors remember the past and react to changing conditions to anticipate future market movement. 
   Psychological levels , is a price level that significantly affects the price of an underlying financial instrument. Typically, near round numbers often serve as support and resistance
The following support and resistance related topics are beyond the scope of this study, so they will be mentioned roughly only as a reference for support and resistance concept 
    Trendlines ,  Support and resistance levels in trends are dynamic. Throughout an uptrend, levels of support tend to look like a trendline, usually clustering around higher lows. As the price rises, the price where buyers consider the stock to be “too cheap” also changes, which creates new support levels on the way up. The same is also true for resistance levels. In an uptrend, a stock is continuously breaking through perceived resistance levels and making new highs
   Moving Averages , is a constantly changing line that smooths out past price data while also allowing the trader to identify support and resistance. In the example Notice how the price of the asset finds support at the moving average when the trend is up, and how it acts as resistance when the trend is down
   The Fibonacci Retracement/Extension tool , is a favorite among many short-term traders because it clearly identifies levels of potential support and resistance
   Pivot Point Calculations , is another common technical analysis technique, where pivot point is calculated based on the high, low, and closing prices of previous trading session/day and support & resistance levels are projected based on the pivot point, different calculation techniques are available, as presented in this example of an pivot point indicator :  PVTvX by DGT 
█  Tʀᴀᴅɪɴɢ Bᴀꜱᴇᴅ ᴏɴ Sᴜᴘᴘᴏʀᴛ ᴀɴᴅ Rᴇꜱɪꜱᴛᴀɴᴄᴇ 
Once an area or "zone" of support or resistance has been identified, those price levels can serve as potential entry or exit points because, as a price reaches a point of support or resistance, it will do one of two things—bounce back away from the support or resistance level (trading ranges), or violate the price level and continue in its direction (trading breakouts) —until it hits the next support or resistance level
The basic trading method for using support and resistance is to buy near support in uptrends or the parts of ranges or chart patterns where prices are moving up and to sell/sell short near resistance in downtrends or the parts of ranges and chart patterns where prices are moving down. Buying near support or selling near resistance can pay off, but there is no assurance that the support or resistance will hold. Therefore, consider waiting for some confirmation that the market is still respecting that area
Trading breakouts, a breakout is a potential trading opportunity that occurs when an asset's price moves above a resistance level or moves below a support level on increasing volume. The first step in trading breakouts is to identify current price trend patterns along with support and resistance levels in order to plan possible entry and exit points. Once the asset trades beyond the price barrier, volatility tends to increase and prices usually trend in the breakout's direction. Breakouts are such an important trading strategy since these setups are the starting point for future volatility increases, large price swings and, in many circumstances, major price trends. When trading breakouts, it is important to consider the underlying asset's support and resistance levels. The more times an asset price has touched these areas, the more valid these levels are and the more important they become. At the same time, the longer these support and resistance levels have been in play, the better the outcome when the asset price finally breaks out. Asset prices will often move slightly further than we expect them to. This doesn't happen all the time, but when it does it is called a false breakout. Therefore it is important to consider waiting for some confirmation while trading breakouts. It’s also popular for traders to sell 50% of their positions at the resistance level, and hold the rest in anticipation of a breakout above resistance
█  Pʀɪᴄᴇ Aᴄᴛɪᴏɴ - Sᴜᴘᴘᴏʀᴛ & Rᴇꜱɪꜱᴛᴀɴᴄᴇ ʙʏ DGT Sᴛᴜᴅʏ 
This experimental study attempts to identify the support and resistance levels. Assumes a simple logic to discover moments where the price is rising or falling consecutively for minimum 3 bars with the condition volume increases on each bar and the last bar’s volume should be bigger than the long term volume moving average.  A line will be drawn at the end of the move (highest or lowest, depending on the move direction), the line will be drawn at minimum on the 3rd bar and if condition holds for other consecutive bars the line will switch to 4th, 5th etc bar. 
Lines will not be deleted so the historical ones will remain and will emphasis the levels significance when they overlap in feature. Strong levels are more likely to hold and cause the price to move in the other direction, whereas the minor levels may only cause the price to pause and keep moving in the same direction. Determining future levels of support and resistance can drastically improve the returns of a short-term investing strategy 
Bar colors will be painted based on the volume of the specific bar to its long term volume moving average. This will help identifying the support and resistance levels significance and emphasis the sings of breakouts 
Finally, Volume spikes will be marked on top of the price chart. A high volume usually indicates more interest in the security and the presence of institutional traders. However, a rapidly rising price in an uptrend accompanied by a huge volume may be a sign of exhaustion. Traders usually look for breaks of support and resistance to enter positions. When security break critical levels without volume , you should consider the breakout suspect and prime for a reversal off the highs/lows. Volume spikes are often the result of news-driven events. Volume spike will often lead to sharp reversals since the moves are unsustainable due to the imbalance of supply and demand
A good example with many support and resistance concepts observed on a stock chart and detected by the study 
Settings:
Length of volume moving average, where volume moving average is used to detect support and resistance levels, is used as reference to compare with threshold values for volume spikes and colors of the bars 
Hint, to get more historical lines scrolling chart to left will enable visualization of them. Please note they may  appear to much all 500 line limit is used 😉
Special thanks to  @HEMANT  Telegram  user, for his observations and suggestions 
 Disclaimer:  
Trading success is all about following your trading strategy and the indicators should fit within your trading strategy, and not to be traded upon solely
The script is for informational and educational purposes only. Use of the script does not constitute professional and/or financial advice. You alone have the sole responsibility of evaluating the script output and risks associated with the use of the script. In exchange for using the script, you agree not to hold dgtrd TradingView user liable for any possible claim for damages arising from any decision you make based on use of the script
Volume-based S/R Levels
█ OVERVIEW
After my last indicator "Order Block Finder" was unexpectedly popular with the TradingView community, I decided to publish another experimental indicator which again tries to identify "areas of interest"
Idea:
Often candles with long wicks represent strong buying & selling pressure, especially when they are combined with extraordinary volume. Especially interesting to me are the lower wicks on red candles and the upper wicks of green candles. These wicks can potentially indicate "areas of interest" by the bigger players in the market and price may interact with these levels again in the future. 
This indicator tries to identify these "high volume / long wick" candles and paints a line of either Support or Resistance from the wick into the future.
█ CALCULATION LOGIC
Extraordinary Volume is identified by first calculating thresholds based on a volume Moving Average and Standard Deviations. Two Standard Deviation Values are entered to identify HIGH and EXTREME threshold levels. The current volume is classified by comparing the volume against these thresholds.
The following inputs can be made:
- Volume MA Length
- Standard Deviation Length
- Threshold for HIGH Volume (Number of StdDev)
- Threshold for EXTREME Volume (Number of StdDev)
Another entry parameter can be used to specify the Minimum Wick Length (in % of the candle body value) which identifies a "relevant" candle. If this value is set to 0, then there is no limit and all high volume candles are considered.
The identified Support/Resistance levels are shown as lines on the chart. The parameter "Length of lines (hours)" can be used to set the length of the lines (always in hours). Depending on the timeframe, this needs to be adjusted.
(I know that this can be solved more elegantly in pine, but it was just not important to me. As always everyone is free to copy the code and make improvements. Just give me a mention when you do.)
█ DISPLAY OPTIONS
Different display options are available in the settings:
- Display Support/Resistance: Select if you want to see only Support or Resistance lines - or both
- Display High/Extreme Volume: Select if you only want to see the Extreme Value Candles or the High Value Candles or both
- Display WICK / WICK Range: Select if you only want one line at the extreme value (High/Low) of the wick - or if you want to see a range (three lines - one at the top, one at the bottom and one in the middle of the wick)
- Show Signal Triangles?: This gives the option to show little triangles on all the identified candles
█ DISCLAIMER
This is an experimental indicator and I do not know if my theory works in real life. So treat this not as financial advise, but purely for entertainment and educational purposes.
As mentioned above, I publish this code open so that everyone can re-use it or hopefully even improve it.
Let me know if you have any ideas for improvement and if it is within my coding capabilities (which to be honest are quite limited), I will try to accomodate it.
Have fun.
On Chart Anticipated Moving Average Crossover IndicatorIntroducing the on chart moving average crossover indicator.
This is my On Chart Pinescript implementation of the Anticipated Simple Moving Average Crossover idea.
This indicator plots 6 user defined moving averages.
It also plots the 5 price levels required on the next close to cross a user selected moving average with the 5 other user defined moving averages
It also gives signals of anticipated moving average crosses as arrows on chart and also as tradingview alerts with a very high degree of accuracy
Much respect to the creator of the original idea Mr. Dimitris Tsokakis
Moving Averages
A moving average simplifies price data by smoothing it out by averaging closing prices and creating one flowing line which makes seeing the trend easier.
Moving averages can work well in strong trending conditions, but poorly in choppy or ranging conditions.
Adjusting the time frame can remedy this problem temporarily, although at some point, these issues are likely to occur regardless of the time frame chosen for the moving average(s).
While Exponential moving averages react quicker to price changes than simple moving averages. In some cases, this may be good, and in others, it may cause false signals.
Moving averages with a shorter look back period (20 days, for example) will also respond quicker to price changes than an average with a longer look back period (200 days).
Trading Strategies — Moving Average Crossovers
Moving average crossovers are a popular strategy for both entries and exits. MAs can also highlight areas of potential support or resistance.
The first type is a price crossover, which is when the price crosses above or below a moving average to signal a potential change in trend.
Another strategy is to apply two moving averages to a chart: one longer and one shorter.
When the shorter-term MA crosses above the longer-term MA, it's a buy signal, as it indicates that the trend is shifting up. This is known as a "golden cross."
Meanwhile, when the shorter-term MA crosses below the longer-term MA, it's a sell signal, as it indicates that the trend is shifting down. This is known as a "dead/death cross."
MA and MA Cross Strategy Disadvantages
Moving averages are calculated based on historical data, and while this may appear predictive nothing about the calculation is predictive in nature.
Moving averages are always based on historical data and simply show the average price over a certain time period.
Therefore, results using moving averages can be quite random.
At times, the market seems to respect MA support/resistance and trade signals, and at other times, it shows these indicators no respect.
One major problem is that, if the price action becomes choppy, the price may swing back and forth, generating multiple trend reversal or trade signals.
When this occurs, it's best to step aside or utilize another indicator to help clarify the trend.
The same thing can occur with MA crossovers when the MAs get "tangled up" for a period of time during periods of consolidation, triggering multiple losing trades.
Ensure you use a robust risk management system to avoid getting "Chopped Up" or "Whip Sawed" during these periods.
Profit MAX MTF HeatMapThis is a powerfull strategy which is made from combining 3 multi timeframes into one for profit max indicator
In this case we have daily, weekly and montly.
Our long conditions are the next ones :
 if we have an uptrend on all 3 at the same time, we go long.
 If we have a downtrend on all 3 of them at the same time we go short.
For exit, for long, as soon as one of the 3 converts into downtrend we exit the trade. 
For exit, for short, as soon as one of the 3 converts into uptrend we exit the trade.
This tool can be used on all types of markets, and can also be changed the time frames.
MACD Hybrid BSHMACD = Moving Average Convergence and Divergence
Hybrid = Combining the two main MACD signals into one indicator 
BSH = Buy Sell Hold
This indicator looks for a crossover of the MACD moving averages (12ema and 26ema) in order to generate a buy/sell signal and a crossover of the MACD line (12ema minus 26ema) and MACD signal line (9ema of MACD line) in order to generate a completely seperate buy/sell signal.  The two buy/sell signals are combined into a hybrid buy/sell/hold indicator which looks for one, neither, or both signals to be "buys."  If both signals are buys (fast crossed above slow), a "buy" signal is given (green bar color).  If only one signal is a buy, a "hold" signal is given (yellow bar color).  If neither signal is a buy, a "sell" signal is given (red bar color).  Note: MACD moving averages crossing over is the same thing as the MACD line crossing the zero level in the MACD indicator.
It makes sense to have the MACD indicator loaded as a reference when using this but it isn't required.  The lines plotted on the chart are the 12ema and a signal line which is the MACD signal line shown relative to the 12ema rather than the MACD line.  The 26ema is not plotted on the chart because the chart becomes cluttered, plus the moving averages crossing over is indicated with the MACD indicator.  
This indicator should be used with other indicators such as ATR (1), RSI (14), Bollinger bands (20, 2), etc. in order to determine the best course of action when a signal is given.  One way to use this as a strict system is to take a neutral cash position when a yellow "hold" signal is given, to go long when a
green "buy" signal is given, and to go short when a red "sell" signal is given.  It can be observed that for many tickers and timeframes that green-yellow-green and red-yellow-red sequences are stronger signals than green-yellow-red and red-yellow-green signals.
Note: Chart type must be "bars" in order for the bar colorization to work properly
Excellent ADXThe Average Directional movement indeX (ADX) is an indicator that helps you determine the trend direction, pivot points, and much more else! But it looks not so easy as other famous indicators. It seems strange or even terrible, but don't be afraid. Let's understand how it works and get its power into your analysis tactics.
In the beginning, imagine a drunk man goes through a ladder: step by step. Up, up, down, up, down, down, up...
How can we understand which direction he goes? Exactly! We can count the number of steps in each direction. In the above example, in the upward – 4, in the downward – 3. So, it looks like he goes in an upward direction.
The ADX indicator counts the same steps, but for price. The size of each step equals 1 ATR for "DI Length" candles. On the indicator chart, we have the green and red lines. The green line represents a number of steps upward. The red line shows one downward. When the red line upper green, then the price goes below, then the trend is directed down. Later the green line comes above the red one, and then the trend changes the direction to upward. Wow? After that, you can easy detect the trend direction on the market!
But it is still not the end. On the chart, we also have the fat blue line. This is the ADX line, and it represents the power of the trend. It is calculated from a distance between the green and red curves. The ADX line value grows if the distance is increased. If the movement is really powerful, then a number of steps into a direction much more prominent than one in an opposed direction. Then the blue line grows faster. But if the growth has stopped and the blue line turns back or already had changed self-direction, then it is a signal that the trend has ended too. It's an excellent sign to close the position (but not always). Easy? Not quite. Thresholds help you there. The indicator has two additional parameters: upper and lower thresholds to evaluate the trend-over signal strength. An u-turn of the ADX line above the upper threshold sends a strong signal. If one occurs between both thresholds, it is a bit weak signal. But if the blue line goes below the lower threshold, it looks like there is no trend, and the price goes side. We can also say that the price goes side when the ADX value gradually falls down.
The Excellent ADX indicator helps you catch pivot/pullback signals based on green, red, and blue lines. Each such signal is highlighted as a green (buy) or red (sell) dot on the plot. The size of the dot represents the strength of the signal. You can also check the position of green and red lines from each other to determine the trend direction and the place where it has been changed. The Excellent ADX indicator helps you there too. It highlights the trend direction by the background-color, so you'll never miss it! The Excellent ADX good compliance with the Price Channel indicator built for the same length. You can use them together to be on a trend wave always!
[blackcat] L2 Ehlers Hilbert Channel Breakout Trading SystemLevel: 2
Background
John F. Ehlers introuced Hilbert Channel Breakout Trading System in Nov, 2000.
Function
This indicator will show how the adaptive filter is being applied to a trading strategy. After the Hilbert Channel Breakout Signal is optimized, set the inputs for this indicator to match the corresponding inputs for the signal. 
In the March 2000 STOCKS & COMMODITIES, John Ehlers published a algorithm for the Hilbert cycle period, an indicator that plots the length of the current market cycle. The Hilbert transform achieved computational efficiency by using a two-dimensional numbering system. Unfortunately, this introduces amplitude error in calculating the quadrature component. Dr. Ehlers compensated for this error. He have updated the method of compensating for the amplitude error by applying a straight-line compensation term using the frequency calculation from one bar ago. This is possible because the cycle period cannot change drastically from bar to bar. The slowly varying cycle period is adequate to do a good job of amplitude compensation. 
In addition, Dr. Ehlers have used a different way to compute the cycle period. He used a homodyne discriminator because it exhibits superior performance in a low signal-to-noise environment. Homodyne means he used the signal multiplied by itself one bar ago to produce a zero-frequency beat note. This beat note carries the phase angle of the one-bar change. Still using the basic definition of a cycle, the one-bar rate of change of phase is exactly the cycle period. 
Here is the pine v4 code to generate the signals in the Hilbert channel breakout trading system, as discussed in Dr. Ehlers article in this issue, "Optimizing With Hilbert Indicators." The signal itself is a simple channel breakout system that generates buy and exit signals, that shows whether the system is long or flat; the high of the bar and the value of the entry channel; and the low of the bar and the value of the exit channel. This helps you see on a bar-by-bar basis exactly how the system is behaving. 
Key Signal
longcond--> when high breakouts EntryChannel to long
shortcond--> when low breakouts ExitChannel to short
Pros and Cons
100% John F. Ehlers definition translation, even variable names are the same. This help readers who would like to use pine to read his book.
Remarks
The 66th script for Blackcat1402 John F. Ehlers Week publication.
I tested it and believe it work better in small time frame e.g. 15m than large time frames.
Readme
In real life, I am a prolific inventor. I have successfully applied for more than 60 international and regional patents in the past 12 years. But in the past two years or so, I have tried to transfer my creativity to the development of trading strategies. Tradingview is the ideal platform for me. I am selecting and contributing some of the hundreds of scripts to publish in Tradingview community. Welcome everyone to interact with me to discuss these interesting pine scripts.
The scripts posted are categorized into 5 levels according to my efforts or manhours put into these works.
Level 1 : interesting script snippets or distinctive improvement from classic indicators or strategy. Level 1 scripts can usually appear in more complex indicators as a function module or element.
Level 2 : composite indicator/strategy. By selecting or combining several independent or dependent functions or sub indicators in proper way, the composite script exhibits a resonance phenomenon which can filter out noise or fake trading signal to enhance trading confidence level.
Level 3 : comprehensive indicator/strategy. They are simple trading systems based on my strategies. They are commonly containing several or all of entry signal, close signal, stop loss, take profit, re-entry, risk management, and position sizing techniques. Even some interesting fundamental and mass psychological aspects are incorporated.
Level 4 : script snippets or functions that do not disclose source code. Interesting element that can reveal market laws and work as raw material for indicators and strategies. If you find Level 1~2 scripts are helpful, Level 4 is a private version that took me far more efforts to develop.
Level 5 : indicator/strategy that do not disclose source code. private version of Level 3 script with my accumulated script processing skills or a large number of custom functions. I had a private function library built in past two years. Level 5 scripts use many of them to achieve private trading strategy.
Universal Global SessionUniversal Global Session 
This Script combines the world sessions of: Stocks, Forex, Bitcoin Kill Zones, strategic points, all configurable, in a single Script, to capitalize the opening and closing times of global exchanges as investment assets, becoming an Universal Global Session .
It is based on the great work of @oscarvs ( BITCOIN KILL ZONES v2 ) and the scripts of @ChrisMoody. Thank you Oscar and Chris for your excellent judgment and great work.
At the end of this writing you can find all the internet references of the extensive documentation that I present here. To maximize your benefits in the use of this Script, I recommend that you read the entire document to create an objective and practical criterion.
All the hours of the different exchanges are presented at GMT -6. In  Market24hClock  you can adjust it to your preferences. 
After a deep investigation I have been able to show that the different world sessions reveal underlying investment cycles, where it is possible to find sustained changes in the nominal behavior of the trend before the passage from one session to another and in the natural overlaps between the sessions. These underlying movements generally occur 15 minutes before the start, close or overlap of the session, when the session properly starts and also 15 minutes after respectively. Therefore, this script is designed to highlight these particular trending behaviors. Try it, discover your own conclusions and let me know in the notes, thank you.
 Foreign Exchange Market Hours 
It is the schedule by which currency market participants can buy, sell, trade and speculate on currencies all over the world. It is open 24 hours a day during working days and closes on weekends, thanks to the fact that operations are carried out through a network of information systems, instead of physical exchanges that close at a certain time. It opens Monday morning at 8 am local time in Sydney —Australia— (which is equivalent to Sunday night at 7 pm, in New York City —United States—, according to Eastern Standard Time), and It closes at 5pm local time in New York City (which is equivalent to 6am Saturday morning in Sydney).
The Forex market is decentralized and driven by local sessions, where the hours of Forex trading are based on the opening range of each active country, becoming an efficient transfer mechanism for all participants. Four territories in particular stand out: Sydney, Tokyo, London and New York, where the highest volume of operations occurs when the sessions in London and New York overlap. Furthermore, Europe is complemented by major financial centers such as Paris, Frankfurt and Zurich. Each day of forex trading begins with the opening of Australia, then Asia, followed by Europe, and finally North America. As markets in one region close, another opens - or has already opened - and continues to trade in the currency market. The seven most traded currencies in the world are: the US dollar, the euro, the Japanese yen, the British pound, the Australian dollar, the Canadian dollar, and the New Zealand dollar.
Currencies are needed around the world for international trade, this means that operations are not dominated by a single exchange market, but rather involve a global network of brokers from around the world, such as banks, commercial companies, central banks, companies investment management, hedge funds, as well as retail forex brokers and global investors. Because this market operates in multiple time zones, it can be accessed at any time except during the weekend, therefore, there is continuously at least one open market and there are some hours of overlap between the closing of the market of one region and the opening of another. The international scope of currency trading means that there are always traders around the world making and satisfying demands for a particular currency.
The market involves a global network of exchanges and brokers from around the world, although time zones overlap, the generally accepted time zone for each region is as follows:
Sydney 5pm to 2am EST (10pm to 7am UTC)
London 3am to 12 noon EST (8pm to 5pm UTC)
New York 8am to 5pm EST (1pm to 10pm UTC)
Tokyo 7pm to 4am EST (12am to 9am UTC)
 Trading Session 
A financial asset trading session refers to a period of time that coincides with the daytime trading hours for a given location, it is a business day in the local financial market. This may vary according to the asset class and the country, therefore operators must know the hours of trading sessions for the securities and derivatives in which they are interested in trading. If investors can understand market hours and set proper targets, they will have a much greater chance of making a profit within a workable schedule.
 Kill Zones 
Kill zones are highly liquid events. Many different market participants often come together and perform around these events. The activity itself can be event-driven (margin calls or option exercise-related activity), portfolio management-driven (asset allocation rebalancing orders and closing buy-in), or institutionally driven (larger players needing liquidity to complete the size) or a combination of any of the three. This intense cross-current of activity at a very specific point in time often occurs near significant technical levels and the established trends emerging from these events often persist until the next Death Zone approaches or enters.
Kill Zones are evolving with time and the course of world history. Since the end of World War II, New York has slowly invaded London's place as the world center for commercial banking. So much so that during the latter part of the 20th century, New York was considered the new center of the financial universe. With the end of the cold war, that leadership appears to have shifted towards Europe and away from the United States. Furthermore, Japan has slowly lost its former dominance in the global economic landscape, while Beijing's has increased dramatically. Only time will tell how these death zones will evolve given the ever-changing political, economic, and socioeconomic influences of each region.
 Financial Markets 
 New York 
New York (NYSE Chicago, NASDAQ)
7:30 am - 2:00 pm
It is the second largest currency platform in the world, followed largely by foreign investors as it participates in 90% of all operations, where movements on the New York Stock Exchange (NYSE) can have an immediate effect (powerful) on the dollar, for example, when companies merge and acquisitions are finalized, the dollar can instantly gain or lose value.
 A. Complementary Stock Exchanges 
Brazil (BOVESPA - Brazilian Stock Exchange)
07:00 am - 02:55 pm
Canada (TSX - Toronto Stock Exchange)
07:30 am - 02:00 pm
New York (NYSE - New York Stock Exchange)
08:30 am - 03:00 pm
 B. North American Trading Session 
07:00 am - 03:00 pm
(from the beginning of the business day on NYSE and NASDAQ, until the end of the New York session)
New York, Chicago and Toronto (Canada) open the North American session. Characterized by the most aggressive trading within the markets, currency pairs show high volatility. As the US markets open, trading is still active in Europe, however trading volume generally decreases with the end of the European session and the overlap between the US and Europe.
 C. Strategic Points 
US main session starts in 1 hour
07:30 am
The euro tends to drop before the US session. The NYSE, CHX and TSX (Canada) trading sessions begin 1 hour after this strategic point. The North American session begins trading Forex at 07:00 am.
This constitutes the beginning of the overlap of the United States and the European market that spans from 07:00 am to 10:35 am, often called the best time to trade EUR / USD, it is the period of greatest liquidity for the main European currencies since it is where they have their widest daily ranges.
When New York opens at 07:00 am the most intense trading begins in both the US and European markets. The overlap of European and American trading sessions has 80% of the total average trading range for all currency pairs during US business hours and 70% of the total average trading range for all currency pairs during European business hours. The intersection of the US and European sessions are the most volatile overlapping hours of all.
Influential news and data for the USD are released between 07:30 am and 09:00 am and play the biggest role in the North American Session. These are the strategically most important moments of this activity period: 07:00 am, 08:00 am and 08:30 am.
The main session of operations in the United States and Canada begins
08:30 am
Start of main trading sessions in New York, Chicago and Toronto. The European session still overlaps the North American session and this is the time for large-scale unpredictable trading. The United States leads the market. It is difficult to interpret the news due to speculation. Trends develop very quickly and it is difficult to identify them, however trends (especially for the euro), which have developed during the overlap, often turn the other way when Europe exits the market.
Second hour of the US session and last hour of the European session
09:30 am
End of the European session
10:35 am
The trend of the euro will change rapidly after the end of the European session.
Last hour of the United States session
02:00 pm
Institutional clients and very large funds are very active during the first and last working hours of almost all stock exchanges, knowing this allows to better predict price movements in the opening and closing of large markets. Within the last trading hours of the secondary market session, a pullback can often be seen in the EUR / USD that continues until the opening of the Tokyo session. Generally it happens if there was an upward price movement before 04:00 pm - 05:00 pm.
End of the trade session in the United States
03:00 pm
 D. Kill Zones 
11:30 am - 1:30 pm
New York Kill Zone. The United States is still the world's largest economy, so by default, the New York opening carries a lot of weight and often comes with a huge injection of liquidity. In fact, most of the world's marketable assets are priced in US dollars, making political and economic activity within this region even more important. Because it is relatively late in the world's trading day, this Death Zone often sees violent price swings within its first hour, leading to the proven adage "never trust the first hour of trading in America. North.
---------------
 London 
London (LSE - London Stock Exchange)
02:00 am - 10:35 am
Britain dominates the currency markets around the world, and London is its main component. London, a central trading capital of the world, accounts for about 43% of world trade, many Forex trends often originate from London.
 A. Complementary Stock Exchange 
Dubai (DFM - Dubai Financial Market)
12:00 am - 03:50 am
Moscow (MOEX - Moscow Exchange)
12:30 am - 10:00 am
Germany (FWB - Frankfurt Stock Exchange)
01:00 am - 10:30 am
Afríca (JSE - Johannesburg Stock Exchange)
01:00 am - 09:00 am
Saudi Arabia (TADAWUL - Saudi Stock Exchange)
01:00 am - 06:00 am
Switzerland (SIX - Swiss Stock Exchange)
02:00 am - 10:30 am
 B. European Trading Session 
02:00 am - 11:00 am
(from the opening of the Frankfurt session to the close of the Order Book on the London Stock Exchange / Euronext)
It is a very liquid trading session, where trends are set that start during the first trading hours in Europe and generally continue until the beginning of the US session.
 C. Middle East Trading Session 
12:00 am - 06:00 am
(from the opening of the Dubai session to the end of the Riyadh session)
 D. Strategic Points 
European session begins
02:00 am
London, Frankfurt and Zurich Stock Exchange enter the market, overlap between Europe and Asia begins.
End of the Singapore and Asia sessions
03:00 am
The euro rises almost immediately or an hour after Singapore exits the market.
Middle East Oil Markets Completion Process
05:00 am
Operations are ending in the European-Asian market, at which time Dubai, Qatar and in another hour in Riyadh, which constitute the Middle East oil markets, are closing. Because oil trading is done in US dollars, and the region with the trading day coming to an end no longer needs the dollar, consequently, the euro tends to grow more frequently.
End of the Middle East trading session
06:00 am
 E. Kill Zones 
5:00 am - 7:00 am
London Kill Zone. Considered the center of the financial universe for more than 500 years, Europe still has a lot of influence in the banking world. Many older players use the European session to establish their positions. As such, the London Open often sees the most significant trend-setting activity on any trading day. In fact, it has been suggested that 80% of all weekly trends are set through the London Kill Zone on Tuesday.
 F. Kill Zones (close) 
2:00 pm - 4:00 pm
London Kill Zone (close).
---------------
 Tokyo 
Tokyo (JPX - Tokyo Stock Exchange)
06:00 pm - 12:00 am
It is the first Asian market to open, receiving most of the Asian trade, just ahead of Hong Kong and Singapore.
 A. Complementary Stock Exchange 
Singapore (SGX - Singapore Exchange)
07:00 pm - 03:00 am
Hong Kong (HKEx - Hong Kong Stock Exchange)
07:30 pm - 02:00 am
Shanghai (SSE - Shanghai Stock Exchange)
07:30 pm - 01:00 am
India (NSE - India National Stock Exchange)
09:45 pm - 04:00 am
 B. Asian Trading Session 
06:00 pm - 03:00 am
From the opening of the Tokyo session to the end of the Singapore session
The first major Asian market to open is Tokyo which has the largest market share and is the third largest Forex trading center in the world. Singapore opens in an hour, and then the Chinese markets: Shanghai and Hong Kong open 30 minutes later. With them, the trading volume increases and begins a large-scale operation in the Asia-Pacific region, offering more liquidity for the Asian-Pacific currencies and their crosses. When European countries open their doors, more liquidity will be offered to Asian and European crossings.
 C. Strategic Points 
Second hour of the Tokyo session
07:00 pm
This session also opens the Singapore market. The commercial dynamics grows in anticipation of the opening of the two largest Chinese markets in 30 minutes: Shanghai and Hong Kong, within these 30 minutes or just before the China session begins, the euro usually falls until the same moment of the opening of Shanghai and Hong Kong.
Second hour of the China session
08:30 pm
Hong Kong and Shanghai start trading and the euro usually grows for more than an hour. The EUR / USD pair mixes up as Asian exporters convert part of their earnings into both US dollars and euros.
Last hour of the Tokyo session
11:00 pm
End of the Tokyo session
12:00 am
If the euro has been actively declining up to this time, China will raise the euro after the Tokyo shutdown. Hong Kong, Shanghai and Singapore remain open and take matters into their own hands causing the growth of the euro. Asia is a huge commercial and industrial region with a large number of high-quality economic products and gigantic financial turnover, making the number of transactions on the stock exchanges huge during the Asian session. That is why traders, who entered the trade at the opening of the London session, should pay attention to their terminals when Asia exits the market.
End of the Shanghai session
01:00 am
The trade ends in Shanghai. This is the last trading hour of the Hong Kong session, during which market activity peaks.
 D. Kill Zones 
10:00 pm - 2:00 am
Asian Kill Zone. Considered the "Institutional" Zone, this zone represents both the launch pad for new trends as well as a recharge area for the post-American session. It is the beginning of a new day (or week) for the world and as such it makes sense that this zone often sets the tone for the remainder of the global business day. It is ideal to pay attention to the opening of Tokyo, Beijing and Sydney.
--------------
 Sidney 
Sydney (ASX - Australia Stock Exchange)
06:00 pm - 12:00 am
 A. Complementary Stock Exchange 
New Zealand (NZX - New Zealand Stock Exchange)
04:00 pm - 10:45 pm
It's where the global trading day officially begins. While it is the smallest of the megamarkets, it sees a lot of initial action when markets reopen Sunday afternoon as individual traders and financial institutions are trying to regroup after the long hiatus since Friday afternoon. On weekdays it constitutes the end of the current trading day where the change in the settlement date occurs.
 B. Pacific Trading Session 
04:00 pm - 12:00 am
(from the opening of the Wellington session to the end of the Sydney session)
Forex begins its business hours when Wellington (New Zealand Exchange) opens local time on Monday. Sydney (Australian Stock Exchange) opens in 2 hours. It is a session with a fairly low volatility, configuring itself as the calmest session of all. Strong movements appear when influential news is published and when the Pacific session overlaps the Asian Session.
 C. Strategic Points 
End of the Sydney session
12:00 am
---------------
 Conclusions 
The best time to trade is during overlaps in trading times between open markets. Overlaps equate to higher price ranges, creating greater opportunities.
Regarding press releases (news), it should be noted that these in the currency markets have the power to improve a normally slow trading period. When a major announcement is made regarding economic data, especially when it goes against the predicted forecast, the coin can lose or gain value in a matter of seconds. In general, the more economic growth a country produces, the more positive the economy is for international investors. Investment capital tends to flow to countries that are believed to have good growth prospects and subsequently good investment opportunities, leading to the strengthening of the country's exchange rate. Also, a country that has higher interest rates through its government bonds tends to attract investment capital as foreign investors seek high-yield opportunities. However, stable economic growth and attractive yields or interest rates are inextricably intertwined. It's important to take advantage of market overlaps and keep an eye out for press releases when setting up a trading schedule. 
 References: 
www.investopedia.com
www.investopedia.com
www.investopedia.com
www.investopedia.com
market24hclock.com
market24hclock.com
Square Root Moving AverageAbstract
This script computes moving averages which the weighting of the recent quarter takes up about a half weight.
This script also provides their upper bands and lower bands.
You can apply moving average or band strategies with this script.
Introduction
Moving average is a popular indicator which can eliminate market noise and observe trend.
There are several moving average related strategies used by many traders.
The first one is trade when the price is far from moving average.
To measure if the price is far from moving average, traders may need a lower band and an upper band.
Bollinger bands use standard derivation and Keltner channels use average true range.
In up trend, moving average and lower band can be support.
In ranging market, lower band can be support and upper band can be resistance.
In down trend, moving average and upper band can be resistance.
An another group of moving average strategy is comparing short term moving average and long term moving average.
Moving average cross, Awesome oscillators and MACD belong to this group.
The period and weightings of moving averages are also topics.
Period, as known as length, means how many days are computed by moving averages.
Weighting means how much weight the price of a day takes up in moving averages.
For simple moving averages, the weightings of each day are equal.
For most of non-simple moving averages, the weightings of more recent days are higher than the weightings of less recent days.
Many trading courses say the concept of trading strategies is more important than the settings of moving averages.
However, we can observe some characteristics of price movement to design the weightings of moving averages and make them more meaningful.
In this research, we use the observation that when there are no significant events, when the time frame becomes 4 times, the average true range becomes about 2 times.
For example, the average true range in 4-hour chart is about 2 times of the average true range in 1-hour chart; the average true range in 1-hour chart is about 2 times of the average true range in 15-minute chart.
Therefore, the goal of design is making the weighting of the most recent quarter is close to the weighting of the rest recent three quarters.
For example, for the 24-day moving average, the weighting of the most recent 6 days is close to the weighting of the rest 18 days.
Computing the weighting
The formula of moving average is
sum ( price of day n * weighting of day n ) / sum ( weighting of day n )
Day 1 is the most recent day and day k+1 is the day before day k.
For more convenient explanation, we don't expect sum ( weighting of day n ) is equal to 1.
To make the weighting of the most recent quarter is close to the weighting of the rest recent three quarters, we have
sum ( weighting of day 4n ) = 2 * sum ( weighting of day n )
If when weighting of day 1 is 1, we have
sum ( weighting of day n ) = sqrt ( n )
weighting of day n = sqrt ( n ) - sqrt ( n-1 )
weighting of day 2 ≒ 1.414 - 1.000 = 0.414
weighting of day 3 ≒ 1.732 - 1.414 = 0.318
weighting of day 4 ≒ 2.000 - 1.732 = 0.268
If we follow this formula, the weighting of day 1 is too strong and the moving average may be not stable.
To reduce the weighting of day 1 and keep the spirit of the formula, we can add a parameter (we call it as x_1w2b).
The formula becomes
weighting of day n = sqrt ( n+x_1w2b ) - sqrt ( n-1+x_1w2b )
if x_1w2b is 0.25, then we have
weighting of day 1 = sqrt(1.25) - sqrt(0.25) ≒ 1.1  - 0.5 = 0.6
weighting of day 2 = sqrt(2.25) - sqrt(1.25) ≒ 1.5  - 1.1 = 0.4
weighting of day 3 = sqrt(3.25) - sqrt(2.25) ≒ 1.8  - 1.5 = 0.3
weighting of day 4 = sqrt(4.25) - sqrt(3.25) ≒ 2.06 - 1.8 = 0.26
weighting of day 5 = sqrt(5.25) - sqrt(4.25) ≒ 2.3 - 2.06 = 0.24
weighting of day 6 = sqrt(6.25) - sqrt(5.25) ≒ 2.5  - 2.3 = 0.2
weighting of day 7 = sqrt(7.25) - sqrt(6.25) ≒ 2.7  - 2.5 = 0.2
What you see and can adjust in this script
This script plots three moving averages described above.
The short term one is default magenta, 6 days and 1 atr.
The middle term one is default yellow, 24 days and 2 atr.
The long term one is default green, 96 days and 4 atr.
I arrange the short term 6 days to make it close to sma(5).
The other twos are arranged according to 4x length and 2x atr.
There are 9 curves plotted by this script. I made the lower bands and the upper bands less clear than moving averages so it is less possible misrecognizing lower or upper bands as moving averages.
x_src : how to compute the reference price of a day, using 1 to 4 of open, high, low and close.
len : how many days are computed by moving averages
atr : how many days are computed by average true range
multi : the distance from the moving average to the lower band and the distance from the moving average to the lower band are equal to multi * average true range.
x_1w2b : adjust this number to avoid the weighting of day 1 from being too strong.
Conclusion
There are moving averages which the weighting of the most recent quarter is close to the weighting of the rest recent three quarters.
We can apply strategies based on moving averages.  Like most of indicators, oversold does not always means it is an opportunity to buy.
If the short term lower band is close to the middle term moving average or the middle term lower band is close to the long term moving average, it may be potential support value.
References
Computing FIR Filters Using Arrays  
How to trade with moving averages : the eight trading signals concluded by Granville
How to trade with Bollinger bands
How to trade with double Bollinger bands
Renko MTF - Traditional and ATRSomehow there aren't too many renko bars that have the traditional setting built-in so I put one up. This one has the option to choose between Traditional and ATR, the size number corresponds to the option that was chosen. And just in case if anyone wanted, I put up a multi-time frame option to choose the time frame the bars take place. D is for day, W is for week, flat numbers are in minutes, and leaving it blank looks at the current time frame the chart is in. The calculation comes from how Tradingview handles renko bars.
Renko bars don't paint a color unless the market moves a certain amount based on its settings. When the market moves up it turns green, if it moves down it turns red, simple color changes alone can say a lot. They're a good way to try to find trends somewhat objectively and seem to be a good way to eliminate time and can replace other time-based indicators that can whipsaw or lag. The bars have a tendency to repeat themselves so it's a good way to find trends. There aren't too many settings for the box size, most people either just choose 5, 10, 14, etc where as other indicators have many options that differ on different markets. The numbers can be chosen easily enough to pick a sweet spot with just a single input where other indicators such as MACD have multiple inputs to pick the right number that can make it difficult to choose from(although it won't be as precise as a MACD would sometimes but can be worth the objectiveness and consistency and same setting repeatability in different markets in my opinion). Some example strategies could be to use them as an alternative trailing stop, finding trends, a simple color change for entry and exit on top of other strategies, etc. It can do the job of many in an all in one price action type indicator(although not better all the time, it can come close enough). Despite all this, it does seem to depend on which time-frame it's being looked at, how TV does the calculation for it, and how one can use this with the lack of practical information on it out there.
VWAP + Fibo Dev Extensions StrategyBased on my VWAP + Fibo deviations indicator, I tested some strategies to see if the indicator can be profitable; and I got it !
This strategy uses:
 
 H1 timeframe
 Weekly VWAP
 +1.618 / +2.618 / -1.618 / -2.618 Deviations Extensions to create 2 bands
 The value of the deviation
 
First, the 2 bands are plotted : +1.618/+2.618 painted in red and -1.618/-2.618 painted in lime.
Then, we wait for the deviation value to reach at least 150 (see thumbnail) to avoid littles moves when the gaps between bands are too short.
Entry long position :
 
 first candle must crossunder the -1.618 level and low have to stay over the -2.618
 low of the second one must stay in the lime band
 enter the third one if the deviation value is over limit (150)
 
Exit long position :
 
 TP : when a high crossover VWAP
 SL : when a low crossunder -2.618
 
Entry short position :
 
 first candle must crossover the +1.618 level and high have to stay under the +2.618
 high of the second one must stay in the red band
 enter the third one if the deviation value is over limit (150)
 
Exit short position :
 
 TP : when a low crossunder VWAP
 SL : when a high crossover +2.618
 
Notes :
 
 this strategy uses pyramiding (5), be careful and calculate your risk management
 the comission value is set to 0.08% to include slippages when entering a trade because of market orders
 This strategy is not an advice to invest, make your own decisions. 
Volatility Bands by DGTVolatility  represents how large an asset's prices swing around the mean price, the degree of variation of a trading price over time, and is commonly measured with beta (β) coefficients, standard deviations (σ) of returns where tools such as Average True Range, Bollinger Bands, Keltner Channel, Squeeze Indicator, etc presents volatility concept 
Volatility often refers to the amount of uncertainty or risk related to the size of changes in a security's value. The higher the volatility, the riskier the security - the price of the security can change dramatically over a short time period in either direction. A lower volatility - security's value does not fluctuate dramatically, and tends to be more steady
This study,  Volatility Bands , attempts to present a way to  measure and visualize volatility , using standard deviations (σ) and average true range indicator, and aims to point out areas that might indicate  potential trading opportunities 
I will try to explain the usage with examples, 
same setup with different option selected
as you may observe from the examples different setting may have advantages and disadvantages over one another, it is recommended to verify a trading setup with different available options. 
Additionally, It is recommended to use this indicator in conjunction with other technical indicators, or verify using chart/candle patterns. Below is an usage example using in conjunction with other indicator, in the given example “Neglected Volume by DGT” is selected 
 Similarities and Differences
 
 Bollinger Bands  depicts two standard deviations above and below a simple moving average, and  Keltner Channel  depicts two times average true range (ATR) above and below an exponential moving average
 Volatility Bands  study combines the approach of both Bollinger Bands and Keltner Channel, with different settings and different visualization 
Default settings are one standard deviations and one time average true range (ATR) above and below 13 period exponential moving average. Setting can be adjusted by users but let me remind all testes are performed with the default settings. 
Mathematically expressed as
Upper band area between “ema + stdev” and “ema + atr”
Lower band area between “ema – stdev” and “ema – atr” 
A different display is added with the inspiration I get from one of the @quantgym ‘s study, many thanks @quantgym 😉
When difference band display is selected the study will reflect the area between “ema + stdev – atr” and “ema – stdev + atr”. As shown in the examples above 
Note: standard deviation calculation can be adjusted based on price action or its moving average. 
Other differentiation between BB and KC is with V-BANDS mostly we look for trade opportunities when price action move out of the bands and in most cases we assume market is consolidating when the price action is within the bands
The other indicator that presents similarities to  Volatility Bands  is  Squeeze Indicator,  which measures the relationship between Bollinger Bands and Keltner's Channels to help identify consolidations and signal when prices are likely to break out. Mainly Volatility Bands is different version of Squeeze indicator, in fact the purpose is almost same but visualization is completely different. Additionally Volatility Bands Offers trading opportunities whereas Squeeze indicator only presents market states unless a momentum indicator is adapted to Squeeze indicator. 
 Disclaimer:
 Trading success is all about following your trading strategy and the indicators should fit within your trading strategy, and not to be traded upon solely
The script is for informational and educational purposes only. Use of the script does not constitute professional and/or financial advice. You alone have the sole responsibility of evaluating the script output and risks associated with the use of the script. In exchange for using the script, you agree not to hold dgtrd TradingView user liable for any possible claim for damages arising from any decision you make based on use of the script
Dynamic Dots Dashboard (a Cloud/ZLEMA Composite)The purpose of this indicator is to provide an easy-to-read binary dashboard of where the current price is relative to key dynamic supports and resistances.  The concept is simple, if a dynamic s/r is currently acting as a resistance, the indicator plots a dot above the histogram in the red box.  If a dynamic s/r is acting as support, a dot is plotted in the green box below.
There are some additional features, but the dot graphs are king. 
_______________________________________________________________________________________________________________
 KEY: 
_______________________________________________________________________________________________________________
Currently the dynamic s/r's being used in the dot plots are:
 Ichimoku Cloud: 
Tenkan (blue)
Kijun (pink)
Senkou A (red)
Senkou B (green)
 ZLEMA (Zero Lag Exponential Moving Average) 
99 ZLEMA (lavender)
200 ZLEMA (salmon)
You'll see a dashed line through the middle of the resistances section (red) and supports section (green).  Cloud indicators are plotted above the dashed line, and ZLEMA's are below.
_______________________________________________________________________________________________________________
 How it Works - Visual 
_______________________________________________________________________________________________________________
As stated in the intro - if a dynamic s/r is currently above the current price and acting as a resistance, the indicator plots a dot above the histogram in the red box.  If a dynamic s/r is acting as support, a dot is plotted in the green box below.  Additionally, there is an optional histogram (default is on) that will further visualize this relationship.  The histogram is a simple summation of the resistances above and the supports below.
Here's a visual to assist with what that means.  This chart includes all of those dynamic s/r's in the dynamic dot dashboard (the on-chart parts are individually added, not part of this tool).
  
You can see that as a dynamic support is lost, the corresponding dot is moved from the supports section at the bottom (green), to the resistances section at the top (red).  The opposite being true as resistances are being overtaken (broken resistances are moved to the support section (red)).  You can see that the raw chart is just... a mess.  Which kinda of accentuates one of the key goals of this indicator:  to get all that dynamic support info without a mess of a chart like that.
_______________________________________________________________________________________________________________
  How To Use It 
_______________________________________________________________________________________________________________
There are a lot of ways to use this information, but the most notable of which is to detect shifts in the market cycle.
  
For this example, take a look at the dynamic s/r dots in the resistances category (red background).  You can see clearly that there are distinctive blocks of high density dots that have clear beginnings and ends.  When we transition from a high density of dots to none in resistances, that means we are flipping them as support and entering a bull cycle.  On the other hand, when we go from low density of dots as resistances to high density, we're pivoting to a bear cycle.  Easy as that, you can quickly detect when market cycles are beginning or ending. 
Alternatively, you can add your preferred linear SR's, fibs, etc. to the chart and quickly glance at the dashboard to gauge how dynamic SR's may be contributing to the risk of your trade.
_______________________________________________________________________________________________________________
 Who It's For 
_______________________________________________________________________________________________________________
New traders:  by looking at dot density alone, you can use Dot Dynamics to spot transitionary phases in market cycles.
Experienced traders:  keep your charts clean and the information easy to digest.
Developers:  I created this originally as a starting point for more complex algos I'm working on.  One algo is reading this dot dashboard and taking a position size relative to the s/r's above and below.  Another cloud algo is using the results as inputs to spot good setups.
 Colored Bars 
There is an option (off by default, shown in the headline image above) to fill the bar colors based on how many dynamic s/r's are above or below the current price.  This can make things easier for some users, confusing for others.  I defaulted them to off as I don't want colors to confuse the primary value proposition of the indicators, which is the dot heat map.  You can turn on colored bars in the settings.
One thing to note with the colored bars:  they plot the color purely by the dot densities.  Random spikes in the gradient colors (i.e. red to lime or green) can be a useful thing to notice, as they commonly occur at places where the price is bouncing between dynamic s/r's and can indicate a paradigm shift in the market cycle.
_______________________________________________________________________________________________________________
 Timeframes and Assets 
_______________________________________________________________________________________________________________
This can be used effectively on all assets (stocks, crypto, forex, etc) and all time frames.  As always with any indicator, the higher TF's are generally respected more than lower TF's.
Thanks for checking it out!  I've been trading crypto for years and am just now beginning to publish my ideas, secret-sauce scripts and handy tools (like this one). If you enjoyed this indicator and would like to see more, a like and a follow is greatly appreciated 😁.
Every single moving average (ALMA, EMA, HMA, KAMA, RMA, SMA...)So you may be looking at the graph and thinking  "this is a mess", and I agree.
The purpose of this script is to plot in the same graph every single type of moving average that I could think of, so you can find the ones that are better for your timeframe and for your asset. Once you add it, disable those types that doesn't seem to serve your purpose, until you can select one you like.
The average types are: ALMA, EMA, HMA, KAMA, RMA, SMA, SWMA, VIDYA, VWAP, VWMA, and WMA. Each one is ploted two times (except SWMA and VWAP), one with a short period, and another with a long, both of which you can configure.
Ruckard TradingLatinoThis strategy tries to mimic TradingLatino strategy.
The current implementation is beta.
Si hablas castellano o espanyol por favor consulta  MENSAJE EN CASTELLANO  más abajo.
It's aimed at BTCUSDT pair and 4h timeframe.
 STRATEGY DEFAULT SETTINGS EXPLANATION 
 
  max_bars_back=5000 : This is a random number of bars so that the strategy test lasts for one or two years
  calc_on_order_fills=false : To wait for the 4h closing is too much. Try to check if it's worth entering a position after closing one. I finally decided not to recheck if it's worth entering after an order is closed. So it is false.
  calc_on_every_tick=false
  pyramiding=0 : We only want one entry allowed in the same direction. And we don't want the order to scale by error.
  initial_capital=1000 : These are 1000 USDT. By using 1% maximum loss per trade and 7% as a default stop loss by using 1000 USDT at 12000 USDT per BTC price you would entry with around 142 USDT which are converted into: 0.010 BTC . The maximum number of decimal for contracts on this BTCUSDT market is 3 decimals. E.g. the minimum might be: 0.001 BTC . So, this minimal 1000 amount ensures us not to entry with less than 0.001 entries which might have happened when using 100 USDT as an initial capital.
  slippage=1 : Binance BTCUSDT mintick is: 0.01. Binance slippage: 0.1 % (Let's assume). TV has an integer slippage. It does not have a percentage based slippage. If we assume a 1000 initial capital, the recommended equity is 142 which at 11996 USDT per BTC price means: 0.011 BTC. The 0.1% slippage of: 0.011 BTC would be: 0.000011 . This is way smaller than the mintick. So our slippage is going to be 1. E.g. 1 (slippage) * 0.01 (mintick)
  commission_type=strategy.commission.percent and commission_value=0.1 : According to: binance . com / en / fee / schedule in VIP 0 level both maker and taker fees are: 0.1 %.
 
 BACKGROUND 
Jaime Merino is a well known Youtuber focused on crypto trading
His channel TradingLatino
features monday to friday videos where he explains his strategy.
 JAIME MERINO STANCE ON BOTS 
Jaime Merino stance on bots (taken from memory out of a 2020 June video from him):
'~
You know. They can program you a bot and it might work.
But, there are some special situations that the bot would not be able to handle.
And, I, as a human, I would handle it. And the bot wouldn't do it.
~'
My long term target with this strategy script is add as many
special situations as I can to the script
so that it can match Jaime Merino behaviour even in non normal circumstances.
My alternate target is learn Pine script
and enjoy programming with it.
 WARNING 
This script might be bigger than other TradingView scripts.
However, please, do not be confused because the current status is beta.
This script has not been tested with real money.
This is NOT an official strategy from Jaime Merino.
This is NOT an official strategy from TradingLatino . net .
 HOW IT WORKS 
It basically uses ADX slope and LazyBear's Squeeze Momentum Indicator
to make its buy and sell decisions.
Fast paced EMA being bigger than slow paced EMA
(on higher timeframe) advices going long.
Fast paced EMA being smaller than slow paced EMA
(on higher timeframe) advices going short.
It finally add many substrats that TradingLatino uses.
 SETTINGS 
 __ SETTINGS - Basics 
 ____ SETTINGS - Basics - ADX 
 
  (ADX) Smoothing {14}
  (ADX) DI Length {14}
  (ADX) key level {23}
 
 ____ SETTINGS - Basics - LazyBear Squeeze Momentum 
 
  (SQZMOM) BB Length {20}
  (SQZMOM) BB MultFactor {2.0}
  (SQZMOM) KC Length {20}
  (SQZMOM) KC MultFactor {1.5}
  (SQZMOM) Use TrueRange (KC) {True}
 
 ____ SETTINGS - Basics - EMAs 
 
  (EMAS) EMA10 - Length {10}
  (EMAS) EMA10 - Source {close}
  (EMAS) EMA55 - Length {55}
  (EMAS) EMA55 - Source {close}
 
 ____ SETTINGS - Volume Profile 
Lowest and highest VPoC from last three days
is used to know if an entry has a support
VPVR of last 100 4h bars
is also taken into account
 
  (VP) Use number of bars (not VP timeframe): Uses 'Number of bars {100}' setting instead of 'Volume Profile timeframe' setting for calculating session VPoC
  (VP) Show tick difference from current price {False}: BETA . Might be useful for actions some day.
  (VP) Number of bars {100}: If 'Use number of bars (not VP timeframe)' is turned on this setting is used to calculate session VPoC.
  (VP) Volume Profile timeframe {1 day}: If 'Use number of bars (not VP timeframe)' is turned off this setting is used to calculate session VPoC.
  (VP) Row width multiplier {0.6}: Adjust how the extra Volume Profile bars are shown in the chart.
  (VP) Resistances prices number of decimal digits  : Round Volume Profile bars label numbers so that they don't have so many decimals.
  (VP) Number of bars for bottom VPOC {18}: 18 bars equals 3 days in suggested timeframe of 4 hours. It's used to calculate lowest session VPoC from previous three days. It's also used as a top VPOC for sells.
  (VP) Ignore VPOC bottom advice on long {False}: If turned on it ignores bottom VPOC (or top VPOC on sells) when evaluating if a buy entry is worth it.
  (VP) Number of bars for VPVR VPOC {100}: Number of bars to calculate the VPVR VPoC. We use 100 as Jaime once used. When the price bounces back to the EMA55 it might just bounce to this VPVR VPoC if its price it's lower than the EMA55 (Sells have inverse algorithm).
 
 ____ SETTINGS - ADX Slope 
ADX Slope
help us to understand if ADX
has a positive slope, negative slope
or it is rather still.
 
  (ADXSLOPE) ADX cut {23}: If ADX value is greater than this cut (23) then ADX has strength
  (ADXSLOPE) ADX minimum steepness entry {45}: ADX slope needs to be 45 degrees to be considered as a positive one.
  (ADXSLOPE) ADX minimum steepness exit {45}: ADX slope needs to be -45 degrees to be considered as a negative one.
  (ADXSLOPE) ADX steepness periods {3}: In order to avoid false detection the slope is calculated along 3 periods.
 
 ____ SETTINGS - Next to EMA55 
 
  (NEXTEMA55) EMA10 to EMA55 bounce back percentage {80}: EMA10 might bounce back to EMA55 or maybe to 80% of its complete way to EMA55
  (NEXTEMA55) Next to EMA55 percentage {15}: How much next to the EMA55 you need to be to consider it's going to bounce back upwards again.
 
 ____ SETTINGS - Stop Loss and Take Profit 
You can set a default stop loss or a default take profit.
 
  (STOPTAKE) Stop Loss % {7.0}
  (STOPTAKE) Take Profit % {2.0}
 
 ____ SETTINGS - Trailing Take Profit 
You can customize the default trailing take profit values
 
  (TRAILING) Trailing Take Profit (%) {1.0}: Trailing take profit offset in percentage
  (TRAILING) Trailing Take Profit Trigger (%) {2.0}: When 2.0% of benefit is reached then activate the trailing take profit.
 
 ____ SETTINGS - MAIN TURN ON/OFF OPTIONS 
 
  (EMAS) Ignore advice based on emas {false}.
  (EMAS) Ignore advice based on emas (On closing long signal) {False}: Ignore advice based on emas but only when deciding to close a buy entry.
  (SQZMOM) Ignore advice based on SQZMOM {false}: Ignores advice based on SQZMOM indicator.
  (ADXSLOPE) Ignore advice based on ADX positive slope {false}
  (ADXSLOPE) Ignore advice based on ADX cut (23) {true}
  (STOPTAKE) Take Profit? {false}: Enables simple Take Profit.
  (STOPTAKE) Stop Loss? {True}: Enables simple Stop Loss.
  (TRAILING) Enable Trailing Take Profit (%) {True}: Enables Trailing Take Profit.
 
 ____ SETTINGS - Strategy mode 
 
  (STRAT) Type Strategy: 'Long and Short', 'Long Only' or 'Short Only'. Default: 'Long and Short'.
 
 ____ SETTINGS - Risk Management  
 
  (RISKM) Risk Management Type: 'Safe', 'Somewhat safe compound' or 'Unsafe compound'. ' Safe ': Calculations are always done with the initial capital (1000) in mind. The maximum losses per trade/day/week/month are taken into account. ' Somewhat safe compound ': Calculations are done with initial capital (1000) or a higher capital if it increases. The maximum losses per trade/day/week/month are taken into account. ' Unsafe compound ': In each order all the current capital is gambled and only the default stop loss per order is taken into account. That means that the maximum losses per trade/day/week/month are not taken into account.  Default : 'Somewhat safe compound'.
  (RISKM) Maximum loss per trade % {1.0}.
  (RISKM) Maximum loss per day % {6.0}.
  (RISKM) Maximum loss per week % {8.0}.
  (RISKM) Maximum loss per month % {10.0}.
 
 ____ SETTINGS - Decimals  
 
  (DECIMAL) Maximum number of decimal for contracts {3}: How small (3 decimals means 0.001) an entry position might be in your exchange.
 
 EXTRA 1 - PRICE IS IN RANGE indicator 
 
  (PRANGE) Print price is in range {False}: Enable a bottom label that indicates if the price is in range or not.
  (PRANGE) Price range periods {5}: How many previous periods are used to calculate the medians
  (PRANGE) Price range maximum desviation (%) {0.6} ( > 0 ): Maximum positive desviation for range detection
  (PRANGE) Price range minimum desviation (%) {0.6} ( > 0 ): Mininum negative desviation for range detection
 
 EXTRA 2 - SQUEEZE MOMENTUM Desviation indicator 
 
  (SQZDIVER) Show degrees {False}: Show degrees of each Squeeze Momentum Divergence lines to the x-axis.
  (SQZDIVER) Show desviation labels {False}: Whether to show or not desviation labels for the Squeeze Momentum Divergences.
  (SQZDIVER) Show desviation lines {False}: Whether to show or not desviation lines for the Squeeze Momentum Divergences.
 
 EXTRA 3 - VOLUME PROFILE indicator 
WARNING: This indicator works not on current bar but on previous bar. So in the worst case it might be VP from 4 hours ago. Don't worry, inside the strategy calculus the correct values are used. It's just that I cannot show the most recent one in the chart.
 
  (VP) Print recent profile {False}: Show Volume Profile indicator
  (VP) Avoid label price overlaps {False}: Avoid label prices to overlap on the chart.
 
 EXTRA 4 - ZIGNALY SUPPORT 
 
  (ZIG) Zignaly Alert Type {Email}: 'Email', 'Webhook'. ' Email ': Prepare alert_message variable content to be compatible with zignaly expected email content format. ' Webhook ': Prepare alert_message variable content to be compatible with zignaly expected json content format.
 
 EXTRA 5 - DEBUG 
 
  (DEBUG) Enable debug on order comments {False}: If set to true it prepares the order message to match the alert_message variable. It makes easier to debug what would have been sent by email or webhook on each of the times an order is triggered.
 
 HOW TO USE THIS STRATEGY 
 
  BOT MODE: This is the default setting.
  PROPER VOLUME PROFILE VIEWING: Click on this strategy settings. Properties tab. Make sure Recalculate 'each time the order was run' is turned off.
  NEWBIE USER: (Check PROPER VOLUME PROFILE VIEWING above!) You might want to turn on the 'Print recent profile {False}' setting. Alternatively you can use my alternate realtime study: 'Resistances and supports based on simplified Volume Profile' but, be aware, it might consume one indicator.
  ADVANCED USER 1: Turn on the 'Print price is in range {False}' setting and help us to debug this subindicator. Also help us to figure out how to include this value in the strategy.
  ADVANCED USER 2: Turn on the all the (SQZDIVER) settings and help us to figure out how to include this value in the strategy.
  ADVANCED USER 3: (Check PROPER VOLUME PROFILE VIEWING above!) Turn on the 'Print recent profile {False}' setting and report any problem with it.
  JAIME MERINO: Just use the indicator as it comes by default. It should only show BUY signals, SELL signals and their associated closing signals. From time to time you might want to check 'ADVANCED USER 2' instructions to check that there's actually a divergence. Check also 'ADVANCED USER 1' instructions for your amusement.
 
 EXTRA ADVICE 
It's advised that you use this strategy in addition to these two other indicators:
* Squeeze Momentum Indicator  
* ADX
so that your chart matches as close as possible to TradingLatino chart.
 ZIGNALY INTEGRATION 
This strategy supports Zignaly email integration by default. It also supports Zignaly Webhook integration.
 ZIGNALY INTEGRATION - Email integration example 
What you would write in your alert message:
||{{strategy.order.alert_message}}||key=MYSECRETKEY||
 ZIGNALY INTEGRATION - Webhook integration example 
What you would write in your alert message:
{ {{strategy.order.alert_message}} , "key" : "MYSECRETKEY" }
 CREDITS 
I have reused and adapted some code from
'Directional Movement Index + ADX & Keylevel Support' study
which it's from TradingView console user.
I have reused and adapted some code from
'3ema' study
which it's from TradingView hunganhnguyen1193 user.
I have reused and adapted some code from
'Squeeze Momentum Indicator  ' study
which it's from TradingView LazyBear user.
I have reused and adapted some code from
'Strategy Tester EMA-SMA-RSI-MACD' study
which it's from TradingView fikira user.
I have reused and adapted some code from
'Support Resistance MTF' study
which it's from TradingView LonesomeTheBlue user.
I have reused and adapted some code from
'TF Segmented Linear Regression' study
which it's from TradingView alexgrover user.
I have reused and adapted some code from
"Poor man's volume profile" study
which it's from TradingView IldarAkhmetgaleev user.
 FEEDBACK 
Please check the strategy source code for more detailed information
where, among others, I explain all of the substrats
and if they are implemented or not.
Q1. Did I understand wrong any of the Jaime substrats (which I have implemented)?
Q2. The strategy yields quite profit when we should long (EMA10 from 1d timeframe is higher than EMA55 from 1d timeframe.
    Why the strategy yields much less profit when we should short (EMA10 from 1d timeframe is lower than EMA55 from 1d timeframe)?
    Any idea if you need to do something else rather than just reverse what Jaime does when longing?
 FREQUENTLY ASKED QUESTIONS 
FAQ1. Why are you giving this strategy for free?
    TradingLatino and his fellow enthusiasts taught me this strategy. Now I'm giving back to them.
FAQ2. Seriously! Why are you giving this strategy for free?
    I'm confident his strategy might be improved a lot. By keeping it to myself I would avoid other people contributions to improve it.
    Now that everyone can contribute this is a win-win.
FAQ3. How can I connect this strategy to my Exchange account?    
    It seems that you can attach alerts to strategies.
    You might want to combine it with a paying account which enable Webhook URLs to work.
    I don't know how all of this works right now so I cannot give you advice on it.
    You will have to do your own research on this subject. But, be careful. Automating trades, if not done properly,
    might end on you automating losses.
FAQ4. I have just found that this strategy by default gives more than 3.97% of 'maximum series of losses'. That's unacceptable according to my risk management policy.
    You might want to reduce default stop loss setting from 7% to something like 5% till you are ok with the 'maximum series of losses'.
FAQ5. Where can I learn more about your work on this strategy?
    Check the source code. You might find unused strategies. Either because there's not a substantial increases on earnings. Or maybe because they have not been implemented yet.
FAQ6. How much leverage is applied in this strategy?
    No leverage.
FAQ7. Any difference with original Jaime Merino strategy?
    Most of the times Jaime defines an stop loss at the price entry. That's not the case here. The default stop loss is 7% (but, don't be confused it only means losing 1% of your investment thanks to risk management). There's also a trailing take profit that triggers at 2% profit with a 1% trailing.
FAQ8. Why this strategy return is so small?
    The strategy should be improved a lot. And, well, backtesting in this platform is not guaranteed to return theoric results comparable to real-life returns. That's why I'm personally forward testing this strategy to verify it.
 MENSAJE EN CASTELLANO 
En primer lugar se agradece feedback para mejorar la estrategia.
Si eres un usuario avanzado y quieres colaborar en mejorar el script no dudes en comentar abajo.
Ten en cuenta que aunque toda esta descripción tenga que estar en inglés no es obligatorio que el comentario esté en inglés.
 CHISTE - CASTELLANO 
¡Pero Jaime!
¡400.000!
¡Tu da mun!
McGinley Dynamic (Improved) - John R. McGinley, Jr.For all the McGinley enthusiasts out there, this is my improved version of the "McGinley Dynamic", originally formulated and publicized in 1990 by John R. McGinley, Jr. Prior to this release, I recently had an encounter with a member request regarding the reliability and stability of the general algorithm. Years ago, I attempted to discover the root of it's inconsistency, but success was not possible until now. Being no stranger to a good old fashioned computational crisis, I revisited it with considerable contemplation.
I discovered a lack of constraints in the formulation that either caused the algorithm to implode to near zero and zero OR it could explosively enlarge to near infinite values during unusual price action volatility conditions, occurring on different time frames. A numeric E-notation in a moving average doesn't mean a stock just shot up in excess of a few quintillion in value from just "10ish" moments ago. Anyone experienced with the usual McGinley Dynamic, has probably encountered this with dynamically dramatic surprises in their chart, destroying it's usability.
Well, I believe I have found an answer to this dilemma of 'susceptibility to miscalculation', to provide what is most likely McGinley's whole hearted intention. It required upgrading the formulation with two constraints applied to it using min/max() functions. Let me explain why below.
When using base numbers with an exponent to the power of four, some miniature numbers smaller than one can numerically collapse to near 0 values, or even 0.0 itself. A denominator of zero will always give any computational device a horribly bad day, not to mention the developer. Let this be an EASY lesson in computational division, I often entertainingly express to others. You have heard the terminology "$#|T happens!🙂" right? In the programming realm, "AnyNumber/0.0 CAN happen!🤪" too, and it happens "A LOT" unexpectedly, even when it's highly improbable. On the other hand, numbers a bit larger than 2 with the power of four can tremendously expand rapidly to the numeric limits of 64-bit processing, generating ginormous spikes on a chart.
The ephemeral presence of one OR both of those potentials now has a combined satisfactory remedy, AND you as TV members now have it, endowed with the ever evolving "Power of Pine". Oh yeah, this one plots from bar_index==0 too. It also has experimental settings tweaks to play with, that may reveal untapped potential of this formulation. This function now has gain of function capabilities, NOT to be confused with viral gain of function enhancements from reckless BSL-4 leaking laboratories that need to be eternally abolished from this planet. Although, I do have hopes this imd() function has the potential to go viral. I believe this improved function may have utility in the future by developers of the TradingView community. You have the source, and use it wisely...
I included an generic ema() plot for a basic comparison, ultimately unveiling some of this algorithm's unique characteristics differing on a variety of time frames. Also another unconstrained function is included to display some the disparities of having no limitations on a divisor in the calculation. I strongly advise against the use of umd() in any published script. There is simply just no reason to even ponder using it. I also included notes in the script to warn against this. It's funny now, but some folks don't always read/understand my advisories... You have been warned!
NOTICE: You have absolute freedom to use this source code any way you see fit within your new Pine projects, and that includes TV themselves. You don't have to ask for my permission to reuse this improved function in your published scripts, simply because I have better things to do than answer requests for the reuse of this simplistic imd() function. Sufficient accreditation regarding this script and compliance with "TV's House Rules" regarding code reuse, is as easy as copying the entire function as is. Fair enough? Good! I have a backlog of "computational crises" to contend with, including another one during the writing of this elaborate description.
When available time provides itself, I will consider your inquiries, thoughts, and concepts presented below in the comments section, should you have any questions or comments regarding this indicator. When my indicators achieve more prevalent use by TV members, I may implement more ideas when they present themselves as worthy additions. Have a profitable future everyone!
Matrix functions -  JD/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// The arrays provided in Pinescript are linear 1D strucures that can be seen either as a large vertical stack or
// a horizontal row containing a list of values, colors, bools,..
// 
// With the FUNCTIONS in this script the 1D ARRAY LIST can be CONVERTED INTO A 2D MATRIX form
// 
// 
///////////////////////////////////////////
/// BASIC INFO ON THE MATRIX STRUCTURE: ///
///////////////////////////////////////////
// 
// The matrix is set up as an 2D structure and is devided in ROWS and COLUMNS.
//  following the standard mathematical notation:
//
//      a 3 x 4 matrix =          4 columns
//                                      0 1 2 3  column index
//                                   0  
//                       3 rows  1  
//                                   2  
//                            row
//                           index
//
// With the use of some purpose-built functions, values can be placed or retrieved in a specific column of a certain row
//  this can be done by intuitively using row_nr and column_nr coördinates,
//  without having to worry on what exact index of the Pine array this value is located (the functions do these conversions for you)
//
//
// the syntax I propose for the 2D Matrix array has the following structure:
// 
//  - the array starts with 2 VALUES describing the DIMENSION INFORMATION, (rows, columns)
//      these are ignored in the actual calculations and serve as a metadata header (similar to the "location, time,... etc." data that is stored in photo files)
//      so the array always carries it's own info about the nr. of rows and columns and doesn't need is seperate "info" file!
//
//      To stay consistent with the standard Pinescript (array and  ) indexing:
//      - indexes for sheets and columns start from 0 (first) and run up to the (total nr of sheets or columns) - 1
//      - indexes for rows also start from 0 (most recent, cfr. ) and run up to the (total nr of rows) - 1
// 
//  - this 2 value metadata header is followed by the actual df data
//      the actual data array can consist of (100,000 - 2) usable items,
//      
//      In a theoretical example, you can have a matrix with almost 20,000 rows with each 5 columns of data (eg. open, high, low, close, volume) in it!!!
//
//
///////////////////////////////////
/// SCHEMATIC OF THE STRUCTURE: ///
///////////////////////////////////
//
////// (metadata header with dimensions info)
//
//                (0)             (1)            (array index)
//       
Higher Timeframe Trend Indicator V3.0What is it? 
An indicator that depicts the trend of up to 5 higher timeframes on the same chart without needing to context-switch between charts.
 Features 
- Supports up to 5 timeframes
- Trends indicated by 5 colored buttons: one for each timeframe
    - Varying shades of green: uptrend
    - Varying shades of red: downtrend
    - White/silver: sideways/neutral
- Configurable length (time period) for each timeframe
    - Increase length to capture long term trends; decrease it to capture only short term ones
- Configurable sensitivity for each timeframe
    - Sensitivity determines what angle is considered trending and what is not
    - Increase sensitivity to capture weak trends
    - Decrease sensitivity to filter out weak trends and capture only strong/steep ones 
    - Sensitivity ranges from 1 (least sensitive) to 3 (most sensitive)
- Move the labels around vertically for better visibility by changing the "Location" and "Offset" parameters
 How should one use it? 
Use it to quickly browse through charts to understand the context across timeframes, and zero in on only those that have trends aligning on the higher and lower timeframes as per your strategy. For e.g., a chart that is trending up strongly on the 15min and 60min (indicated by dark green colored buttons), and trending down on the 1 and/or 5 min (indicated by red-colored buttons), can be shortlisted for a potential pullback trade. Use your favorite pullback strategy (Supply/Demand, Support/Resistance, Moving Averages, etc.) to hop in on the trend.
 How are trends determined? 
The indicator uses normalized %change in price of the linear regression line segment of the chosen price sources (close, high, low, MA, etc.) over a specified length to determine trend direction and intensity 
 Known Issues 
Will indicate the trend correctly only for timeframes *higher* than the current (visible) resolution/timeframe of the chart. Might not indicate it correctly for lower timeframes ( i.e., lower than the current (visible) resolution/timeframe of the chart). For this reason, all timeframes lower than the current resolution will be hidden in the present release.
 Future releases 
- I am still experimenting with various sensitivity levels and the corresponding trend shades to make the tool as accurate and intuitive as possible. These modifications might come in
- Sensitivity levels might be increased.
- Bug fixes, if any
  
MACD-X, More Than MACD by DGTMoving Average Convergence Divergence – MACD
 
The most popular indicator used in technical analysis, the moving average convergence divergence (MACD), created by Gerald Appel. MACD is a trend-following momentum indicator, designed to reveal changes in the strength, direction, momentum, and duration of a trend in a financial instrument’s price
 Historical evolution of MACD, 
 -	 Gerald Appel  created the MACD line, 
-	 Thomas Aspray  added the histogram feature to MACD 
-	 Giorgos E. Siligardos  created a leader of MACD
MACD employs two Moving Averages of varying lengths (which are lagging indicators) to identify trend direction and duration. Then, MACD takes the difference in values between those two Moving Averages (MACD Line) and an EMA of those Moving Averages (Signal Line) and plots that difference between the two lines as a histogram which oscillates above and below a center Zero Line. The histogram is used as a good indication of a security's momentum.
Mathematically expressed as;
   macd = ma(source,  fast_length) – ma(source, slow_length)
   signal = ma(macd, signal_length)
   histogram = macd – signal 
where exponential moving average (ema) is in common use as a moving average (ma)
   fast_length = 12
   slow_length = 26
   signal_length = 9
The MACD indicator is typically good for identifying three types of  basic signals ;
 Signal Line Crossovers
 A Signal Line Crossover is the most common signal produced by the MACD. On the occasions where the MACD Line crosses above or below the Signal Line, that can signify a potentially strong move. The standard interpretation of such an event is a recommendation to buy if the MACD line crosses up through the Signal Line (a "bullish" crossover), or to sell if it crosses down through the Signal Line (a "bearish" crossover). These events are taken as indications that the trend in the financial instrument is about to accelerate in the direction of the crossover.
 Zero Line Crossovers
 Zero Line Crossovers occur when the MACD Line crossed the Zero Line and either becomes positive (above 0) or negative (below 0). A change from positive to negative MACD is interpreted as "bearish", and from negative to positive as "bullish". Zero crossovers provide evidence of a change in the direction of a trend but less confirmation of its momentum than a signal line crossover
 Divergence 
Divergence is another signal created by the MACD. Simply, divergence occurs when the MACD and actual price are not in agreement. A "positive divergence" or "bullish divergence" occurs when the price makes a new low but the MACD does not confirm with a new low of its own. A "negative divergence" or "bearish divergence" occurs when the price makes a new high but the MACD does not confirm with a new high of its own. A divergence with respect to price may occur on the MACD line and/or the MACD Histogram
 Moving Average Crossovers , another hidden signal that MACD Indicator identifies 
Many traders will watch for a short-term moving average to cross above a longer-term moving average and use this to signal increasing upward momentum. This bullish crossover suggests that the price has recently been rising at a faster rate than it has in the past, so it is a common technical buy sign. Conversely, a short-term moving average crossing below a longer-term average is used to illustrate that the asset's price has been moving downward at a faster rate and that it may be a good time to sell. 
Moving Average Crossovers in reality is Zero Line Crossovers, the value of the MACD indicator is equal to zero each time the two moving averages cross over each other. For easy interpretation by trades,  Zero Line Crossovers are simply described as positive or negative MACD 
 False signals
 Like any forecasting algorithm, the MACD can generate false signals. A false positive, for example, would be a bullish crossover followed by a sudden decline in a financial instrument. A false negative would be a situation where there is bearish crossover, yet the financial instrument accelerated suddenly upwards
 What is “MACD-X” and Why it is “More Than MACD”  
 
In its simples form, MACD-X implements variety of  different calculation techniques  applied to obtain MACD Line, ability to use of variety of  different sources , including  Volume  related sources, and can be plotted along with MACD in the same window and all those features are available and presented within a single indicator, MACD-X
Different calculation techniques lead to different values for MACD Line, as will further discuss below, and as a consequence the signal line and the histogram values will differentiate accordingly. Mathematical calculation of both signal line and the histogram remain the same. 
 Main features of MACD-X ; 
 
1-	Introduces  different proven techniques applied on MACD calculation , such as  MACD-Histogram, MACD-Leader and MACD-Source, besides the traditional MACD (MACD-TRADITIONAL) 
•	 MACD-Traditional ,  by Gerald Appel 
It is the MACD that we know, stated as traditional just to avoid confusion with other techniques used with this study 
•	 MACD-Histogram ,  by Thomas Aspray 
The MACD-Histogram measures the distance between MACD and its signal line (the 9-day EMA of MACD). Aspray developed the MACD-Histogram to anticipate signal line crossovers in MACD. Because MACD uses moving averages and moving averages lag price, signal line crossovers can come late and affect the reward-to-risk ratio of a trade. Bullish or bearish divergences in the MACD-Histogram can alert chartists to an imminent signal line crossover in MACD
The MACD-Histogram represents the difference between MACD and its 9-day EMA, the signal line.  Mathematically, 
   macdx = macd - ma(macd, signal_length)
Aspray's contribution served as a way to anticipate (and therefore cut down on lag) possible MACD crossovers which are a fundamental part of the indicator.
Here come a question, what if repeat the same calculations once more (macdh2 = macdh - ma(macdh, signal_length), will it be even better, this question will remain to be tested  
•	 MACD-Leader ,  by Giorgos E. Siligardos, PhD 
MACD  Leader has the ability to lead MACD at critical situations. Almost all smoothing methods encounter in technical analysis are based on a relative-weighted sum of past prices, and the Leader is no exception. The concealed weights of MACD Leader are such that more relative weight is used in the more recent prices than the respective weights used by the components of MACD. In effect, the Leader expresses more changes in average price dynamics for the recent price movement than MACD, thus eventually leading MACD, especially when significant trend changes are about to take place. 
Siligardos creates two less-laggard moving averages indicators in its formula using the same periods as follows
   Indicator1 = ma(source, fast_length) + ma(source - ma(source, fast_length), fast_length)
   Indicator2 = ma(source, slow_length) + ma(source - ma(source, slow_length), slow_length)
and then take the difference:
   Indicator1 - Indicator2
The result is a new MACD  Leader indicator
   macdx = macd + ma(source - fast_ma, fast_length) - ma(source - slow_ma, slow_length)
•	 MACD-Source ,  a custom experimental interpretation of mine , 
MACD Source, presents an application of MACD that evaluates Source/MA Ratio, relatively with less lag,  as a basis for MACD Line, also can be expressed as source convergence/divergence to its moving average. Among the various techniques for removing the lag between price and moving average (MA) of the price, one in particular stands out: the addition to the moving average of a portion of the difference between the price and MA. MACD Source, is based on signal length mean of the difference between Source and average value of shot length and long length moving average  of the source (Source/MA Ratio), where the source is actual value and hence no lag and relatively less lag with the average value of moving average  of the source . Mathematically expressed as,
macdx = ma(source - avg( ma(source, fast_length), ma(source, slow_length) ), signal_length)
MACD Source provides relatively early crossovers comparing to MACD and better momentum direction indications, assuming the lengths are set to same values   
For further details, you are invited to check the following two studies, where the first seeds were sown of the MACD-Source idea 
 Price Distance to its Moving Averages  study, adapts the idea of “Prices high above the moving average (MA) or low below it are likely to be remedied in the future by a reverse price movement", presented in an article by Denis Alajbeg, Zoran Bubas and Dina Vasic published in International Journal of Economics, Commerce and Management
First MACD like interpretation comes with the second study named as “ P-MACD ”, where P stands for price,  P-MACD study attempts to display relationship between Price and its 20 and 200-period moving average.   Calculations with P-MACD were based on price distance (convergence/divergence) to its  200-period moving average, and moving average  convergence/divergence of 20-period moving average to 200-period moving average of price. 
Now as explained above,  MACD Source  is a one adapted with traditional MACD, where Source stands for Price, Volume Indicator etc, any source applicable with MACD concept 
2-	Allows  usage of variety of different sources, including Volume related  indicators 
The most common usage of Source for MACD calculation is close value of the financial instruments price. As an experimental approach, this study will allow source to be selected as one of the following series;
•	Current Close Price (close)
•	Average of High, Low, and Close Price (hlc3)
•	On Balance Volume (obv)
•	Accumulation Distribution (accdist)
•	Price Volume Trend (pvt)
Where, 
-Current Close Price and Average of High, Low, and Close Price are price actions of the financial instrument 
- Accumulation Distribution  is a volume based indicator designed to measure underlying supply and demand
- On Balance Volume (OBV) ,  is a momentum indicator that measures positive and negative volume flow
- Price Volume Trend (PVT)  is a momentum based indicator used to measure money flow
3-	Can  be plotted along with MACD  in the same window using the same scaling
Default setting of MACD-X will display MACD-Source with Current Close Price as a source and traditional MACD can be plotted eighter as a companion of MACD-X or can be selected to be plotted alone. 
Applying both will add ability to compare, or use as a confirmation of one other 
In case, traditional MACD Is plotted along with MACD-X to avoid misinterpreting,  the lines plotted, the area between MACD-X Line and Signal-X Line is highlighted automatically, even if the highlight option not selected. Otherwise highlight will be applied only if that option selected
4-	 4C  Histogram
Histogram is plotted with four colors to emphasize the momentum and direction 
5-	Customizable   
Additional to ability of selecting Calculation Method,  Source, plotting along with MACD, there are few other option that allows users to customize the MACD-X indicator 
 Lengths  are configurable, default values are set as 12, 26, 9 respectively for fast, slow and smoothing length. Setting lengths to 8,21,5  respectively Is worth checking, slower length moving averages will lead to less lag and earlier reaction to price actions but yet requires a caution and back testing  before applying 
 Highlight  the area between MACD-X Line and Signal-X Line, with colors emphasising the direction 
 Label  can be added to display Calculation Method, Source and Length  settings, the aim of this label is to server only as a reminder to trades to be aware of settings while they are occupied with charts, analysis etc. 
Here comes another question, which is of more importance having the reminder or having the indicators with multi timeframe feature? Build-in Multi Time Frame features of Pine is not supported when labels and lines introduced in the script, there are other methods but brings complexity. To be studied further, this version will be with labels for time being.  
 Epilogue
 
MACD-X is an alternative variant of MACD, the insight/signals provided by MACD are also applicable to MACD-X with early and clear warnings for the changes in the trend. 
If MACD is essential to your analysis, then it is my guess that after using the MACD-X for a while and familiarizing yourself with its unique character and personality, you will make it an inseparable companion to other indicators in your charts. 
The various signals generated by MACD/MACD-X are easily interpreted and very few indicators in technical analysis have proved to be more reliable than the MACD, and this relatively simple indicator can quickly be incorporated into any short-term trading strategy
 Disclaimer : Trading success is all about following your trading strategy and the indicators should fit within your trading strategy, and not to be traded upon solely
The script is for informational and educational purposes only. Use of the script does not constitutes professional and/or financial advice. You alone the sole responsibility of evaluating the script output and risks associated with the use of the script. In exchange for using the script, you agree not to hold dgtrd TradingView user liable for any possible claim for damages arising from any decision you make based on use of the script
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.
13612WThis script is a 13612W momentum filter used in the Vigilant Asset Allocation (VAA) and Defensive Asset Allocation (DAA) created by Wouter J. Keller and Jan Willem Keuning.
This asset allocation strategy was uploaded to SSRN in 2017 and 2018.
13612W Calculation Method
(Profitability in Last 1 months * 12 +
Profitability in Last 3 months * 4 +
Profitability in Last 6 months * 2 +
Profitability in Last 12 months)/4
Let me briefly explain one of the VAAs, VAA-G4. 
The VAA-G4 has an annualized return of 17.7%, a Sharpe ratio of 1.07% and Max Drawdown of 16.1%.
(It's too long and complicated to describe all VAA, DAA strategies. Above all, the translator performance is not good.)
VAA Global 4 Universe: SPY, EFA, EEM, AGG
Cash Universe: SHY , IEF, LQD
If 13612W of VAA Global 4 Universe is negative at least one
>> 100% of assets hold one of the highest 13612W of Cash Universe
If all 13612W of VAA Global 4 Universe are positive
>> 100% of assets hold one of the highest 13612W of VAA Global 4 Universe
Rebalancing is done every month according to this method.
MAFIA CANDLESMafia Candles is a Exhaustion bar count and candle count indicator, Using the Leledc Candles and 1-3 counting candle play gives you a pretty good idea where a so called "top" will be or a so called "bottom" will be!
In this example, getting the transparent round circles ( either lime or red ) would mean that the move will be a good size move!
EXAMPLE=1 You see a down trend and then the Mafia Candles Flashes a Green Dot on the forming new red candle. This is where in theory you might want to consider going long on the market!
EXAMPLE=2 If you see a RED $ symbol, after a uptrend, this means in theory, there might be room for a short play or room for a small pullback in the price!
THE CIRCLES(RED OR LIME COLORED) ARE INDICATING BIGGER MOVES!
THE $ SYMBOLS (RED OR LIME COLORED) ARE INDICATING SMALLER PULLBACKS OR SMALLER PUMPS IN PRICE!
RED IS CONSIDERED TO BE A SELL!
LIME COLOR IS CONSIDERED TO BE A BUY!
AS MUCH IS BASED OF THE 1-3 CANDLE COUNT AND THE LEDLEC CANDLE DEVIATION STRATEGY, LET ME EXPLAIN THE THEORY ON BOTH THE 1-3 CANDLE COUNT AND THE LELEDC STRATEGY I COMBINE TO BRING YOU THIS ADDITION OF THE INDICATOR....
LELEDC THEORY USAGE... 
An Exhaustion Bar is a bar which signals
the exhaustion of the trend in the current direction. In other words an
exhaustion bar is “A bar of last seller” in case of a downtrend and  “A bar of
last buyer”in case of an uptrend.
Having said that when a party cannot take the price further in their direction,naturally the other party comes in , takes charge and reverses the direction of the trend.
TO EASIER UNDERSTAND I GIVE YOU A EASY EXAMPLE OF WHAT AN LELEDC EXHAUSTION BAR IS...
1. A wide range bar ( a bar with
long body!!!).
2. A long wick at the bottom of
the bar and no or negligible wick at the top of the bar in case of “Bear exhaustion bar” and
a long wick at the top and no or
negligible wick at the bottom of the bar in case of 
“Bull exhuation bar”!!!
3. Extreme volume and.....
4. Bar forming at a key support or resistance
area including a Round Number (RN) and Big Round Number  ( BRN ).THE PSYCHOLOGY BEHIND THIS!!!
Now let's assume that we have a group
of people,say 100 people who decides to go for a casual running. After running for few KM's few of
them will say “I am exhausted. I cannot run further”. They will quit running.
After running  further, another bunch of runners will say “I am exhausted. I can’t run
further” and they  also will quit  running.
This goes on and on and then there will be a stage where only few will be left in the running. Now a stage will come where the last person left in the running will say “I
am exhausted” and he stops running. That means no one is left now in the
running.This means all are exhausted in the running.
The same way an exhaustion bar works and if we can figure out that
exhaustion bar with all the tools available on hand, we will be in a big trade
for sure!!.The reason is an exhaustion bar is formed at exact tops and bottoms most of the times.In forex with wide variety of pairs available at the counter ,one can trade this technique to make lifetime gains.
NOW LET ME EXPLAIN THE 1-3 CANDLE CORRECTION COUNT THEORY WHICH IS USED TO GET THE SUM UP SIGNALS FROM THIS INDICATOR FROM ITS INPUT LEVELS!!!
1-3 CANDLES....
The 1-3 Candlestick pattern is basically like sequential, aka a candle counting system!
1-3 CANDLE COUNT means you count the number of bullish=green candles or the bearish=red candles!
3 BULL/GREEN CANDLES in a row, each closing its close higher than the previous one before it is the 1-3 candle top count idea!
lets say you get 3 red bear candles, each candle after the first closes its body below the previous red candle before it, then you see 3 red candles with each closing lower bodies lower than the previous candle, THATS A POSSIBLE SIGN OF BEARISH EXHAUSTION, AND YOU MIGHT HAVE SOME BULLS STEP IN TO TAKE THE PRICE UP AFTER THE IMMEDIATE DOWNFALL OF THOSE 3 RED CANDLES!!
PLEASE IF ANYONE HAS QUESTIONS OR NEEDS ANY FURTHER EXPLANATION, DONT HESISITATE TO MESSAGE ME! CHALRES KNIGHT IS THE ORIGINAL AUTHOR OF THE 1-3 CANDLE COUNT AND THE LELEDC EXHAUSTION BAR INDICATOR ON METE-TRADER! R.IP CHARLES F KNIGHT!!! WE LOVE YOU AND MISS YOU BROTHER!
CHARLES KNIGHT PASSED DOWN ALL OF HIS INDICATORS AND SCRIPTS IN ORIGINAL CODE TO MYSELF WHEN HE PASSED AWAY AND I WILL CONTINUE TO HONOR HIS MEMORY BY ENHANCING HIS ORIGINAL SOURCE CODED SCRIPTS TO ENHANCE THE LIFE FOR ALL TRADERS!
CHARLIE LOVED WHEN I WOULD PUT MY OWN SWING ON HIS INDICATORS! HE TAUGHT ME EVERYTHING I KNOW AND I KNOW ONE DAY I WILL SEE HIM AGAIN! 
TRADE IN PARADISE CHARLIE!!!
THE BEST TRADER IN THE WORLD!!!






















