Higher High & Higher Low (Live) ━ [whvntr]This indicator is based on the trading formation Higher high and Higher low. It dynamically displays the current price above the bar on a label.
Features:
• If the current price is lower than the previous high the label color will dim.
• If the current price is lower than the previous low the price figure will turn red.
• Completely customizable
• Inspired by the Price label written by Westy_ , I have written different functions (coding) to make this indicator what it is.
These are not buy and sell signs, it's based on the HH & HL trading formation.
Analysis
Theory Affinity TrendlinesThis indicator is perfect for traders who want to identify trend lines on a chart. It draws higher low uptrends and lower high downtrends, making it easy to see where the trend is going. You can also customize the settings to fit your needs, making it the perfect tool for your trading arsenal.
With this new tool, you can easily customize your experience to get the most out of your trading and analysis. With options like max lines, strength multiplier, pivot plots/text, and more, you can easily create the perfect trading analysis environment.
So why wait? Try it out today!
Leave feedback and let me know what you think.
// ############################################################################################## Input Descriptions
Pivot Left ----------------- look left n bars
Pivot Right ---------------- look right n bars
Strength ------------------- Pivot multiplier (Higher = Wider Trend lines)
Max Lines ------------------ Number of lines for each Uptrend and Downtrend
Structure Text ------------ Show HH, LL, etc. on chart
Structure Markers -------- Dots at the Pivot Highs and Lows
Plots ------------------------ Draw a line at Pivot Highs and Lows
Last Up Width ------------- Width of the current Uptrend line
Historical Up Width ------ Width of previous Uptrend lines
Last Down Width --------- Width of the current Downtrend lines
Historical Down Width --- Width of previous Downtrend lines
Line Offset ---------------- Shift trend lines right or left
* Lines may or may not "repaint". For use to identify trends that are more than likely already established and to identify trend line breaks.
Odd_Moving AveragesMulti Moving Average Analysis
A highly customizable indicator to help discover moving averages being used in the market.
📈 Chart up to 15 Moving Averages in the same indicator
⏳ Changeable time frame resolution
Ⅲ Available types - Simple, Weighted, Volume-weighted
≡ Custom and pre configured length sets
🪄 Automatic hiding of moving averages a set % away from last price
🌈 14 selectable color sets for plot lines
🗻 Selectable themed legend of values
-Removes hidden values
-Selectable density of data
⇄ Selectable chart data locations
Fixed Quantum CDVWe took the original script Cumulative delta volume from LonesomeTheBlue, here is the link:
To understand the CDV you can watch traders reality master class about CDV.
This indicator show the ratio of vector color and the ratio of the cumulative delta volume from vector color.
First you select a date range on the chart. Then it calculate all candles in that region. Let's say there is 3 green vectors and 3 red vectors in the region, the ratio of vector color will be 50% for bull and 50% for bear vector. As for the CDV ratio, it will measure the total CDV inside green vector and total CDV inside red vector and make a ratio. But it is a little different.
I twisted the calculation for the ratio of CDV a little bit to make it more comprehensive in the table. Since it's the ratio of the CDV for the bull candles versus the bear candles, the CDV is almost always a positive number for the bull candles and almost always a negative number for the bear candle. So I calculated the bear CDV as a positive number. Formula: Bull_CDV_ratio = Bull_CDV / (Bull_CDV + Bear_CDV), Bear_CDV_ratio = -Bear_CDV / (Bull_CDV - Bear_CDV).
Note that when the bull CDV and bear CDV are both a positive number or both a negative number, the ratio percentage can be over 100% and under 0%. It means that we expect volatility.
Enjoy!
Extended Recursive Bands StrategyThe original indicator was created by alexgrover .
All credit goes to alexgrover for creating the indicator that this strategy uses.
This strategy was posted because there were multiple requests for it, and no strategy based on this indicator exists yet.
The Recursive Bands Indicator, an indicator specially created to be extremely efficient, I think you already know that calculation time is extra important in algorithmic trading, and this is the principal motivation for the creation of the proposed indicator. Originally described in Alex's paper "Pierrefeu, Alex (2019): Recursive Bands - A New Indicator For Technical Analysis", the indicator framework has been widely used in his previous uploaded indicators, however it would have been a shame to not upload it, however user experience being a major concern for me, I decided to add extra options, which explain the term "extended".
The Indicator
The indicator displays one upper and one lower band, every common usages applied to bands indicators such as support/resistance , breakout, trailing stop, etc, can also be applied to this one. Length controls how reactive the bands are, higher values will make the bands cross the price less often.
In order to provide more flexibility for the user alexgrover added the option to use various methods for the calculation of the indicator, therefore the indicator can use the average true range , standard deviation, average high-low range, and one totally exclusive method specially designed for this indicator.
Added logic:
We have implemented a logic that checks whether the bands have been following in the same direction for a set amount of bars. This logic must be true before it can enter trades. This is completely new code that was written by us entirely, and it makes a huge difference on strategy performance.
Strategy Long conditions:
1 — Price low is below the the lower band.
2 — The lower band keeps increasing in value until the 'lookback' setting amount of bars is reached.
Strategy Short conditions:
1 — Price high is above the upper band.
2 — The upper band keeps decreasing in value until the 'lookback' setting amount of bars is reached.
Strategy Properties:
We have set a default commission of 0.06% because these are Bybit's fees. The strategy uses an order size of 10% of equity, since drawdown is very low like this. We also use a 10 tick slippage to keep results realistic and account for this. All other settings were left as default apart from initial capital, just to decrease the size of the numbers.
Waves CorrectionsWave theory tool for tracking waves relations and their corrections. It filters out a sets of formations and count how often correction from them are reaching characteristic correction levels marked on the chart as CL1, CL2, CL3.
It supports 2 rulesets/wave variants:
Low - Based on more sensitive trend detection.
Medium - Based on less sensitive trend detection.
Script settings:
| SCANNER |
Trend type - Trend used by scanner to detect sets of waves.
L - Low
M - Medium
<= W1/W2 * 100% <= - Tresholds describing proportions between 1 and 2 wave in the set.
<= W3/W1 * 100% <= - Tresholds describing proportions between 3 and 1 wave in the set.
<= W3/W2 * 100% <= - Tresholds describing proportions between 3 and 2 wave in the set.
Show potencial areas - Showing underway sets
Show Arrows - Showing arrows with possible correction on underway set.
Correction from trend UP - Background and border colors for found sets in up trends
Correction from trend Down - Bakcground and border colors for found sets in down trends.
History - Showing sets in historic data.
Stats - Type of statistic table shown on the screen:
H - Hide
% - Statistics with normal font
%s - Statistics with small font
Wn n= - Picking how many waves are taken into account when calculating statistics .
| TREND VISUALIZATION |
Type - Trend visualization types:
H - Hidden
L - Low
M - Medium
B - Both
Alfred - AI assistant that informs about wave confirmation or trend changes (With "Both" type Alfred will monit only Medium wave).
Shadow - Showing second reprezentation of the trend with drawing with the use of minimal and maximal values. It's usefull to determine the delay between the peak and a wave change signal.
Low/Med Line width/color - Width/color of drawn line. Separate setting for Low and Medium trend type.
| IMPULS VISUALIZATION |
Impuls - Drawing impuls modes:
H - Hidden
F - First
S - Second
A - Auto
Impuls color - Color of the first bullish arrow.
Draw arrow - Drawing arrow at the end of the first bullish arrow.
Troubleshooting:
In case of any problems, send error details to the author of the script.
Futures SignalThis is a Futures Signal Indictor works using support & resistance and market trend, it is designed for all type of markets (crypto, forex, stock etc.) and works on all commonly used timeframes (preferably on 5 Min, 15 Min Candles).
How it works Futures Signal Indictor :
Core logic behind this indicator is to finding the Support and Resistance , we find the Lower High (LH) and Higher Low (HL) to find the from where the price reversed (bounced back) and also we use a custom logic for figuring out the peak price in the last few candles. Based on the multiple previous Support and Resistance (HH, HL, LL LH) we calculate a price level, this price level is used a major a factor for entering the trade. Once we have the price level we check if the current price crosses that price level, if it crossed then we consider that as a long/short entry (based on whether it crosses resistance or support line that we calculated). Once we have pre long/short signals we further filter it based on the market trend to prevent too early/late signals. Along with this if we don't see a clear trend we do the filtering by checking how many support or resistance level the price has bounced off.
Stop Loss and Take Profit: We have also added printing SL and TP levels on the chart to make the it easier for everyone to find the SL/TP values. Script calculates the SL value by checking the previous support level for LONG trade and previous resistance level for SHORT trades. Take profit are calculated in 0.5 ratio as of now.
Extension %This is a tracking tool to measure two different kinds of distances:
- Gaps, from the open/close or the high/low value to the nearest open/close or high/low value.
- Price extensions of one or two candles from a preferred starting point (open, high, low or close) to a final point (open, high, low or close). The two-candles mode includes an optional rectangle to help you visualize the first and the last point of the measurement.
The script will plot a label with a percentage when the extension reaches the value you set. Unless you choose to track the one-candle price extension, the label will always be displayed on the high/low value of the second candle.
[TTI] Stage Analysis Alert IndexHISTORY AND CREDITS –––––––––––––––––––––––––––––––––––––––––––––––––––––––
The script is created based on lessons and interviews from Stan Weinstein. The Alert Index is being used by Stan and his team to gauge the general markets.
WHAT IT DOES– ––––––––––––––––––––––––––––––––––––––––––––––––––––––
This is an internal fundamental indicator that Stan and its team uses, that gauges the relationship between the 3 month T bill yield and the AAA bonds. The indicator uses the 3 colored system to determine favorable trading conditions in the market.
🟨 Yellow – OK conditions
🟩 Green – Great conditions
🟥 Red – Unfavorable conditions
Remember this is a fundamentals indicator and looks at the market from a much more macro picture.
HOW TO USE IT –––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
The indicator is to be used in order to determine the agressiveness of the position sizing in the market. Green conditions show very favorable market for long positions and yellow show ok conditions. However, during red condition the trader is advised not to be aggressively exposed in the market
Volume percentrank[TV1]Volume percentrank
Volume normalized by percentile.
The indicator calculates the percentile of the trading volume . The volume in the base asset or quote asset can be selected as data. To calculate the volume of a quoted asset, the closing price or another standard method for calculating the price of a bar can be used.
A feature of percentile calculation with a small data sample length is low accuracy. Despite the fact that the script allows you to calculate a percentile with a length of 1, using a percentile length less than 100 is not recommended.
The percentile calculation method does not allow correctly calculating the percentile at the beginning of the chart due to the lack of all data in the selection, therefore, when the date of the first bar changes (this happens on small timeframes if the TradingView subscription does not allow you to see all historical data), the indicator will be repainted up to the bar number equal to the percentile sample length.
Huge values of the percentile length may cause a script error. If the indicator doesn't work, just make the percentile length smaller.
Объем, нормализованный по процентилью.
Индикатор вычисляет процентиль объема торгов. В качестве данных может быть выбран объем в базовом(base) активе или котировочном(quote) активе. Для расчета объема в котировочном активе может использоваться цена закрытия либо другой стандартный метод расчета цены бара.
Особенностью расчета процентиля при малой длине выборки данных является малая точность. Не смотря на то, что скрипт позволяет вычиcлить процентиль с длинной 1, использовать длину процентиля меньше 100 не рекомендуется.
Метод расчета процентиля не позволяет корректно рассчитать процентиль в начале графика из-за отсутствия всех данных в выборке, поэтому при изменении даты первого бара (это происходит на малых таймфреймах, если подписка TradingView не позволяет видеть все исторические данные) индикатор подвержен перерисовке вплоть до номера бара равного длине выборки процентиля.
Большие значения длины процентиля могут приводить к ошибке скрипта. Если индикатор не работает, просто сделайте длину процентиля меньше.
[TTI] Stage Analysis Momentum Index––––History & Credit
The credit to this indicator goes to Stan Weinstein, the father of Stage Analysis. By studying his books and methods he has disclosed the exact way of calculating the Momentum Index that is being used by him and his team in order to gauge the market.
–––––What it does
The indicator falls into the category of technical indicators used by Stan. It calculates an simple moving average based on the difference between the Advancing and Declining issues on various markets.
The settings of the indicator allow to adjust the length of the moving average as well to choose 1 of the 3 markets for which it has been scripted to work: NYSE, NASDAQ or Total US Stocks.
–––––How to use it
The indicator ought to be used on the daily chart
The most important thing to look for is if the indicator is if it is above zero and below zero. A below zero Momentum index is an outright bearish signal and traders should consider stepping out of the market or initiate short positions.
The other things that ought to be considered are the depth and length of the prior to a violating action. In a nutshell the longer, stronger the above zero action the more powerful a below zero cross will be.
Relative Bi-Directional Volatility RangeThe basic math behind this Indicator is very similar to the math behind the Relative Strength Index without using a standard deviation as used for the Relative Volatility Index. The Volatility Range is calculated by utilizing the highs and lows. However not in the same way as in the Relative Volatility Index. This approach leads to different values, but the overall result clearly reveals the intrinsic Volatility of the chart, so the user can be aware, when something fundamentally is going on behind the scenes. If the Volatility rises on positive and negative range (-100 to 100) it implies that something fundamental is changing.
An advantage of using this kind of calculation is the possibility of separating the data into positive (buy pressure) and negative (sell pressure) components. The bi-directional character shows a slightly overhang in one of the directions, which can be used to detect a trend. A Moving Average of the users choice shell smoothen the overhang of the Relative Bi-Directional Volatility and show a trend direction. Similar to the math of the Relative Strength Index as standard a Relative Moving Average is preferred. If the Moving Average is in the positive range (0 to 100) it indicates a bullish trend, else if the Moving Average is in the negative range (0 to -100) it indicates a bearish trend. External Indicators can use a provided Trend Shift Signal which switches from 0 to 1, if the trend becomes bullish or from 0 to -1, if the trend becomes bearish.
The user should know, that in this Indicator the starting point of the Moving Averages always begins at the first bar, because the starting progress is approximated appropriately. Most Moving Averages require a minimum number of bars to be calculated, which is chosen with the Moving Average Length. In this cases the length used will be automatically reduced in the background until the number of bars is sufficient to match the chosen length. So if data history is very short, the Indicator can be used never the less as good as possible.
It is feasible to switch the Indicator on a higher timeframe, while staying in a lower timeframe on the chart. This can be useful for making the indication cleaner, if the Moving Average is to choppy and shows too many false signals. On the other hand the benefit of a higher timeframe (or a higher Moving Average Length) is paid with higher latency of the signaling. So the user has to decide what the best setting in his case is.
This Indicator can be used with all kinds of charts. Even charts with percentage or negative values should work fine.
RF+ Replay for Heikin AshiRF+ Replay for Heikin Ashi
RF+ Replay for Heikin Ashi generates fully customisable Heikin Ashi candlesticks presented on a standard chart, enabling traders to utilise the Tradingview Replay feature with Heikin Ashi candlesticks when analysing and backtesting HA style strategies.
The features of this indicator include:
- Fully customisable Heikin Ashi Candles, including custom colour options for candle bodies, borders and wicks.
- Optional real-time, real-price close dots painted onto each candlestick.
- A optional set of 2 x Range Filters designed to indicate short term trend identification upon color change, ideal for low timeframe scalping.
- A optional set of 3 x fully customisable Moving Averages.
- An option to enable Heikin Ashi calculated data for the Range Filters and Moving Averages, so they present as they would on a Heikin Ashi non-standard chart type, without having to use an actual Heikin Ashi chart. Enabled by default.
- An optional sessions indicator, to highlight your prefered trading session for the purpose of backtesting.
- An optional watermark featuring customisable text and well as symbol and timeframe information, as seen in the screenshot of this indicator.
Instructions for use:
1) Because this indicator generates candlesticks and presents them onto your chart, you will need to hide the existing candlesticks so you do not see two sets of candles. You can do this by going into your Tradingview chart settings and making the candle bodies, borders and wicks fully transparent. You can then save this as a layout template. You can access your Chart Settings by clicking on the cog icon, or by right clicking on the chart itself and selecting 'Chart Settings' from the list.
2) Ensure you have the standard chart type selected - you do not need to select a Heikin Ashi type chart.
3) You will now be able to analyise and even backtest your Heikin Ashi style strategies including the use of the Tradingview Replay feature found at the top of the chart.
Heikin Ashi means 'average bar' in Japanese, which speaks to the fact that Heikin Ashi candles are calculated differently to standard Japanese candlesticks. The general idea of Heikin Ashi candles is to 'smooth' the appearance of price movement, by the use of averages within their calculation. It is important to understand that the Open and Close values of a Heikin Ashi candlestick do not reflect real Open and Close prices. You can use the real price dots feature to clearly see the real time and real price Close of each candle.
The formula for calculating a Heikin Ashi candlestick is as follows:
High = Maximum of High, Open, or Close (whichever is highest)
Low = Minimum of Low, Open, or Close (whichever is lowest)
Open = Open (previous bar) + Close (previous bar) /2
Close = (Open + High + Low + Close) / 4
If you found this useful, be sure to leave a like, comment and subscribe to show your support.
Until next time.
Financial MetricsGives a sneak peak into some of the important financial ratios described below:
1. P/E : price to earnings ratio (Green when P/E<15)
2. PEG: Price to earnings growth ratio (Green when PEG<1)
3. P/S: Price to sales ratio (Green when P/S<2)
4. EV/FCF: Enterprise Value to Free Cashflow ratio
5. OPM: Operating Profit Margin % (Green when OPM>15%)
6. D/E: Debt to equity ratio (Green when D/E<1)
7. ROE: Return on equity % (Green when ROE>15%)
8. Div_Yield: Dividend yield
Disclaimer: All the limits defined are based on the widely accepted general values, but are subjective to particular sector or group of stocks. For example IT stocks command higher valuation than cyclical stocks like metal. So Compare with other stocks of the same sector to reach any conclusion.
Candlestick Pattern Criteria and Analysis Indicator█ OVERVIEW
Define, then locate the presence of a candle that fits a specific criteria. Run a basic calculation on what happens after such a candle occurs.
Here, I’m not giving you an edge, but I’m giving you a clear way to find one.
IMPORTANT NOTE: PLEASE READ:
THE INDICATOR WILL ALWAYS INITIALLY LOAD WITH A RUNTIME ERROR. WHEN INITIALLY LOADED THERE NO CRITERIA SELECTED.
If you do not select a criteria or run a search for a criteria that doesn’t exist, you will get a runtime error. If you want to force the chart to load anyway, enable the debug panel at the bottom of the settings menu.
Who this is for:
- People who want to engage in TradingView for tedious and challenging data analysis related to candlestick measurement and occurrence rate and signal bar relationships with subsequent bars. People who don’t know but want to figure out what a strong bullish bar or a strong bearish bar is.
Who this is not for:
- People who want to be told by an indicator what is good or bad or buy or sell. Also, not for people that don’t have any clear idea on what they think is a strong bullish bar or a strong bearish bar and aren’t willing to put in the work.
Recommendation: Use on the candle resolution that accurately reflects your typical holding period. If you typically hold a trade for 3 weeks, use 3W candles. If you hold a trade for 3 minutes, use 3m candles.
Tldr; Read the tool tips and everything above this line. Let me know any issues that arise or questions you have.
█ CONCEPTS
Many trading styles indicate that a certain candle construct implies a bearish or bullish future for price. That said, it is also common to add to that idea that the context matters. Of course, this is how you end up with all manner of candlestick patterns accounting for thousands of pages of literature. No matter the context though, we can distill a discretionary trader's decision to take a trade based on one very basic premise: “A trader decides to take a trade on the basis of the rightmost candle's construction and what he/she believes that candle construct implies about the future price.” This indicator vets that trader’s theory in the most basic way possible. It finds the instances of any candle construction and takes a look at what happens on the next bar. This current bar is our “Signal Bar.”
█ GUIDE
I said that we vet the theory in the most basic way possible. But, in truth, this indicator is very complex as a result of there being thousands of ways to define a ‘strong’ candle. And you get to define things on a very granular level with this indicator.
Features:
1. Candle Highlighting
When the user’s criteria is met, the candle is highlighted on the chart.
The following candle is highlighted based on whether it breaks out, breaks down, or is an inside bar.
2. User-Defined Criteria
Criteria that you define include:
Candle Type: Bull bars, Bear bars, or both
Candle Attributes
Average Size based on Standard Deviation or Average of all potential bars in price history
Search within a specific price range
Search within a specific time range
Clarify time range using defined sessions and with or without weekends
3. Strike Lines on Candle
Often you want to know how price reacts when it gets back to a certain candle. Also it might be true that candle types cluster in a price region. This can be identified visually by adding lines that extend right on candles that fit the criteria.
4. User-Defined Context
Labeled “Alternative Criteria,” this facet of the script allows the user to take the context provided from another indicator and import it into the indicator to use as a overriding criteria. To account for the fact that the external indicator must be imported as a float value, true (criteria of external indicator is met) must be imported as 1 and false (criteria of external indicator is not met) as 0. Basically a binary Boolean. This can be used to create context, such as in the case of a traditional fractal, or can be used to pair with other signals.
If you know how to code in Pinescript, you can save a copy and simply add your own code to the section indicated in the code and set your bull and bear variables accordingly and the code should compile just fine with no further editing needed.
Included with the script to maximize out-of-the-box functionality, there is preloaded as alternative criteria a code snippet. The criteria is met on the bull side when the current candle close breaks out above the prior candle high. The bear criteria is met when the close breaks below the prior candle. When Alternate Criteria is run by itself, this is the only criteria set and bars are highlighted when it is true. You can qualify these candles by adding additional attributes that you think would fit well.
Using Alternative Criteria, you are essentially setting a filter for the rest of the criteria.
5. Extensive Read Out in the Data Window (right side bar pop out window).
As you can see in the thumbnail, there is pasted a copy of the Data Window Dialogue. I am doubtful I can get the thumbnail to load up perfectly aligned. Its hard to get all these data points in here. It may be better suited for a table at this point. Let me know what you think.
The primary, but not exclusive, purpose of what is in the Data Window is to talk about how often your criteria happens and what happens on the next bar. There are a lot of pieces to this.
Red = Values pertaining to the size of the current bar only
Blue = Values pertaining or related to the total number of signals
Green = Values pertaining to the signal bars themselves, including their measurements
Purple = Values pertaining to bullish bars that happen after the signal bar
Fuchsia = Values pertaining to bearish bars that happen after the signal bar
Lime = Last four rows which are your percentage occurrence vs total signals percentages
The best way I can explain how to understand parts you don’t understand otherwise in the data window is search the title of the row in the code using ‘ctrl+f’ and look at it and see if it makes more sense.
█ [b}Available Candle Attributes
Candle attributes can be used in any combination. They include:
[*}Bodies
[*}High/Low Range
[*}Upper Wick
[*}Lower Wick
[*}Average Size
[*}Alternative Criteria
Criteria will evaluate each attribute independently. If none is set for a particular attribute it is bypassed.
Criteria Quantity can be in Ticks, Points, or Percentage. For percentage keep in mind if using anything involving the candle range will not work well with percentage.
Criteria Operators are “Greater Than,” “Less Than,” and “Threshold.” Threshold means within a range of two numbers.
█ Problems with this methodology and opportunities for future development:
#1 This kind of work is hard.
If you know what you’re doing you might be able to find success changing out the inputs for loops and logging results in arrays or matrices, but to manually go through and test various criteria is a lot of work. However, it is rewarding. At the time of publication in early Oct 2022, you will quickly find that you get MUCH more follow through on bear bars than bull bars. That should be obvious because we’re in the middle of a bear market, but you can still work with the parameters and contextual inputs to determine what maximizes your probability. I’ve found configurations that yield 70% probability across the full series of bars. That’s an edge. That means that 70% of the time, when this criteria is met, the next bar puts you in profit.
#2 The script is VERY heavy.
Takes an eternity to load. But, give it a break, it’s doing a heck of a lot! There is 10 unique arrays in here and a loop that is a bit heavy but gives us the debug window.
#3 If you don’t have a clear idea its hard to know where to start.
There are a lot of levers to pull on in this script. Knowing which ones are useful and meaningful is very challenging. Combine that with long load times… its not great.
#4 Your brain is the only thing that can optimize your results because the criteria come from your mind.
Machine learning would be much more useful here, but for now, you are the machine. Learn.
#5 You can’t save your settings.
So, when you find a good combo, you’ll have to write it down elsewhere for future reference. It would be nice if we could save templates on custom indicators like we can on some of the built in drawing tools, but I’ve had no success in that. So, I recommend screenshotting your settings and saving them in Notion.so or some other solid record keeping database. Then you can go back and retrieve those settings.
#6 no way to export these results into conditions that can be copy/pasted into another script.
Copy/Paste of labels or tables would be the best feature ever at this point. Because you could take the criteria and put it in a label, copy it and drop it into another strategy script or something. But… men can dream.
█ Opportunities to PineCoders Learn:
1. In this script I’m importing libraries, showing some of my libraries functionality. Hopefully that gives you some ideas on how to use them too.
The price displacement library (which I love!)
Creative and conventional ways of using debug()
how to display arrays and matrices on charts
I didn’t call in the library that holds the backtesting function. But, also demonstrating, you can always pull the library up and just copy/paste the function out of there and into your script. That’s fine to do a lot of the time.
2. I am using REALLY complicated logic in this script (at least for me). I included extensive descriptions of this ? : logic in the text of the script. I also did my best to bracket () my logic groups to demonstrate how they fit together, both for you and my future self.
3. The breakout, built-in, “alternative criteria” is actually a small bit of genius built in there if you want to take the time to understand that block of code and think about some of the larger implications of the method deployed.
As always, a big thank you to TradingView and the Pinescript community, the Pinescript pros who have mentored me, and all of you who I am privileged to help in their Pinescripting journey.
"Those who stay will become champions" - Bo Schembechler
Volume Price and FundamentalsVolume Price and Fundamentals indicators contains 4 exponential moving averages based upon Fibonnaci numbers as period (8, 21, 55 & 144) with crossovers and crossunders.
It also contain a table for volume and 50 Day Avg. Volume, Relative volume, Change in Volume, Volume Value, Up-Down Closing Basis days in last 50 days, Volume ratio (U/D Ratio) on last 50-day Up / Down days and along with fundamental analysis table with various Fundamental Analysis parameters and QoQ & YoY comparison basis for better investment decision making.
Bull/Bear Candle % Oscillator█ OVERVIEW
This script determines the proportion of bullish and bearish candles in a given sample size. It will produce an oscillator that fluctuates between 100 and -100, where values > 0 indicate more bullish candles in the sample and values < 0 indicate more bearish candles in the sample. Data produced by this oscillator is normalized around the 50% value, meaning that an even 50/50 split between bullish and bearish candles makes this oscillator produce 0; this oscillator indirectly represents the percent proportion of bullish and bearish candles in the sample (see HOW TO USE/INTERPRETATION OF DATA ).
It has two overarching settings: 'classic' and 'range'.
█ CONCEPTS
This script will cover concepts related to candlestick analysis, volumetric analysis, and lower timeframes.
Candlestick Analysis - The idea behind this script is to solely look at the candlesticks themselves and derive information from them in a given sample. It separates candles into two categories, bullish (close > open) and bearish (close < open).
If the indicator's setting is set to 'classic', the size of candles do not matter and all are assigned a value of 1 or 0.
If the indicator's setting is set to 'range', specific candle ranges modify the proportion of bullish/bearish values. Bullish candle values include all bullish candles in the set from their lows to the close, plus the lower wicks of all bearish candles. Bearish candle values include all bearish candles in the set from their highs to the close, plus the upper wicks of all bullish candles.
Volumetric Analysis - One of this script's features allows the user to modify the bullish and bearish candle proportions by its 'weight' determined by its volume compared to the sample set's total volume. Volumetric analysis for the 'range' setting are more complex than 'classic' as described below.
Lower Timeframes - For volumetric analysis to be done on candle wicks, there needed to be a way to determine how much volume had occurred in the wick by itself to find the weight of upper and lower wicks. To accomplish this, I employed PineScrypt's request.security_lower_tf function to grab OHLC values of lower timeframe candles (as well as volume) to determine how much volume had occurred in the wicks of the chart resolution's candle. The default OHLC values used here are the lows for upper wicks and highs for lower wicks. These OHLC values are then compared to the chart resolution candle's close to determine if the volume of that lower timeframe candle should be shifted to the wick weight or stay in the current weight of that candle. The reason 'low' and 'high' are used here is to guarantee that 100% of the volume of a lower timeframe candle had occurred in the wick of the candle at the current resolution (see LIMITATIONS ).
Bullish candles will exclude volume of all lower timeframe candles whose lows were greater than that candle's close. Bearish candles will exclude volume of all lower timeframe candles whose highs were less than that candle's close. These wick volumes are then divided by the volume of the sample set, and wick sizes are then multiplied by this weight before being added to their specific bullish/bearish sums (lower wicks to bullish and upper wicks to bearish).
█ FEATURES
There are 13 inputs for the user to modify the behavior/visual representation of this script.
Sample Length - This determines how many candles are in the sample set to find the proportion of bullish and bearish candles.
Colors and Invert Colors - There are three colors set by the user: a bullish color, neutral color, and bearish color. The oscillator plots two lines, one at 0 and another that represents the proportion of bullish or bearish candles in the sample set (we'll call this the 'signal line'). If the oscillator is above 0, bullish color is used, bearish otherwise. This script generates a gradient to color a filled area between the 0 line and the signal line based on the historical values of the oscillator itself and the signal line. For bullish values, the closer the signal line is to the max (or restricted max described below) that the oscillator has experienced, the more colored toward bullish color the shaded area will be, using the neutral color as a starting point. The same is applied to the bearish values using the bearish color.
There is an additional input to invert the colors so that the bearish color is associated with bullish values and vise-versa.
Calculation Type - This determines the overarching behavior of the oscillator and has two settings:
Classic - The weight of candles are either 1 if they occurred and 0 if not.
Range - The weight of candles is determined by the size of specific sections as described in CONCEPTS - Candlestick Analysis .
Volume Weighted - This enables modifying the weights of candles as described in CONCEPTS - Volumetric Analysis and Lower Timeframes based on which Calculation Type is used.
Wick Slice Resolution - This is the lower timeframe resolution that will be used to slice the chart resolution's candle when determining the volumetric weight of wicks. Lower timeframe resolutions like '1 minute' will yield more precise results as they will give more data points to go off of (see LIMITATIONS ).
Upper/Lower Wick Source - These two inputs allow the user to select which OHLC values to compare against the chart resolution's candle close when determining which lower timeframe candles will have their volumes associated with the wicks of candles being analyzed at the chart's resolution.
Restrict Min/Max Data and Restriction - This will restrict the maximum and minimum values that will be used for the signal line when comparing its value to previous oscillator values and change how the color gradient is generated for the indicator. Restriction is the number of candles back that will determine these maximum and minimum values.
Display Min/Max Guide - This will plot two lines that are colored the corresponding bullish and bearish colors which follow what the maximum and minimum values are currently for the oscillator.
█ HOW TO USE/INTERPRETATION OF DATA
As mentioned in the OVERVIEW section, this oscillator provides an indirect representation of the percent proportion of bullish or bearish candles in a given sample. If the oscillator reads 80, this does not mean that 80% of all candles in the sample were bullish . To find the percentage of candles that were bullish or bearish, the user needs to perform the following:
50% + ((|oscillator value| / 100) * 50)%
If the oscillator value is negative, the value from above will represent the percentage of bearish candles in the sample. If it is positive, this value represents the percentage of bullish candles in the sample.
Example 1 (oscillator value = 80):
50% + ((|80| / 100) * 50)%
50% + ((0.80) * 50)%
50% + 40% = 90%
90% of the candles in the sample were bullish.
Example 2 (oscillator value = -43):
50% + ((|-43| / 100) * 50)%
50% + ((0.43) * 50)%
50% + 21.5% = 71.5%
71.5% of the candles in the sample were bearish.
An example use of this indicator would be to put in a 'buy' order when its value shows a significant proportion of the sampled candles were bearish, and put in a 'sell' order when a significant proportion of candles were bullish. Potential divergences of this oscillator may also be used to plan trades accordingly such as bearish divergence - price continues higher as the oscillator decreases in value and vise-versa.*
* Nothing in this script constitutes any form of financial advice. The user is solely responsible for their trading decisions and I will not be held liable for any losses or gains incurred with the use of this script. Please proceed with caution when using this script to assist with trading decisions.
█ LIMITATIONS
Range Volumetric Weights :
Because of the conditions that must be met in order for volume to be considered part of wicks, it is possible that the default settings and their intended reasoning will not produce reliable results. If all lower timeframe candles have highs or lows that are within the body of the candle at the chart's resolution, the volume for the wicks will effectively be 0, which is not an accurate representation of those wicks. This is one of the reasons why I included the ability to change the source values used for these conditions as certain OHLC values may produce more reliable/intended results under these conditions.
Wick Slice Resolution :
PineScript restricts the number of intrabar references to 100,000 total. This script uses 3 separate request.security_lower_tf calls and has a default resolution of 1 minute. This means that if the user were to set the oscillator to the Range setting, enable volume weighted, and had the Wick Slice Resolution set to 1 minute, this script will exceed this 100,000 reference restriction within 24 days of data and will not produce any results beyond the previous 23.14 days.
Below are example uses of all the different settings of this script, these are done on the 1D chart of COINBASE:BTCUSD :
Default Settings:
Classic - Volume Weighted:
Range - no Volume Weight:
Range - Volume Weighted (1 min slices):
Range - Volume Weighted (1 hour slices):
Display Min/Max Guide - No Restriction:
Display Min/Max Guide - Restriction:
Invert Colors:
Multi-timeframe Squeeze Mom + ADX and DIsMulti-timeframe Squeeze and ADX
This indicator is designed to be able to get used in combination with others that can lead to a potential help for trading.
The indicator uses colors such us light green, dark green, light red and dark red. Light green and light red to indicate the second half and strongest movement of an upwards and downwards movement, respectively. The same for the first half of an upwards or downwards movement, dark red for the possible start of the upwards movement and dark green ad possible start of the downwards movement.
The indicator is multi-timeframe because the trader can configure within the menu a background timeframe, which plots a squeeze momentum for a different timeframe than the one selected for the main graph. It plots the background timeframe with an area style, while the main squeeze is plotted with a column style. This helps the traders to analyze whether entering a position countering a higher timeframe upwards or downwards squeeze momentum.
It also shows the divergences that occur between the price and the squeeze momentum that can add strength to a potential movement upwards or downwards.
The ADX, DI+ and DI- lines are also added to determine the potential strength of the movement in the monitor (squeeze momentum). If the DI+ is over the DI-, then the strength is likely higher upwards and the opposite for the downwards strength.
Fundamentals
Squeeze momentum: It shows the periods when volatility increases or decreases, in other words, when the market goes from the trend into flat movement and vice versa.
ADX (Average Directional Index): The ADX helps the indicator to estimate the strength of the movement, always considering the DI+ and DI- to not go against the trend strength.
Positive (DI+) and Negative DI (DI-): Both DI+ and DI- measure up and down price movement, in some cases crossovers of these lines can be used as trade signals.
Divergences: Divergence occur when the price of an asset is moving in the opposite direction of a technical indicator, such as an oscillator (squeeze momentum). Divergence warns that the current price trend may be weakening, and in some cases may lead to the price changing direction.
Panel
This panel allows the trader to have a summary of the values of the direction and strength of the movement. It has the following characteristics:
It is placed on the right middle side of the chart indicator by the default.
Its colors changes according to the indicator’s values.
The summary box shows the projection for the main squeeze plot and also for the background squeeze plot. If only one is needed, it can be changed on the menu of the indicator.
Summary
From all previously mentioned, it can be stated that the indicator allows users to:
Detect the direction of trends
Detect price and squeeze divergences
Get a table summarizing important values of the indicator to determine the strength of a trend.
Futures Full FS ScreenerFull FS Screener
This indicator allows traders to have a view of multiple pairs and timeframes buy/sell signals and specific information of parameters, based on the Futures FS Indicator also developed by me.
Futures FS Indicator Fundamentals
1. Exponential Moving Average (EMAs): The base indicator is composed of moving averages of 5, 10, 11, 13, 36 and 55 exponential periods.
2. Squeeze Momentum: This indicator allows the signals to go with the trend and not against it.
3. VPVR (Volume Profile Visible Range): It allows to determine the Point of Control (POC) which is the node with the highest volume profile. This can be used as an important retest point or to calculate potential support and resistance.
4. ADX (Average Directional Index): The ADX helps the indicator to estimate the strength of the movement, always considering the DI+ and DI- to not go against the trend.
5. RSI (Relative Strength Index): The RSI helps measuring the speed and magnitude of the recent price changes to evaluate overvalued or undervalued conditions in the price of that security. The indicator considers RSI 5, 13 and 50 as bottom and top, respectively.
6. MACD (Moving average convergence divergence): The MACD is a trend-following momentum indicator that shows the relationship between moving averages. The indicator uses moving averages of 5, 8 and 21).
7. The trend is determined according to these parameters and their different values, which might indicate that we are in a bullish or bearish trend. The trend has a max positive (bullish) value of 6 and a max negative (bearish) value of -6.
Full Screener Panel
This panel allows the trader to monitor multiple pairs at a single screen, giving an immediate vision of possible entries and exits (Long/Short/Strong Long/Strong Short Signals). Moreover, allows traders to have handy all information of the Future FS Indicator that might be analyzed further for each pair. It has the following characteristics:
• It can be placed anywhere on the screen through the main menu of the indicator.
• It can be combined with the same indicator multiple times, as per screener is limited to show 40 pairs, you can select the number of panels being added to adjust position one next to each other.
• It strengthens colors when a pair has changed its signals in order to the trader to know immediate changes and then do the follow up
• The screener shows the pairs, which can be changed within the menus.
• The screener shows the Long, Short, Strong Long and Strong Short Signals in its las column but previously, it shows the parameters that determined the possible position. Therefore, the EMAs, SQZ, ADX, VPVR, RSI and MACD calculated internally, are also summarized in the screener.
For analyzing a specific pair, refer to the TwV Futures Indicator – FS, which is other indicator that might be on my TradingView Profile and that was used as base for the screener.
Blockchain Fundamentals: 200 Week MA Heatmap [CR]Blockchain Fundamentals: 200 Week MA Heatmap
This is released as a thank you to all my followers who pushed me over the 600 follower mark on twitter. Thanks to all you Kingz and Queenz out there who made it happen. <3
Indicator Overview
In each of its major market cycles, Bitcoin's price historically bottoms out around the 200 week moving average.
This indicator uses a color heatmap based on the % increases of that 200 week moving average. Depending on the rolling cumulative 4 week percent delta of the 200 week moving average, a color is assigned to the price chart. This method clearly highlights the market cycles of bitcoin and can be extremely helpful to use in your forecasts.
How It Can Be Used
The long term Bitcoin investor can monitor the monthly color changes. Historically, when we see orange and red dots assigned to the price chart, this has been a good time to sell Bitcoin as the market overheats. Periods where the price dots are purple and close to the 200 week MA have historically been good times to buy.
Bitcoin Price Prediction Using This Tool
If you are looking to predict the price of Bitcoin or forecast where it may go in the future, the 200WMA heatmap can be a useful tool as it shows on a historical basis whether the current price is overextending (red dots) and may need to cool down. It can also show when Bitcoin price may be good value on a historical basis. This can be when the dots on the chart are purple or blue.
Over more than ten years, $BTC has spent very little time below the 200 week moving average which is also worth noting when thinking about price predictions for Bitcoin or a Bitcoin price forecast.
Notes
1.) If you do not want to view the legend do the following: Indicator options > Style tab > Uncheck "Tables"
2.) I use my custom function to get around the limited historical data for bitcoin. You can check out the explanation of it here:
Intraday Background Time RangesThis simple script was written for studying recurring intraday behaviours of financial instruments. With it, you can highlight up to 13 customizable time ranges on your chart, filling the corresponding background space with colors you prefer. You can then write a note for each range and it will be shown in the optional related table.
The experience shows that every financial instrument has its own personality. With this in mind, the script can be useful to study intraday charts with the purpose of discovering recurring behaviours of specific instruments over a certain time range and under specific circumstances (normal days, earnings days, days with catalysts, etc.) This can help the trader to deeply understand the instrument personality, and therefore also to decide whether to enter or exit the market if its behaviour meets or not his expectations.
Please note that this script only works on minute/hourly charts.
Correlation with Matrix TableCorrelation coefficient is a measure of the strength of the relationship between two values. It can be useful for market analysis, cryptocurrencies, forex and much more.
Since it "describes the degree to which two series tend to deviate from their moving average values" (1), first of all you have to set the length of these moving averages. You can also retrieve the values from another timeframe, and choose whether or not to ignore the gaps.
After selecting the reference ticker, which is not dependent from the chart you are on, you can choose up to eight other tickers to relate to it. The provided matrix table will then give you a deeper insight through all of the correlations between the chosen symbols.
Correlation values are scored on a scale from 1 to -1
A value of 1 means the correlation between the values is perfect.
A value of 0 means that there is no correlation at all.
A value of -1 indicates that the correlation is perfectly opposite.
For a better view at a glance, eight level colors are available and it is possible to modify them at will. You can even change level ranges by setting their threshold values. The background color of the matrix's cells will change accordingly to all of these choices.
The default threshold values, commonly used in statistics, are as follows:
None to weak correlation: 0 - 0.3
Weak to moderate correlation: 0.3 - 0.5
Moderate to high correlation: 0.5 - 0.7
High to perfect correlation: 0.7 - 1
Remember to be careful about spurious correlations, which are strong correlations without a real causal relationship.
(1) www.tradingview.com
VIX - SKEW DivergenceThe CBOE VIX is a well-known index representing market expectations for volatility over the next 30 days.
The CBOE SKEW is an index reflecting the perceived tail risk over the next 30 days.
When the SKEW rises over a certain level (~140/150), that means investors are hedging their exposure with options, because they are worried about an incoming market crash or a "black swan". If that happens when the VIX is very low and apparently there is no uncertainty, this can warn of a sudden change in direction of the market. You will see for yourself that an increasing divergence often anticipates a sharp fall of leading stock indexes, usually within two to four months.
This is probably not very relevant for the short-term trader but mid/long-term traders and market analysts may find it useful to clearly visualize the extent of the distance between the VIX and the SKEW. For that reason, I wrote this highly customizable script with which you can plot the two indexes and fill the space within them with a color gradient to highlight the maximum and minimum divergence. Additionally, you can fill the beneath VIX area with four different colors. It is also possible to plot the divergence value itself, so if you want you can draw trendlines and support/resistance levels on it.
Please note that the divergence per se doesn't predict anything and it's meant to be used synergistically with other technical analysis tools.
More informations here:
www.cboe.com
www.cboe.com