Support and Resistance: Triangles [YinYangAlgorithms]Overview:
Triangles have always been known to be the strongest shape. Well, why wouldn’t that likewise apply to trading? This Indicator will create Upwards and Downwards Triangles which in turn create Support and Resistance locations. For example, we find 2 highs that meet the criteria (within deviation %, Minimum Distance and Lookback Distance). We calculate the distance between these two and create an Equilateral Triangle Downwards (You can adjust the % if you want more of an Isosceles Triangle). The midpoint (tip) of this triangle is the Support and the bottom (base) of it is the Resistance. The exact opposite applies for an Upwards Triangle.
The reason why Triangles may make for good Support and Resistance locations is the % 's used, much like the fibonacci, use ratios relevant in nature and everywhere in the world around us, so why not for trading too?
Tutorial:
If you look at the locations we’ve circled above, all of them exhibit strong rejections are predictive Support and Resistance locations plotted by the triangles created. There can only ever be 1 Upward and 1 Downward Triangle at a time, so when a new one is created, the Support and Resistance locations are moved.
If you scroll back far enough you’ll notice the Triangles disappear but their Support and Resistance locations are still plotted. This has to do with the fact you are allowed only so many Lines plotted and when a new Triangle is created, an old one will be removed. The Support and Resistance locations however will stay.
If we look at the example above, you can see the Support and Resistance locations the Triangles made here may have helped predict where the price would struggle to surpass.
By default the Look Back Distance is set to 50 and the Min Distance is 10 (settings used in all previous examples). However, you can modify these to make Triangles more ‘Rare’ and therefore the Support and Resistance locations change less. In the example above for Instance we left Look Back Distance to 50 but changed Min Distance from 10 to 25. This results in Support and Resistance locations that may hold better in the long term.
If we scroll back a bit, we can see the settings ‘Look Back Distance’ 50 and ‘Minimum Distance’ 25 had done a decent job at predicting the ATH resistance and many Support and Resistance locations around it. Keep in mind, previous results don’t mean future results, but Triangles may create ratios which apply well to trading.
We will conclude our Tutorial here. Hopefully you can see the benefit to the ratio Triangles make when predicting Support and Resistance locations.
Settings:
Show Triangles: If all you want to know is the Support and Resistance locations, there’s no need to draw the Triangles.
Triangle Zones: What types of triangles should we create our zones for? Options are Upward, Downward, Both, None.
Max Deviation Allowed: Maximum Deviation up or down from the last bars High/Low for potential to create a Triangle.
Lookback Distance: How far back we look to see for potential of a High/Low within Deviation range.
Min Distance: This is so triangles are spaced properly and not from 2 bars beside each other. Min distance allocated between 2 points to create a Triangle.
Bar Percent Increase: How much % multiplier do we apply for each bar spacing of the triangle. 0.005 creates a close to Equilateral Triangle, but other values like 0.004 and 0.006 seem to work well too.
If you have any questions, comments, ideas or concerns please don't hesitate to contact us.
HAPPY TRADING!
Algorithms
YinYang MomentumOverview:
YinYang Momentum is a Price, Volume and Momentum Oscillator. Its job is to help you see swings in momentum and the strength of it. It also creates signals (Blood Diamond (Bear) and Support Cross (Bull)) where these momentum swings may occur. YinYang Momentum features 3 Price and 3 Volume 'Mountains with Ice'. There are Predictive, Regular and Confirming Mountains. You have the ability to overlay them on top of each other which helps to decipher momentum swings. The Volume Mountains are very important for showing the strength behind the Price Mountains and their Signals. If you look, you'll notice, as the 'Ice' starts to curve into the 'Mountains' it signals a potential shift in Momentum. The green Mountain is the Predictive, the Blue is the Regular and the Purple is the Confirming. You'll also notice that the Predictive Mountains movements happen first and move much more drastically. When you notice the regular starts to follow suit, there is a potential for a momentum shift. Shortly after, a signal will occur if this shift is actually happening. You can also check the Confirming Mountain for more confirmation (however, leaving the Confirming Mountain active can be a little confusing and make it harder to read signals). YinYang Momentum also features Information Tables. These tables display how the Blood Diamonds and Support Cross' are fairing on different Timeframes. This way, you'll be able to see if it's in a Bullish or Bearish state on critical Time Frames no matter what Timeframe you're trading on.
Before we move onto the tutorial, let's discuss what each of these Mountains and Ice are and how they work. All of our Mountains and Ice are calculated using the same algorithm but with varying sources, lengths and multipliers. We are essentially calculating differences in movement and then sending those differences into an EMA for the Mountain Base and SMA for the mountain Ice. The values we use for the Predictive are much lower and therefore occur much quicker as they aren’t averaged out on longer lengths/time frames; this helps to make it more of a leading Indicator which may predict momentum changes. Our Regular is over a medium length and multipliers that result in a smooth but generally also gradual movement that helps reliability; this helps it act as more of an ‘in the now’ Indication of momentum changes. Our Confirming uses lengths and multipliers that are of a higher value and longer span; this makes it more difficult to use for determining entry / exit locations as it's more of a lagging indicator, but it helps to add confirmation as to whether the momentum change has occurred and wasn't a false signal.
Tutorial:
YinYang Momentum may look like a lot is going on.. And well that’s cause there is.. But that doesn’t mean it's confusing or hard to read once you know what you’re looking for!
To make this tutorial a little easier to understand, let's turn off a few settings and dissect this indicator one thing at a time. YinYang Momentum features Price and Volume mountains. Currently in the photo above we have 2 Price Mountains and 1 Volume Mountain turned on (this is how it's set by default and how we recommend using it), however there are 3 Mountains available for both Price and Volume:
Predictive
Regular
Confirming
We are going to deactivate everything so it's the Regular Price Mountain + Ice enabled.
Now that it is just the Regular Price Mountain and Ice it is much easier to teach and understand. As you can see there are two different colors on the mountain. The dark blue is the Mountain and the light blue is the Ice.
The Ice moves before the mountain does and when the momentum happens it is larger than it (below or above). When the momentum starts to change however, the Ice curves inside of the mountain. As you can see here, where the BUY signal (red cross) is, the Ice curves into the mountain; also where the SELL signal (red circle) is, the Ice curves into the mountain. The Ice curving into the mountain is a very important leading indication that momentum is changing and the Signals (crosses and diamonds) help solidify this momentum change.
The Index levels for YinYang Momentum is a little different than most oscillators that range from 0-100. Instead YinYang Momentum’s neutral level is 0 and it ranges from -100 to 100. For these reasons, the Viable Range for Buying is -40 to -70 and the Optimal Range for Buying is -70 to -100. For Selling, the Viable Range is 40 to 70 and the Optimal Range is 70 to 100.
If you look at the example above, you can see whenever it has been in the optimal range and the signal occurred, it may potentially be an amazing time to buy or sell. However, when it is within the Viable Range it can be hit or miss. The reason for this is because we are only looking at the Regular Price Mountain and Ice. Once we turn on the Predictive Price and Regular Volume we will have a much clearer idea as to what is noise and what is a true purchase signal. Why don’t we turn on Predictive Price Mountains and Ice so you can see what we’re talking about:
So there are 2 big things that changed when we added the predictive price mountains + ice.
We can see that where the orange circle is, is just noise, it isn’t a viable buy signal.
We can see that where the red circle is, is actually a better spot to sell than the previous marked white circle slightly to the right of it.
We will explain why both above are true, but first let's explain how we were able to deduce this information.
There are 5 rules when deciphering if the signal is a true signal or just noise.
You want the predictive mountain to be decently spaced out from the regular mountain. Refer to the example above how that should look. Remember it's predictive so with parabolic movements it will get quite spaced out. If the price went up but slowly, it generally won’t be as spaced and isn’t as strong of a signal predictor.
You want the Ice to be of a decent size and to curve in on both the Predictive and Regular Mountains. Both arrows (red and white circle arrows) are pointing to Ice that does just that. The Predictive mountain is of decent size and spaced out and the Ice curves in sharply on the Predictive, before curving in sharply on the Regular and then we get both Predictive and Regular Support Cross on the Same Bar.
When you get the Signals (Predictive and Regular) the amount of bars between them matters a lot! On the same Bar is ideal, however 1-2, max 3 bars between them is acceptable. Any more than 3 bars spacing and it's too risky of a signal because that means momentum change was happening but then stopped before picking back up. This doesn’t mean it can’t be a good signal, it just means it is much more risky and we don’t recommend it.
You don’t want Signal Clustering. You can see an example of this from the picture above. Signal Clustering is where signals are back to back over and over. During this time the momentum is in a consolidation phase and easily swaps back and forth between signals. These signals are not reliable and should not be traded on. We only want to act on clear momentum based signals.
Last but certainly not least, actually, the most important! Ensure that the Mountain + Ice for both the Predictive and Regular is at the bare minimum touching (preferably inside) the Viable Range. The Optimal range is best, but most mountains don’t make it that far. Viable Range is where you will make most of your trades from. Sometimes a great signal happens with all 5 of these rules but it is only touching the Viable Range right at 40 or -40. This CAN be okay, but is also much more risky than if it was at 50 to 60 or -50 to -60.
Based on the 5 rules mentioned, take a second and look back at the photo where we initially added the Predictive Price mountains and Ice, can you decipher why the orange circle is just noise, and can you see why the red circle is a better sell location than the white circle slightly to the right of it?
Let’s bring that photo back up now and let’s discuss this:
Let's start with the orange circle:
This orange circle, without the predictive, was hard to tell if it was a good location to buy or not, but the second we turned it on we could clearly see it was just noise.
The spacing between the Predictive mountains and the Regular is almost non-existent.
There was signal clustering shortly before this signal.
Remember, there doesn’t have to be many rules broken for a signal to be either too risky or not valid at all. The safest trades are ones where it meets the requirements of all 5 rules (6 once we talk about volume, but 5 price rules).
Now, let's discuss the red circle:
This red circle, although it could have been chosen with just the regular, was much more noticeable with the predictive added on top.
It has a perfect spacing between the Predictive and the Regular all the way to the peak.
The Ice is large and both curve in very nicely towards the mountains.
The signals are within 2 bars apart from each other.
There is no signal clustering.
The Predictive is within the Viable Range and the Regular is just touching it.
For these reasons, the red circle actually would have been where you sold and not the white circle beside it.
This pretty much covers the Price Mountains, but wait! The most important Cherry on Top to your decision making process is coming next!
We have just enabled our Regular Volume Mountains and Ice (which are the black mountains + ice). As you can see, we have circled what we call the ‘Perfect Combo’. This Perfect combo is when you have all 5 Price rules met COMBINED with a high volume mountain. The Volume Mountain and Ice act as strength. They aren’t biased towards bulls or bears, they simply show strength to whatever signal is present with it.
For example, if all 5 rules are met with Price on a Blood Diamond (Bear) Signal and there is a High Volume Mountain then this is also a ‘Perfect Combo’. That Blood Diamond signal will potentially have great strength behind it. The Viable and Optimal Ranges don’t apply to volume mountains. Any volume mountain, even close to the Viable Range, is considered to be a very high mountain. High volume is when the mountain is above 0 and low volume is when it's below 0. Any signal with low volume has less of a chance of being correct, regardless of whether it abides by all 5 price rules.
You can see here that the 5 Price rules are achieved but the volume mountain is low. It is at -25. Since the 5 Price rules are right, there is still a decent amount of accuracy to this signal and the price did plummet after, but not nearly as much as it would have if the volume mountain was high with it.
We have turned our Confirming Price Mountain on here so you can get an idea of what it looks like and how it’s used. If you refer to the Support Crosses and Blood Diamonds circled in white, you’ll see that although they both received their signals on the Predictive and Regular, neither of them received it on the Confirming. This shows that these signals lost momentum shortly after. However if you look at both the red and green circles, you’ll see that they both received their confirming signals and that it helped give those signals momentum. The Confirming Price Mountain is meant to help confirm if the momentum change is still on track and the max 3 bars from the regular signal rule still applies to it. However its height within the viable and optimal range is important, just not as relevant
Before we move on to our Information Tables we want to take a second just to discuss our Volume Mountains and Ice. We haven’t had a chance yet to discuss the Predictive or Confirming Volume. When it comes to our Volume Mountains + Ice, we don’t recommend having more than 1 on at a time. The reason we have included the Predictive and Confirming is in case you find they suit your Trading Style best, not necessarily to be used the same way the Price Mountains and Ice are. The main reason for this is due to the fact that the Volume Mountains are much smaller and when overlaid on top of each other can make a confusing blur that is hard to decipher.
In this example above we have enabled both Predictive and Regular Volume just so you can understand what we are talking about. The two together can be rather confusing and actually interfere with your decision making process. For this reason, we highly recommend finding the Volume Mountain that suits your trading style best and solely sticking to that.
Our Predictive Volume Mountains and Ice may help sense volume changes before they’ve even happened. This can be very useful if your Trading Style revolves around heavy volume changes.
Our Confirming Volume Mountains and Ice are much slower and smaller, but they help show the movement of volume that has occurred already. This can be used to help see the movement of volume without fearing it may or may not happen.
Our Information Tables are there to show you valuable information on whether it is in a state of Support Cross or Blood Diamond on 6 different Time Frames at the same time. The % it shows you displays how much of a price change has occurred since that signal has happened. It is important to note, if for instance you see it is in a state of Support Cross but the % is negative, this generally means it is going to switch to Blood Diamond soon and vice versa. Therefore if you are in a trade, especially on a lower Time Frame and you are watching the 1 Day or a higher Time Frame and notice that the % is getting less and less, it may be a good time to get out.
We will conclude our Tutorial here. If you have any Questions, Concerns, Suggestions or Comments please don’t hesitate to contact us.
Settings:
1. Show Predictive to Confirmed Trendline:
The Predictive to Confirmed Trendline is very useful for seeing when the predictive (Support Cross or Blood Diamond) has hit the confirmed (It’s a strong confirmation that the trend may be shifting). This trendline also features a Moving Average which helps give you a solid marker for when the Regular / Predictive mountains cross under or over it that a momentum swing may occur. Somewhat like when the RSI crosses above/below its Moving Average it dictates momentum change, that is likewise how to interpret when it happens with the mountains and this trendline.
2. Show Price Ice and Mountains based on:
The Price Ice and Mountains are very important when it comes to deciphering signal strength. For example, When the mountains are very low (regular and predictive) and are between the 2 red line (undervalued) or even possibly below the bottom red line, and the Ice on the mountains starts to curve into the mountains and then the Predictive and Regular Support Cross occur; this is a very strong Bullish Signal. But wait, that's not all, the cherry on top is when the volume mountain (black) is ALSO high while this occurs; the Volume Mountain adds Strength to the signal. When the volume mountain is high too during this ‘Perfect Combo’ this may potentially lead to very bullish price movement occurring soon. Here is an overview of each mountain:
2.1. Predictive: Are the least reliable, but they move first and nothing will move without the predictive moving first, and getting you ready.
2.2. Regular: Are the most accurate, they don't signify strength on its own, but they sure show some momentum.
2.3. Confirming: Are slightly behind when it comes to displaying data, and therefore shouldn't be used for entry / exit, but rather to show if the trend movement has truly been confirmed or not.
When the Ice starts to curve into the Mountain, (either upward or below) it signifies possible momentum change. There are Crosses (Bull), and Diamonds (Bear) to show when they've crossed. Cross' and Diamonds balance each other out and therefore there can never be more than 1 in a row (of the same type). When the Ice and Mountain size is very large (between 40 and 70), and the predictive Ice starts to curve into its mountain, and then the predictive curves into the Regular, and the Regular Ice is curving into its Mountain, then it may have some strong weight behind that signal. IMPORTANT: refer to Volume tooltip below for how to increase the signal strength even more.
3. Show Volume Ice and Mountains based on:
The Volume Ice and Mountains are for giving strength to the Price's signals and Size. When there is the perfect combo (described above) AND the Volume Ice + Mountain is high, then there may be a lot of strength to that Price signals (whether it is Cross (Bull), or Diamond (Bear)).
IMPORTANT: High volume mountains, unlike Price, don't mean good or bad. Volume shows strength to the Price, and therefore if there are high Volume mountains during a Diamond (Bearish), then there may be a lot of strength to that signal and vice versa.
4. Show Information Tables:
Information tables are used to display 6 different Time Frames and whether or not each time frame is in a state of Blood Diamond (red) or Support Cross (green). They also show how much % in price has changed since the current signal happened. These are very useful for seeing how the price is fairing on different Time Frames without having to constantly change your timeframe. For instance, maybe you base your entry off the 1 day time frame but then you swing trade on the 15 minute. Well, after you’ve confirmed your entry position and are sitting on the 15 minute, you can stay on the 15 minute and see how it is fairing on the 1 day, 5 minute or whatever time frame you choose. This way you aren’t distracted from the trade at hand. All of these Time Frames can be adjusted in the Settings (GUI) to whatever resolution you wish.
5. Res1 / Res2/ Res3 / Res4 / Res5 / Res6:
These represent the different resolutions (Time Frames) being used in your information tables and can be modified to display whatever resolution works best for your trading style. By default they are:
Res1: Current Timeframe
Res2: 15 Minute
Res3: 1 Hour
Res4: 4 Hour
Res5: 1 Day
Res6: 1 Week
Backup Res (not changeable): 5 Minute (this is only used if your Current Timeframe in Res1 is a duplicate of one of the other resolutions)
HAPPY TRADING!
YinYang VolumeOverview:
YinYang Volume is an Advanced Volume Indicator. Regular Volume can be deceiving. It can be hard to tell how much of the Volume bar is Buy vs Sell volume, especially since the bar is green or red simply based on if it closes at a greater price than it opened. With YinYang Volume you'll be able to see how much Buy AND Sell Volume there is on each bar. Being able to see both is very useful, but the cherry on top is the Buy and Sell Moving Average Lines. These lines (White is Buy and Orange is Sell) can show who is currently winning the fight, Bulls or Bears. When the lines cross it's a shift in momentum and when combined with other technical analysis you can better understand the direction the market is moving and make an informed and educated trading decision. YinYang Volume also has Information tables, these tables display the Buy vs Sell volume on different Timeframes. This way even if you're trading on a Low Timeframe (like 15 minutes) you can see how the Buy vs Sell volume is fairing on other Timeframes.
Tutorial:
Unlike most volume indicators, including standard volume, we can see both Buy AND Sell volume for each bar. You may be wondering, well what’s the importance of this? The answer is EVERYTHING! Volume is one of the most important indicators when it comes to trading. Nothing moves without volume. However, with standard volume, the bar is either red or green simply based on if it closes greater than it opens. Now, that is pretty silly if you ask us. Let’s get into depth as to why seeing both Buy and Sell volume is important, and examples for how you can make trades with it:
In this example above, we have 2 green bars and they both have high levels of volume. This bar on the right however, has more volume than the one on the left. The issue here is, the bar on the right has MORE Sell volume than it even does have Buy volume; meanwhile the bar on the left has way more buy volume than the bar on the right with little sell volume. Without separating them and by simply looking at the price bar and regular volume bar, we would never be able to deduce this. It is crucial to understand and see how much of each volume there is as it plays a huge role in the price movements.
The white line represents the Buy Volume Moving Average and the orange line represents the Sell Volume Moving Average. These moving averages are very useful as when they cross they represent strong Buy and Sell Signals.
We’ve enabled signals which plot circles onto the MA’s to display when they’ve crossed. The white circle represents a Buy Signal and the Orange circle represents a Sell Signal. These signals are very strong, but there is a catch that comes with it. The bar right after the signal has the highest chance of a reversal so it isn’t always advised to make the trade until confirmed that the reversal didn’t happen on the following bar. If you have enough data based on other technical analysis to know the first signal is true, then use it as a way to solidify the fact that it is a good entry/exit location.
You can change the length of which the MA’s are smoothed out over. For instance, in the previous examples and by default the length is 14. However, if we are to change it to 50 for instance, it makes them a longer lasting MA that has much fewer crosses. This can be useful based on your trading style and if you prefer to stay in trades for quite awhile. As you can see, all signals with the 50 length are quite accurate and would have produced profitable trades, likely more so than at 14, but since it moves slower there's fewer signals to trade on.
Our Information Tables are there to show you the amount of Buy vs Sell %’s on 6 different Time Frames at the same time. It can be very useful to know how people are feeling on different Time Frames without you having to change your own. This way you can stay on say the 15 minute Time Frame locked in your trade and can see if the momentum of your long trade is cooling down based on higher Time Frames Buy vs Sell volume %’s.
For example, let's say you got an alert from YinYang Volume for Buy Signal on the 1 Day. You then entered a trade which you deemed a good location on the 15 minutes (after doing your own technical analysis on the 15 minute too). The Buy vs Sell Volume %’s on the 1 Day was 55% Buy and 45% Sell when you entered the trade. You are still waiting for exit confirmation on the 15 minute but you notice the Buy vs Sell Volume % on the 1 Day goes down to 52% Buy and 48% Sell. You can see the momentum changing. Even though you haven’t received confirmation for exit on the 15 minute, it may still be a good time to get out as momentum is clearly changing on the 1 Day.
We will conclude this Tutorial here. We hope you’ll get some good use out of our Volume Indicator and its ability to display unique Volume Data. If you have any Questions, Comments, Suggestions or Concerns, please don’t hesitate to contact us.
Settings:
1. Show Signals:
Toggling this setting shows when the Buy and Sell Volume MA’s cross each other. It produces a white circle when the Buy Volume Crosses over the Sell Volume (BULLISH) and an orange circle when the Sell Volume Crosses over the Buy Volume (BEARISH).
2. Length:
How far back should we average the Buy and Sell Volume Moving Averages? 14 is default has been tested and proven to work well, however you can change it if there is a different value that suits your trading style better.
3. Type:
How is the Moving Averages calculated? VWMA (Volume Weighted Moving Average) is the default as it has been tested and worked best; afterall, we are calculating volume and therefore should use a volume weighted MA calculation. However, you can change it as your options are:
VWMA, EMA and SMA
4. Information Tables:
4.1. Show Information Tables:
Our Information tables display 6 different resolutions so you can see how much Buy vs Sell volume there is as a % in multiple different Time Frames without having to change your Time Frame.
4.2. Strength:
The Buy / Sell Volume %’s displayed within your Information Tables are based on Moving Averages. The length this moving average uses is based on the Strength you select. The strengths aren’t as simple as just a length amount but are a calculation involving multiple different lengths and averages. However, the stronger the strength, generally the farther the lookback length is as an average. Your options for strength are:
Unbreakable
Very Strong
Strong
Average
Weak
Very Weak
Glass
We recommend ‘Average’ Strength, however if you find you want to see the %’s change more or less frequently you can adjust to your trading style
4.3. Res1 / Res2/ Res3 / Res4 / Res5 / Res6:
These represent the different resolutions (Time Frames) being used in your information tables and can be modified to display whatever resolution works best for your trading style. By default they are:
Res1: Current Timeframe
Res2: 15 Minute
Res3: 1 Hour
Res4: 4 Hour
Res5: 1 Day
Res6: 1 Week
Backup Res (not changeable): 5 Minute (this is only used if your Current Timeframe in Res1 is a duplicate of one of the other resolutions)
HAPPY TRADING!
YinYang Bar ForecastOverview:
YinYang Bar Forecast is a prediction indicator. It predicts the movement for High, Low, Open and Close for up to 13 bars into the future. We created this Indicator as we felt the TradingView community could benefit from a bar forecast as there wasn’t any currently available.
Our YinYang Bar Forecast is something we plan on continuously working on to better improve it, but at its current state it is still very useful and decently accurate. It features many calculations to derive what it thinks the future bars will hold. Let’s discuss some of the logic behind it:
Each bar has its High, Low, Open and Close calculated individually for highest accuracy. Within these calculations we first check which bar it is we are calculating and base our span back length that we are getting our data from based on the bar index we are generating. This helps us get a Moving Average for this bar index.
We take this MA and we apply our Custom Volume Filter calculation on it, which is essentially us dividing the current bars volume over the average volume in the last ‘Filtered Length’ (Setting) length. We take this decimal and multiply it on our MA and smooth it out with a VWMA.
We take the new Volume Filtered MA and apply a RSI Filter calculation on it. RSI Filter is where we take the difference between the high and low of this bar and we multiply it with an RSI calculation using our Volume Filtered MA. We take the result of that multiplication and either add or subtract it from the Volume Filtered MA based on if close > open. This makes our RSI Filtered MA.
Next, we do an EMA Strength Calculation which is where we check if close > ema(close, ‘EMA Averaged Length’) (Setting). Based on this condition we assign a multiplier that is applied to our RSI Filtered MA. We divide by how many bars we are predicting and add a bit to each predictive bar so that the further we go into the future the stronger the strength is.
Next we check RSI and RSI MA levels and apply multiplications based on its RSI levels and if it is greater than or less than the MA. Also it is affected by if the RSI is <= 30 and >= 70.
Finally we check the MFI and MFI MA levels and like RSI we apply multiplications based on its MFI levels and if it is greater than or less than the MA. It is also affected by if the MFI is <= 30 and >= 70.
Please note the way we calculate this may change in the future, this is just currently what we deemed works best for forecasting the future bars. Also note this script uses MA calculations out of scope for efficiency but there is potential for inconsistencies.
Innately it’s main use is the projection it provides. It only draws the bars for realtime bars and not historical ones, so the best way to backtest it is with TradingView’s Replay Tool.
Well, enough of the logic behind it, let's get to understanding how to use it:
Tutorial:
So unfortunately we aren’t able to plot legit bars/candles into the future so we’ve had to do a bit of a work around using lines and fills. As you can see here we have 4 Lines and 3 Zones:
Lines:
Green: Represents the High
Orange: Represents the Open
Teal: Represents the Close
Red: Represents the Low
Zones:
High Zone: This zone is from either Open or Close to the High and is ALWAYS filled with Green.
Open/Close Zone: This zone is from the Open to the Close and is filled with either Green or Red based on if it's greater than the previous bar (real or forecasted).
Low Zone: This zone is from either Open or Close to the Low and is ALWAYS filled with Red.
As you can see generally the Forecasted bars are generally within strong pivot locations and are a good estimation of what will likely go on. Please note, the WHOLE structure of the prediction can change based on the current bars movements and the way it affects the calculations.
Let's look 1 bar back from the current bar just so we can see what it used to Forecast:
As you can see it has changed quite a bit from the previous bar, but if you look close, we drew horizontal lines around where its projecting the next bar to be (our current realtime bar), if we go back to the live chart:
Its projections were pretty close for the high and low. Generally, right now at least, it does a much better job at predicting the high and low than it does the open and close, however we will do our best to fine tune that in future updates.
Remember, this indicator is not meant to base your trades on, but rather give you a Forecast towards the general direction of the next few bars. Somewhat like weather, the farther the bar (or day for weather), the harder it is to predict. For this reason we recommend you focusing on the first few bars as they are more accurate, but review the further ones as they may help show the trend and the way that pair will move.
We will conclude this tutorial here, hopefully this Predictive Indicator can be of some help and use to you. If you have any questions, comments, ideas or concerns please let us know.
Settings:
Forecast Length: How many bars should we predict into the Future? Max 13
Each Bar Length Multiplier: For each new Forecast bar, how many more bars are averaged? Min 2
VWMA Averaged Length: All Forecast bars are put into a VWMA, what length should we use?
EMA Averaged Length: All Forecast bars are put into a EMA, what length should we use?
Filtered Length: What length should we use for Filtered Volume and RSI?
EMA Strength Length: What length should we use for the EMA Strength
HAPPY TRADING!
YinYang Fear and Greed Index (FGI)Overview:
YinYang Fear and Greed Index is used for seeing how people are feeling towards the current price. It works similar to an RSI, but fluctuates differently. Essentially you want to be Greedy when the Index displays Fear and Fearful when it displays Greed. Our Indicator displays a Green Circle (Greed Signal) on the YinYang Fear and Greed Index when there is a large amount of Greed at this price point. It displays a Red Circle (Fear Signal) when there is a large amount of Fear. The Fear and Greed Signals can happen at any Fear and Greed Index but generally they correlate with the Index level. The Fear and Greed Signals are much more important at dictating a swing in momentum than the actual Index itself. The Index is more of a guide and is useful for seeing when the Index level crosses the Ma (the yellow line) as you can see a shift in momentum. However for large swings in momentum, the Fear and Greed Signals should be used. Do NOT Ignore these signals, they are quite powerful at predicting momentum swings.
Tutorial:
As you can see, the Fear and Greed Index looks somewhat similar to an RSI, but it has the ability to gain drastic momentum when there are strong changes in Fear and Greed.
When it comes to identifying buy/sell locations you generally want to ensure 2 things:
For a buy, the Fear and Greed Index (FGI) is less than 30.
For a sell, the FGI is greater than 70.
A signal has occurred. For buy that is the red circle and for sell that is the green circle.
The reason we generally want to ensure these 2 rules is to ensure you have the highest chance of being right with the lowest risk of being wrong. The way you want to use this indicator is; Be Fearful when others are Greedy and Greedy when others are Fearful.
There will be times when a fear or greed signal appears when the index is between 30-70. When these occur, they are still generally strong signal locations that represent a high chance of momentum in the direction they signal, however they face a higher risk of being wrong and therefore shouldn’t be used on its own to make a trade.
In the photo above we can see that the FGI’s color changed from Red to Orange in the candle after the Fear Signal. This happened because there was high price movement right after it (which is normal) and caused the Fear level to drop.
The color the FGI displays is based not off the FGI but by the STATE it is currently in. When the color is Green it is in a state of HIGH GREED, when the color is Red it is in a state of HIGH FEAR. When the color is Teal it is in a state of SLIGHT GREED, when the color is Orange it is in a state of SLIGHT FEAR. These colors hold true for the Information Tables as well.
As we can also see from the example above, it is 100% possible to have a state of HIGH GREED when the FGI is low. For instance look at the Fear (BUY) signals circled. Right before the Fear Signals happened, it was in a state of HIGH GREED (Green). The opposite is also true with Fear. We can have a high state of Fear when the FGI is high. However, please do remember, the lowest risk and best time to make trades is still:
FGI is higher than 70 and there is a Greed Signal = SELL
FGI is lower than 30 and there is a Fear Signal = BUY
You may notice there are sometimes occurrences that we call ‘Oddballs’. These oddballs are quite rare but they do happen and when they do they’re generally in clusters (close together). These Oddballs are when a Greed Signal occurs when the FGI is very low or when a Fear Signal occurs when the FGI is very high. Basically, they are occurring in the opposite location that they are supposed to. These may not seem like they matter but they matter a lot. As you can see based on where the blue vertical lines are, the price moved in the direction the signal identified shortly after the signal.
You may be wondering, are Oddball’s stronger price influencers than the regular signal? The issue with Oddballs is they sometimes CAN BE. But generally they aren’t. They generally do signal price movement will occur in the direction they are influencing, but generally not as much movement as if it occurred properly (Fear signal under 30 or Greed signal above 70).
The takeaway from Oddballs is to acknowledge their existence and potentially use them as markers for smaller purchases or DCA locations. We don’t recommend treating them as a legitimate purchase signal as they generally are weaker and less predictable, but nevertheless don’t dismiss them.
Our Information Tables are there to show you the FGI on 6 different Time Frames at the same time. This can be very useful for knowing how the other Time Frames are fairing while you are trading without needing to constantly change the Time Frame you are on.
For example, you see a Fear Signal on the 1 Day Time Frame, you then swap to the 15 minute Time Frame to find your entry location. Well, once you’re locked into that trade, you’ll likely be fixated on the 15 minute Time Frame. There’s a chance while you’re still waiting for your exit that levels and states of the FGI could change on higher Time Frames. This could drastically influence when and where your exit on the lower Time Frame should be.
This concludes our Tutorial on how to use YinYang Fear and Greed Index (FGI). However, continue reading for a description and better understanding of the Settings available to you for customization within this Indicator.
Settings:
1. Information Tables:
1.1. Show Information Tables:
Our Information Tables display 6 different Time Frames (resolutions) so that you can see the current level of Fear and Greed (FGI) that is prevalent on each Time Frame. There are 4 different states the FGI can be in:
Fear (Red)
Minor Fear (Orange)
Greed (Green)
Minor Greed (Teal)
The color of each Time Frame Cell (on Oscillator and in the table) is based on the following:
Red: Red represents that it is currently in a state of Fear. When it is in a state of fear it means traders are being overly bearish and selling when they likely shouldn’t. While it is in a state of Fear, there is a high chance of BULLISH price movement occurring. Remember, Be Fearful when others are Greedy and Greedy when others are Fearful.
Orange: Orange represents that it is currently in a state of Minor Fear. Minor Fear means that the FGI is less than 50, but it’s not currently in a state of Fear or Greed. While it is in this state, there is a better chance for BULLISH price action than there is bearish but it's nowhere near as likely as when in a state of Fear.
Green: Green represents that it is currently in a state of Greed. When it is in a state of Greed, it means traders are being overly bullish and buying when they shouldn’t. While it is in a state of Greed, there is a high chance of BEARISH price movement occurring.
Teal: Teal represents that it is currently in a state of Minor Greed. Minor Greed means that the FGI is greater than 50, but it’s not currently in a state of Fear or Greed. While it is in this state, there is a better chance for BEARISH price actions than there is bullish; but it’s nowhere near as likely as when its in a state of Greed.
2. Res1 / Res2/ Res3 / Res4 / Res5 / Res6:
These represent the different resolutions (Time Frames) being used in your information tables and can be modified to display whatever resolution works best for your trading style. By default they are:
Res1: Current Timeframe
Res2: 15 Minute
Res3: 1 Hour
Res4: 4 Hour
Res5: 1 Day
Res6: 1 Week
Backup Res (not changeable): 5 Minute (this is only used if your Current Timeframe in Res1 is a duplicate of one of the other resolutions)
Our Fear and Greed Index can be very useful for understanding how people are feeling in the market and when large price swings will occur. Remember, Be Greedy when others are Fearful and Fearful when others are Greedy!
If you have any Questions or Concerns, don’t hesitate to contact us.
HAPPY TRADING!
YinYang RSIYinYang RSI is a Momentum Oscillator. It is loosely based on the standard RSI but uses our Custom True Value Zone Algorithm. Essentially it is a stronger, more accurate RSI that isn't manipulated by consolidation. YinYang RSI moves slightly slower than the standard RSI but when it does move it is much more accurate.
Why do we deem YinYang RSI to be a more accurate RSI? Well, let's discuss some of the underlying logic behind it. YinYang RSI is derived from the High and Low data from multiple Security Requests, we send that data into a modified Donchian Channel to calculate its Basis. That basis is then taken and averaged between multiple different VWMA calculations to ‘Smooth’ it out before we send it into an RSI calculation and display the final results.
This may sound a little confusing and you may be wondering, why bother doing this? The main reason we created the YinYang RSI is to remove the fact that consolidation causes Regular RSI to go down in index value. In our opinion RSI shouldn’t go down due to consolidation. By removing consolidation from RSI it innately made the RSI more smooth and since it became more smooth there were less times it crossed the RSI Moving Average (MA). In turn, since it crosses the RSI MA less, it means when it does cross the RSI MA, it is a much stronger more accurate signal; but don’t just take our word for it! Let’s get into some examples to show you exactly how it works:
Our RSI is very smooth, because of the way we apply VWMA to it, it keeps it from being a jagged line like the regular RSI is:
Our Indicator features 3 RSI’s in it: YinYangRSI, Regular RSI and YinYang Stoch RSI. The reason there are 3 is not only for the Information Tables (we will talk about this later), but also for the fact that you can overlay them on top of each other.
Here is the same dates but with Regular RSI:
Hopefully you can see how different they are and how smooth ours is, but if not, lets overlay them so you get a better idea:
When the YinYang RSI and Regular RSI are overlaid on top of each other, the Regular RSI’s colors change for easier readability. The Regular RSI turns Pink and the Regular RSI MA turns Orange. As you can see here, they function much differently and it is quite clear that the YinYang RSI holds itself during consolidation and is more smooth.
You may be asking yourself, this is great and all, but how does it help me trade?
Well, now that you understand the difference between YinYang and Regular RSI let's discuss exactly that!
So as you can see in the image above, when the RSI crosses the RSI MA it represents a strong movement in price is likely about to occur. When the RSI is very low (20 or less) and it crosses ABOVE the RSI MA, this represents a BUY/LONG signal. When the RSI is very high (80 or above) and it crosses BELOW the RSI MA, this represents a SELL/SHORT signal.
There are times where it is a good time to buy or sell, but the RSI may not be in the right place. This is rare but it does happen. We marked a location that did exactly that with an Orange circle in the picture above. These things happen, however we don’t recommend you act on them. The main reason is that they are much more risky. Nothing will ever be 100% accurate, but the key is making decisions that are more in your favor than not. When the RSI and RSI MA cross and the RSI is near 50, it's much less accurate, however, not impossible for it to be a good signal.
Now you may be wondering, how come I see 2 SELL or 2 BUY signals before the RSI moves a lot? This is quite normal. Based on the picture above, all of the BUY and SELL signals are accurate, but not all of them have insane price movements. However, they all did feature SOME price movements. Just because a BUY or SELL (RSI and RSI MA crossing) happens, doesn’t mean the RSI is going to move all the way from 80 to 20, sometimes the price only moves a bit and then corrects back. This is completely normal.
The part that is up to you is knowing when to exit these trades. You can use the YinYang RSI to see entry locations for Long/Short, but it can be risky to assume that you can go from a BUY right to a SELL and vice versa.
Don’t fret, there is a reason we have our YinYang Stoch RSI within this indicator and its not just because we felt like it! When you overlay the YinYang RSI and YinYang Stoch RSI on top of each other, you can get a very good idea of when a signal may be over and likely it’s a good time to get out. However, first, just so you understand what our YinYang Stoch RSI does, let's take a quick look at it.
At first glance, the YinYang Stoch RSI can look pretty strange and even overwhelming, this is completely normal. It features drastic movements, but only when there is good reason to! When the blue line (K) crosses the orange line (D) it represents momentum in price. So when the blue line crosses above the orange line it means BUY and when the blue line crosses below the orange line it means SELL.
How it works with the YinYang RSI is simple, lets toggle the two of them on together in the settings:
It may look a little confusing at first, and we don’t necessarily recommend you do it for your entry as it can be a little too much and sometimes confusing, but it can be very helpful for understanding your exit and if the momentum has changed/died down. Here's an example based on our initial BUY/SELL image above:
So since we’re talking about the double SELL signal and how to know if its momentum is ending we’ve zoomed in on this example. Here we can see where the pink circle is, that the YinYang Stoch RSI has gained buy momentum and the sell momentum has likely ended here. This is canceled out however, by the fact that shortly after we see another SELL signal combined with the Stoch RSI crossing under and also showing SELL momentum. The blue Vertical lines are to show visually where the stoch crossed over/under as they can be a little hard to see visually. Also, based on this example, you can see where the orange circle is that was clearly a very good buy location and also has the stoch crossover in that location too. So even though the RSI isn’t very low, there is still a decent amount of bullish momentum in that location. Is this enough for you to make a purchase on? In our opinion, it’s still a little too risky, but maybe it fits your trading style, or maybe you decide its a good time to Dollar Cost Average / purchase just a small amount.
Now, you may be wondering, as we mentioned it early, what are those Information Tables that have been sitting on the right of every example?
These Information Tables are there to display very important Time Frame data for you. Not only can you see 6 Different Time Frames, which you can customize within your Settings. You also get to see the level of RSI and RSI MA for YinYang, Regular and YinYang Stoch RSI. Being able to see this data on multiple different Time Frames without having to change the Time Frame you are on can be very helpful, especially if you’re trading on a lower Time Frame like 15 minutes. The color of the box is based on if the RSI has crossed the MA or not. When the box is Green, the RSI is greater than the MA (Bullish). When the box is Red, the RSI is less than the MA (Bearish).
This concludes our Tutorial on how to use YinYang RSI, below you will see all of our current Settings, what they all mean and how you can customize them.
Settings:
1. Show Signals:
Signals are when the RSI crosses the RSI MA (for any RSI TYPE active). When these crosses happen, it will make a plot on the chart that represents Buy and Sell Signals. These signals have alerts that correspond with them, but you will manually need to set up these alerts yourself through the indicator. Please refer to TradingView for how to set up alerts.
2. RSI Type:
We have 3 types of RSI’s within this Indicator:
YinYang RSI
Regular RSI
YinYang Stoch RSI
These RSI’s can be used individually or overlaid on top of each other for easier comparison. It can be useful to go back and forth between indicators or have them overlaid to get a better understanding of what's going on.
2.1. YinYang RSI:
Our YinYang RSI is our custom RSI that is based on our True Value Zone Algorithm. It is the main purpose of this Indicator but can be used in conjunction with Regular RSI and YinYang Stoch RSI. YinYang RSI is a much more smooth, slow moving form of RSI that doesn’t go down from consolidation and therefore makes the RSI and RSI MA crosses much more accurate.
2.2. Regular RSI:
This is a regular RSI that is within our indicator so you can make comparisons and also overlay on top of our YinYang RSI and/or YinYang Stoch.
2.3. YinYang Stoch RSI:
This is a Stoch RSI that is calculated with our YinYang RSI’s values to create a very unique Stoch RSI. Our YinYang Stoch RSI moves very drastically and quickly when there is true momentum swings but it never really hovers in the middle. It makes its way from 0-100 and 100-0 within 2-3 candles usually and if it makes it all the way, you know there is momentum backing this price movement.
3. Information Tables:
3.1. Show Information Tables:
Our Information tables display 6 different Time Frame resolutions to give you the data of YinYang RSI/MA, Regular RSI/MA and Stoch RSI/MA over multiple different Time Frames so you don’t constantly have to keep changing yours and can focus on the trade at hand.
You can choose to display:
‘All’,
‘None’,
‘YinYang RSI’,
‘Regular RSI’,
‘YinYang Stoch RSI’
and/or any combination of the three so you can see all the data you want to your liking.
3.2. Display Tables Direction:
Since there are 6 different Time Frames shown, and you have the ability to display all 3 RSI and MA values, this table can get pretty big. If you have a large monitor and not too many indicators active it's no big deal and a vertical display is likely what you’ll want. However, if you have a smaller monitor or many Indicators active, it will scrunch this Indicator and make it difficult to see all of your Time Frames in the tables. For this reason, we have the option to display them ‘Horizontally’.
3.3. Res1 / Res2/ Res3 / Res4 / Res5 / Res6:
These represent the different resolutions (Time Frames) being used in your information tables and can be modified to display whatever resolution works best for your trading style. By default they are:
Res1: Current Timeframe
Res2: 15 Minute
Res3: 1 Hour
Res4: 4 Hour
Res5: 1 Day
Res6: 1 Week
Backup Res (not changeable): 5 Minute (this is only used if your Current Timeframe in Res1 is a duplicate of one of the other resolutions)
Alerts are available and customizable within the Indicator. You can set up an alert for any of the RSI crossing Signals.
If you have any Questions or Concerns, don’t hesitate to contact us.
HAPPY TRADING!
Emulating binary operations and several values in one variableBinary operations and storing several numbers in one variable.
It's useful when you need to pass a values numbers to another study. Study-on-study (SOS) in Tradingview allows passing only one value, which is not always convinient. So if we put all those numbers in one - we can pass more values from one study to another.
In Pine we can use up to 52 bits for our data. Because of that we can put 6 1-byte (8-bit) values in one float. Or 12 4-bit values. Or 52 1-bit values.
Strategy Builder Crypto (Single Trend/Plots)Hi everyone
Big program for the daily indicator
This one will be free on trial only for a week because it has an immense value and required quite a lot of work. For more info to use it long-term, please DM me
That out of the way, let's dive right in...
This is a huge upgrade from that script Ultimate-Algorithm-Builder-Single-Trend
The Tradingview non-pro users will appreciate it because it allows to add the selected subsequent indicators as well. The Pro users too will likely like this feature equally, what the H*** I'm saying :)
This indicator will transform you into what I was in the past... into a quant trader. You'll build your own trading algorithm in a few clicks only
Which timeframe and which assets ?
Short answer : ALL and ALL
You'll have to define the configuration of the tool based on your capital, psychology. For custom configuration of the tool, please DM me directly so that we can discuss further
But a few words of advices anyway :
the bigger the timeframe, the lower the inputs (and vice-versa)
Think about how much $$ you want to make per trade and define your entries from there
Think about how much $$ you can afford to lose per trade and define the supertrend from there
...
Your golden configuration might not work for all assets.
You might have to create some tweaks - for instance you found a great config for BTCUSD but it's not working for ETHUSD, then you can create a copy of your BTCUSD chart and set a new config for ETHUSD
What are the indicators inside :
This fantastic tool that I personally use for my trading detects convergence between the following indicators :
Overlay - meaning if the price close above/below a moving average
Trend Signal - to detect if the the DOW law is broken and predict a possible reversal - en.wikipedia.org/wiki/Dow_theory
In other words, it detects if the higher highs or lower lows sequence is broken
MACD or MACD Zero Lag
MA Cross - Cross of moving averages
Ichimoku - if the price closes below/above the cloud
Supertrend - used to detect polarity zones
TSI Shadow -
Pullback
You'll also have the possibility to define a pullback on a given MA. That means basically that you'll get a convergence and it will only display a signal when it will pullback first
This will reduce your losses in case of invalidation and maximize your gains as it will enter the trade in a better position.
You can define your pullback either based an absolute value or based on a percent distance from the MA
+Example:
Pullback value = 100 means I want a 100 pip/USD distance between the MA pullback and the candle
Pullback percent = 2 means I want a 2% distance between the MA pullback and the candle
The percent option is more generic in my opinion but I let the other available for those who might like it
That's it ?
Almost....You can also setup alerts on the indicator signals so that you won't have to stay days in front of the chart to wait for a signal.
You receive the alert, you check real quick if we're not in front of a support/resistance, if no then take the trade. if yes, I advice waiting for a big pullback - better to be safe than sorry in trading
What If you want a custom version ?
Here are a few custom ideas I could add just for you :
re-enter everytime there is a convergence. So far the indicator is only taking the first convergence. This would give more entries
add the resistances/supports (fibo, pivot)
add the take profit targets and trailing stop loss
..
Please hit me up directly so we can discuss further. Any custom dev will require quite some time so it won't be free
Enjoy that one as I really think it will improve your analyst skills and trading and hopefully make you a few gains (which will make me very happy as I want to help most of you to at least not losing your capital)
Dave