Adaptive Bandpass Filter [Ehlers]This is my latest bandpass filter - used to determine if a security is in a trend or cycle.
Now with an adaptive period setting! I use Ehlers in-phase & quadrature dominant cycle measurement (IQ IFM) method to set the period dynamically.
This method favors longer periods which tend to produce smoother, albeit laggier bandpass oscillator plots. From my quick tests, I tend to have lag between 4 and 8 bars, depending on the Timeframe.
The lower timeframes tend to have more noise and thus produce more interfering frequencies that may cause lag.
>Settings
Source: Select the data source to perform calc's on (close, open, etc...)
Period: Select the period to tune. Periods outside of this value will be attenuated (reduced)
Adaptive: Enable to have the I-Q IFM set the period for you (disables Period setting)
Bandpass Tolerance: Allow periods that are plus/minus the chosen period to pass.
Cycle Tolerance: Sensitivity of cycle mode. Lower values consider trends more frequent, higher values consider cycles more frequent.
Bandpass tolerance example: for instance, if this setting is 0.1 (10%) and Period is set to 20, then waves with a period of 18 - 22 will pass.
>How to read
Red line is the bandpass output, showing a lagged version of the dominant cycle representing the
Black lines are the upper and lower bounds for a cycle
Green Background indicates an uptrend
Red background indicates a downtrend
Cari dalam skrip untuk "wave"
Godmode 4.0.0 [Oscillator]First off, a huge thank you to the following people:
LEGION:
LazyBear: www.tradingview.com
xSilas: www.tradingview.com
Ni6HTH4awK: www.tradingview.com
sco77m4r7and:
SNOW_CITY: www.tradingview.com
oh92: www.tradingview.com
alexgrover: www.tradingview.com
cI8DH: www.tradingview.com
DonovanWall: www.tradingview.com
Since I've been on TradingView I've become somewhat enthralled by Godmode and the collective work that goes in to it, so I decided to publish my own iteration, building off the ideas already present. (This is a great way to get familiar with Pine by the way, just in case there are any beginners reading this)
Changes
The first change I made was to allow the user to select whatever tickerid they wanted as a benchmark. If trading XBTUSD on BitMEX for example, the indicator will react to exchange-specific activity, which means it will respond to all the little whipsaws, whipsaws that can be especially present on a futures exchange. By typing CRYPTOCAP:BTC or CRYPTOCAP:TOTAL we endeavor to remove noise. It can also signal earlier. Less noise and less lag. Another idea would be to choose a benchmark that has a strong inverse relationship with the asset you're trading: try CRYPTOCAP:USDT as the benchmark against BTC to see what I mean.
I also added the ability to smooth the plot, yet again removing noise but adding considerable lag.
The linear regression of the wave-trend is calculated in place of the EMA. This is plotted as columns with the midline (50) as the base. This is just calculating the slope of the wave-trend and can signal a weakening trend before a reversal takes place.
Using cI8DH's True RSI script () as inspiration, I added a function for calculating the True TSI in an attempt to remove any bullish bias. Funnily enough, when I tried to do the same with the RSI I had some problems. I'll try to resolve this in the coming weeks.
Made slight changes to the aesthetics. Tried to bring the two main plots alive by making their bold, opaque colors stand off the subtle tones in the background.
To Do List
1. I would like to sort out the issue with the True RSI.
2. When the plots are smoothed, there's an issue with the green 'Caution!' dots appearing in the lower half of the indicator.
3. I'd like to adjust the code so that if the 'Benchmark' box is empty, that it will automatically register the current tickerid as the 'Benchmark'.
If anyone has any suggestions on other fixes or how to apply the fixes mentioned by me, please don't hesitate to reach out to me here or through other media platforms.
Want to Learn?
If you'd like the opportunity to learn Pine but you have difficulty finding resources to guide you, take a look at this rudimentary list: docs.google.com
The list will be updated in the future as more people share the resources that have helped, or continue to help, them. Follow me on Twitter to keep up-to-date with the growing list of resources.
Suggestions or Questions?
Don't even kinda hesitate to forward them to me. My (metaphorical) door is always open.
BITMEX:XBTUSD
CRYPTOCAP:BTC
CRYPTOCAP:TOTAL
CRYPTOCAP:USDT.D
Bandpass Cycle Indicator [Ehlers]This indicator is NOT used for entry and exit conditions when trading. Instead, it's purpose is to tell you what the state of the market is: trending or cyclical.
>WHO IS THIS FOR?
This is especially useful for strategies that use scalping or martingale betting to turn a profit. You don't want to be caught in a bullish trend with several open short orders. Algo traders welcome.
>HOW DOES IT WORK?
I'm glad you asked. It's based on Ehlers' work regarding signal filtering. Essentially, it uses a bandpass filter to reduce noise that is inherent in the market and display the underlying frequency.
First, we get rid of the high-frequency noise - think jitters, long wicks, etc... price action that usually effects EMAs and other MAs. We don't want any of that.
Next, we get rid of low-frequency noise - this is a little more difficult to picture, but we're essentially ignoring cycles (Elliot waves) from other longer time frames. We don't care if the Daily bars are just about to reverse if it doesn't affect our scalping strategy.
Finally, we find the root mean square (RMS) of the high and low points of our newly created signal (red) and plot them (black). These will act as triggers to tell us if a market is in cycle or trending.
>HOW DO YOU READ IT?
Background colors:
-Blue is cycle - you're safe.
-Red is trending down
-Green is trending up
Crossovers:
-Red above Upper Black: Uptrend
-Red below Lower Black: Downtrend
-Red in the middle: Cycle
>IS IT PREDICTIVE?
Momentum tends to pick up quickly and decline quickly, so if you'll often see a small Red or Green strip before a large price movement.
After long periods of cyclic movement (or consolidation), there isn't much momentum in the system, so any small price action will be considered a trend -> these small movements are picked up by other human traders and bots. Trading volume increases more and more until you have a swing in one direction.
So yes, it can be predictive due to the nature of signals and oscillation. Maybe not necessarily predictive of which direction price will go, but when volatility is about to increase.
Low Latency Trendline[Geo]Low latency trendline is a better and faster indicator than MAs.
It lowes high frequency wave(noise) and echoes low frequency wave(main move trend).
You can find out trend faster and have more confidence to dicide than MA indicators.
Take your own risk to use this Indicator.
PS:
I found RMTA() to help coding.
Tradingview has a good recursive function method. And RMTA has a good licence:MIT licence. Thanks to you, Alex.
Logarithmic Fibonacci RetraceThis script will allow you to use Logarithmic (instead of linear) Fibonacci retrace.
Please see excellent write up here: www.elliottwavetrader.net
explaining why logarithmic is preferred, especially over large price movement and long timeframes.
All TradingView fib tools use linear math, and will show incorrect long-term levels because of this.
HOW TO USE:
* Enter your points for Wave 0 and 1. Example: 1810.10 and 2872.87 in the SPX chart shown.
* Turn on "show lines" and "show labels". These are OFF by default because the chart will usually get warped
if you display the lines before entering the actual values you want.
* Change the "label offset" if the fib labels are too close or too far from the chart.
Please be aware that this is considered an "INDICATOR" script and so will not save the values separately
for each chart. You will need to enter new values each time you change to a different symbol.
Logarithmic Fibonacci ExtensionThis script will allow you to use Logarithmic (instead of linear) Fibonacci extensions.
Please see excellent write up here: www.elliottwavetrader.net
explaining why logarithmic is preferred, especially over large price movement and long timeframes.
All TradingView fib tools use linear math, and will show incorrect long-term levels because of this.
HOW TO USE:
* Enter your points for Wave 0, 1, and 2. Example: 666.79, 1219.80, 1010.91 in the SPX chart shown.
* Turn on "show lines" and "show labels". These are OFF by default because the chart will usually get warped
if you display the lines before entering the actual values you want.
* Change the "label offset" if the fib labels are too close or too far from the chart.
* Select up to 2.000, 3.000, and 4.000 to display higher-power fibs.
Please be aware that this is considered an "INDICATOR" script and so will not save the values separately
for each chart. You will need to enter new values each time you change to a different symbol.
Adaptive Bandpass Trigger Oscillator Ver 3This is an improvement of the Adaptive Bandpass Trigger Oscillator. It adds an option for a multiplier to the dominant cycle to filter out smaller swings.
Feel free to message me if you would like development work or would just like to donate ; )
This is based off of Ehlers' Bandpass Filter system (link below slides 15-17). I then used Ehlers' methods for finding the dominant cycle to automatically input the dominant cycle to the length. Essentially Ehlers runs a band pass with a given period to detrend the price data and highlight a cycle with the given frequency(length). This represents the In phase cycle. Ehlers then creates the trigger line by taking the one bar momentum of the In Phase line, multiplying by 2Pi and then using this to create a 60 degree leading signal. The triggers are crossovers of the In Phase and Lead lines. You can also use conservative signals by waiting for the In Phase line to trend in the direction of the trigger crossover as well.
Delta represents how much to influence the oscillator by the price (Delta 0 is a perfect wave)
Alpha represents how quickly to adapt between the dominant cycle changes in the price.
Thanks to LazyBear for implementing Ehlers' original adaptive code, which I used for this system
Thanks to HPotter for the BandPass Filter code, which I used as a base for implementing the rest of the system
Adaptive Bandpass Trigger Oscillator Ver 2.0This is an improvement of the Adaptive Bandpass Trigger Oscillator. It normalizes the values to 0-100 to allow the addition of overbought and oversold levels. An aggressive trigger would be an inflection point of the trigger line while overbought/oversold and the phase line above/below the midline.
Feel free to message me if you would like development work or would just like to donate ; )
This is based off of Ehlers' Bandpass Filter system (link below slides 15-17). I then used Ehlers' methods for finding the dominant cycle to automatically input the dominant cycle to the length. Essentially Ehlers runs a band pass with a given period to detrend the price data and highlight a cycle with the given frequency(length). This represents the In phase cycle. Ehlers then creates the trigger line by taking the one bar momentum of the In Phase line, multiplying by 2Pi and then using this to create a 60 degree leading signal. The triggers are crossovers of the In Phase and Lead lines. You can also use conservative signals by waiting for the In Phase line to trend in the direction of the trigger crossover as well.
Delta represents how much to influence the oscillator by the price (Delta 0 is a perfect wave)
Alpha represents how quickly to adapt between the dominant cycle changes in the price.
Thanks to LazyBear for implementing Ehlers' original adaptive code, which I used for this system
Thanks to HPotter for the BandPass Filter code, which I used as a base for implementing the rest of the system
www.mesasoftware.com
Christmas Tree Theme With Open Code To See Pine ScriptI had been trying to code a predictive algorithm working with sine waves, but I got distracted and made some snow and Christmas trees lol. I'm uploading this with the source code because I'm sure someone will be able to learn from it to create something useful.
Please follow me for some actual useful pine scripts and merry Christmas! :)
Adaptive Bandpass Trigger OscillatorThis is based off of Ehler's Bandpass Filter system (link below slides 15-17). I then used Ehler's methods for finding the dominant cycle to automatically input the dominant cycle to the length. Essentially Ehler runs a band pass with a given period to detrend the price data and highlight a cycle with the given frequency(length). This represents the In phase cycle. Ehler then creates the trigger line by taking the one bar momentum of the In Phase line, multiplying by 2Pi and then using this to create a 60 degree leading signal. The triggers are crossovers of the In Phase and Lead lines. You can also use conservative signals by waiting for the In Phase line to trend in the direction of the trigger crossover as well.
Delta represents how much to influence the oscillator by the price (Delta 0 is a perfect wave)
Alpha represents how quickly to adapt between the dominant cycle changes in the price.
Thanks to LazyBear for implementing Ehler's original adaptive code, which I used for this system
Thanks to HPotter for the BandPass Filter code, which I used as a base for implementing the rest of the system
www.mesasoftware.com
Ehler Bandpass Trigger OscillatorThis is based off of Ehler's Bandpass Filter system (link below slides 15-17). Essentially Ehler runs a band pass with a given period to detrend the price data and highlight a cycle with the given frequency(length). This represents the In phase cycle. Ehler then creates the trigger line by taking the one bar momentum of the In Phase line, multiplying by 2Pi and then using this to create a 60 degree leading signal. The triggers are crossovers of the In Phase and Lead lines. You can also use conservative signals by waiting for the In Phase line to trend in the direction of the trigger crossover as well.
Length represent the cycle period you want to highlight.
Delta represents how much to influence the oscillator by the price (Delta 0 is a perfect wave)
Thanks to HPotter for the BandPass Filter code, which I used as a base for implementing the rest of the system
www.mesasoftware.com
Fractal FramerThis indicator constructs dynamic high/low price range levels, based on 3 point fractals. Trend lines are drawn (zigzag style) at fractal points when trend direction is clearly established.
This is a lagging indicator: fractals lag by one bar and trend lines can lag by many bars. However, its strength lays in objectively defining historic price action: e.g. support/resistance levels and waves within a trend.
See the comments at the beginning of the script for a complete description.
Golden Fib WavesDynamic Fibonacci levels in pleasing gold shades. Smoothing (SMA) of swing lows and highs enabled by default. Boldly, this just looks good. I am not sure whether it is of any help for trading purposes. If you do in fact find it useful, feel free to drop me a line and to share your insights.
Compare Wave IndexI built this indicator to compare the performance of multiple chart ID's, at the moment the chart analyses how far above or below the assets prices are compared to a moving average. In this first version, the indicator compares BTC against the current chart and also one customisable ticker, which by default is set to SLRBTC.
As I update the indicator I intend to make it possible to add many other chart IDs so that I can just take a quick look at the indicator to see how my faviorite assets are performing.
Any feedback is welcome, if anyone has any questions just leave me a comment.
Happy Trading,
Biffy
RSI TrendspotterHad a bit of a TA epiphany with RSI so bear with me. The time since RSI was last overbought/sold is a solid trend indicator. This may seem obvious but after x number of years trading it hit me like a smack in the face. I've coded this for easy visualisation. They're fairly simple changes but it's making a big difference in my trendspotting already.
In the example CMG hasn't been overbought for 183 days, so the RSI is mostly green:
Before that it hadn't been oversold for 199 days, so RSI is mostly red:
And before that it was ranging like a maf*ckin' sine wave, so the RSI shows green, red, green, red, etc.:
Finally, normal RSI for comparison. Same data, but now with pretty colours:
I've also added overbought/oversold highlights cause that just makes the whole charting thing a lot easier. Enjoy!
DVDIQQE [DW]This is an experimental study inspired by the Quantitative Qualitative Estimation indicator designed to identify trend and wave activity.
In this study, rather than using RSI for the calculation, the Dual Volume Divergence Index oscillator is utilized.
First, the DVDI oscillator is calculated by taking the difference between PVI and its EMA, and NVI and its EMA, then taking the difference between the two results.
Optional parameters for DVDI calculation are included within this script:
- An option to use tick volume rather than real volume for the volume source
- An option to use cumulative data, which sums the movements of the oscillator from the beginning to the end of TradingView's maximum window to give a more broad picture of market sentiment
Next, two trailing levels are calculated using the average true range of the oscillator. The levels are then used to determine wave direction.
Lastly, rather than using 0 as the center line, it is instead calculated by taking a cumulative average of the oscillator.
Custom bar colors are included.
Note: For charts that have no real volume component, use tick volume as the volume source.
Weis Wave Volume with alert [LazyBear]LFI added alert conditions to LazyBear's indicator on the second bar of a turn to bullish or bearish.
To use alerts:
be sure you are on the interval you want to create your alert,
be sure the indicator inputs are the way you want them,
create an alert, choose this indicator and then choose one of the 2 conditions.
Changes to the inputs after an alert was created require alerts to be recreated.
The alerts trigger on the second bar to avoid noise.
I also changed the default aesthetics, but more importantly the default period (from 2 to 5, because that's what I use most often).
Gain/Loss Moving Average [Cyrus c|:D]This is a simple momentum indicator. It calculates the moving average of gains and losses. As you can see in the chart above, gains have been decreasing in each wave which is also captured by this indicator. Its closest relative is RSI but unlike RSI it is not range bound. Divergence on indicators that are not range bound are generally more reliable.
Recommended settings:
- EMA as moving average type.
- EMA length 27 is equal to RSI length 14 (2 x RSI length - 1). You can sync the length on the two indicators using that equation.
- hlc3 (AKA typical price) as input source might be better than "close" as it captures more information. If you use hlc3 as a source, then change the chart type to line and set hlc3 as the source for identifying divergence.
PS: Let me know if you know any identical indicator. I may be re-inventing the wheel :)
Elliott Wave Oscillator w/ Signal LineI just added a signal line to Koryu's code to fit my trading style. When the signal line crosses zero, it confirms to me that it's safe to trade.
Bill Williams Trading Chaos Vol 1-NoviceThis is a revision of a script developed by tekolo. I hope tekolo takes a look. The concepts are here but I struggle with pine. I am very much a novice, but I tried to put information from the original book, Trading Chaos, Volume One by Bill Williams. There are too many plots to get this to wor. I made a lot of plot lines into comments to get it to run. I'm hoping someone with an interest in this material and some programming skills will be kind enough to take these thoughts and put them in a script that the Pine Editor would actually run. Thanks for taking a look. I do believe in these leading indicators. This is information included for Novice Level Trading in the Bill Williams book. There are more indicators developed in his material, but the jest is that Price is an end result of the marketplace. Market participation (Volume), Market Bias (Momentum), Increased Participation and Bias (Acceleration) all preceed the formation of the Trend. This along with Elliott Wave interpretation using his indicators as a basis for locating key points of the Elliott Wave, are most of what I understand about this interesting man's work. Again, I am a novice at all of this, but the leading indicators that result in price seem interesting. Thanks!
Original Wavy Tunnel This wavy tunnel setup is constructed according tu Jody Samuel's original Wavy Tunnel, consist of wave, tunnel & filter. Instead of dotted EMA like other user has constructed, this script uses smooth medium width EMAs & colored exactly like the formula Jody has instructed in her course.
Salty GRaB Wave with Highlights for Squeeze CCI-Arrows SlowStochThis indicator shows GRaB candles and allows several moving averages to be displayed at the same time.
It uses background coloring to identify momentum shifts. Wide bands of color can be used to identify trends while short bands of color can be used to identify reversals.
It has arrows above or below the candles to show CCI values above 100 or below -100 with the arrow pointing in the direction of the momentum.
It has red background coloring to show slow stochastic Overbought ranges and dark red signals indicating a cross of the fast and slow lines.
It has green background coloring to show slow stochastic Oversold ranges and dark green signals indicating a cross of the fast and slow lines.
It has yellow background to show squeezes with additional Squeeze information shown at the bottom of the chart in the form of letters and momentum arrows.