TASC 2023.03 Every Little Bit Helps - Special EditionMy first Published contribution.
Gracious thank you to all Pine Coders,
this has subtle features that have multiple shifts based on inputs.
with some experimentation, one might try pushing other sources
at the hue dials and see more dynamic indication.
for John Ehlers article
TASC Magazine This Month.
- Special Edition.
Design
Ichimoku [Gu5]Original Ichimoku Kinko Hyo created by Goichi Hosoda 1930
Knowing how to interpret the Ichimoku indicator can be complicated. I hope this version is more intuitive
Use Ichimoku to determine the trend of the day
When the market is above the cloud, and Tenkan (green line) crosses over Kijun (red Line), there is a Bullish Trend . When Tenkan crosses under Kijun, the trend ends.
When the market is under the cloud, and Tenkan crosses under Kijun; There is a Bearish Trend . When Tenkan crosses over Kijun, the trend ends.
When the market crosses the cloud (orange bars), there is no trend
The default setting is 9, 26 and 52. For cryptocurrencies (24/7 market), you can change it to 10, 30 and 60 periods.
///
Ichimoku Kinko Hyo fue creado por Goichi Hosoda en 1930
Saber interpretar al indicador Ichimoku puede ser complicado. Espero esta version sea mas intuitiva
Use Ichimoku para determinar la tendencia del día, y operar solo a favor de la misma
Cuando el mercado esta sobre la nube y Tenkan (linea verde) cruza sobre Kijun (linea roja), la tendencia es alcista. Cuando Tenkan cruza bajo Kijun, termina la tendencia.
Cuando el mercado esta bajo la nube y Tenkan cruza bajo Kijun, la tendencia es bajista. Cuando Tenkan cruza sobre Kijun, termina la tendencia.
Cuando el mercado atraviesa la nube (barras naranjas), no hay tendencia
Por defecto, el seteo es 9, 26 y 52. Para criptomonedas, puede cambiarlo a 10, 30 y 60 períodos
Open Interest Money Flow Index (OIMFI)CAUTION : This system was inspired from seiglerj' s "Money Flow Index " script. Open Interests are used instead of volume.
What is the Money Flow Index ( MFI )?
The Money Flow Index ( MFI ) is a technical oscillator that uses price and volume for identifying overbought or oversold conditions in an asset. It can also be used to spot divergences which warn of a trend change in price. The oscillator moves between 0 and 100.
Unlike conventional oscillators such as the Relative Strength Index ( RSI ), the Money Flow Index incorporates both price and volume data, as opposed to just price. For this reason, some analysts call MFI the volume-weighted RSI .
What Does the Money Flow Index ( MFI ) Tell You?
One of the primary ways to use the Money Flow Index is when there is a divergence. A divergence is when the oscillator is moving in the opposite direction of price. This is a signal of a potential reversal in the prevailing price trend.
For example, a very high Money Flow Index that begins to fall below a reading of 80 while the underlying security continues to climb is a price reversal signal to the downside. Conversely, a very low MFI reading that climbs above a reading of 20 while the underlying security continues to sell off is a price reversal signal to the upside.
Traders also watch for larger divergences using multiple waves in the price and MFI . For example, a stock peaks at $10, pulls back to $8, and then rallies to $12. The price has made two successive highs, at $10 and $12. If MFI makes a lower higher when the price reaches $12, the indicator is not confirming the new high. This could foreshadow a decline in price.
The overbought and oversold levels are also used to signal possible trading opportunities. Moves below 10 and above 90 are rare. Traders watch for the MFI to move back above 10 to signal a long trade, and to drop below 90 to signal a short trade.
Other moves out of overbought or oversold territory can also be useful. For example, when an asset is in an uptrend, a drop below 20 (or even 30) and then a rally back above it could indicate a pullback is over and the price uptrend is resuming. The same goes for a downtrend. A short-term rally could push the MFI up to 70 or 80, but when it drops back below that could be the time to enter a short trade in preparation for another drop .
Reference : www.investopedia.com
WARNING :
** Since each instrument in the list has its own unique contract data, you must first enter its name to display it. I recommend you to select OANDA from the markets. Finally, when the COT reports are issued, it may repaints. However, this repaint is usually close to closing or after close .(When COT reports are so sharp ) So use this script only 1W ( 1 week ) or 1 M ( 1 month ) timeframe.
** This data is taken to Tradingview with the help of Quandl. This is a very low possibility, but the system will not work if there is a malfunction.
FEATURES :
*** Working with all futures (Including : Bitcoin )
*** If you dont work with "Futures" , you can select "Others" from switchable menu and use volume for all instruments.
*** New generation elegant design used : Adaptive coloring Overbought - Oversold Levels according to the closing price.
NOTE : This code is open source under the MIT License. If you have any improvements or corrections to suggest, please send me a pull request via the github repository github.com
Stay tuned. Best wishes !
Function : Bollinger Bands and BBW Squeeze DetectorThis script shows Bollinger Bands function and want to detect Bollinger Band Width Squeeze with a successful, different perspective .
Bollinger Bands : You can specify the Bollinger Bands periods as mutable variables .
Bollinger Band Width Squeeze : First the Bollinger bands width was calculated.The width was then divided into levels using the money flow index.
Thus, the bollinger takes into account the available volume averages when calculating the band width mfi (Money Flow Index).
After this modelling, we can limit and color the lower limit and upper limits just as Relative Strength Index.
We can even put warnings on oversold areas if desired. Let's not forget that we are working with width rather than price.
By design, squeeze areas are defined directly above the Bollinger Bands with coloration. I think it is very practical and looks stylish.
I tried and found it quite successful and wanted to share it with users.
I came up with many ideas when I wrote this system, and I will share them very soon . I hope it will be useful to users and give new ideas.
Best regards.
Template For Custom FIR Filters - Make Your Moving AverageIntroduction
FIR filters (finite impulse response) are widely used in technical analysis, there is the simple or arithmetic moving average, the triangular, the weighted, the least squares...etc. A FIR filter is characterized by the fact that its impulse response (the output of a filter using an impulse as input) is finite, this mean that the impulse response won't have infinite outputs unlike IIR filters.
They are extremely simple to design to, even without the Fourier transform, this is why i post this template that will let you create custom filters from step responses. Don't hesitate to post your results.
How It Works
Originally you create your filters from the frequency response you want your filter to have, this is because the inverse Fourier transform of the frequency response is the filter impulse response.
After that step you use convolution (convolution is the sum of the product between the signal and the impulse response) and you will have your filter. But we don't have Fourier transforms in pine so how can we possibly make FIR filters from convolution ? Well here the thing, the impulse response is the derivative of the step response and the step response is the sum of the impulse response, this mean we can create filters from step responses.
Step response of a moving average.
Step responses are easy to design, you just need a function that start at 0 and end up at 1.
How To Use The Template
All the work is done for you, the only thing you need to do is to enter your function at line 5 :
f(x)=> your function
For example if you want your filter to have a step response equal to sqrt(x) just enter :
f(x)=> sqrt(x)
This will give the following filter output :
You can create custom step responses from online graphing tools like fooplot or wolfram alpha, i recommend fooplot.
You can also design your filter step response from the line 14/15/16, b will be your filter step response, just use a , for example b = pow(a,2) , then replace output in plot by b and use overlay false, you can also plot step , if you like your step response copy the content of b and paste after f(x) => .
Filter Characteristics
The impulse response determine how many of a certain signal you want in your filter, this is also called weighting, you can think of filter design as cooking where your ingredients are the the signal at different periods and the impulse response determine how many of an ingredient you must include in the recipe. The step response can also tell you about your filter characteristics, for example :
This one converge faster to the step function, this mean that the filter will have less lag.
However this one converge slower to the step function, this mean the filter might have more lag but could be smoother.
Be aware that you must find a good weighting balance, else you can have output equals to the signal or just a delayed version of the signal without smoothing.
Real Case
Lets design a sine weighted moving average (swma), this FIR filter use the first 180 degrees of a sine wave function as impulse response.
Impulse response of the swma.
We can design it from the step response without much problems, remember that the impulse response is the derivative of the step response, therefore the derivative of the step response is equal to the first 180 degrees of a sine wave, the derivative of the cosine function is a sine function, therefore :
f(x)=> .5*(1 - cos(x*pi))
And voila.
Designing A BandPass Filter
The bandpass filter like a low-pass and high pass filter, you can think of it as a smooth oscillator.
To design a bandpass filter your step response must be bell shaped, or starting at 0 and ending at 0, for example :
f(x)=>sin(x*pi) give :
Conclusion
Just use fooplot and experiment, you could get nice filters, i will try to post some using this template but it would be really nice to have other people use it. If you need further help pm me.
Thanks for reading !
80/20 14 RSIThe default RSI (14) set up with Pareto (80/20 for overbought and oversold).
The background color is turning green and red as buy & sell signals
8/21/100 EMAsBecause we all want to keep our charts clean, I have saved my EMA's configuration in this script.
Follow the green & red background as the buy / sell signal. Always keep an eye on the EMA 100 too.