Williams Vix Fix [CC]The Vix Fix indicator was created by Larry Williams and is one of my giant backlog of unpublished scripts which I'm going to start publishing more of. This indicator is a great synthetic version of the classic Volatility Index and can be useful in combination with other indicators to determine when to enter or exit a trade due to the current volatility. The indicator creates this synthetic version of the Volatility Index by a fairly simple formula that subtracts the current low from the highest close over the last 22 days and then divides that result by the same highest close and multiplies by 100 to turn it into a percentage. The 22-day length is used by default since there is a max of 22 trading days in a month but this formula works well for any other timeframe. By itself, this indicator doesn't generate buy or sell signals but generally speaking, you will want to enter or exit a trade when the Vix fix indicator amount spikes and you get an entry or exit signal from another indicator of your choice. Keep in mind that the colors I'm using for this indicator are only a general idea of when volatility is high enough to enter or exit a trade so green colors mean higher volatility and red colors mean low volatility. This is one of the few indicators I have written that don't recommend to buy or sell when the colors change.
This was a custom request from one of my followers so please let me know if you guys have any other script requests you want to see!
Synthetic
Detrended Synthetic Price [CC]The Detrended Synthetic Price was created by Bill Mars and this indicator is another undiscovered gem that I have found very useful. He obviously took inspiration from John Ehlers in the creation of this indicator and I would describe this indicator as a combination of a MACD and Ehlers work. This indicator is extremely smooth and gives very clear buy and sell signals. Let me know how this indicator works for you. I have included strong buy and sell signals in addition to normal ones so strong signals are darker in color and normal signals are lighter in color. Buy when the line turns green and sell when it turns red.
Let me know if there are any other indicators or scripts you would like to see me publish!
Synthetic Price Action GeneratorNOTICE:
First thing you need to know, it "DOES NOT" reflect the price of the ticker you will load it on. THIS IS NOT AN INDICATOR FOR TRADING! It's a developer tool solely generating random values that look exactly like the fractals we observe every single day. This script's generated candles are as fake as the never ending garbage news cycles we are often force fed and expected to believe by using carefully scripted narratives peddled as hypnotic truth to psychologically and emotionally influence you to the point of control by coercion and subjugation. I wanted to make the script's synthetic nature very clear using that analogy, it's dynamically artificial. Do not accidentally become disillusioned by this scripts values, make trading decisions from it, and lastly don't become victim to predatory media magic ministry parrots with pretty, handsome smiles, compelling you to board their ferris wheel of fear. Now, on to the good stuff...
BACKSTORY:
Occasionally I find myself in situations where I have to build analyzers in Pine to actually build novel quantitative analytic indicators and tools worthy of future use. These analyzers certainly don't exist on this platform, but usually are required to engineer and tweak algorithms of the highest quality with the finest computational caliber. I have numerous other synthesizers to publish besides this one.
For many reasons, I needed a synthetic environment to utilize the analyzers I built in Pine, to even pursue building some exotic indicators and algorithms. Pine doesn't allow sourcing of tuples. Not to mention, I required numerous Pine advancements to make long held dreams into tangible realities. Many Pine upgrades have arrived and MANY, MANY more are in need of implementation for all. Now that I have this, intending to use it in the future often when in need, you can now use it too. I do anticipate some skilled Pine poets will employ this intended handy utility to design and/or improved indicators for trading.
ORIGIN:
This was inspired by the brilliance from the world renowned ALGOmist John F. Ehlers, but it's taken on a completely alien form from its original DNA. Browsing on the internet for something else, I came across an article with a small code snippet, and I remembered an old wish of mine. I have long known that by flipping back and forth on specific tickers and timeframes in my Watchlist is not the most efficient way to evaluate indicators in multiple theatres of price action. I realized, I always wanted to possess and use this sort of tool, so... I put it into Pine form, but now have decided to inject it with Pine Script steroids. The outcome is highly mutable candle formations in a reusable mutagenic package, observable above and masquerading as genuine looking price candles.
OVERVIEW:
I guess you could call it a price action synthesizer, but I entitled it "Synthetic Price Action Generator" for those who may be searching for such a thing. You may find this more useful on the All or 5Y charts initially to witness indication from beginning (barstate.isfirst === barindex==0) to end (last_bar_index), but you may also use keyboard shortcuts + + to view the earliest plottable bars on any timeframe. I often use that keyboard shortcut to qualify an indicator through the entirety of it's runtime.
A lot can go wrong unexpectedly with indicator initialization, and you will never know it if you don't inspect it. Many recursively endowed Infinite Impulse Response (IIR) Filters can initialize with unintended results that minutely ring in slightly erroneous fashion for the entire runtime, beginning to end, causing deviations from "what should of been..." values with false signals. Looking closely at spg(), you will recognize that 3 EMAs are employed to manage and maintain randomness of CLOSE, HIGH, and LOW. In fact, any indicator's barindex==0 initialization can be inspected with the keyboard shortcuts above. If you see anything obviously strange in an authors indicator, please contact the developer if possible and respectfully notify them.
PURPOSE:
The primary intended application of this script, is to offer developers from advanced to even novice skill levels assistance with building next generation indicators. Mostly, it's purpose is for testing and troubleshooting indicators AND evaluating how they perform in a "manageable" randomized environment. Some times indicators flake out on rare but problematic price fluctuations, and this may help you with finding your issues/errata sooner than later. While the candles upon initial loading look pristine, by tweaking it to the minval/maxval parameters limits OR beyond with a few code modifications, you can generate unusual volatility, for instance... huge wicks. Limits of minval= and maxval= of are by default set to a comfort zone of operation. Massive wicks or candle bodies will undoubtedly affect your indication and often render them useless on tickers that exhibit that behavior, like WGMCF intraday currently.
Copy/paste boundaries are provided for relevant insertion into another script. Paste placement should happen at the very top of a script. Note that by overwriting the close, open, high, etc... values, your compiler will give you generous warnings of "variable shadowing" in abundance, but this is an expected part of applying it to your novel script, no worries. plotcandle() can be copied over too and enabled/disabled in Settings->Style. Always remember to fully remove this scripts' code and those assignments properly before actual trading use of your script occurs, AND specifically when publishing. The entirety of this provided code should never, never exist in a published indicator.
OTHER INTENTIONS:
Even though these are 100% synthetic generated price points, you will notice ALL of the fractal pseudo-patterns that commonly exist in the markets, are naturally occurring with this generator too. You can also swiftly immerse yourself in pattern recognition exercises with increased efficiency in real time by clicking any SPAG Setting in focus and then using the up/down arrow keys. I hope I explained potential uses adequately...
On a personal note, the existence of fractal symmetry often makes me wonder, do we truly live in a totality chaotic universe or is it ordered mathematically for some outcomes to a certain extent. I think both. My observations, it's a pre-deterministic reality completely influenced by infinitesimal amounts of sentient free will with unimaginable existing and emerging quantities. Some how an unknown mysterious mechanism governing the totality of universal physics and mathematics counts this 100.0% flawlessly and perpetually. Anyways, you can't change the past that long existed before your birth or even yesterday, but you can choose to dream, create, and forge the future into your desires and hopes. As always, shite always happens when your not looking for it. What you choose to do after stepping in it unintentionally... is totally up to you. :) Maybe this tool and tips provided will aid you in not stepping in an algo cachucha up to your ankles somehow.
SCRIPTING LESSONS PORTRAYED IN THIS SCRIPT:
Pine etiquette and code cleanliness
Overwrite capabilities of built-in Pine variables for testing indicators
Various techniques to organize Settings panel while providing ease of adjustment utility
Use of tooltip= to provide users adequate valuable information. Most people want to trade with indicators, not blindly make adjustments to them without any knowledge of their intended operation/effects
When available time provides itself, I will consider your inquiries, thoughts, and concepts presented below in the comments section, should you have any questions or comments regarding this indicator. When my indicators achieve more prevalent use by TV members , I may implement more ideas when they present themselves as worthy additions. Have a profitable future everyone!
Random Synthetic Asset GenerationThis script generates pseudo-random asset data . Due to the nature of the random generator, it is impossible to use this indicator as input for other indicators because the instance of the script that the indicator is applied to will automatically be different from the instance that is plotted on the chart. Therefore, the idea is to use this script in other scripts (to make it possible to backtest on random data, for example).
The script has four main input parameters.
Random Number Generator Method: It supports two methods for generating the pseudo-random numbers (one by Ricardo Santos and one by Wichmann-Hill).
Seed: You can specify the seed to use. Each unique seed will generate a unique set of pseudo-random data.
Intrabar Volatility: This basically sets how volatile the generated wicks will be (0 = no wicks).
Price Multiplier: This is just a multiplier for the generated price data, so that you can scale up or down the generated price data.
You can also change the colors of the bars.
In addition to this, the indicator also generates random volume. In order to make it possible to show both volume and price, you need to have two identical instances of the indicator. One on the chart, and one in its own panel. Then, go into the Style tab in the indicator settings on the instance in the panel. Untick Up-Candles and Down-Candles boxes, and tick the Volume box.
In a similar manner, you can also plot the true range data and the candle change data as well, by ticking one of those boxes instead.
[blackcat] L2 Ehlers Synthetic Prices CandlesLevel: 2
Background
John F. Ehlers create Synthetic Prices Using Random Numbers with Memory in his "Cycle Analytics for Traders" chapter 8 on 2013.
Function
Peter Swerling is best known for the class of statistically “fluctuating target” scattering models he developed in the early 1950s to characterize the performance of pulsed radar systems, referred to as Swerling targets. He noted that the return radar echoes were noisy because of semirandom reflections from different parts of the aircraft because of the changing aspect of aircraft relative to the radar transmitter. There were different kinds of fluctuations due to target shape and size, radar wavelength, and so on. Some fluctuations would occur pulse to pulse, and others would vary more slowly, such as from scan to scan of the antenna. In fact, his early work led to the design of modern stealthy aircraft. The noisy radar echoes were successfully modeled as a constant plus a random number with memory. In terms recognized by traders, the echoes were modeled as an exponential moving average (EMA) passes numbers. The time constant of the EMA was different for the various models, and more complex models included several EMAs. The Swerling model is entirely consistent with the 1/F α spectral model that uses random inputs with long-term memory.
Since there has been a mountain of opinion regarding the randomness of the market, it is reasonable to apply a Swerling-like model toward the generation of synthetic data. The result is subjective, but appears to be a reasonable approximation to real market movement. There is no relationship between the real prices and the synthetic prices. Since random numbers are used, the display will change every time the indicator is computed. Since synthetic prices created by taking an EMA of random numbers are a reasonable approximation to real market prices, the prices can be viewed as random numbers with memory. A logical extension is that we can gain insight into market activity by correlating current prices with prices in the recent history to take advantage of the memory part of the model. At least that was Dr. Ehlers premise.
Key Signal
Cls--> Synthetic Close Prices
Hgh--> Synthetic High Prices
Lw --> Synthetic Low Prices
Opn--> Synthetic Open Prices
Pros and Cons
I am sorry this script is NOT 100% as original Ehlers works but I modified it accordingly which demostrated with better visual effect.
Remarks
The 46th script for Blackcat1402 John F. Ehlers Week publication.
Courtesy of @ midtownsk8rguy for random number generation.
Readme
In real life, I am a prolific inventor. I have successfully applied for more than 60 international and regional patents in the past 12 years. But in the past two years or so, I have tried to transfer my creativity to the development of trading strategies. Tradingview is the ideal platform for me. I am selecting and contributing some of the hundreds of scripts to publish in Tradingview community. Welcome everyone to interact with me to discuss these interesting pine scripts.
The scripts posted are categorized into 5 levels according to my efforts or manhours put into these works.
Level 1 : interesting script snippets or distinctive improvement from classic indicators or strategy. Level 1 scripts can usually appear in more complex indicators as a function module or element.
Level 2 : composite indicator/strategy. By selecting or combining several independent or dependent functions or sub indicators in proper way, the composite script exhibits a resonance phenomenon which can filter out noise or fake trading signal to enhance trading confidence level.
Level 3 : comprehensive indicator/strategy. They are simple trading systems based on my strategies. They are commonly containing several or all of entry signal, close signal, stop loss, take profit, re-entry, risk management, and position sizing techniques. Even some interesting fundamental and mass psychological aspects are incorporated.
Level 4 : script snippets or functions that do not disclose source code. Interesting element that can reveal market laws and work as raw material for indicators and strategies. If you find Level 1~2 scripts are helpful, Level 4 is a private version that took me far more efforts to develop.
Level 5 : indicator/strategy that do not disclose source code. private version of Level 3 script with my accumulated script processing skills or a large number of custom functions. I had a private function library built in past two years. Level 5 scripts use many of them to achieve private trading strategy.
Combo Backtest 123 Reversal & D_ELI (Ehlers Leading Indicator) 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
This Indicator plots a single
Daily DSP (Detrended Synthetic Price) and a Daily ELI (Ehlers Leading
Indicator) using intraday data.
Detrended Synthetic Price is a function that is in phase with the dominant
cycle of real price data. This one is computed by subtracting a 3 pole Butterworth
filter from a 2 Pole Butterworth filter. Ehlers Leading Indicator gives an advanced
indication of a cyclic turning point. It is computed by subtracting the simple
moving average of the detrended synthetic price from the detrended synthetic price.
Buy and Sell signals arise when the ELI indicator crosses over or under the detrended
synthetic price.
See "MESA and Trading Market Cycles" by John Ehlers pages 64 - 70.
WARNING:
- For purpose educate only
- This script to change bars colors.
Combo Backtest 123 Reversal & D_ELI (Ehlers Leading Indicator) 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
This Indicator plots a single
Daily DSP (Detrended Synthetic Price) and a Daily ELI (Ehlers Leading
Indicator) using intraday data.
Detrended Synthetic Price is a function that is in phase with the dominant
cycle of real price data. This one is computed by subtracting a 3 pole Butterworth
filter from a 2 Pole Butterworth filter. Ehlers Leading Indicator gives an advanced
indication of a cyclic turning point. It is computed by subtracting the simple
moving average of the detrended synthetic price from the detrended synthetic price.
Buy and Sell signals arise when the ELI indicator crosses over or under the detrended
synthetic price.
See "MESA and Trading Market Cycles" by John Ehlers pages 64 - 70.
WARNING:
- For purpose educate only
- This script to change bars colors.
Combo Backtest 123 Reversal & D_DSP (Detrended Synthetic Price) 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
Detrended Synthetic Price is a function that is in phase with the
dominant cycle of real price data. This DSP is computed by subtracting
a half-cycle exponential moving average (EMA) from the quarter cycle
exponential moving average.
See "MESA and Trading Market Cycles" by John Ehlers pages 64 - 70.
WARNING:
- For purpose educate only
- This script to change bars colors.
Combo Backtest 123 Reversal & D_DSP (Detrended Synthetic Price) 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
Detrended Synthetic Price is a function that is in phase with the
dominant cycle of real price data. This DSP is computed by subtracting
a half-cycle exponential moving average (EMA) from the quarter cycle
exponential moving average.
See "MESA and Trading Market Cycles" by John Ehlers pages 64 - 70.
WARNING:
- For purpose educate only
- This script to change bars colors.
OJLJ Synthetic CAD IndexThis script uses information of the principal CAD pairs to create an Index:
(X). We can see a difference between the CAD INDEX force that has decrease a lot and it means that CAD will raise again, making AUDCAD to go down
(Y). The AUDCAD chart has problems with it trend but we can be more confident about the trend if we look at the CAD INDEX trend were we can see a down trend
The mathematic methodology is private, but it uses percentile changes to be calculated and I have made some tests to make sure that results work perfectly fine, If you want to know more about the calculation or the test I have made, please send me a message
This indexes offer a way to:
+ Measure changes in an economy without being compared with another as the Forex pairs do
+ Analyze macroeconomic variables in the exchange rate of a determinate economy
+ Use candles instead of lines
+ The script have an input option were you can decide if use wicks or not (Not recomendable)
+ White color means it goes up while red means it goes down
+ The script works perfectly with all the time frames
+ Itcan be used with all the Forex pairs that include CAD
Because of all the data used to be calculated this script normally compile after 10-20 seconds
I thought a lot about it and I did a lot of tests, Technical Indicators don’t work the same way that Forex, this index were created and published principaly for users who have more interest in the Fundamental analysis but It can be useful for everyone
Do you like this Index or have any Ideas ? Please let me know with a comment :)
D_DSP (Detrended Synthetic Price ) Detrended Synthetic Price is a function that is in phase with the
dominant cycle of real price data. This DSP is computed by subtracting
a half-cycle exponential moving average (EMA) from the quarter cycle
exponential moving average.
See "MESA and Trading Market Cycles" by John Ehlers pages 64 - 70.