Time Sessions - S/RThis scripts shows you some time sessions such as NY open, NY mid, London Open and Daily Close for UTC - 0
It also plots resistance and support based on the last 15 candles but you can change it in settings.
Cycles
Days and Session
This indicator optionally displays 2 informations:
- The Day of the week
- The New session's Candle
You can turn off/on the displayed information
Disclaimer: Scripts that I post publicly are experimental. They are not financial advices. Always backtest your ideas using your own methodologies.
PA-Adaptive TRIX Log [Loxx]PA-Adaptive TRIX Log is a Phase Accumulation Adaptive TRIX Log indicator. This adaptation smooths the signal to catch larger trends.
What is TRIX?
TRIX is a momentum oscillator that displays the percent rate of change of a TEMA . It was developed in the early 1980's by Jack Hutson, an editor for "Technical Analysis of Stocks and Commodities" magazine. With its triple smoothing, TRIX is designed to filter insignificant price movements. In his article he uses a logarithm of a price (which is in many versions, left out).
What is the Phase Accumulation Cycle?
The phase accumulation method of computing the dominant cycle is perhaps the easiest to comprehend. In this technique, we measure the phase at each sample by taking the arctangent of the ratio of the quadrature component to the in-phase component. A delta phase is generated by taking the difference of the phase between successive samples. At each sample we can then look backwards, adding up the delta phases.When the sum of the delta phases reaches 360 degrees, we must have passed through one full cycle, on average.The process is repeated for each new sample.
The phase accumulation method of cycle measurement always uses one full cycle’s worth of historical data.This is both an advantage and a disadvantage.The advantage is the lag in obtaining the answer scales directly with the cycle period.That is, the measurement of a short cycle period has less lag than the measurement of a longer cycle period. However, the number of samples used in making the measurement means the averaging period is variable with cycle period. longer averaging reduces the noise level compared to the signal.Therefore, shorter cycle periods necessarily have a higher out- put signal-to-noise ratio.
Included
Bar coloring
2 signal options
Alerts
Poly Cycle [Loxx]This is an example of what can be done by combining Legendre polynomials and analytic signals. I get a way of determining a smooth period and relative adaptive strength indicator without adding time lag.
This indicator displays the following:
The Least Squares fit of a polynomial to a DC subtracted time series - a best fit to a cycle.
The normalized analytic signal of the cycle (signal and quadrature).
The Phase shift of the analytic signal per bar.
The Period and HalfPeriod lengths, in bars of the current cycle.
A relative strength indicator of the time series over the cycle length. That is, adaptive relative strength over the cycle length.
The Relative Strength Indicator, is adaptive to the time series, and it can be smoothed by increasing the length of decreasing the number of degrees of freedom.
Other adaptive indicators based upon the period and can be similarly constructed.
There is some new math here, so I have broken the story up into 5 Parts:
Part 1:
Any time series can be decomposed into a orthogonal set of polynomials .
This is just math and here are some good references:
Legendre polynomials - Wikipedia, the free encyclopedia
Peter Seffen, "On Digital Smoothing Filters: A Brief Review of Closed Form Solutions and Two New Filter Approaches", Circuits Systems Signal Process, Vol. 5, No 2, 1986
I gave some thought to what should be done with this and came to the conclusion that they can be used for basic smoothing of time series. For the analysis below, I decompose a time series into a low number of degrees of freedom and discard the zero mode to introduce smoothing.
That is:
time series => c_1 t + c_2 t^2 ... c_Max t^Max
This is the cycle. By construction, the cycle does not have a zero mode and more physically, I am defining the "Trend" to be the zero mode.
The data for the cycle and the fit of the cycle can be viewed by setting
ShowDataAndFit = TRUE;
There, you will see the fit of the last bar as well as the time series of the leading edge of the fits. If you don't know what I mean by the "leading edge", please see some of the postings in . The leading edges are in grayscale, and the fit of the last bar is in color.
I have chosen Length = 17 and Degree = 4 as the default. I am simply making sure by eye that the fit is reasonably good and degree 4 is the lowest polynomial that can represent a sine-like wave, and 17 is the smallest length that lets me calculate the Phase Shift (Part 3 below) using the Hilbert Transform of width=7 (Part 2 below).
Depending upon the fit you make, you will capture different cycles in the data. A fit that is too "smooth" will not see the smaller cycles, and a fit that is too "choppy" will not see the longer ones. The idea is to use the fit to try to suppress the smaller noise cycles while keeping larger signal cycles.
Part 2:
Every time series has an Analytic Signal, defined by applying the Hilbert Transform to it. You can think of the original time series as amplitude * cosine(theta) and the transformed series, called the quadrature, can be thought of as amplitude * sine(theta). By taking the ratio, you can get the angle theta, and this is exactly what was done by John Ehlers in . It lets you get a frequency out of the time series under consideration.
Amazon.com: Rocket Science for Traders: Digital Signal Processing Applications (9780471405672): John F. Ehlers: Books
It helps to have more references to understand this. There is a nice article on Wikipedia on it.
Read the part about the discrete Hilbert Transform:
en.wikipedia.org
If you really want to understand how to go from continuous to discrete, look up this article written by Richard Lyons:
www.dspguru.com
In the indicator below, I am calculating the normalized analytic signal, which can be written as:
s + i h where i is the imagery number, and s^2 + h^2 = 1;
s= signal = cosine(theta)
h = Hilbert transformed signal = quadrature = sine(theta)
The angle is therefore given by theta = arctan(h/s);
The analytic signal leading edge and the fit of the last bar of the cycle can be viewed by setting
ShowAnalyticSignal = TRUE;
The leading edges are in grayscale fit to the last bar is in color. Light (yellow) is the s term, and Dark (orange) is the quadrature (hilbert transform). Note that for every bar, s^2 + h^2 = 1 , by construction.
I am using a width = 7 Hilbert transform, just like Ehlers. (But you can adjust it if you want.) This transform has a 7 bar lag. I have put the lag into the plot statements, so the cycle info should be quite good at displaying minima and maxima (extrema).
Part 3:
The Phase shift is the amount of phase change from bar to bar.
It is a discrete unitary transformation that takes s + i h to s + i h
explicitly, T = (s+ih)*(s -ih ) , since s *s + h *h = 1.
writing it out, we find that T = T1 + iT2
where T1 = s*s + h*h and T2 = s*h -h*s
and the phase shift is given by PhaseShift = arctan(T2/T1);
Alas, I have no reference for this, all I doing is finding the rotation what takes the analytic signal at bar to the analytic signal at bar . T is the transfer matrix.
Of interest is the PhaseShift from the closest two bars to the present, given by the bar and bar since I am using a width=7 Hilbert transform, bar is the earliest bar with an analytic signal.
I store the phase shift from bar to bar as a time series called PhaseShift. It basically gives you the (7-bar delayed) leading edge the amount of phase angle change in the series.
You can see it by setting
ShowPhaseShift=TRUE
The green points are positive phase shifts and red points are negative phase shifts.
On most charts, I have looked at, the indicator is mostly green, but occasionally, the stock "retrogrades" and red appears. This happens when the cycle is "broken" and the cycle length starts to expand as a trend occurs.
Part 4:
The Period:
The Period is the number of bars required to generate a sum of PhaseShifts equal to 360 degrees.
The Half-period is the number of bars required to generate a sum of phase shifts equal to 180 degrees. It is usually not equal to 1/2 of the period.
You can see the Period and Half-period by setting
ShowPeriod=TRUE
The code is very simple here:
Value1=0;
Value2=0;
while Value1 < bar_index and math.abs(Value2) < 360 begin
Value2 = Value2 + PhaseShift ;
Value1 = Value1 + 1;
end;
Period = Value1;
The period is sensitive to the input length and degree values but not overly so. Any insight on this would be appreciated.
Part 5:
The Relative Strength indicator:
The Relative Strength is just the current value of the series minus the minimum over the last cycle divided by the maximum - minimum over the last cycle, normalized between +1 and -1.
RelativeStrength = -1 + 2*(Series-Min)/(Max-Min);
It therefore tells you where the current bar is relative to the cycle. If you want to smooth the indicator, then extend the period and/or reduce the polynomial degree.
In code:
NewLength = floor(Period + HilbertWidth+1);
Max = highest(Series,NewLength);
Min = lowest(Series,NewLength);
if Max>Min then
Note that the variable NewLength includes the lag that comes from the Hilbert transform, (HilbertWidth=7 by default).
Conclusion:
This is an example of what can be done by combining Legendre polynomials and analytic signals to determine a smooth period without adding time lag.
________________________________
Changes in this one : instead of using true/false options for every single way to display, use Type parameter as following :
1. The Least Squares fit of a polynomial to a DC subtracted time series - a best fit to a cycle.
2. The normalized analytic signal of the cycle (signal and quadrature).
3. The Phase shift of the analytic signal per bar.
4. The Period and HalfPeriod lengths, in bars of the current cycle.
5. A relative strength indicator of the time series over the cycle length. That is, adaptive relative strength over the cycle length.
MACDV DASHBOARDFrom Riliza MACD-V Volatility Normalisation and another knowledge I am just her follower, Try to make dashboard to study the market for my self.
Rev00
- MACDV with momentum
-Still need to optimize and revise many thing.
-Any wrong could you please help feed back , Not much experience.
Chervolinos_Rob Hoffman_Inventory Retracement Bar_and_OverlayHere is something like a combo from the well known Rob Hoffman (Overlay) Indicator and the Inventory Retracement Bar without any ballast
This really smart strategy with a low risk and a quick profit. I combine this two Indicators to save space.
The first condition is that the orange line and the lime line must be parallel and there is no other line between them because this condition is moving under 45 angle.
The second condition is that the target candles must be below the orange line in the case of the downtrend as we see.
As we see it here in the case of an uptrend should be candles above the orange line and this is logical as we see here.
Sometimes we noticed the appearance of the signal onto the candle but the conditions were not applicable because there is an orange line between the green line and the orange line and this means that the signal is fake.
This candle is also good for entry and we can place a buy order above it but is it beginner, so you must respect the conditions in order to be able to master it very well.
Enter with Confidence all conditions are present a red arrow above the candle and the candle is above the orange line and there are no lines between the lime and
orange line. Yes this is our target the entry-point will be a little above the wicked the candle, that is you will not buy now but it's a price exceeds the weight limit
even slightly, we will buy directly it is hoffman's method. Expected if the price in which resistance occurred which is the resistance represented
by the candlewick will be broken the price for rise up and strongly and if it does not happen you will not lose anything anyway to stop loss and take profit. Try the ratio by 1,5.
This part of this strategy is one of the best trading strategies with a low risk rate and can be used as an initial guide to know the market movement and to enter successful trades.
Let's start correctly. This strategy can be used on any time frame from one minute to one day or even more, but I recommend using it on a 10-minute frame one hour or 30 minutes frame. Here I use the 30-Minute frame.
This strategy is based on two things: Tramp Direction and the inventory retracement bar. Don't worry and don't think about it because all this will be automatic but let's understand some simple terms.
There many arrows in green and red. Please read the discription above.
Please read the following tipps:
To avoid the trend Reversal, try to add one one of the Divergence indicators to your chart.
To avoid entering in a pullback movement as much as possible.
--> Combine it with other indicators <--
Best Regards Chervolino
if there were any typographical errors, please forgive me
Note: Buy/Sell signals using non-standard chart types (Heikin Ashi, Renko, Kagi, Point & Figure, and Range) are not allowed, as they produce unrealistic results
Adjusted TOTAL3 (TOTAL3 minus the stable coins)Total3 does not show the whole picture, because the supply of the stable coins is included and that provides an over optimistic outlook on the the market cap of the alt coins.
The Investment ClockThe Investment Clock was most likely introduced to the general public in a research paper distributed by Merrill Lynch. It’s a simple yet useful framework for understanding the various stages of the US economic cycle and which asset classes perform best in each stage.
The Investment Clock splits the business cycle into four phases, where each phase is comprised of the orientation of growth and inflation relative to their sustainable levels:
Reflation phase (6:01 to 8:59): Growth is sluggish and inflation is low. This phase occurs during the heart of a bear market. The economy is plagued by excess capacity and falling demand. This keeps commodity prices low and pulls down inflation. The yield curve steepens as the central bank lowers short-term rates in an attempt to stimulate growth and inflation. Bonds are the best asset class in this phase.
Recovery phase (9:01 to 11:59): The central bank’s easing takes effect and begins driving growth to above the trend rate. Though growth picks up, inflation remains low because there’s still excess capacity. Rising growth and low inflation are the Goldilocks phase of every cycle. Stocks are the best asset class in this phase.
Overheat phase(12:01 to 2:59): Productivity growth slows and the GDP gap closes causing the economy to bump up against supply constraints. This causes inflation to rise. Rising inflation spurs the central banks to hike rates. As a result, the yield curve begins flattening. With high growth and high inflation, stocks still perform but not as well as in recovery. Volatility returns as bond yields rise and stocks compete with higher yields for capital flows. In this phase, commodities are the best asset class.
Stagflation phase (3:01 to 5:59): GDP growth slows but inflation remains high (sidenote: most bear markets are preceded by a 100%+ increase in the price of oil which drives inflation up and causes central banks to tighten). Productivity dives and a wage-price spiral develops as companies raise prices to protect compressing margins. This goes on until there’s a steep rise in unemployment which breaks the cycle. Central banks keep rates high until they reign in inflation. This causes the yield curve to invert. During this phase, cash is the best asset.
Additional notes from Merrill Lynch:
Cyclicality: When growth is accelerating (12 o'clock), Stocks and Commodities do well. Cyclical sectors like Tech or Steel outperform. When growth is slowing (6 o'clock), Bonds, Cash, and defensives outperform.
Duration: When inflation is falling (9 o'clock), discount rates drop and financial assets do well. Investors pay up for long duration Growth stocks. When inflation is rising (3 o'clock), real assets like Commodities and Cash do best. Pricing power is plentiful and short-duration Value stocks outperform.
Interest Rate-Sensitives: Banks and Consumer Discretionary stocks are interest-rate sensitive “early cycle” performers, doing best in Reflation and Recovery when central banks are easing and growth is starting to recover.
Asset Plays: Some sectors are linked to the performance of an underlying asset. Insurance stocks and Investment Banks are often bond or equity price sensitive, doing well in the Reflation or Recovery phases. Mining stocks are metal price-sensitive, doing well during an Overheat.
About the indicator:
This indicator suggests iShares ETFs for sector rotation analysis. There are likely other ETFs to consider which have lower fees and are outperforming their sector peers.
You may get errors if your chart is set to a different timeframe & ticker other than 1d for symbol/tickers GDPC1 or CPILFESL.
Investment Clock settings are based on a "sustainable level" of growth and inflation, which are each slightly subjective depending on the economist and probably have changed since the last time this indicator was updated. Hence, the sustainable levels are customizable in the settings. When I was formally educated I was trained to use average CPI of 3.1% for financial planning purposes, the default for the indicator is 2.5%, and the Medium article backtested and optimized a 2% sustainable inflation rate. Again, user-defined sustainable growth and rates are slightly subjective and will affect results.
I have not been trained or even had much experience with MetaTrader code, which is how this indicator was originally coded. See the original Medium article that inspired this indicator if you want to audit & compare code.
Hover over info panel for detailed information.
Features: Advanced info panel that performs Investment Clock analysis and offers additional hover info such as sector rotation suggestions. Customizable sustainable levels, growth input, and inflation input. Phase background coloring.
⚠ DISCLAIMER: Not financial advice. Not a trading system. DYOR. I am not affiliated with Medium, Macro Ops, iShares, or Merrill Lynch.
About the Author: I am a patent-holding inventor, a futures trader, a hobby PineScripter, and a former FINRA Registered Representative.
Strategy Oil Z ScoreObjective is to find forward looking indicators to find good entries into major index's.
In similar vein to my Combo Z Score script I have implemented one looking at oil and oil volatility. Interestingly the script out performs WITHOUT applying the EMA in longer timeframes but under performs in shorter timeframes, for example 2007 vs 2019. Likely due to the bullish nature of the past decade (by and large). You have some options on the underlying included Oil vs OVX (Best), MOVE vs OVX and VIX vs OVX. Oil vs OVX out performs Combo Z Script. Favours Spy over QQQ or derivations (SPXL etc).
Market Sessions(4sessions)Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM))) Special for CLUB SM)))
Historical US Bond Yield CurvePreface: I'm just the bartender serving today's freshly blended concoction; I'd like to send a massive THANK YOU to all the coders and PineWizards for the locally-sourced ingredients. I am simply a code editor, not a code author. Many thanks to these original authors!
Source 1 (Aug 8, 2019):
Source 2 (Aug 11, 2019):
About the Indicator: The term yield curve refers to the yields of U.S. treasury bills, notes, and bonds in order from shortest to longest maturity date. The yield curve describes the shapes of the term structures of interest rates and their respective terms to maturity in years. The slope of the yield curve tells us how the bond market expects short-term interest rates to move in the future based on bond traders' expectations about economic activity and inflation. The best use of the yield curve is to get a sense of the economy's direction rather than to try to make an exact prediction. This indicator plots the U.S. yield curve as maturity (x-axis/time) vs yield (y-axis/price) in addition to historical yield curves and advanced data tickers . The visual array of historical yield curves helps investors visualize shifts in the yield curve that are useful when identifying & forecasting economic conditions. The bond market can help predict the direction of the economy which can be useful in crafting your investment strategy. An inverted 10y/2y yield curve for durations longer than 5 consecutive trading days signals an almost certain recession on the horizon. An inversion happens when short-term bonds pay better than longer-term bonds. There is Federal Reserve Board data that suggests the 10y3m may be a better predictor of recessions.
Features: Advanced dual data ticker that performs curve & important spread analysis, plus additional hover info. Advanced yield curve data labels with additional hover info. Customizable historical curves and color theme.
‼ IMPORTANT: Hover over labels/tables for advanced information. Chart asset and timeframe may affect the yield curve results; I have found consistently accurate results using BINANCE:BTCUSDT on 1d timeframe. Historical curve lookbacks will have an effect on whether the curve analysis says the curve is bull/bear steepening/flattening, so please use appropriate lookbacks.
⚠ DISCLAIMER: Not financial advice. Not a trading system. DYOR. I am not affiliated with the original authors, TradingView, Binance, or the Federal Reserve Board.
About the Editor: I am a former FINRA Registered Representative, inventor/patent holder, futures trader, and hobby PineScripter.
Buy Monday, Exit WednesdayStrategy to go long at end of Monday before market closes and exit before Wednesday close, or at stop loss or take profit percentages
This runs strategy on entering by weekday name and also by session time.
Implemented are also Take Profit and Stop Loss to exit position using custom inputs.
Added stop loss and take profit plot lines
Daily_Mid Term_Consulting BOLTDaily Mid Term Consulting BOLT es una estrategia a mediano y largo plazo creada para detectar los cambios tendenciales en zonas de tiempo diarias. se basa en el análisis de los cambios porcentuales que sufre el precio contra las distintas medias móviles simples definidas en la estrategia. el uso de osciladores como el MACD , RSI y EFI apoyan la decisión de entrada a la estrategia.
actualmente esta en construcción la colocación de stop losses para aumentar la eectividad de la misma.
VHF Adaptive Fisher Transform [Loxx]VHF Adaptive Fisher Transform is an adaptive cycle Fisher Transform using a Vertical Horizontal Filter to calculate the volatility adjusted period.
What is VHF Adaptive Cycle?
Vertical Horizontal Filter (VHF) was created by Adam White to identify trending and ranging markets. VHF measures the level of trend activity, similar to ADX DI. Vertical Horizontal Filter does not, itself, generate trading signals, but determines whether signals are taken from trend or momentum indicators. Using this trend information, one is then able to derive an average cycle length.
What is Fisher Transform?
The Fisher Transform is a technical indicator created by John F. Ehlers that converts prices into a Gaussian normal distribution.
The indicator highlights when prices have moved to an extreme, based on recent prices. This may help in spotting turning points in the price of an asset. It also helps show the trend and isolate the price waves within a trend.
Included:
Zero-line and signal cross options for bar coloring
Customizable overbought/oversold thresh-holds
Alerts
Signals
APA Adaptive Fisher Transform [Loxx]APA Adaptive Fisher Transform is an adaptive cycle Fisher Transform using Ehlers Autocorrelation Periodogram Algorithm to calculate the dominant cycle period.
What is an adaptive cycle, and what is Ehlers Autocorrelation Periodogram Algorithm?
From Ehlers' book Cycle Analytics for Traders Advanced Technical Trading Concepts by John F. Ehlers , 2013, page 135:
"Adaptive filters can have several different meanings. For example, Perry Kaufman’s adaptive moving average ( KAMA ) and Tushar Chande’s variable index dynamic average ( VIDYA ) adapt to changes in volatility . By definition, these filters are reactive to price changes, and therefore they close the barn door after the horse is gone.The adaptive filters discussed in this chapter are the familiar Stochastic , relative strength index ( RSI ), commodity channel index ( CCI ), and band-pass filter.The key parameter in each case is the look-back period used to calculate the indicator. This look-back period is commonly a fixed value. However, since the measured cycle period is changing, it makes sense to adapt these indicators to the measured cycle period. When tradable market cycles are observed, they tend to persist for a short while.Therefore, by tuning the indicators to the measure cycle period they are optimized for current conditions and can even have predictive characteristics.
The dominant cycle period is measured using the Autocorrelation Periodogram Algorithm. That dominant cycle dynamically sets the look-back period for the indicators. I employ my own streamlined computation for the indicators that provide smoother and easier to interpret outputs than traditional methods. Further, the indicator codes have been modified to remove the effects of spectral dilation.This basically creates a whole new set of indicators for your trading arsenal."
What is Fisher Transform?
The Fisher Transform is a technical indicator created by John F. Ehlers that converts prices into a Gaussian normal distribution.
The indicator highlights when prices have moved to an extreme, based on recent prices. This may help in spotting turning points in the price of an asset. It also helps show the trend and isolate the price waves within a trend.
Included:
Zero-line and signal cross options for bar coloring
Customizable overbought/oversold thresh-holds
Alerts
Signals
Deep FinderThis indicator shows you the most convenient buying times. It helps you lower your average and earn high profits by purchasing incrementally.
A_HMS_EMAsthis is an indicator that have many essentials in one indicator and prevent from adding many indicator in chart
Ichimoko clouds and 4 ema from number 19 , 33 , 66 , 199
and an spatial average ema with 2 color that help you to find trend
Histomentu is a great Indicator that combine RSI Composit by RSi line and show momentum of price movement by a histogram
for better use note that:
red line is composite line
green line is rsi line
when composite line run away from histogram momemtum increase rapidly
when composite and rsi line is in same way its time to get position .
some futures is hidden by default:
composite red and green signal line
rmi of price with to color with momentum 4
ema 13, 33 of rmi as signal line
finaly u can change any colors from setting
in background we determine some fills for better use of Indicator
for better use note that:
1_pivots show with tiny triangles bellow and above the candles
red triangles for hi pivots and green triangles for low povots
2_ema19 , 66 , 199 shown on chart by default and you can change its source or length from settings
3- ichimoko cloud help you to determine demand and supply zones that those points are price target to go.
A_HMS_RSI_COMPOSITMy majic Macd Indicator with Ema base macd is My great Indicator that combine four ema base macd lines with its signal lines that show price gravity by best way , and one spatial chart that is the best part of this magic indicator that help you to trading without any problem
for better use note that:
green fill line is ema 66 and ema 199 macd and signal its name is macd very slow signal line
blue fill line is ema 19 and ema 66 macd and signal its name is macd normal signal line
red fill line is ema 9 and ema 19 macd and signal its name is macd very fast signal line
black line is ema 4 and ema 14 macd its name is macd main signal line
in all of this lines we can define divergence
when this lines crossing over and under from together each of this crossings give me some signals and because this signals very much we cant describe thats in some lines
but note that we in fact trade just by black line but short and long position determine by position of black line instead of other lines and positions of other lines from each ones
purple line is rsi line
red line is composite line
blue line is rmi line
red and Blue below line is Slow Stochastic lines
blue and orange line is Stochastic ema with ema12 - ema21
and third chart is a secret indicator that help more to determine best place to start trading
A_HMS_RSI is My great Indicator that RSI , RMI and , momentum of price movement by a histogram , that help you to trading without any problem
for better use note that:
blue line is rsi line with hl2 source and 14 length
low color line is rmi line with momentum 33
rmi of price with momentum 33 is a very good signal for long positions.
momentum histogram help us to define strong of price motion in each time
some futures is hidden by default:
composite red and green signal line
rmi of price with momentum 4
ema 13, 33 of rmi as signal line and rsi and composit
finaly u can change any colors from setting
in background we determine some filled zones for better use of Indicator
when composite line run away from histogram momentum increase rapidly
when composite and rsi line is in same way its time to get position .
rmi of price with momentum 20 is a very good signal for long positions.
some futures is hidden by default:
composite red and green signal line
rmi of price with momentum 20
ema 13, 33 of rmi as signal line
finaly u can change any colors from setting
and you can get stoch signals too
in background we determine some filled zones for better use of Indicator
Goertzel Cycle Period [Loxx]Goertzel Cycle Period is an indicator that uses Goertzel algorithm to extract the cycle period of ticker's price input to then be injected into advanced, adaptive indicators and technical analysis algorithms.
The following information is extracted from: "MESA vs Goertzel-DFT, 2003 by Dennis Meyers"
Background
MESA which stands for Maximum Entropy Spectral Analysis is a widely used mathematical technique designed to find the frequencies present in data. MESA was developed by J.P Burg for his Ph.D dissertation at Stanford University in 1975. The use of the MESA technique for stocks has been written about in many articles and has been popularized as a trading technique by John Ehlers.
The Fourier Transform is a mathematical technique named after the famed French mathematician Jean Baptiste Joseph Fourier 1768-1830. In its digital form, namely the discrete-time Fourier Transform (DFT) series, is a widely used mathematical technique to find the frequencies of discrete time sampled data. The use of the DFT has been written about in many articles in this magazine (see references section).
Today, both MESA and DFT are widely used in science and engineering in digital signal processing. The application of MESA and Fourier mathematical techniques are prevalent in our everyday life from everything from television to cell phones to wireless internet to satellite communications.
MESA Advantages & Disadvantage
MESA is a mathematical technique that calculates the frequencies of a time series from the autoregressive coefficients of the time series. We have all heard of regression. The simplest regression is the straight line regression of price against time where price(t) = a+b*t and where a and b are calculated such that the square of the distance between price and the best fit straight line is minimized (also called least squares fitting). With autoregression we attempt to predict tomorrows price by a linear combination of M past prices.
One of the major advantages of MESA is that the frequency examined is not constrained to multiples of 1/N (1/N is equal to the DFT frequency spacing and N is equal to the number of sample points). For instance with the DFT and N data points we can only look a frequencies of 1/N, 2/N, Ö.., 0.5. With MESA we can examine any frequency band within that range and any frequency spacing between i/N and (i+1)/N . For example, if we had 100 bars of price data, we might be interested in looking for all cycles between 3 bars per cycle and 30 bars/ cycle only and with a frequency spacing of 0.5 bars/cycle. DFT would examine all bars per cycle of between 2 and 50 with a frequency spacing constrained to 1/100.
Another of the major advantages of MESA is that the dominant spectral (frequency) peaks of the price series, if they exist, can be identified with fewer samples than the DFT technique. For instance if we had a 10 bar price period and a high signal to noise ratio we could accurately identify this period with 40 data samples using the MESA technique. This same resolution might take 128 samples for the DFT. One major disadvantage of the MESA technique is that with low signal to noise ratios, that is below 6db (signal amplitude/noise amplitude < 2), the ability of MESA to find the dominant frequency peaks is severely diminished.(see Kay, Ref 10, p 437). With noisy price series this disadvantage can become a real problem. Another disadvantage of MESA is that when the dominant frequencies are found another procedure has to be used to get the amplitude and phases of these found frequencies. This two stage process can make MESA much slower than the DFT and FFT . The FFT stands for Fast Fourier Transform. The Fast Fourier Transform(FFT) is a computationally efficient algorithm which is a designed to rapidly evaluate the DFT. We will show in examples below the comparisons between the DFT & MESA using constructed signals with various noise levels.
DFT Advantages and Disadvantages.
The mathematical technique called the DFT takes a discrete time series(price) of N equally spaced samples and transforms or converts this time series through a mathematical operation into set of N complex numbers defined in what is called the frequency domain. Why would we what to do that? Well it turns out that we can do all kinds of neat analysis tricks in the frequency domain which are just to hard to do, computationally wise, with the original price series in the time domain. If we make the assumption that the price series we are examining is made up of signals of various frequencies plus noise, than in the frequency domain we can easily filter out the frequencies we have no interest in and minimize the noise in the data. We could then transform the resultant back into the time domain and produce a filtered price series that hopefully would be easier to trade. The advantages of the DFT and itís fast computation algorithm the FFT, are that it is extremely fast in calculating the frequencies of the input price series. In addition it can determine frequency peaks for very noisy price series even when the signal amplitude is less than the noise amplitude. One of the disadvantages of the FFT is that straight line, parabolic trends and edge effects in the price series can distort the frequency spectrum. In addition, end effects in the price series can distort the frequency spectrum. Another disadvantage of the FFT is that it needs a lot more data than MESA for spectral resolution. However this disadvantage has largely been nullified by the speed of today's computers.
Goertzel algorithm attempts to resolve these problems...
What is the Goertzel algorithm?
The Goertzel algorithm is a technique in digital signal processing (DSP) for efficient evaluation of the individual terms of the discrete Fourier transform (DFT). It is useful in certain practical applications, such as recognition of dual-tone multi-frequency signaling (DTMF) tones produced by the push buttons of the keypad of a traditional analog telephone. The algorithm was first described by Gerald Goertzel in 1958.
Like the DFT, the Goertzel algorithm analyses one selectable frequency component from a discrete signal. Unlike direct DFT calculations, the Goertzel algorithm applies a single real-valued coefficient at each iteration, using real-valued arithmetic for real-valued input sequences. For covering a full spectrum, the Goertzel algorithm has a higher order of complexity than fast Fourier transform (FFT) algorithms, but for computing a small number of selected frequency components, it is more numerically efficient. The simple structure of the Goertzel algorithm makes it well suited to small processors and embedded applications.
The main calculation in the Goertzel algorithm has the form of a digital filter, and for this reason the algorithm is often called a Goertzel filter
Where is Goertzel algorithm used?
This package contains the advanced mathematical technique called the Goertzel algorithm for discrete Fourier transforms. This mathematical technique is currently used in today's space-age satellite and communication applications and is applied here to stock and futures trading.
While the mathematical technique called the Goertzel algorithm is unknown to many, this algorithm is used everyday without even knowing it. When you press a cell phone button have you ever wondered how the telephone company knows what button tone you pushed? The answer is the Goertzel algorithm. This algorithm is built into tiny integrated circuits and immediately detects which of the 12 button tones(frequencies) you pushed.
Future Additions:
Bartels test for cycle significance, testing output cycles for utility
Hodrick Prescott Detrending, smoothing
Zero-Lag Regression Detrending, smoothing
High-pass or Double WMA filtering of source input price data
References:
1. Burg, J. P., ëMaximum Entropy Spectral Analysisî, Ph.D. dissertation, Stanford University, Stanford, CA. May 1975.
2. Kay, Steven M., ìModern Spectral Estimationî, Prentice Hall, 1988
3. Marple, Lawrence S. Jr., ìDigital Spectral Analysis With Applicationsî, Prentice Hall, 1987
4. Press, William H., et al, ìNumerical Receipts in C++: the Art of Scientific Computingî,
Cambridge Press, 2002.
5. Oppenheim, A, Schafer, R. and Buck, J., ìDiscrete Time Signal Processingî, Prentice Hall,
1996, pp663-634
6. Proakis, J. and Manolakis, D. ìDigital Signal Processing-Principles, Algorithms and
Applicationsî, Prentice Hall, 1996., pp480-481
7. Goertzel, G., ìAn Algorithm for he evaluation of finite trigonometric seriesî American Math
Month, Vol 65, 1958 pp34-35.
Phase-Accumulation Adaptive EMA w/ Expanded Source Types [Loxx]Phase-Accumulation Adaptive EMA w/ Expanded Source Types is a Phase Accumulation Adaptive Exponential Moving Average with Loxx's Expanded Source Types. This indicator is meant to better capture trend movements using dominant cycle inputs. Alerts are included.
What is Phase Accumulation?
The phase accumulation method of computing the dominant cycle is perhaps the easiest to comprehend. In this technique, we measure the phase at each sample by taking the arctangent of the ratio of the quadrature component to the in-phase component. A delta phase is generated by taking the difference of the phase between successive samples. At each sample we can then look backwards, adding up the delta phases.When the sum of the delta phases reaches 360 degrees, we must have passed through one full cycle, on average.The process is repeated for each new sample.
The phase accumulation method of cycle measurement always uses one full cycle’s worth of historical data.This is both an advantage and a disadvantage.The advantage is the lag in obtaining the answer scales directly with the cycle period.That is, the measurement of a short cycle period has less lag than the measurement of a longer cycle period. However, the number of samples used in making the measurement means the averaging period is variable with cycle period. longer averaging reduces the noise level compared to the signal.Therefore, shorter cycle periods necessarily have a higher out- put signal-to-noise ratio.
Included:
-Toggle on/off bar coloring
-Alerts
APA-Adaptive, Ehlers Early Onset Trend [Loxx]APA-Adaptive, Ehlers Early Onset Trend is Ehlers Early Onset Trend but with Autocorrelation Periodogram Algorithm dominant cycle period input.
What is Ehlers Early Onset Trend?
The Onset Trend Detector study is a trend analyzing technical indicator developed by John F. Ehlers , based on a non-linear quotient transform. Two of Mr. Ehlers' previous studies, the Super Smoother Filter and the Roofing Filter, were used and expanded to create this new complex technical indicator. Being a trend-following analysis technique, its main purpose is to address the problem of lag that is common among moving average type indicators.
The Onset Trend Detector first applies the EhlersRoofingFilter to the input data in order to eliminate cyclic components with periods longer than, for example, 100 bars (default value, customizable via input parameters) as those are considered spectral dilation. Filtered data is then subjected to re-filtering by the Super Smoother Filter so that the noise (cyclic components with low length) is reduced to minimum. The period of 10 bars is a default maximum value for a wave cycle to be considered noise; it can be customized via input parameters as well. Once the data is cleared of both noise and spectral dilation, the filter processes it with the automatic gain control algorithm which is widely used in digital signal processing. This algorithm registers the most recent peak value and normalizes it; the normalized value slowly decays until the next peak swing. The ratio of previously filtered value to the corresponding peak value is then quotiently transformed to provide the resulting oscillator. The quotient transform is controlled by the K coefficient: its allowed values are in the range from -1 to +1. K values close to 1 leave the ratio almost untouched, those close to -1 will translate it to around the additive inverse, and those close to zero will collapse small values of the ratio while keeping the higher values high.
Indicator values around 1 signify uptrend and those around -1, downtrend.
What is an adaptive cycle, and what is Ehlers Autocorrelation Periodogram Algorithm?
From his Ehlers' book Cycle Analytics for Traders Advanced Technical Trading Concepts by John F. Ehlers , 2013, page 135:
"Adaptive filters can have several different meanings. For example, Perry Kaufman’s adaptive moving average ( KAMA ) and Tushar Chande’s variable index dynamic average ( VIDYA ) adapt to changes in volatility . By definition, these filters are reactive to price changes, and therefore they close the barn door after the horse is gone.The adaptive filters discussed in this chapter are the familiar Stochastic , relative strength index ( RSI ), commodity channel index ( CCI ), and band-pass filter.The key parameter in each case is the look-back period used to calculate the indicator. This look-back period is commonly a fixed value. However, since the measured cycle period is changing, it makes sense to adapt these indicators to the measured cycle period. When tradable market cycles are observed, they tend to persist for a short while.Therefore, by tuning the indicators to the measure cycle period they are optimized for current conditions and can even have predictive characteristics.
The dominant cycle period is measured using the Autocorrelation Periodogram Algorithm. That dominant cycle dynamically sets the look-back period for the indicators. I employ my own streamlined computation for the indicators that provide smoother and easier to interpret outputs than traditional methods. Further, the indicator codes have been modified to remove the effects of spectral dilation.This basically creates a whole new set of indicators for your trading arsenal."
RSI - S&P Sector ETFsThe script displays RSI of each S&P SPDR Sector ETF
XLB - Materials
XLC - Communications
XLE - Energy
XLF - Financials
XLI - Industrials
XLK - Technology
XLP - Consumer Staples
XLRE - Real Estate
XLU - Utilities
XLV - Healthcare
XLY - Consumer Discretionary
It is meant to identify changes in sector rotation, compare oversold/overbought signals of each sector, and/or any price momentum trading strategy applicable to a trader.
even_better_sinewave_mod
Description:
Even better sinewave was an indicator developed by John F. Ehlers (see Cycle Analytics for Trader, pg. 159), in which improvement to cycle measurements completely relies on strong normalization of the waveform. The indicator aims to create an artificially predictive indicator by transferring the cyclic data swings into a sine wave. In this indicator, the modified is on the weighted moving average as a smoothing function, instead of using the super smoother, aim to be more adaptive, and the default length is set to 55 bars.
Sinewave
smoothing = (7*hp + 6*hp_1 + 5*hp_2+ 4*hp_3 + 3*hp_4 + 2*hp5 + hp_6) /28
normalize = wave/sqrt(power)
Notes:
sinewave indicator crossing over -0.9 is considered to beginning of the cycle while crossing under 0.9 is considered as an end of the cycle
line color turns to green considered as a confirmation of an uptrend, while turns red as a confirmation of a downtrend
confidence of using indicator will be much in confirmation paired with another indicator such dynamic trendline e.g. moving average
as cited within Ehlers book Cycle Analytic for Traders, the indicator will be useful if the satisfied market cycle mode and the period of the dominant cycle must be estimated with reasonable accuracy
Other Example