Grand Trend Forecasting - A Simple And Original Approach Today we'll link time series forecasting with signal processing in order to provide an original and funny trend forecasting method, the post share lot of information, if you just want to see how to use the indicator then go to the section "Using The Indicator".
Time series forecasting is an area dealing with the prediction of future values of a series by using a specific model, the model is the main tool that is used for forecasting, and is often an expression based on a set of predictor terms and parameters, for example the linear regression (model) is a 1st order polynomial (expression) using 2 parameters and a predictor variable ax + b . Today we won't be using the linear regression nor the LSMA.
In time series analysis we can describe the time series with a model, in the case of the closing price a simple model could be as follows :
Price = Trend + Cycles + Noise
The variables of the model are the components, such model is additive since we add the component with each others, we should be familiar with each components of the model, the trend represent a simple long term variation of high amplitude, the cycles are periodic fluctuations centered around 0 of varying period and amplitude, the noise component represent shorter term irregular variations with mean 0.
As a trader we are mostly interested by the cycles and the trend, altho the cycles are relatively more technical to trade and can constitute parasitic fluctuations (think about retracements in a trend affecting your trend indicator, causing potential false signals).
If you are curious, in signal processing combining components has a specific name, "synthesis" , here we are dealing with additive synthesis, other type of synthesis are more specific to audio processing and are relatively more complex, but could be used in technical analysis.
So what to do with our components ? If we want to trade the trend, we should estimate right ? Estimating the trend component involve removing the cycle and noise component from the price, if you have read stuff about filters you should know where i'am going, yep, we should use filters, in the case of keeping the trend we can use a simple moving average of relatively high period, and here we go.
However the lag problem, which is recurrent, come back again, we end up with information easier to interpret (here the trend, which is a simple fluctuation such as a line or other smooth curve) at the cost of decision timing, that is unfortunate but as i said the information, here the moving average output, is relatively simple, and could be easily forecasted right ? If you plot a moving average of high period it would be easier for you to forecast its future values. And thats what we aim to do today, provide an estimate of the trend that should be easy to forecast, and should fit to the price relatively well in order to produce forecast that could determine the position of future closing prices observations.
Estimating And Forecasting The Trend
The parameter of the indicator dealing with the estimation of the trend is length , with higher values of length attenuating the cycle and noise component in the price, note however that high values of length can return a really long term trend unlike a simple moving average, so a small value of length, 14 for example can still produce relatively correct estimate of trend.
here length = 14.
The rough estimate of the trend is t in the code, and is an IIR filter, that is, it is based on recursion. Now i'll pass on the filter design explanation but in short, weights are constants, with higher weights allocated to the previous length values of the filter, you can see on the code that the first part of t is similar to an exponential moving average with :
t(n) = 0.9t(n-length) + 0.1*Price
However while the EMA only use the precedent value for the recursion, here we use the precedent length value, this would just output a noisy and really slow output, therefore in order to create a better fit we add : 0.9*(t(n-length) - t(n-2length)) , and this create the rough trend estimate that you can see in blue. On the parameters, 0.9 is used since it gives the best estimate in my opinion, higher values would create more periodic output and lower values would just create a rougher output.
The blue line still contain a residual of the cycle/noise component, this is why it is smoothed with a simple moving average of period length. If you are curious, a filter estimating the trend but still containing noisy fluctuations is called "Notch" filter, such filter would depending on the cutoff remove/attenuate mid term cyclic fluctuations while preserving the trend and the noise, its the opposite of a bandpass filter.
In order to forecast values, we simply sum our trend estimate with the trend estimate change with period equal to the forecasting horizon period, this is a really really simple forecasting method, but it can produce decent results, it can also allows the forecast to start from the last point of the trend estimate.
Using The Indicator
We explained the length parameter in the precedent section, src is the input series which the trend is estimated, forecast determine the forecasting horizon, recommend values for forecast should be equal to length, length/2 or length*2, altho i strongly recommend length.
here length and forecast are both equal to 14 .
The corrective parameter affect the trend estimate, it reduce the overshoot and can led to a curve that might fit better to the price.
The indicator with the non corrective version above, and the corrective one below.
The source parameter determine the source of the forecast, when "Noisy" is selected the source is the blue line, and produce a noisy forecast, when "Smooth" is selected the source is the moving average of t , this create a smoother forecast.
The width interval control...the width of the intervals, they can be seen above and under the forecast plot, they are constructed by adding/subtracting the forecast with the forecast moving average absolute error with respect to the price. Prediction intervals are often associated with a probability (determining the probability of future values being between the interval) here we can't determine such probability with accuracy, this require (i think) an analysis of the forecasting distribution as well as assumptions on the distribution of the forecasting error.
Finally it is possible to see historical forecasts, that is, forecasts previously generated by checking the "Show Historical Forecasts" option.
Examples
Good forecasts mostly occur when the price is close to the trend estimate, this include the following highlighted periods on AMD 15TF with default settings :
We can see the same thing at the end of EURUSD :
However we can't always obtain suitable fits, here it is isn't sufficient on BTCUSD :
We can see wide intervals, we could change length or use the corrective option to get better results, another option is to use a log scale.
We will end the examples with the log SPX, who posses a linear trend, so for example a linear model such as a linear regression would be really adapted, lets see how the indicator perform :
Not a great fit, we could try to use an higher length value and use "Smooth" :
Most recent fits are quite decent.
Conclusions
A forecasting indicator has been presented in this post. The indicator use an original approach toward estimating the trend component in the closing price. Of course i should have given statistics related to the forecasting error, however such analysis is worth doing with better methods and in more advanced environment allowing for optimization.
But we have learned some stuff related to signal processing as well as time series analysis, seeing a time series as the sum of various components is really helpful when it comes to make sense of chaotic and noisy series and is a basic topic in time series analysis.
You can see that in this new year i work harder on the visual of my indicators without trying to fall in the label addict trap, something that i wasn't really doing before, let me know what do you think of it.
Thanks for reading !
Forecasting
ANN Forecast Dependent Variable Odd GeneratorHello , this script is the ANN Forecast version of my "Dependent Variable Odd Generator " script.
I went to simplify a bit because the deep learning calculations are too much for this command.
The latest instruments included:
WTI : West Texas Intermediate (WTICOUSD , USOIL , CL1! ) Average error : 0.007593
BRENT : Brent Crude Oil ( BCOUSD , UKOIL , BB1! ) Average error : 0.006591
GOLD : XAUUSD , GOLD , GC1! Average error : 0.012767
SP500 : S&P 500 Index ( SPX500USD , SP1! ) Average error : 0.011650
EURUSD : Eurodollar ( EURUSD , 6E1! , FCEU1!) Average error : 0.005500
ETHUSD : Ethereum ( ETHUSD , ETHUSDT ) Average error : 0.009378
BTCUSD : Bitcoin ( BTCUSD , BTCUSDT , XBTUSD , BTC1! ) Average error : 0.01050
GBPUSD : British Pound ( GBPUSD , 6B1! , GBP1!) Average error : 0.009999
USDJPY : US Dollar / Japanese Yen ( USDJPY , FCUY1!) Average error : 0.009198
USDCHF : US Dollar / Swiss Franc ( USDCHF , FCUF1! ) Average error : 0.009999
USDCAD : Us Dollar / Canadian Dollar ( USDCAD ) Average error : 0.012162
VIX : S & P 500 Volatility Index (VX1! , VIX ) Average error : 0.009999
ES : S&P 500 E-Mini Futures ( ES1! ) Average error : 0.010709
SSE : Shangai Stock Exchange Composite (Index ) ( 000001 ) Average error : 0.011287
XRPUSD : Ripple (XRPUSD , XRPUSDT ) Average error : 0.009803
Simply select the required instrument from the tradingview analysis screen, then add this command and select the same instrument from the settings section.
The codes are not open-source because they contain forecast algorithm codes a little that I will use commercially in the future.
However, I will never remove this script, and you can use it for free unlimitedly.
For more information about my artificial neural network forecast series:
For more information about my dependent variable odd generator :
For more information about simple artificial neural networks :
(detailed information about ANN )
(25 in 1 version )
I hope it helps in your analysis. Regards , Noldo .
NOTE : In the first pass bar of the definite positive and negative zone, alerts are added for both conditions.
Scripting Tutorial B - TManyMA - Commission/FeesThis script is for a triple moving average strategy where the user can select from different types of moving averages, price sources, lookback periods and resolutions.
Features:
- 3 Moving Averages with variable MA types, periods, price sources, resolutions and the ability to disable each individually.
- Crossovers are plotted on the chart with detailed information regarding the crossover (Ex: 50 SMA crossed over 200 SMA )
- Forecasting available for all three MAs. MA values are forecasted 5 values out and plotted as if a continuation to the MA.
- Forecast bias also applies to all forecasting. Bias means we can forecast based on an anticipated bullish , bearish or neutral direction in the market.
- To understand bias, please read the source code, or if you can't read the code just send me a message on here or Twitter . Twitter should be linked to my profile.
- Ribbons added and on by default. Optional setting to disable the ribbons. 5 ribbons between MA1 and MA2 and another 5 between MA2 and MA3.
- Ribbons are alpha-color coded based on their relation to their default MAs.
- Ribbons are only visible between MAs if the MAs being compared share the same Type, Resolution, and Source because there is no way to consolidate those three in a simple manner.
- Ribbon values are calculated based on calculated MA Periods between the MAs.
- Converted the existing study into a strategy.
- Strategy only enters long positions with a market order when MA crossovers occur.
- Strategy exits positions when crossunders occur.
- Trades 100% of the equity with one order/position by default.
- Ability to disable trading certain crosses with input checks.
- Ability to exit trades with a take profit or stop loss.
- User input to allow quick changes to the take profit or stop loss percentages.
- Strategy now calculates on every tick
- Strategy also includes fixed commission values based on Coinbase standard order fees
This script is meant as an educational script with well-formatted styling, and references for specific functions.
*** PLEASE NOTE - THIS STRATEGY IS MEANT FOR LEARNING PURPOSES. DEPENDING ON IT'S CONFIGURATION IT MAY OR MAY NOT BE USEFUL FOR ACTUAL TRADING. THE STRATEGY IS NOT FINANCIAL ADVICE ***
ANN Forecast Stochastic Oscillator [Noldo] In this script, I tried to integrate ANN Forecast Algorithm on Stochastic Oscillator.
It took me quite a while, but i guess it worth.
After selecting the ticker, select the instrument from the menu and the system will automatically turn on the appropriate Forecast Stoch system.
The system is trained with ANN values of ANN MACD 25 in 1.
The Forecast algorithm is not open-source.
But I'm never remove this script.
You can use it forever for free.
As you can see in the presentation, although it is in the same period, it is more accurate and agile than standard Stochastic Oscillator .
I think even a bar is important in trade.
For those who don't see that command,listed instruments with alternative tickers and error rates:
WTI : West Texas Intermediate (WTICOUSD , USOIL , CL1! ) Average error : 0.007593
BRENT : Brent Crude Oil ( BCOUSD , UKOIL , BB1! ) Average error : 0.006591
GOLD : XAUUSD , GOLD , GC1! Average error : 0.012767
SP500 : S&P 500 Index ( SPX500USD , SP1! ) Average error : 0.011650
EURUSD : Eurodollar ( EURUSD , 6E1! , FCEU1!) Average error : 0.005500
ETHUSD : Ethereum ( ETHUSD , ETHUSDT ) Average error : 0.009378
BTCUSD : Bitcoin ( BTCUSD , BTCUSDT , XBTUSD , BTC1! ) Average error : 0.01050
GBPUSD : British Pound ( GBPUSD , 6B1! , GBP1!) Average error : 0.009999
USDJPY : US Dollar / Japanese Yen ( USDJPY , FCUY1!) Average error : 0.009198
USDCHF : US Dollar / Swiss Franc ( USDCHF , FCUF1! ) Average error : 0.009999
USDCAD : Us Dollar / Canadian Dollar ( USDCAD ) Average error : 0.012162
SOYBNUSD : Soybean ( SOYBNUSD , ZS1! ) Average error : 0.010000
CORNUSD : Corn ( ZC1! ) Average error : 0.007574
NATGASUSD : Natural Gas ( NATGASUSD , NG1! ) Average error : 0.010000
SUGARUSD : Sugar ( SUGARUSD , SB1! ) Average error : 0.011081
WHEATUSD : Wheat ( WHEATUSD , ZW1! ) Average error : 0.009980
XPTUSD : Platinum ( XPTUSD , PL1! ) Average error : 0.009964
XU030 : Borsa Istanbul 30 Futures ( XU030 , XU030D1! ) Average error : 0.010727
VIX : S & P 500 Volatility Index (VX1! , VIX ) Average error : 0.009999
ES : S&P 500 E-Mini Futures ( ES1! ) Average error : 0.010709
SSE : Shangai Stock Exchange Composite (Index ) ( 000001 ) Average error : 0.011287
XRPUSD : Ripple (XRPUSD , XRPUSDT ) Average error : 0.009803
Extras :
- Crossover and crossunder alerts
- Switchable barcolor
NOTE :
Australian Dollar / US Dollar ( AUDUSD ) removed due to high average error. (Average error > 0.013 )
Timeframe advice :
I suggest you to use that system TF >= 1D
My favorite is 1 week bars. (1W)
More info about forecast series (My last forecast example ) :
Special thanks :
Special thanks to dear wroclai for his great effort .
NOTE : I decided to build Autonomous LSTM on Stochastic Oscillator , i think Stochastic Oscillator one of the best and it contains naturally high-lows.
ANN Forecast MACD [Noldo] In this script, I tried to convert ANN MACD to MACD Forecast.
It took me quite a while, but it was fun.
After selecting the ticker, select the instrument from the menu and the system will automatically turn on the appropriate Forecast MACD system.
The system is trained with ANN values of ANN MACD 25 in 1.
But because the system is overloaded, only the most popular instruments are left.
The others were unfortunately eliminated.
The only difference is that it was built on the forecast algorithm of my own creation.
The Forecast algorithm is not open-source.
The codes are a nice framework for some of my most valuable systems about ANN . (Working on them. )
But I'm never remove this script.
You can use it forever for free.
As you can see in the presentation, although it is in the same period, it is more accurate and agile than normal MACD.
I think even a bar is important in trade.
For those who don't see that command,listed instruments with alternative tickers and error rates:
WTI : West Texas Intermediate (WTICOUSD , USOIL , CL1! ) Average error : 0.007593
BRENT : Brent Crude Oil ( BCOUSD , UKOIL , BB1! ) Average error : 0.006591
GOLD : XAUUSD , GOLD , GC1! Average error : 0.012767
SP500 : S&P 500 Index ( SPX500USD , SP1! ) Average error : 0.011650
EURUSD : Eurodollar ( EURUSD , 6E1! , FCEU1!) Average error : 0.005500
ETHUSD : Ethereum ( ETHUSD , ETHUSDT ) Average error : 0.009378
BTCUSD : Bitcoin ( BTCUSD , BTCUSDT , XBTUSD , BTC1! ) Average error : 0.01050
GBPUSD : British Pound ( GBPUSD , 6B1! , GBP1!) Average error : 0.009999
USDJPY : US Dollar / Japanese Yen ( USDJPY , FCUY1!) Average error : 0.009198
USDCHF : US Dollar / Swiss Franc ( USDCHF , FCUF1! ) Average error : 0.009999
USDCAD : Us Dollar / Canadian Dollar ( USDCAD ) Average error : 0.012162
SOYBNUSD : Soybean ( SOYBNUSD , ZS1! ) Average error : 0.010000
CORNUSD : Corn ( ZC1! ) Average error : 0.007574
NATGASUSD : Natural Gas ( NATGASUSD , NG1! ) Average error : 0.010000
SUGARUSD : Sugar ( SUGARUSD , SB1! ) Average error : 0.011081
WHEATUSD : Wheat ( WHEATUSD , ZW1! ) Average error : 0.009980
XPTUSD : Platinum ( XPTUSD , PL1! ) Average error : 0.009964
XU030 : Borsa Istanbul 30 Futures ( XU030 , XU030D1! ) Average error : 0.010727
VIX : S & P 500 Volatility Index (VX1! , VIX ) Average error : 0.009999
ES : S&P 500 E-Mini Futures ( ES1! ) Average error : 0.010709
SSE : Shangai Stock Exchange Composite (Index ) ( 000001 ) Average error : 0.011287
XRPUSD : Ripple (XRPUSD , XRPUSDT ) Average error : 0.009803
Extras :
- Crossover and crossunder alerts
- Switchable barcolor
NOTE :
Australian Dollar / US Dollar (AUDUSD ) removed due to high average error. (Average error > 0.013 )
Timeframe advice :
I suggest you to use that system TF >= 1D
My favorite is 1 week bars. (1W)
Info about forecast series :
www.sciencedirect.com
Special thanks :
Special thanks to dear wroclai for his great effort .
Scripting Tutorial 9 - TManyMA Strategy - Long Market Order OnlyThis script is for a triple moving average strategy where the user can select from different types of moving averages, price sources, lookback periods and resolutions.
Features:
- 3 Moving Averages with variable MA types, periods, price sources, resolutions and the ability to disable each individually
- Crossovers are plotted on the chart with detailed information regarding the crossover (Ex: 50 SMA crossed over 200 SMA )
- Forecasting available for all three MAs. MA values are forecasted 5 values out and plotted as if a continuation to the MA.
- Forecast bias also applies to all forecasting. Bias means we can forecast based on an anticipated bullish, bearish or neutral direction in the market.
- To understand bias, please read the source code, or if you can't read the code just send me a message on here or Twitter. Twitter should be linked to my profile.
- Ribbons added and on by default. Optional setting to disable the ribbons. 5 ribbons between MA1 and MA2 and another 5 between MA2 and MA3.
- Ribbons are alpha-color coded based on their relation to their default MAs.
- Ribbons are only visible between MAs if the MAs being compared share the same Type, Resolution, and Source because there is no way to consolidate those three in a simple manner.
- Ribbon values are calculated based on calculated MA Periods between the MAs.
- Converted the existing study into a strategy
- Strategy only enters long positions with a market order when MA crossovers occur
- Strategy exits positions when crossunders occur
- Trades 100% of the equity with one order/position by default
- Ability to disable trading certain crosses with input checks
This script is meant as an educational script with well-formatted styling, and references for specific functions.
*** PLEASE NOTE - THIS STRATEGY IS MEANT FOR LEARNING PURPOSES. DEPENDING ON IT'S CONFIGURATION IT MAY OR MAY NOT BE USEFUL FOR ACTUAL TRADING. THE STRATEGY IS NOT FINANCIAL ADVICE ***
Scripting Tutorial 7 - Triple Many Moving Averages ResolutionsThis script is for a triple moving average indicator where the user can select from different types of moving averages, price sources, lookback periods and resolutions.
Features:
- 3 Moving Averages with variable MA types, periods, price sources, resolutions and the ability to disable each individually
- Crossovers are plotted on the chart with detailed information regarding the crossover (Ex: 50 SMA crossed over 200 SMA )
- Forecasting available for all three MAs. MA values are forecasted 5 values out and plotted as if a continuation to the MA.
- Forecast bias also applies to all forecasting. Bias means we can forecast based on an anticipated bullish, bearish or neutral direction in the market.
- To understand bias, please read the source code, or if you can't read the code just send me a message on here or Twitter. Twitter should be linked to my profile.
This script is meant as an educational script with well-formatted styling, and references for specific functions.
Scripting Tutorial 6 - Triple Many Moving Averages ForecastingThis script is for a triple moving average indicator where the user can select from different types of moving averages, price sources and lookback periods.
Features:
- 3 Moving Averages with variable MA types, periods, price sources and ability to disable each individually
- Crossovers are plotted on the chart with detailed information regarding the crossover (Ex: 50 SMA crossed over 200 SMA )
- Forecasting available for all three MAs. MA values are forecasted 5 values out and plotted as if a continuation to the MA.
- Forecast bias also applies to all forecasting. Bias means we can forecast based on an anticipated bullish, bearish or neutral direction in the market.
- To understand bias, please read the source code, or if you can't read the code just send me a message on here or Twitter. Twitter should be linked on my profile.
This script is meant as an educational script with well-formatted styling, and references for specific functions.
Forecasting - Quadratic RegressionThis script is written totally thanks to Alex Grover (). Here it is implemented in conjunction with the seasonal forecast I showed in one of my previous posts. It takes the calculated QReg curve and extends its last section (Season) into the future (Forecasted periods).
Forecasting - Seasonal Naive MethodFor completeness here is a naive method with seasonality. The idea behind naive method with seasonality is to take last value from same season and treat it as a forecast. Its counterpart, naive method without seasonality, involves taking last mean value, i.e forecast = sma(x, p) .
Forecasting - Simple Mean MethodThis is a continuation of my series on forecasting techniques. The idea behind the Simple Mean method is to somehow extend historical mean to the future. In this case a forecast equals to last value plus average change.
Forecasting - Locally Weighted Regression (rescaled)UPDATE: the original version works only with BTC. Here's a general version with rescaling.
Forecasting - Vanilla Locally Weighted RegressionThere is not much to say - just vanilla locally weighted regression in PineScript 4.
see: medium.com
also: cs229.stanford.edu
Forecasting - Least Squares RegressionTested on 5m TF with EURUSD. Settings should be modified appropriately for other TFs, lookbacks and securities. This indicator does not repaint.
Forecasting - Holt’s Linear Trend ForecastingHolt's Forecasting method
Holt (1957) extended simple exponential smoothing to allow the forecasting of data with a trend. This method involves a forecast equation and two smoothing equations (one for the level and one for the trend):
Forecast equation: ŷ = l + h * b
Level equation: l = alpha * y + (1 - alpha) * (l + b)
Trend equation: b = beta * (l - l) + (1 - beta) * b
where:
l (or l) denotes an estimate of the level of the series at time t,
b (or b) denotes an estimate of the trend (slope) of the series at time t,
alpha is the smoothing parameter for the level, 0 ≤ alpha ≤ 1, and
beta is the smoothing parameter for the trend, 0 ≤ beta ≤ 1.
As with simple exponential smoothing, the level equation here shows that l is a weighted average of observation y and the one-step-ahead training forecast for time t, here given by l+b. The trend equation shows that b is a weighted average of the estimated trend at time t based on l-l and b, the previous estimate of the trend.
The forecast function is not flat but trending. The h-step-ahead forecast is equal to the last estimated level plus h times the last estimated trend value. Hence the forecasts are a linear function of h.
SMA collector MTF ForecastHello everyone
Here's the today indicator
That one is a true gift before X-mas. X-mas in July which bundles a lot more than what Santa Claus will offer you in December :)
So without further due, let's dive right in
This indicator will display the following algorithmic SMA :
SMA 20 Daily
SMA 50 Daily
SMA 50 Daily
SMA 100 Daily
SMA 200 Daily
SMA 20 Weekly
SMA 50 Weekly
SMA 100 Weekly
SMA 200 Weekly
SMA 7 Monthly
SMA 20 Monthly
SMA 50 Monthly
Those SMA usually work as big supports/resistances for all tradable assets (forex, index, crypto, stocks, ...)
That's it for the first feature, let's cover the next one
2/ I developped a small optimization to get those labels placed on the right hand side of your screen.
"Is it really useful sir ?" Well, you certainly noticed that looking at a chart on tradingview mobile is not ideal (indicators overlapping, indicator names taking too much space and so on...)
When you'll deactivate the indicator name label display from tradingview, you can activate mine which will look way nicer on your mobile (and even Desktop).
This concept was greatly inspired by @scarf :
3/ Now the cherry on the top of the cherry on the top of the.... cake
You'll have the cool option to display the forecasts for those SMAs based on either current price "flat" or a 3 period liner regressions "linreg".
You can play out with the forecasts options and find out which ones will make the most of sense to you
They're represented by small dots at the very right of the moving averages
This concept was greatly inspired by @yatrader2 :
That's a lot to digest but hope it went smoothly
As always if you have any question or feedback or complain or you want to show me some love (please), shoot it in the comments section
See y'all tomorrow for another indicator
Enjoy
Dave
Stationary Extrapolated Levels OscillatorIntroduction
The oscillator version of the stationary extrapolated levels indicator. The methodology behind the extrapolated levels where to minimize the risk of making a decision based only on a forecast, therefore the indicator plotted levels in order to determine possible reversal points, signals where generated when the detrended series crossed over/under those levels.
The Indicator
First we detrend the price, this is because forecasting the trend is often harder than a series without trend (stationarity > non-stationarity) , then we forecast the detrended price with a linear extrapolation over a period of length and apply a max/min filter twice to the forecast, the max/min filters are just the highest and lowest function in pine. So the max/min filter have lag length/2 , by applying it two times we have a lag of length which is the period of the forecast. Because we use highest and lowest we can apply min-max normalization in the form of :
x' = (x - min(x, min'))/(max(x,max') - min(x, min'))
where x is the detrended price, max' the highest of the forecast of x and min' the lowest of the forecast of x . This result in a scaled oscillator in a range of (1,0),
When the indicator is equal to 1 or 0 there are high chances of reversals, more in depth this mean that the detrended price have crossed the highest/lowest of the forecast, when the indicator is equal to 0 or 1 for a long time this mean that the forecast was quite inaccurate, you can minimize risk by focusing on the cross between the detrended price and the 0.8/0.2 levels.
Conclusion
I've shown an oscillator version of my previous "Stationary extrapolated levels" indicator, the method involving taking the highest and lowest of the forecast is a great way to minimize the risk involved by time-series forecasting driven decisions. So i hope you find an use to it.
Thanks for reading !
EW Correction on choppiness with CB Composite index [yoxxx]Sometimes it is more than convenient to differ fast from a genuine high or
a B in an expanded flat (a very impulsive counter within a correction, resulting in an higher high than the genuine.)
I tried to use the typical choppiness of Bs in general to indicate them (orange box in example).
Therefore i used a momentum of close, relative to the bar's heights (=vola).
I turned out, that it works like charme to show ALL correction phases in a trend cycle. (And hence the impulses as well.)
(Credit:The choppiness of the Bs is a hint of Constance Brown, which i adopted. Bow to her.)
Note1: I tested it on all Timeframes, but mainly on D; and only in bull markets.
Note 2: I added the composite index of Constance Brown which is faster than the rsi and - special skill -
can inidcate divergences to prices where rsi fails. Use it as a hint for choppiness changes to come.
Since its strength lies in being not normalized, sometimes you may adjust the composite for fitiing it to the EW bars.I inserted a line for that in the script.
Feedback welcome!
yoxxx
Alpha-Sutte ModelThe Alpha-Sutte model is an ongoing project run by Ansari Saleh Ahmar, a lecturer and researcher at Universitas Negeri Makassar in Indonesia, that attempts to make forecasts for time series like how Arima and Holt-Winters models do. Currently Ahmar and his team have conducted research and published papers comparing the efficacy of the Alpha-Sutte and other models, such as Arima and Holt-Winters, on topics ranging from forecasting Turkey's CPI data, Bitcoin prices, Apple's stock prices, primary energy supply of Indonesia, to infant mortality rates in China.
The Alpha-Sutte model in comparison to the other two models listed above shows promise in providing a more accurate forecast, and the project has been able to receive some of its funding from organizations such as the US Agency for International Development, which is a part of the US Federal Government, so maybe the project has some actual merit.
How it works:
In this model there are four values presented at the top of the window.
1) The first value in blue is the value of the Alpha-Sutte model whose purpose is to forecast the price of the current bar.
2) The second value in yellow is an adaptive version of the Alpha-Sutte model that I made. The purpose of the adaptive Alpha-Sutte model is to expand upon the Alpha-Sutte by allowing new information to be introduced, causing the value to change during the current period, hence the adaptiveness of it.
3) The third value in aqua is the moving average of the low% Sutte line which is a predictive line that is based off of the close and low of the current and previous periods.
4) The fourth value in red is the moving average of the high% Sutte line which is a predictive line that is based off of the close and high of the current and previous periods.
Trend signals:
If low% Sutte (aqua value/line) is greater than high% Sutte (red value/line) then this is a buy signal.
If high% Sutte (red value/line) is greater than low% Sutte (aqua value/line) then this is a sell signal.
Caveat:
Even though this model's purpose is to forecast the future, will it be able to predict periods of large movements? No, of course not, but it will adjust quickly to try to make more accurate forecasts for the next period. This was also a reason why I made an adaptive version of this model to try to reduce some of the discrepancies between the Alpha Sutte and price when there is a large unexpected move.
*WARNING before using this I would highly recommend that you look up "Sutte Indicator" online and read some of the papers about this model before you use this , even though this model has shown merit when compared to Arima and Holt-Winter models this is still an ongoing project.*
Hopefully this project will actually come to something in the near future as the calculation for this time series predictive model is much easier to calculate and program in pine editor than something like an Arima model.
*Also, if you know how to use R language there is a package for the "Alpha-Sutte model".*
CryptoScalper: NightMODE by BiO-618Hey guys!
It's me with a new version of the script.
Since a lot of people wanted to use it for scalping, I adjusted it for that.
More buy signals, more sell signals, 90% accuracy (at least ;) )
Remember to use the pivots to set Take Profits and Stop Losses, no software is 100% accurate, otherwise the market would trash it.
SELL SIGNALS
Red "S": Sell signal
Yellow "Sell": Strong+ sell signal
Orange "SELL": Strong++ sell signal. Shortable signal.
Red triangledown "SELL!": Strongest+++ sell signal, bearish divergences from MACD . Shortable signal.
BUY SIGNALS
Yellow triangleup "Weakening": Bear trend is getting weak, as the asset is getting oversold.
Green "BUY!": Strong buy, bullish divergence from MACD . Strongest buy signal.
Remember, again, to ALWAYS set your TP and SL beforehand. The key to be profitable is to act before the market acts.
It's better 3% in hand than 1% below your initial balance.
From a manual backtesting, I got a 53% profit on 2 weeks, trust my advice to manage the risk and you will be profitable aswell ;)
Check my other scripts to get more options :)
I also made a 4Hours and 12Hours optimized scripts, you might found that which one works better for your strategy, asset, and timeframe.
4Hours optimized CAR: NightMODEA night mode of my script.
Feel free to contact me with your suggestion, I'm working on the things people ask me more frequently.
Thanks and good profit!
12Hours-optimized Crypto Alert ReloadedSame as 4H, but this time 12H.
In my opinion this one is way more accurate, let me know yours.
UPDATES:
I added Short Sell signals, both Red and Blue means "Short Sell", but they use different formulas. The blue one seems pretty solid, meanwhile the red one get more oportunities but might give an earlier entrance aswell.
Remember no software is 100% accurate, but this one seems at least >90% accurate so I guess that with a decent risk management and order placing you will make great profit.
The script gave1 bad short signal in whole 2018, and 4 bad buy signals, pretty decent on a market as cryptos, and at a correction phase.
Again, let me know your opinion, feedback, and critics.
Stay aware since I will update it for sure, I'm already working on it.
Soon:
*Filtering signal by candlestick patterns
*Pivot levels for resistance and support forecast beforehand.
*and more cool features ;)
Thanks again!