Combo Backtest 123 Reversal & Chande Forecast Oscillator This is combo strategies for get a cumulative signal.
First strategy
This System was created from the Book "How I Tripled My Money In The
Futures Market" by Ulf Jensen, Page 183. This is reverse type of strategies.
The strategy buys at market, if close price is higher than the previous close
during 2 days and the meaning of 9-days Stochastic Slow Oscillator is lower than 50.
The strategy sells at market, if close price is lower than the previous close price
during 2 days and the meaning of 9-days Stochastic Fast Oscillator is higher than 50.
Second strategy
The Chande Forecast Oscillator developed by Tushar Chande The Forecast
Oscillator plots the percentage difference between the closing price and
the n-period linear regression forecasted price. The oscillator is above
zero when the forecast price is greater than the closing price and less
than zero if it is below.
WARNING:
- For purpose educate only
- This script to change bars colors.
Forecast
Combo Strategy 123 Reversal & Chande Forecast Oscillator This is combo strategies for get a cumulative signal.
First strategy
This System was created from the Book "How I Tripled My Money In The
Futures Market" by Ulf Jensen, Page 183. This is reverse type of strategies.
The strategy buys at market, if close price is higher than the previous close
during 2 days and the meaning of 9-days Stochastic Slow Oscillator is lower than 50.
The strategy sells at market, if close price is lower than the previous close price
during 2 days and the meaning of 9-days Stochastic Fast Oscillator is higher than 50.
Second strategy
The Chande Forecast Oscillator developed by Tushar Chande The Forecast
Oscillator plots the percentage difference between the closing price and
the n-period linear regression forecasted price. The oscillator is above
zero when the forecast price is greater than the closing price and less
than zero if it is below.
WARNING:
- For purpose educate only
- This script to change bars colors.
Time Series ForecastIntroduction
Forecasting is a blurry science that deal with lot of uncertainty. Most of the time forecasting is made with the assumption that past values can be used to forecast a time series, the accuracy of the forecast depend on the type of time series, the pre-processing applied to it, the forecast model and the parameters of the model.
In tradingview we don't have much forecasting models appart from the linear regression which is definitely not adapted to forecast financial markets, instead we mainly use it as support/resistance indicator. So i wanted to try making a forecasting tool based on the lsma that might provide something at least interesting, i hope you find an use to it.
The Method
Remember that the regression model and the lsma are closely related, both share the same equation ax + b but the lsma will use running parameters while a and b are constants in a linear regression, the last point of the lsma of period p is the last point of the linear regression that fit a line to the price at time p to 1, try to add a linear regression with count = 100 and an lsma of length = 100 and you will see, this is why the lsma is also called "end point moving average".
The forecast of the linear regression is the linear extrapolation of the fitted line, however the proposed indicator forecast is the linear extrapolation between the value of the lsma at time length and the last value of the lsma when short term extrapolation is false, when short term extrapolation is checked the forecast is the linear extrapolation between the lsma value prior to the last point and the last lsma value.
long term extrapolation, length = 1000
short term extrapolation, length = 1000
How To Use
Intervals are create from the running mean absolute error between the price and the lsma. Those intervals can be interpreted as possible support and resistance levels when using long term extrapolation, make sure that the intervals have been priorly tested, this mean the intervals are more significants.
The short term extrapolation is made with the assumption that the price will follow the last two lsma points direction, the forecast tend to become inaccurate during a trend change or when noise affect heavily the lsma.
You can test both method accuracy with the replay mode.
Comparison With The Linear Regression
Both methods share similitudes, but they have different results, lets compare them.
In blue the indicator and in red a linear regression of both period 200, the linear regression is always extremely conservative since she fit a line using the least squares method, at the contrary the indicator is less conservative which can be an advantage as well as a problem.
Conclusion
Linear models are good when what we want to forecast is approximately linear, thats not the case with market price and this is why other methods are used. But the use of the lsma to provide a forecast is still an interesting method that might require further studies.
Thanks for reading !
Linear ChannelsIntroduction
I already made an indicator (simple line) that tried to make lines on price such that the results would not repaint and give a good fit to the price, today i publish a channels indicator based on the simple line indicator. The indicator aim to show possible support and resistance levels when the central line posses a low sum of squares with the price, a linear extrapolation was also provided in order to show possible future price positions respective to the channels.
The Indicator
The emphasis parameter of the simple line indicator has been removed, instead we keep length and mult as numerical input parameters. In general length control how persistent the lines are, larger values will create longer lines on average, mult help make the line fit to the price better but might as well affect how spread the channels are as well as the lines average length. When mult > length the lines will fit better the price while when length >= mult the fit might not be the best.
The point parameter allow you to fix the indicator when using it on high market price values or when the indicator exhibit a weird behaviour.
point = false on btcusd
point = true
If the lines still does not fit well enough try to lower length.
I know this might result inconvenient in so many ways but i'am working on simplifying things. Therefore some larger price values might use lower length and use mult instead. For market not using the point parameters a settings of : length > 1 and mult = length*2 might provide a good to go setup.
The channel spreading parameter allow to make spread the channels by a certain factor.
Issues
I'am still not good with line extensions, if it bother you deactivate the extrapolation parameter. Sorry for the inconvenience.
Conclusion
It is possible to make non repainting linear indicators, and i'am working on some of them. While some might argue that price is not linear thus not requiring the use of linear indicators it can still be interesting to use those if they, unlike the linear regression, don't repaints and provide a way to change their directions according to the price trend.
Thanks for reading !
[RS]ZigZag Percent Reversal - Forecast - patterns - labels description:
• Zig Zag indicator plots points on the chart whenever prices reverse
by a percentage greater than a pre-chosen variable.
• Forecasts area based on zigzag statistics.
• Displays labels with detected patterns.
• Displays slope information rate of price, time diferentials and angle(experimental)
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 !
Morphed Sine WaveIntroduction
If you rescale a sine wave to the price you will need to correlate it with it in order to show good results, today i present a different method that does not involve correlation to "morph" a sine wave to the price in order to provide forecast's and highlight market periodic patterns.
Parameters
length control the period of the sine wave, power control the "morphing" amount, if you see for example that the results are going nuts try to increase power , if the results are just the price and the delayed price try to decrease power .
power = 1
power = 100
Those settings might be different depending on which market you are in.
Various Uses
You can do a lot of things with this indicator, use filters as source :
Use the indicator as source for oscillators in order to create cycles indicators :
And certainly many more things
Conclusion
I presented a way to morph a sine wave to the price i order to highlight cycles. You can use any function that return a value between -1 and 1 instead of sin , this can be a scaled rsi/stochastic or correlation coefficient, its up to you :)
If you need help don't hesitate to commend or pm me. I hope you will like the indicator and that it will inspire you to make great things.
Thanks for reading !
[RS]ZigZag Percent Reversal(Multiple) - Forecast Areasnaive level forecasting of multiple zigzag's
based on this principle:
BB Forecast PrototypeExperiment to try apply @atrader2's MA Forecast () to bollinger bands - didn't exactly work out how I expected it to, especially with the Upper/Lower forecast projections.
Moving Averages & Bollinger Bands with ForecastsMoving Averages & Bollinger Bands with Forecasts
11 Moving Averages
SMA, EMA, WMA
Highly Customizable
Linear Regression Forecast
Bollonger Bands
Personal Setup: Add indicator twice
1st indicator = SMA using #4, 7, 10, 11 (20, 50, 100, 200 SMAs) with bollonger bands on 20.
2nd indicator = EMA using #1, 2, 3, 5, 6, 8, 9 (5, 8, 13, 21 ,34, 55, 89 EMAs).
This allows easy toggling between SMAs/Bolls and Fib EMAs
Thank you to yatrader2 for the forecast code
Moving Averages & Bollinger Bands with ForecastsMoving Averages & Bollinger Bands with Forecasts
11 Moving Averages
SMA, EMA, WMA
Highly Customizable
Linear Regression Forecast
Bollonger Bands
Personal Setup: Add indicator twice
1st indicator = SMA using #4, 7, 10, 11 (20, 50, 100, 200 SMAs) with bollonger bands on 20.
2nd indicator = EMA using #1, 2, 3, 5, 6, 8, 9 (5, 8, 13, 21 ,34, 55, 89 EMAs).
This allows easy toggling between SMAs/Bolls and Fib EMAs
Thank you to yatrader2 for the forecast code
Moving Averages & Bollinger Bands with ForecastsMoving Averages & Bollinger Bands with Forecasts
11 Moving Averages
SMA, EMA, WMA
Highly Customizable
Linear Regression Forecast
Bollonger Bands
Personal Setup: Add indicator twice
1st indicator = SMA using #4, 7, 10, 11 (20, 50, 100, 200 SMAs) with bollonger bands on 20.
2nd indicator = EMA using #1, 2, 3, 5, 6, 8, 9 (5, 8, 13, 21 ,34, 55, 89 EMAs).
This allows easy toggling between SMAs/Bolls and Fib EMAs
Thank you to yatrader2 for the forecast code
Moving Averages & Bollinger Bands with ForecastsMoving Averages & Bollinger Bands with Forecasts
11 Moving Averages
SMA, EMA, WMA
Highly Customizable
Linear Regression Forecast
Bollonger Bands
Personal Setup: Add indicator twice
1st indicator = SMA using #4, 7, 10, 11 (20, 50, 100, 200 SMAs) with bollonger bands on 20.
2nd indicator = EMA using #1, 2, 3, 5, 6, 8, 9 (5, 8, 13, 21 ,34, 55, 89 EMAs).
This allows easy toggling between SMAs/Bolls and Fib EMAs
Thank you to yatrader2 for the forecast code
Meister Shredder - Exponential Moving Averages x4 ForecastShows the 21, 50, 100, 200 Exponential Moving Average + 6 bar forecast
Meister Shredder - Simple Moving Averages x4 ForecastIncludes the 21, 50, 100 and 200 SMA and 6 bar forecast
4EMA ForecastThis script is an upgrade of the existing 3EMA forecast to allow the user to display 4 different EMAs (short, mid, long and very long range) and the forecast for the 5 candles ahead
Seasonality ForecasterThe Seasonaliity Forcaster indicator takes advantage of the seasonality of the price to create a forecast of how the price could go in the coming days.
It is calculated on the DAILY chart that contains about 260 days of market and I recommend using it on that chart.
In the properties under " Style " you can turn on or off the chart of what made the price 1, 2, 3, 4, 5 years ago or the average of the last 5, 7 or 10 years (if there are enough data).
Under " Input " you can decide the offsets of the various charts, or horizontally align the various charts to find the most similar configuration to what the price has done, so as to understand if the price is following the seasonality of a few years in particular, the vertical alignment is a decimal number that allows you to raise or lower the chart in percentage to better align it with the price.
How to use it:
1) under "Properties" --> "Style" deselect all the last years charts and leave just the actual price.
2) select just the last year chart.
3) under input you have the parameters to change to align the last year chart on the actual price chart, the indicator by default show the forecast 100 bars,
align the horizontal offset and the vertical alignment to put the 2 charts together, you have to find the macro trend, not the micro, of the last 5 - 6 months.
4) repeat it with another chart, for example 2 years ago
5) then repeat it with all the charts, if there are no macro trend as the actual price deselect the chart
6) when you find a good overlap look for the candle chart to find a good level to enter.
That's it that's all.
Chande Forecast Oscillator Backtest The Chande Forecast Oscillator developed by Tushar Chande The Forecast
Oscillator plots the percentage difference between the closing price and
the n-period linear regression forecasted price. The oscillator is above
zero when the forecast price is greater than the closing price and less
than zero if it is below.
You can change long to short in the Input Settings
WARNING:
- For purpose educate only
- This script to change bars colors.
Chande Forecast Oscillator Strategy The Chande Forecast Oscillator developed by Tushar Chande The Forecast
Oscillator plots the percentage difference between the closing price and
the n-period linear regression forecasted price. The oscillator is above
zero when the forecast price is greater than the closing price and less
than zero if it is below.
WARNING:
- This script to change bars colors.
Forecast OscillatorForecast Oscillator indicator script. This indicator was originally developed by Tushar Chande.
Chande Forecast Oscillator The Chande Forecast Oscillator developed by Tushar Chande The Forecast
Oscillator plots the percentage difference between the closing price and
the n-period linear regression forecasted price. The oscillator is above
zero when the forecast price is greater than the closing price and less
than zero if it is below.
Stationary Extrapolated LevelsBeta Peek/Valey based forecast
The idea behind this indicator is to extrapolate a stationary time series and find the peeks of the extrapolated result. The highest and lowest of the extrapolated data represent really precise support and resistance if the data and its extrapolation are barelly equal with an error lower than the average.
When the detrended price ( in blue ) crossover the lower level then the indicator detect a valey and the possibility of an up movement, if the higher is crossed down then the indicator detect a peek and the possibility a down movement.
When "Show extrapolated values" is checked the indicator will show the forecast of the detrended price with a forecast of length periods ahead.
Feel free to contact me for any questions regarding my indicators :)