Auto Trendline Indicator (based on fractals)A tool that automatically draws out trend lines by connecting the most recent fractals.
Description:
The process of manual drawing out trend lines is highly subjective. Many times, we don’t trade what we see, but what we “want to see”. As a result, we draw lines pointing to the direction that we wishfully want price to move towards. While there are no right/wrong ways to draw trend lines, there are, however, systematic/unsystematic ways to draw trend lines. This tool will systematically draw out trend lines based on fractals.
Additional feature:
This tool will also plot out symbols (default symbol “X”) to signify points of crossings. This can be useful for traders considering to use trend lines as part of their trading strategies.
Here is an interesting observation on the price actions of NASDAQ futures on a 5 second chart during regular trading hours on July 14, 2022.
It’s a phenomenon. People like to see straight lines connecting HL/LH, etc., so it's possible for the market as a whole to psychologically react to these lines. However, it is important to note that is is impossible to predict the direction of price. In the case above, price could have tanked below auto-drawn trend line. Fractal based trend lines should only be taken as references and regarded as price levels. No studies have ever proven that the slope of trend lines can indicate price's future direction.
More about fractals:
To understand more about fractals:
www.investopedia.com
www.tradingview.com
Contrary to what it sounds like, fractal in "technical analysis" does not refer to the recursive self-repeating patterns that appear in nature, such as the mesmerizing patterns found in snowflakes. The Fractal Markets Hypothesis claims that market prices exhibit fractal properties over time. Assuming this assertion to be true, then fractals can be used a tool to represent the chaotic movements of price is a simplified manner.
The purpose of this exercise is to take a tool that is readily available (ie. in this case, TradingView’s built-in fractals tool), and to create a newer tool based on it.
Parameters:
Fractal period (denoted as ‘n’ in code): It is the number of bars bounding a high/low point that must be lower/higher than it, respectively, in order for fractal to be considered valid. Period ‘n’ can be adjusted in this tool. Traditionally, chartists pick the value of 5. The longer it is, the less noise seen on the chart, and the pivot point may also be exhibited in higher timeframes. The drawback is that it will increase the period of lag, and it will take more bars to confirm the printed fractal.
Others: Intuitive parameters such as whether to draw historical trend lines, what color to use, which way to extend the lines, and whether or not to show points of crossings.
Fractalmarket
EMA & SMA with FRACTAL DEVIATION BANDS by @XeL_ArjonaEMA & SMA with FRACTAL DEVIATION BANDS
Ver. 1.0.25.08.2015
By Ricardo M Arjona @XeL_Arjona
DISCLAIMER:
DISCLAIMER:
The Following indicator/code IS NOT intended to be a formal investment advice or recommendation by the author, nor should be construed as such. Users will be fully responsible by their use regarding their own trading vehicles/assets. The embedded code and ideas within this work are FREELY AND PUBLICLY available on the Web for NON LUCRATIVE ACTIVITIES and must remain as is.
WHAT IS THIS?
This is the adaptation of the FRACTAL DEVIATION BANDS to be used on Traditional Moving Averages (Simple & Exponential).
ALL NEW IDEAS OR MODIFICATIONS to these indicator(s) are Welcome in favor to deploy a better and more accurate readings. I will be very glad to be notified at Twitter or TradingVew accounts at: @XeL_Arjona
Any important addition to this work MUST REMAIN PUBLIC by means of CreativeCommons CC & TradingView.
2015
McGinley Dynamic with FRACTAL DEVIATION BANDS by @XeL_ArjonaMcGINLEY DYNAMIC with FRACTAL DEVIATION BANDS.
Ver. 1.0.beta.25.08.2015
By Ricardo M Arjona @XeL_Arjona
DISCLAIMER
The Following indicator/code IS NOT intended to be a formal investment advice or recommendation by the author, nor should be construed as such. Users will be fully responsible by their use regarding their own trading vehicles/assets. -- The embedded code and ideas within this work are FREELY AND PUBLICLY available on the Web for NON LUCRATIVE ACTIVITIES and must remain as is.
WHAT IS THIS?
This is my first adaptation of the FRACTAL DEVIATION BANDS to the "McGinley Dynamic Line". Be advised that the nature of this line tend to need some adjustments at the "Smooth Factor" if you see a flat line with tiny values.
Pine Script code MOD's and adaptations by @XeL_Arjona with special mention in regard of:
Morphic Numbers: (PHI & Plastic) Pine Script adaptation from it's algebraic generation formulas by @XeL_Arjona.
FRACTAL DEVIATION BANDS: main idea by @XeL_Arjona
ALL NEW IDEAS OR MODIFICATIONS to these indicator(s) are Welcome in favor to deploy a better and more accurate readings. I will be very glad to be notified at Twitter or TradingVew accounts at: @XeL_Arjona. Any important addition to this work MUST REMAIN PUBLIC by means of CreativeCommons CC & TradingView.
2015
Acc/Dist. Cloud with Fractal Deviation Bands by @XeL_ArjonaACCUMULATION / DISTRIBUTION CLOUD with MORPHIC DEVIATION BANDS
Ver. 2.0.beta.23:08:2015
by Ricardo M. Arjona @XeL_Arjona
DISCLAIMER
The Following indicator/code IS NOT intended to be a formal investment advice or recommendation by the author, nor should be construed as such. Users will be fully responsible by their use regarding their own trading vehicles/assets.
The embedded code and ideas within this work are FREELY AND PUBLICLY available on the Web for NON LUCRATIVE ACTIVITIES and must remain as is.
Pine Script code MOD's and adaptations by @XeL_Arjona with special mention in regard of:
Buy (Bull) and Sell (Bear) "Power Balance Algorithm by Vadim Gimelfarb published at Stocks & Commodities V. 21:10 (68-72).
Custom Weighting Coefficient for Exponential Moving Average (nEMA) adaptation work by @XeL_Arjona with contribution help from @RicardoSantos at TradingView @pinescript chat room.
Morphic Numbers (PHI & Plastic) Pine Script adaptation from it's algebraic generation formulas by @XeL_Arjona
Fractal Deviation Bands idea by @XeL_Arjona
CHANGE LOG:
ACCUMULATION / DISTRIBUTION CLOUD: I decided to change it's name from the Buy to Sell Pressure. The code is essentially the same as older versions and they are the center core (VORTEX?) of all derived New stuff which are:
MORPHIC NUMBERS: The "Golden Ratio" expressed by the result of the constant "PHI" and the newer and same in characteristics "Plastic Number" expressed as "PN". For more information about this regard take a look at: HERE!
CUSTOM(K) EXPONENTIAL MOVING AVERAGE: Some code has cleaned from last version to include as custom function the nEMA , which use an additional input (K) to customise the way the "exponentially" is weighted from the custom array. For the purpose of this indicator, I implement a volatility algorithm using the Average True Range of last 9 periods multiplied by the morphic number used in the fractal study. (Golden Ratio as default) The result is very similar in response to classic EMA but tend to accelerate or decelerate much more responsive with wider bars presented in trending average.
FRACTAL DEVIATION BANDS: The main idea is based on the so useful Standard Deviation process to create Bands in favor of a multiplier (As John Bollinger used in it's own bands) from a custom array, in which for this case is the "Volume Pressure Moving Average" as the main Vortex for the "Fractallitly", so then apply as many "Child bands" using the older one as the new calculation array using the same morphic constant as multiplier (Like Fibonacci but with other approach rather than %ratios). Results are AWSOME! Market tend to accelerate or decelerate their Trend in favor of a Fractal approach. This bands try to catch them, so please experiment and feedback me your own observations.
EXTERNAL TICKER FOR VOLUME DATA: I Added a way to input volume data for this kind of study from external tickers. This is just a quicky-hack given that currently TradingView is not adding Volume to their Indexes so; maybe this is temporary by now. It seems that this part of the code is conflicting with intraday timeframes, so You are advised.
This CODE is versioned as BETA FOR TESTING PROPOSES. By now TradingView Admins are changing lot's of things internally, so maybe this could conflict with correct rendering of this study with special tickers or timeframes. I will try to code by itself just the core parts of this study in order to use them at discretion in other areas. ALL NEW IDEAS OR MODIFICATIONS to these indicator(s) are Welcome in favor to deploy a better and more accurate readings. I will be very glad to be notified at Twitter or TradingView accounts at: @XeL_Arjona