Machine Learning: Support and Resistance [YinYangAlgorithms]Overview:
Support and Resistance is normally based upon Pivot Points and Highest Highs and Lowest Lows. Many times coders even incorporate Volume, RSI and other factors into the equation. However there may be a downside to doing a pure technical approach based on historical levels. We live in a time where Machine Learning is becoming more and more used; thus we have decided to create a Machine Learning Support and Resistance Projection based Indicator. Rather than using traditional Support and Resistance calculations using historical data, we have taken a rather different approach. This Indicator instead attempts to Predict and Project where Support and Resistance locations will be based on a Machine Learning Model using a form of KNN (k-Nearest Neighbors).
Since this indicator creates a Projection of where it deems Support and Resistance will be, it has the ability to move its Support and Resistance before the price even gets to it if it believes it will surpass its projections. This may create a more accurate placement of Support and Resistance as they’re not based on historical levels.
This Indicator does not Repaint.
How it works:
This Indicator makes its projections based on the source you provide (by default close) of the previous bar and submits the source, RSI and EMA to our Projection Function to get its projection of the current bar.
The Projection function essentially calculates potential movement after finding the differences between the source the MA from the current bar, previous bar and average over the span of Machine Learning Length.
Potential movement is defined as:
Average Difference + Average(Machine Learning Average, Average Last Distance)
Average Difference: (Absolute value of Current Source - Current MA) - (Absolute value of Machine Learning Average - Machine Learning MA)
Average Last Distance: Average(Current Source - Current MA, Previous Source - Previous MA)
It then predicts the next bars directional movement (bullish or bearish bar) using several factors:
Previous Source > Previous MA
Current Source - Current MA > Average Source - Average MA
Current RSI > Previous RSI
Current RSI > 30 and Previous RSI <= 30
Current RSI < 70 and Previous RSI >= 70
This helps us to predict the direction the next bar may move.
We then calculate a multiplier that we apply to our Potential Movement value to get our final result which is our Current Bars Close Projection.
Our multiplier is calculated using:
(Current RSI > 30 and Previous RSI <= 30) OR (Current RSI < 70 and Previous RSI >= 70)
Current Source - Current MA > Previous Source - Previous MA
We then create an array and fill it with the previous X projections (Machine Learning Length) and send it to another function. This function, if told to, will sort the data accordingly and then output the KNN average of the length given.
We calculate and plot various KNN lengths to create different Zones:
Strong Support: Length of 2 but sort the data Ascending (low to high)
Strong Resistance: Length of 2 but sort the data Descending (high to low)
Support: Length of Machine Length Length / 10 or Min of 2 sorted by Ascending
Resistance: Length of Machine Length Length / 10 or Min of 2 sorted by Descending
There are also 4 other plots you may be wondering what they are, there is your AVG, VWMA, Long Term Memory and Current Projection.
By default your Current Projection is disabled in settings but you can enable it if you are curious to see how the projections for each close are calculated. It is, however, not a crucial point of interest (white line).
The average is simply the average value of the Machine Learning Data (purple line).
The VWMA is a VWMA calculation applied to our Data over a length specified in settings (by default 1)(blue line). The VWMA is crucial when combined with the Avg as they can cross over and under each other. These crosses represent potential Bullish and Bearish zones.
Lastly, but certainly not least, we have the Long Term Memory (maroon line). The Long Term Memory can be displayed either as an ‘Average’, ‘Hard Line’ or ‘None’. The Long Term Average is only updated every Machine Learning Length Bar Index’s and is populated with the average of the Machine Learning Data. For Instance, if Machine Learning Length is set to 100, the Long Term Memory is only updated every 100 bars, and since its length is the same as the Machine Learning Length, that means its data is composed of 10,000 bars worth of data. The Long Term Memory may be very beneficial for determining where Support and Resistance lie over the Long Term within a Machine Learning Algorithm. When set to ‘Average’ it plots the connection lines diagonally, and although they may be more visually appealing, they’re less useful when it comes to actually seeing support and resistance as generally speaking, support and resistance lie on the horizontal. When set to ‘Hard Line’ the Long Term Memory is connected with hard lines and holds the price value until the next time it is updated. This makes it much more useful for potentially identifying Support and Resistance.
Tutorial:
Here is an overview of what the Indicator looks like, now let's start to dissect it.
In the example above we can see how all of the lines between the Major Support and Resistance zones may act as BOTH Support and Resistance depending on which side the price is currently on. In the circle on the left, we can see how it can fluctuate between the two. If you look at the circle on the right, we can see how the Average line acts as a strong support before it fails to maintain it. Generally speaking, most Support and Resistance locations may potentially fail to hold after 3 tests, as the Average did in this example.
As you can see, the Support and Resistance doesn’t wait to be tested before adjusting, which is why there are 2 lines which create their zones. The inner line is the Support/Resistance and the outer line is the Strong Support/Resistance. The Yellow Circle shows the inner line was able to calculate the moving resistance correctly and then adjusted accordingly as it was projecting the price to keep increasing. However, if you look at the White Circle, you can see that since there was first a crash, and then parabolic movement, that the inner zone could not move and predict the resistance as well as the outer zone could.
We consider the price to be ‘Overvalued’ when it is above the VWMA (blue line) and ‘Undervalued’ when it is below the VWMA. It is considered ‘fair’ price when it is within the VWMA to Average zone (between the blue and purple lines). If you look at the example above, you’ll notice where the two yellow circles are, it is not only considered ‘Overvalued’, but it then proceeds to ride the inner resistance line upwards. This is common when the market is overly bullish and vice versa when it is bearish. Please keep in mind, although it is common, it doesn’t mean a correction can’t happen.
In this example above we look at the last bull run that may have started due to the halving. This bull run was very bullish as you can see in the example above. The price was constantly sitting within the Resistance Zone and the VWMA that was very close to it was constantly acting as a Support. Naturally, due to the Algorithm used in this Indicator, as the momentum starts to slow down, the VWMA (blue line) will start to space out more and more from the Resistance Zone. This doesn’t mean the momentum is gone, it just means it may be slowing down.
Unfortunately we have to study the Bear Market with a different perspective than the Bull Market. However, there are still some similarities within the two. If you refer to the example above and the previous example, you can clearly see that the Bull Market loves to stay with the Resistance Zone and use the VWMA as a Support. However, the Bear Market does not. This is a normal occurrence, however we can see from the example above you may see a correction / horizontal movement when the Outer Support Line is touched. If you look at all 3 yellow circles, the Outer Support Line was touched, then either a small correction or horizontal consolidation occurred.
We will conclude our Tutorial here, hopefully you’ll be able to benefit from a moving Support and Resistance calculated with Machine Learning that projects its locations, rather than using traditional calculations.
Settings:
Source: This source is the base for all our calculations
Machine Learning Length: How much projection data are we storing and using to make calculations.
Smoothing Length: We need to smooth calculations such as RSI, EMA and VWMA. What length are we smoothing it with?
VWMA ML Projection Length: How far into our Machine Learning data should we average for our VWMA. Please note the 'Smoothing Length' is still applied here after getting the Projection Average.
Long Term Memory: Long term memory has the same storage length but is only updated once per Machine Learning Length. For instance, if Machine Learning Length is 100, it will save the Average of our data once every 100 bars. This means its memory is an average of 10,000 bars of Machine Learning. 'Average' connects its values diagonally whereas 'Hard Line' holds its value until it changes.
Use Average Last Distance In Potential Movement: This can help accuracy but generally also displaces the Support and Resistance by projecting it further.
Show Current Projection: Projections occur for each bar, and our Machine Learning utilizes these projections by storing and evaluating them. This toggle will display the Current Projection Line which is used to create all our Projections.
If you have any questions, comments, ideas or concerns please don't hesitate to contact us.
HAPPY TRADING!
Search in scripts for "algo"
Whale Trend AnalysisLarge entity and whales are always smart, they hide in the market to make money. Learning how they operate, we will become smarter. How to distinguish the structure of participants, find the large entities or giant whales, this is a difficult problem.
Indicators: Whale Trend Analysis , using AI algorithms to find them.
⏩Principle overview:
The core of Whale Trend Analysis is trading volume. By subdividing the cumulative value of trading volume in different periods and price, algorithm-weighted splitting is performed on ultra-large trading volume, large trading volume, medium trading volume and small trading volume to distinguish each magnitude is subdivided from the four dimensions of large entities, whales, large investors, and retail investors, effectively exploring the main trading entities.
⏩Usage:
4 characters:
· "Light blue column": represents the trading volume of large entities.
· "Red column": represents the trading volume of whales.
· "Green column": represents the trading volume of large investors.
· "Gray column": represents the trading volume of retail investors.
🧿Tip I:
Identify upside willingness. When the market is rising and the column representing large entities and whales appear, it means that the willingness to buy is strong, and the market is rising healthily at this time.
However, when the market continues to rise,but large entities and whales disappear, and only retail investors are trading intensively. At this time, we need to be vigilant. Large entities and whales may be quietly leaving the market, so don’t be cut off.
🧿Tip II:
Recognize bottom-buying sentiment. Most retail investors stop loss and leave the market at the end of the decline, which is the favorite scene of large entities and whales, because they can pick up a lot of cheap chips.
When falling, pay attention to their movements. If the blue and red column that represent large entities and whales appear frequently, it means that they are actively buying. It is possible that the downward momentum will weaken and usher in a short-term bottom.
🧿Tip III:
This indicator is an open indicator that describes the trading methods and participation time of participants at all levels. There are different forms of expression in fluctuation, trends, rises, and falls. It cannot be generalized, and must be analyzed with reference to the market sentiment at that time.
*The signals in the indicators are for reference only and not intended as investment advice. Past performance of a strategy is not indicative of future earnings results.
Autocorrelation OscillatorReleasing the autocorrelation oscillator.
NOTE! Please be sure to read the description. This is a theoretical indicator and its important to understand the theory behind its use.
About the indicator:
Before getting into the indicator and its functionality, its important to discuss the theoretical underpinnings of the indicator.
The autocorrelation oscillator operates on two theories of market behaviour that go hand in hand. Those theories are the market efficiency theory and the random walk theory (or hypothesis ).
Market efficiency theory: The market efficiency theory or "Efficient Market Hypothesis (EMH)" postulates that all available information is reflected in a ticker's price almost instantaneously and thus it is impossible for an investor or trader to get ahead of the market because we cannot respond to the speed that the market responds. Of course, there are many holes in this theory, the most notable being that the market is a function of humans. Absent humans and their technological integrations into the market, the market would cease to react at all. But that's besides the point. This is a widely accepted theory and one in which I can mathematically observe through statistical tests. The truth behind this theory is the market is efficient for responding to evolving economic and financial information, likely owning to huge amounts of computer and algorithmic integration into trading, and thus the market is more efficient than the average person is capable (absent computerized algorithms and integration) of ascertaining nuanced financial and economic circumstances. By the time we the people can appraise information, the market has already acted on it. And that is the main premise of the EMH.
The next theory is the Random Walk Theory or Hypothesis (RWH). This builds on the EMH and essentially postulates that the market reacts so quickly to price in current circumstances that it is too random for people to truly exploit and benefit from.
The result of these two theories is two-fold and can be summarized as such:
a) The market behaves in a chaotic fashion that is seemingly random and is incapable of being predicted effectively; and
b) The market is more efficient than a person in incorporating key fundamental information, contributing to the high degree of seemingly random behaviour.
So, how does this help us?
It is said, because of the EMH and the RWH, the only way to truly exploit the market for profit is by:
a) Buying and holding and investing under the bias that stocks will eventually rise in value; or
b) For short term trading, exploiting the pricing anomalies within the data.
So how do we exploit pricing anomalies within the data?
Well, in my own research on market efficiency and behaviour, I have identified many ways of figuring out some anomalies. One of the most effective ways is by looking at simple correlation of lagged values, or autocorrelation for short.
What is autocorrelation and how to use it in relation to EMH and RWH?
Autocorrelation refers to the correlative relationship among the values in a series. Put simply, its the relationship of the same variable over time. For example, if we wanted to look at the auto-correlation of a ticker's high price, we would take, say, 5 to 7 previous high prices and correlate them with the current high price in a series dataset. If the EMH and RWH are true, the correlation among all the variables should have an average less than 0.5 or greater than -0.5. This would indicate true randomness in the dataset and thus an efficient market.
However, if the average of all of the sum's of these correlations are greater than or equal to 0.5 or less than or equal to -0.5, that indicates there is a high degree of autocorrelation and thus the EMH ad RWH is being invalidated as the market is not operating efficiently. This is an anomaly and this anomaly can be exploited.
So how do we exploit it?
Well, when the EMH and RWH hypothesis is being invalidated, we can expect what I coin as a "Regression to Chaos" i.e. the market will revert back to an efficient equilibrium state. So if we have a high correlation of the lagged variables and a strong uptrend or downtrend correlation, we can expect an inefficient market to correct back to an efficient market (i.e. have a reversal from the current trend).
So how does the indicator work?
The indicator measures the lagged correlation of the previous 5 highs and lows of a ticker. A high correlation among all of the highs and lows that exceeds 0.8 would be an invalidation of the EMH and RWH and thus signal a correction to come (i.e. a Regression to Chaos).
The indicator will display this by changing colour. Red for a bearish reversal and green for a bullish. Let's take a look below using the ticker MSFT:
Above we can see the indicator identifying observed inefficiencies within the MSFT ticker on the 1 minute timeframe. The green vertical lines correspond to potential bullish reversals as a result of bearish inefficiencies, the red correspond to bearish reversals as a result of bullish inefficiencies.
You can see these lead to reversals within the ticker.
Components of the indicator:
In the chart above we see the following that are being indicated by arrows:
Red Arrows: Show the identified inefficiencies. Red for bullish inefficiencies (i.e. bearish reversal), green for bearish inefficiencies (i.e. bullish reversal)
Yellow Arrow: The lagged variable chart. This will display the current correlation among all the lagged variables the indicator is assessing.
Teal arrow: Displays the current strength of the trend by correlating the trend to time. A strong negative value (i.e. a value less than or equal to -0.5) indicates a strong downtrend, a strong positive value indicates the inverse.
You can unselect the data-tables in the settings menu if you just want to view the correlation line itself. This part of the indicator is customizable. You can also define the lookback period; however, it is strongly recommended to leave it at 14 as this maintains the use of this indicator as an oscillator.
And that is the indicator! Let me know your comments, questions and feedback below.
Safe trades everyone!
Order Block Scanner - Institutional ActivityIntroducing the Order Block Scanner: Unleash the Power of Institutional Insight!
Unlock a whole new realm of trading opportunities with the Order Block Scanner, your ultimate weapon in the dynamic world of financial markets. This cutting-edge indicator is meticulously designed to empower you with invaluable insights into potential Institutional and Hedge Funds activity like never before. Prepare to harness the intelligence that drives the giants of the industry and propel your trading success to new heights.
Institutional trading has long been veiled in secrecy, an exclusive realm accessible only to the chosen few. But with the Order Block Scanner, the doors to this realm swing open, inviting you to step inside and seize the advantage. Our revolutionary technology employs advanced algorithms to scan and analyze market data, pinpointing the telltale signs of institutional activity that can make or break your trades.
Imagine having the power to identify key levels where Institutional and Hedge Funds are initiating significant trades. With the Order Block Scanner, these hidden order blocks are unveiled, allowing you to ride the coattails of the market giants. This game-changing tool decodes their strategies, offering you a window into their actions and allowing you to align your trading decisions accordingly.
Forget the guesswork and uncertainty that plague so many traders. The Order Block Scanner empowers you with precision and clarity, helping you make informed decisions based on real-time data. Identify when the big players enter or exit the market, recognize their accumulation or distribution patterns, and position yourself for maximum profit potential.
Step into the realm of trading mastery and unleash your potential with the Order Block Scanner. Elevate your trading game, tap into the world of institutional trading, and take your profits to soaring heights. Don't let opportunity pass you by – invest in the Order Block Scanner today and embark on a thrilling journey toward trading success like never before.
The algorithm operates on data from Options and Darkpool markets, which is first exported to Quandl DB and then imported to TradingView using an API. The indicator also identifies patterns based on volume, volatility, and market movements, increasing the number of identified institutional activities on the markets.
ICT Macros [LuxAlgo]The ICT Macros indicator aims to highlight & classify ICT Macros, which are time intervals where algorithmic trading takes place to interact with existing liquidity or to create new liquidity.
🔶 SETTINGS
🔹 Macros
Macro Time options (such as '09:50 AM 10:10'): Enable specific macro display.
Top Line , Mid Line , Bottom Line and Extending Lines options: Controls the lines for the specific macro.
🔹 Macro Classification
Length : A length to detect Market Structure Brakes and classify macro type based on detection.
Swing Area : Swing or Liquidity Area selection, highest/lowest of the wick or the candle bodies.
Accumulation , Manipulation and Expansion color options for the classified macros.
🔹 Others
Macro Texts : Controls both the size and the visibility of the macro text.
Alert Macro Times in Advance (Minutes) : This option will plot a vertical line presenting the start of the next macro time. The line will not appear all the time, but it will be there based on remaining minutes specified in the option.
Daylight Saving Time (DST) : Adjust time appropriate to Daylight Saving Time of the specific region.
🔶 USAGE
A macro is a way to automate a task or procedure which you perform on a regular basis.
In the context of ICT's teachings, a macro is a small program or set of instructions that unfolds within an algorithm, which influences price movements in the market. These macros operate at specific times and can be related to price runs from one level to another or certain market behaviors during specific time intervals. They help traders anticipate market movements and potential setups during specific time intervals.
To trade these effectively, it is important to understand the time of day when certain macros come into play, and it is strongly advised to introduce the concept of liquidity in your analysis.
Macros can be classified into three categories where the Macro classification is calculated based on the Market Structure prior to macro and the Market Structure during the macro duration:
Manipulation Macro
Manipulation macros are characterized by liquidity being swept both on the buyside and sellside.
Expansion Macro
Expansion macros are characterized by liquidity being swept only on the buyside or sellside. Prices within these macros are highly correlated with the overall trend.
Accumulation Macro
Accumulation macros are characterized by an accumulation of liquidity. Prices within these macros tend to range.
The script returns the maximum/minimum price values reached during the macro interval alongside the average between the maximum/minimum and extends them until a new macro starts. These levels can act as supports and resistances.
🔶 DETAILS
All required data for the macro detection and classification is retrieved using 1 minute data sets, this includes candles as well as pivot/swing highs and lows. This approach guarantees the visually presented objects are same (same highs/lows) on higher timeframes as well as the macro classification remain same as it is in 1 min charts.
8 Macros can be displayed by the script (4 are enabled by default):
02:33 AM 03:00 London Macro
04:03 AM 04:30 London Macro
08:50 AM 09:10 New York Macro
09:50 AM 10:10 New York Macro
10:50 AM 11:10 New York Macro
11:50 AM 12:10 New York Launch Macro
13:10 PM 13:40 New York Macro
15:15 PM 15:45 New York Macro
🔶 ALERTS
When an alert is configured, the user will have the ability to be notified in advance of the next Macro time, where the value specified in 'Alert Macro Times in Advance (Minutes)' option indicates how early to be notified.
🔶 LIMITATIONS
The script is supported on 1 min, 3 mins and 5 mins charts.
🔶 RELATED SCRIPTS
Local Model Kalman Market ModeIntroduction
Heyo guys, I made a new (repainting) indicator called Local Model Kalman Market Mode.
I created it, because I wanted a reliable market mode filter for a potential mean-reversion strategy (e. g. BB Scalping).
On the screenshot you can see an example of how to use it in a BB strategy.
E.g. you would enter long when you have bullish divergence, price is under lower BB, price is under PoC and this indicator here shows range-bound market phase.
You would exit long on cross of the middle band.
Description
The indicator attempts to model the underlying market using different local models (i.e., trending, range-bound, and choppy) and combines them using the T3 Six Pole Kalman Filter to generate an overall estimate of the market.
The Fisher Transform is applied on the price to reach a Gaussian distribution, which increases the accuracy of the indicator itself.
The script first defines state variables for each local model, which include trend direction, trend strength, upper and lower bounds of the range, volatility of the range, level of choppiness, and strength of noise.
Then, likelihood functions are defined for each local model based on the state variables.
Next, the script calculates weights for each local model based on their likelihoods and uses them to calculate state variables for the overall estimate.
Finally, the script combines the state variables using the T3 Six Pole Kalman Filter to generate the overall estimate of the market, which is plotted in blue.
Fundamental Knowledge
To understand the explanation of the indicator and the script, there are a few fundamental concepts that you need to know:
Market: A market is a place where buyers and sellers come together to exchange goods or services.
In the context of trading, the market refers to the exchange where financial instruments such as stocks, currencies, and commodities are bought and sold.
Local models: Local models are statistical models that attempt to capture the characteristics of a particular market regime.
For example, a trending market may have different characteristics than a range-bound market or a choppy market.
The indicator uses different local models to capture the different market regimes.
Trend direction and strength: The trend direction refers to the direction in which the market is moving, either up or down.
The trend strength refers to the magnitude of the trend and how likely it is to continue.
Range-bound market: A range-bound market is a market where prices are trading within a specific range, with a clear upper and lower bound.
Choppiness: Choppiness refers to the degree of irregularity in price movements, often seen in sideways or range-bound markets.
Volatility: Volatility refers to the degree of variation in the price of an asset over time. High volatility implies larger price swings, while low volatility implies smaller price swings.
Kalman filter: A Kalman filter is a mathematical algorithm used to estimate an unknown variable from a series of noisy measurements.
In the context of the indicator, the Kalman filter is used to generate an overall estimate of the market by combining the local models.
T3 Six Pole Kalman Filter: The T3 Six Pole Kalman Filter is a specific type of Kalman filter that is used to smooth and filter time-series data, such as the price data of a financial instrument.
Fisher Transform: The Fisher Transform is a mathematical formula used to transform any probability distribution into a Gaussian normal distribution. It is commonly used in technical analysis to transform non-Gaussian indicators into ones that are more suitable for statistical analysis.
By understanding these fundamental concepts, you should have a basic understanding of how the indicator works and how it generates an overall estimate of the market.
Usage
You can use this indicator on every timeframe.
Users can customize the parameters of the T3 Six Pole Kalman Filter (T3 length, alpha, beta, gamma, and delta) using input functions.
Try out different parameter combinations and use the one you like most.
Thank you for checking this out. Leave me a comment or boost the script, when you wanna support me! 👌
--
Credits to:
▪@HPotter - Fisher Transform
▪@loxx - T3
▪ChatGPT - Helped me to make the research for this indicator and helped to build the core algorithm.
Diddly - Liquidity ZonesDiddly Liquidity Zones is an indicator to highlight where the liquidity exists in a market place.
What is Liquidity
Liquidity refers to the ability of an asset to be turned into cash. Cash is the more liquid form of any asset, whereas selling a house would take a little longer to liquidate and convert to cash.
Liquidity in financial markets is in essence based on the same principle and refers to how easily an asset can be bought and sold.
Liquidity in simple terms is the volume of participants who are willing to be involved in the market at any given time. Markets are based on auction theory, the more participants who want to buy at a certain price than sell, will dictate that the price goes up. As a result it is important to understand the role that volume has in financial markets, as volume will directly correlate to liquidity and supply and demand.
What does it mean?
Areas of abnormal liquidity and volume can lead to a price range where there is high supply and demand, which in turn can become a zone that forms a support and resistance level in the future. As we all know what happens in the past does not mean it will happen in the future, but what liquidity zones will tell us is that in the past a higher number of people were interested in doing business at those prices, which is critical information when making trading decisions.
Although markets are based on auction theory, sadly we don't have the advantage of a traditional auction, where we are all sitting in a room putting our hands in the air when we are interested in paying x price for a particular item. In this environment it is very clear to see how popular the item for sale is and whether it is possible to pick up a bargain.
Being able to identify liquidity areas on a chart, provides an insight into market sentiment at a given price range. Also we have to consider that typically most retail traders participate in very liquid markets, where you can get in and out of a position with relative ease.
There are obviously exceptions, extremely low float stocks, but on the whole with liquid assets it takes some big orders to move price, especially with currencies and high float stocks. Understanding these principles helps us as retail traders identify where the big money is seeing a bargain, if buying or overpriced if selling.
However you identify liquidity, I hope you agree that it is an extremely important element to be considering before taking a trade. The last thing any trader wants to be doing if they can help it, is selling where the market perceives price to be a bargain and buying when overpriced.
Just as a side note, high and low "Float Stocks" refers to the number of shares in general circulation for buying and selling.
What is Diddly Liquidity Zones
This liquidity zones indicator in simple terms will plot zones on the chart and make an assessment of whether this is predominately buying or selling liquidity. Price will frequently come back to test areas of liquidity before making any further continuation in a specific direction. This is why liquidity zones are often described as areas of support and resistance.
How does it Work
To identify these zones the indicator is looking at a number of pieces of information predominantly based on volume.
Volume
Rate of Change
Relative Strength
From these calculations the algorithm is then looking for the standard deviation away from the normal, to identify exceptions that then become the liquidity zones. These can be classified up to 4 levels, the first being the weakest exception to four being the strongest. By default 3 levels are displayed.
What is the Indicator Showing me?
The Liquidity Zones indicator comprises two basic elements: Bull Zones and Bear Zones.
Zones that are not broken in the past are projected forward and can act as strong support and resistance levels that can also be used for targets or ignoring a trade due to lack of room above or below.
Here on AUDCHF 15 minute chart, during March 2023, it provides an example of the three indicator zone types. Details have been annotated on the chart.
The third type of zone is a “Trap Zone” which can be extremely powerful for identifying potential reversals. A Trap Zone can be either Trapped Buyers or Trapper Sellers. In essence it is a Zone that is identified, but price can never trade above or below in the direction of the zone.
As an example if a bear zone is identified and price fails to trade below the lower edge and bounces immediately out of the top. The trap is set and the indicator changes the zone from the default green (bull) or red (bear) zone to a different colour, which is orange by default.
As price moves higher away from the zone, those in their short positions start to feel the pain. The higher the move away before a retracement the higher the pain. When the retracement finally comes and price returns to the zone, you will often see price bounce off the zone for the move back to retest the highs, following the same principles of support and resistance.
In this example above a resistance level is broken, which has been identified by a volume exception identified by the indicator, when price returns to that area it now becomes support as those traders in short positions look to cover at breakeven.
Here on EURUSD 15 minute chart, during the last week in March 2023, it provides a great example of a "trap zone" setup. Details have been annotated on the chart.
Usage
This indicator will compliment any existing strategy or could be traded as part of a support and resistance trading strategy. One of the great advantages of support and resistance is that levels and zones are identified ahead of time, so trades can be planned and considered well in advance.
There is also the advantage of where to stop out, once a support or resistance level is broken then we no longer want to be in that trade. We have to accept the facts that the market sentiment has changed and no longer sees price here as good value for bull zones or overpriced at bear zones.
You will sometimes see spikes of price through a zone, where the market has grabbed the liquidity in the form of stops on the other-side, which can be extremely frustrating as a trader, but important to understand that it does happen and why it is happening.
You will find liquidity zones on all charts, from the daily to the 1 second chart. The higher the timeframe, the wider the zones are. As a result we would not recommend planning an entry purely on a daily zone, but it is extremely useful information when drilling into the lower time frame charts. So using multiple timeframe analysis is a really useful technique when looking to understand a market.
There are a number of elements to consider before taking entries around support and resistance levels. The most important thing to remember is these levels have to break at some point, otherwise price would never go anywhere. Understanding that these levels can fail is important and is the reason we should always have clearly defined stops and manage risk.
You may also want to consider higher timeframe trend analysis to try and ensure you are trading with the trend. First and second retests work better as these zones will weaken over multiple retests as traders give up on that area, as it no longer is giving the reactions of price that it used to.
The easiest entry method when working with support and resistance levels, is to place limit orders in the market. This is not a recommended approach, although it can be useful for traders who can't sit in front of charts all day. By taking this approach you would want to ensure that you are trading with the predominant trend on a higher timeframe and are in effect using these levels on a lower timeframe as pullback entries. You would also want to ensure that you have a wide enough stop to ensure that any spikes through don't stop out the trade, so using an Average True Range multiplier can be very helpful. The key point is don't oversize and manage risk.
A better approach to identifying entries would be to look at price action on a lower time frame chart, once price has arrived at the level.
A more conservative approach would be to wait for price to close outside the zone in the direction you want to trade on the signal chart and look for an entry on the retest of the top of the zone for buys or the bottom of the zone for the sells, with the stop the other-side of the zone.
For the purpose of examples we will focus on the last two methods, although there are many sources of information on how to trade support and resistance levels, so please don't take the above as the only way to plan or take entries.
Multiple Timeframe Alignment
Here on a stock asset MSFT (Microsoft), we have a zoomed out 15 minute chart. The top left is August 2022 and the bottom right is November 2022, which is quite a sell-off and there were many opportunities to the short side, although many traders would have been looking to see when this stock was at a bargain price.
Here on the 7th November 2022, there were the first signs of a potential change in market sentiment, as the indicator identified a Bull Zone on the 15 minute chart. At this stage the stock has been beaten up for a long time and there is a Bear Zone, above price - so not much distance to get a decent risk reward trade as yet.
Then on the Thursday of the same week, price came back to test the high of this previously created Bull Zone, after being rejected from the Bear Zone above.
So drilling into the 1 minute chart to find good risk : reward entries, price at the opening bell explodes through Bear Zones in the above chart and prints a big 1 minute Bull Zone. This on its own would be hard to trade, is it a fake out? price must surely retrace before a move higher, also there is a trapped buyers zone above price, so there will be a lot of liquidity and sell orders at that level.
Here again on the 1 minute chart, we see the breakout of the orange zone with a new Bull Zone (which is coloured blue, being a 2nd level zone) . Now we just want to see this zone being confirmed by breaking the top and then we would look for entries on the retest.
Price action is now ready for taking a buy entry for a short-term swing trade as illustrated on the next chart.
About a month later the price hit the target, as shown on the 4 hour chart.
The target was set on the 15 min chart, being the next substantial level of a bear zone. Also on the 1 hour chart above, a big green bull zone of liquidity was identified, so there's a fair chance that price will come back to retest liquidity before a greater move away. The trade planner has been removed from this chart, so it is easier to see the printed zones, but the entry was at the 238.00
You will see since January 2023 there have been many opportunities on this stock using the 15 minute chart to find zones to trades and manage risk. The one thing that is clear in this chart is where the market sentiment was on this stock as it made the run-up to current price.
Alerting
Utilising the power of TradingView Alerts enables you to monitor many pairs, when you are away from your charts. You can set up alert for the indicator, by right-clicking on a zone that you see on a chart and choose the first option that appears on the menu "Add Alert to Diddly Zones". You can also perform the same operation from the indicator tile that appears in the top left corner of the chart.
Within setting you can choose to be alerted under the following conditions:
When New Bull Zone has been Identified
When New Bear Zone has been Identified
When Price approaches a Bear Zone from below. Notifying traders that we are approaching a resistance level
When Price approaches a Bull Zone from above. Notifying traders that we are approaching a support level
When Price is Trading inside a Zone at a certain configurable time.
On the last point above: This is useful on a slightly higher timeframe, where large zones exist and you may want to be notified if this asset is trading in a zone at say the London open. You would have already been sent an alert telling you price was arriving at the zone, but that could have been a couple of days ago.
Key Settings
Within the indicator settings there are a number of options that are available to users. From changing the colours and their transparency of different zone types, to the number of exception levels that you want to see on the chart.
The most important ones that are in need of explanation are outline below:
To simplify the settings, the indicator is configured by using a similar analogy to driving style. The reason this is needed is because different assets and asset classes have different levels of liquidity, as a result the indicator requires some basic information to provide the best results. The principle being the faster you drive the more zones you will encounter.
To continue with the analogy, it is important not to drive too fast on a particular asset otherwise all you will see is zones and nowhere for price to go. If this is the case, slow the setting down or go to a higher time frame for a broader perspective.
Settings
"Determine Algo Driving Style" : Available options = "Slow", "Steady", "Sports", "Racing", "Rocket" (Default Setting = Sports)
So this is setting the speed of the indicator
"Turn on Turbo Mode" : True or False (Default Settings = True)
This setting will give the indicator a boost
"What type of asset is the Algo looking at" : Available Options = "Small Caps", "Large Caps", "Futures", "Currencies" (Default Setting = Currencies)
The only difference in these settings currently is a magnification element that is applied to the calculations, which is particularly relevant for highly liquid assets like currencies, futures and large cap stock. The only option that by default does not use the magnification element is Small Cap low float stocks, where liquidity is lower this setting is not required. This magnification can be change later in the settings under "Zone Identification Calculation Models"
Finally
We greatly appreciate the support and feedback from the Trading View community, and we are dedicated to continuing to improve our indicators with your support.
We want to help you manage risk, and that's why we emphasise that trading is risky and any technology used to support our trading decisions is based on information from the past. We encourage traders to take responsibility for their trading businesses and always prioritise risk management.
Strategy Developer ToolSolar Strategies: Strategy Developer Tool Complete Guide
This guide provides full explanation of the intended purpose of our script along with individual explanation of each input and the logic behind them coupled with general knowledge which we find useful in using our tool regarding elements of risk and strategy. Use this information wisely and understand we are not providing financial advise, this is a learning tool meant to help advance traders knowledge of the markets and their strategies which are formed as such.
Basics
Before getting into the specifics of how to use our strategy developer tool, it's important to understand a few basic fundamental things about it. The purpose of the tool is to allow the user to optimize a strategy through back testing with our strategy tracker and 50+ user inputs. The way you optimize your strategy depends on a couple things:
The state of the current and recent previous market.
The timeframe you trade on.
The types of trades you prefer. (swings, scalps, etc.)
How much risk you are willing to take on.
Risk Basics:
Going off the last bullet point on the list above, risk plays a huge part in how you optimize your strategy, with that being said here are a few general rules of risk as they relate to trades:
The more trades you take on, the more risk you are opening your strategy up to.
If done correctly, more trades will often result in more profit with slightly lower accuracy, and more risk.
The less trades you take on, the easier it is to have higher accuracy because ideally by rooting out the losing trades, you are left with fewer overall trades but mostly winning trades.
Less trades with higher accuracy often result in less profit but will 100% be less risky than the opposite. (More trades, less accurate, more profit, MORE RISK)
Input Basics:
More trades, less trades, more risk, less risk, what does this all mean as it relates to our tool?
The 50+ user inputs that allow you to optimize and create your strategy all effect when the script takes a trade.
Many of the inputs are essentially conditions. By changing these inputs, what you are doing is changing how specific the conditions need to be in order to take a trade.
This is how the inputs tie into the bullet point list above regarding risk and the number of trades you take on. By raising or lowering certain inputs, you are making the conditions more or less specific on when to trade.
Making conditions more specific will allow for less trades to be taken and will often result in a higher win rate, and less associated risk.
Making conditions less specific will allow for more trades to be taken and depending on the state of the market, could result in more profit being realized, but at the same time opens you up to more risk because you are stating a more general set of conditions in order to take a trade.
How does it work?
Our strategy developer tool is based on two simple factors in order to identify specific areas in the market deemed good for trade. They are as follows:
Directional momentum to identify when a move might happen.
A confirmation of the desired move.
Indicators:
The tool gets its information on these two factors from two custom built indicators which are hard coded into the script. These two indicators and the inputs which affect them can be found labeled with Indicator 1 or Indicator 2 in the tool's settings.
When the conditions are met based on the factors of both indicators, it then decides your stop losses and take profits using pivot points.
Indicator 1 is the momentum indicator.
Indicator 2 looks for confirmation of the move.
Hedges:
Since nothing is ever certain when trading, our tool also aims to minimize potential loss before it can happen by incorporating hedges when a signal prints in the opposite direction of the trade you are currently in.
To identify when to hedge, the candles will appear with the opposite color of your original trade. Candles, while in a long trade, appear as green and candles while in a short trade appear as red. While in a long trade the only time red candles will appear is when a hedge occurs and vice versa for shorts.
Example: If you just took a long trade based on a long signal that the script gave off, but a short signal prints off while you are in the long, you are directed to sell half your long position and enter that half into a short position. Since there is now more uncertainty in the long because of the short signal, minimizing your position size and having a smaller position in the opposite direction allows you to cover your bases if the trade moves against you. If it doesn’t move against you and ends up going long as originally intended, you are not to lose any money, likely a small profit or break even when all is said and done.
In order to give the hedges a greater change of hitting, the take profits are smaller than a normal trade, this way even if your hedge wasn’t necessary and the original trade does not move against you, it's likely that your hedge will still win, and you can just consider it a small scalp to further your profits on the original trade.
Doubles:
Besides minimizing loss, we also aim to maximize the potential gain. When a second signal prints off in the direction of the trade you are currently already in, the tool directs you to double your position size.
The signal for doubling is a label with “2x” written inside.
The logic here is similar to hedging but in the opposite way. Just as a signal in the opposite direction creates uncertainty, a signal in the same direction indicates more certainty hence doubling your position size.
Example: If you are currently in a long position and you get a second long signal, you would then double your existing position since two long signals printing off before the first one has a chance to play out indicates a stronger chance of movement in the intended direction of your trade.
User Inputs
Upon opening the tools settings tab, you will find all the user inputs which can then be modified to fit your desired strategy. In this section of our guides, you will find individual explanations and use cases for each input so you can correctly use them to your best advantage.
Strategy Tracker Table:
By ticking this input on, the strategy tracker table will be visible to the user. (Default is on)
Indicator 1 Greater Than: Long:
By ticking this input on, you are adding a condition the script will then look for in order to take a long. (Default is on)
This condition is that an average of indicator 1, which searches for momentum, must fall above a certain level, which is determined in the next input.
The purpose of this is to ensure that the average momentum is not too low because this would indicate prolonged downwards movement on the timeframe of the market being observed, making a long position riskier.
Indicator 1 Greater Than Input: Long:
This input correlates to the previous input directly above.
If Indicator 1 Greater Than: Long is ticked on, then one of the conditions in order to take a long position will be that the average of indicator 1 must fall above the level which you set in this input.
max level 100, min level 0
Indicator 1 Less Than: Long
By ticking this input on, you are adding a condition the script will then look for in order to take a long position. (Default is on)
This condition is that an average of indicator 1, which searches for momentum, must fall below a certain level, which is determined in the next input.
The purpose of this is to ensure that the average momentum is not too high, because this would indicate a prior significant upwards movement or trend on the timeframe of the market being observed.
Taking a long position while the average momentum is at higher levels exposes the risk of longing as the market has started to pull back from a peak or when the market has just reached a peak.
Indicator 1 Less Than Input: Long
This input correlates to the previous input directly above.
If Indicator 1 Less Than: Long is ticked on, then one of the conditions in order to take a long position will be that the average of indicator 1 must fall below the level which you set in this input.
max level 100, min level 0
Indicator 1 Greater Than: Short
By ticking this input on, you are adding a condition the script will then look for in order to take a short. (Default is on)
This condition is that an average of indicator 1, which searches for momentum, must fall above a certain level, which is determined in the next input.
The purpose of this is to ensure that the average momentum is not too low because this would indicate prolonged downwards movement or trend on the timeframe of the market being observed.
Taking a short position while the average momentum is at lower levels exposes the risk of shorting as the market has started to recover from a bottom or when the market has just reached a bottom.
Indicator 1 Greater Than Input: Short
This input correlates to the previous input directly above.
If Indicator 1 Greater Than: Short is ticked on, then one of the conditions in order to take a short position will be that the average of indicator 1 must fall above the level which you set in this input.
max level 100, min level 0
Indicator 1 Less Than: Short
By ticking this input on, you are adding a condition the script will then look for in order to take a short position. (Default is on)
This condition is that an average of indicator 1, which searches for momentum, must fall below a certain level, which is determined in the next input.
The purpose of this is to ensure that the average momentum is not too high, because this would indicate a prior significant upwards movement or trend on the timeframe of the market being observed.
Taking a short position while the average momentum is at higher levels exposes the risk of shorting as the market is currently in a strong uptrend.
Indicator 1 Less Than: Short
This input correlates to the previous input directly above.
If Indicator 1 Less Than: Short is ticked on, then one of the conditions in order to take a short position will be that the average of indicator 1 must fall below the level which you set in this input.
max level 100, min level 0
Summary of Input Group: Indicator 1 Greater/Less Than Long/Short
This grouping of inputs is best used as a filter of sorts, much like many of the other inputs which are also essentially filters of the market to find areas ripe for trade. Specifically, however, this group of inputs is especially powerful because if used correctly, it can specify a range for the average momentum to fall in when looking for either long or short trades. Think of it like a sweet spot where the average is not too high nor too low. In combination with the numerous other inputs which will shortly be explained, this sweet spot can be a great indication. Keep in mind that once you find a working range, this will not last forever. Conditions in the market are ever changing and as such your inputs, in this case the range the average momentum must fall in, will also need to change with the market conditions.
Bars Since Crossover:
This input simply describes a crossover of the momentum indicator (indicator 1) and its average.
In the category How does it work? Two main factors are discussed, the first being directional momentum to determine when an upwards move might happen. The crossover correlated to this input is the directional momentum as mentioned earlier.
As also mentioned in How does it work? The second factor is a confirmation of the desired upwards move. This confirmation is a crossover of the current price and indicator 2 which will be further addressed later on.
What's important to understand about the two key factors at play in regard to Bars Since Crossover is that this input is determining a condition which looks for a certain number of bars prior to the confirmation of indicator 2 which the crossover of momentum and its average has happened on indicator 1.
Example: Bars Since Crossover input is set to 10. This means that the crossover of momentum and its average from indicator 1 must be within 10 bars prior to the confirmation from indicator 2. If this happens then this condition is met for a long position.
Bars Since Crossunder:
This input simply describes a crossunder of the momentum indicator (indicator 1) and its average.
In the category How does it work? Two main factors are discussed, the first being directional momentum to determine when a downwards move might happen. The crossunder correlated to this input is the directional momentum as mentioned earlier.
As also mentioned in How does it work? The second factor is a confirmation of the desired downwards move. This confirmation is a crossunder of the current price and indicator 2 which will be further addressed later on.
What's important to understand about the two key factors at play in regard to Bars Since Crossunder is that this input is determining a condition which looks for a certain number of bars prior to the confirmation of indicator 2 which the crossunder of momentum and its average has happened on indicator 1.
Example: Bars Since Crossunder input is set to 10. This means that the crossunder of momentum and its average from indicator 1 must be within 10 bars prior to the confirmation from indicator 2. If this happens then this condition is met for a short position.
Summary of Input Group: Bars Since Crossover/Crossunder
These two inputs can have a large effect on the types of trades being taken and the risk which your strategy opens up to. The idea is that in order for the two key factors described in How does it work? to be correlated and therefore indicate a strong directional move, the two events must happen within a somewhat small period of time. If the period of time between the two events taking place is too large, then it's riskier for your strategy due to a delay in directional momentum and the necessary confirmation. It's important to note that this “small period of time” is relative to the security you're trading and the timeframe its being trades on. Small could mean 5 bars in some cases or 20 bars in others, this is why our custom back tester exists. So that the process of optimization on different securities and different timeframes is smooth and only requires adjustments to inputs then your own analysis of the back test results.
Indicator 1 Input Long
Defines how strong the upwards momentum needs to be in order to take a long position.
When optimizing your strategy, this input is likely to have some of the most effect on when the script takes a long position.
The reasoning for this is because the level you set for this input is the level which indicator 1 must close above following the crossover of its average.
Example: Indicator 1 Input Long set to 50, this means that when the momentum crosses over its average from indicator 1, upon the close of this crossover the momentum must be above the level 50 in order for this condition to be met to take a long position.
The higher the level, the stronger the upwards momentum must be, and therefore by using higher levels for this input, the script will search for stronger directional moves leaving less chance for the trade to move against you.
Indicator 1 Input Short
Defines how strong the downwards momentum needs to be in order to take a short position.
When optimizing your strategy, this input is likely to have some of the most effect on when the script takes a short position.
The reasoning for this is because the level you set for this input is the level which indicator 1 must close below following the crossunder of its average.
Example: Indicator 1 Input Short set to 40, this means that when the momentum crosses under its average from indicator 1, upon the close of this crossunder the momentum must be below the level 40 in order for this condition to be met to take a short position.
The lower the level, the stronger the downwards momentum must be, and therefore by using lower levels for this input, the script will search for stronger directional moves leaving less chance for the trade to move against you.
Summary of Input Group: Indicator 1 Input Long/Short
These two inputs are so important to your strategy because at the end of the day no matter how you set it up, it's still a momentum-based strategy. With that being said the level of momentum or the strength needed in order to take trades is of course going to be a key decider in the successfulness of the strategy. When optimizing these two inputs make sure to take into account what the overall market conditions are, meaning if it’s a bull market maybe make the momentum needed to take a long slightly less comparatively to the amount needed to take a short, in other words make long conditions less specific and short conditions more specific. Slight variations of this input can have very big effects, even changing it by 1 or 2 can make a major difference. In might even be good to consider starting optimization with these inputs and then work the rest of the strategy out from there. A lot could be said about these inputs and more docs will be added in order to further explain more strategy approaches revolving around them, for now don’t hesitate to ask any questions.
Indicator 2 Red
This input is used as a sort of chop filter at its base level, however if used correctly it can be a much broader filter for what areas of the market you want to trade in.
Indicator 2 shows as either red or green and is used as a confirmation when price crosses over it following the crossover of momentum and its average from indicator 1 to take a long position.
If ticked on, Indicator 2 Red states a condition in order for the script to take a long position. (Default is on)
The condition is that upon the crossover of the current price and Indicator 2, 10 bars ago indicator 2 must have been red.
The reason for this input is because the current color of indicator 2 upon the crossover must also be red. However, this condition is hard coded in and cannot be changed by any input.
This is because the type of trade being targeted is that of a type of reversal or continuation.
If indicator 2 showed green 10 bars ago and is currently red this would indicate that a top was just reached, and price is reversing downwards making this not a good area to take a long.
Another scenario if indicator 2 showed green 10 bars ago and is currently red is that there is currently a sideways trend going on or otherwise known as chop, also not an ideal area to take a long
However, if 10 bars ago indicator 2 was red and it's currently red this would indicate a more prolonged pullback.
If all conditions are met and we know that price has been pulling back, now we can enter a long with more knowledge pointing to price reversing upwards from a downwards trend, or continuing its upwards trend after a pullback.
Indicator 2 Green
This input is used as a sort of chop filter at its base level, however if used correctly it can be a much broader filter for what areas of the market you want to trade in.
Indicator 2 shows as either red or green and is used as a confirmation when price crosses under it following the crossunder of momentum and its average from indicator 1 to take a short position.
If ticked on, Indicator 2 Green states a condition in order for the script to take a short position. (Default is on)
The condition is that upon the crossunder of the current price and Indicator 2, 10 bars ago indicator 2 must have been green.
The reason for this input is because the current color of indicator 2 upon the crossunder must also be green. However, this condition is hard coded in and cannot be changed by any input.
This is because the type of trade being targeted is that of a type of reversal or continuation.
If indicator 2 showed red 10 bars ago and is currently green this would indicate that a bottom was just reached, and price is reversing upwards making this not a good area to take a short.
Another scenario if indicator 2 showed red 10 bars ago and is currently green is that there is currently a sideways trend going on or otherwise known as chop, also not an ideal area to take a short.
However, if 10 bars ago indicator 2 was green and it's currently green this would indicate a more prolonged upwards movement.
If all conditions are met and we know that price has been moving up, now we can enter a short with more knowledge pointing to price reversing downwards from an upwards trend, or continuing its downwards trend after a bounce up.
Summary of Input Group: Indicator 2 Red/Green
Similar to Indicator 1 Greater/Less Than Long/Short, the goal of these inputs is to try to get a picture of what the previous recent market has been doing. By getting this picture it's easier to find different areas of the market more ideal for trades. Different from Indicator 1 Greater/Less Than Long/Short though, Indicator 2 Red/Green is directly correlated to the price action in the market rather than the momentum. By switching these on or off you are setting more or less specific conditions for taking trades. Some markets require this extra condition to lower your risk in your strategy, however others may not.
Pivot Low
This input is used to define the number of bars the script will look back to grab a pivot low when taking a long position.
This pivot low is then used to set the stop loss when entering a long position.
This input is very important and optimizing it correctly can be extremely crucial to your strategies success.
The Strategy Developer tool uses a 1:1 risk to reward ratio when setting your first take profit point, so when the script looks back to get a pivot low based on the input you set, it will then set your first take profit at an equal ratio to the stop loss found from the pivot low.
The goal in optimizing this input is to give enough lookback to find real pivot points where price has reversed off of, but not to give too much lookback where its grabbing previous pivot points unrelated to the current move of momentum the script is giving a long signal from.
Consider the type of trades you're looking for in your strategy and what timeframe you are trying to trade on.
Longer swing trades which aim to catch bigger moves in the market, possibly on higher time frames, may require a further lookback in order to get your take profits in the correct positioning to catch the desired move, and not exit early before the trade has fully played out.
Shorter scalp trades may aim to catch smaller moves and therefore you don’t want to allow for too much risk by having a large stop loss and large take profits as a result.
Pivot Low 2
Pivot low 2 can be thought of as a backup lookback in order to get the correct pivot low.
In an input which will be discussed shortly called Pivot Low Minimum, you can set a minimum percentage for your pivot low to be, if the pivot low does not meet the minimum then the script will look to Pivot Low 2’s input to use as a bar lookback in order to get the correct pivot low.
This input is used because you might find a Pivot Low input that works well for the majority of the trades in your back tested strategy, however, there will always be outliers and when this Pivot Low input falls short of getting the correct level to put your stop losses at, Pivot Low 2 is used.
Pivot Low 2’s input should always be higher than Pivot Low’s input, that way you can allow the script to look back further in time to find the correct level when the minimum is not met.
Pivot High
This input is used to define the number of bars the script will look back to grab a pivot high when taking a short position.
This pivot high is then used to set the stop loss when entering a short position.
This input is very important and optimizing it correctly can be extremely crucial to your strategies success.
The Strategy Developer tool uses a 1:1 risk to reward ratio when setting your first take profit point, so when the script looks back to get a pivot high based on the input you set, it will then set your first take profit at an equal ratio to the stop loss found from the pivot high.
The goal in optimizing this input is to give enough lookback to find real pivot points where price has reversed off of, but not to give too much lookback where its grabbing previous pivot points unrelated to the current move of momentum the script is giving a short signal from.
Consider the type of trades you're looking for in your strategy and what timeframe you are trying to trade on.
Longer swing trades which aim to catch bigger moves in the market, possibly on higher time frames, may require a further lookback in order to get your take profits in the correct positioning to catch the desired move, and not exit early before the trade has fully played out.
Shorter scalp trades may aim to catch smaller moves and therefore you don’t want to allow for too much risk by having a large stop loss and large take profits as a result.
Pivot High 2
Pivot high 2 can be thought of as a backup lookback in order to get the correct pivot high.
In an input which will be discussed shortly called Pivot High Minimum, you can set a minimum percentage for your pivot high to be, if the pivot high does not meet the minimum then the script will look to Pivot High 2’s input to use as a bar lookback in order to get the correct pivot high.
This input is used because you might find a Pivot High input that works well for the majority of the trades in your back tested strategy, however, there will always be outliers and when this Pivot High input falls short of getting the correct level to put your stop losses at, Pivot High 2 is used.
Pivot High 2’s input should always be higher than Pivot High’s input, that way you can allow the script to look back further in time to find the correct level when the minimum is not met.
Pivot Low Risk Tolerance
This input is very important in managing the risk associated with your strategy.
Pivot Low Risk Tolerance is defining a maximum percentage the pivot low can be away from your entry.
Since the pivot low that’s found is assigned to your stop loss and directly affects the placement of your take profits when taking a long position, making sure the pivot low isn’t too far down is crucial.
Depending on the types of trades you're aiming to take, the timeframe you choose to trade on, and the leverage you use in your strategy, you may want to assign a higher risk tolerance or a lower one.
Example: Pivot Low Risk Tolerance input set to 3, this means that when all other conditions are met in order to take a long position, when searching for the pivot low in order to set a stop loss, if the script finds the pivot low is greater than 3% away from the entry point, it will not take the trade.
Pivot High Risk Tolerance
This input is very important in managing the risk associated with your strategy.
Pivot High Risk Tolerance is defining a maximum percentage the pivot high can be away from your entry.
Since the pivot high that’s found is assigned to your stop loss and directly affects the placement of your take profits when taking a short position, making sure the pivot high isn’t too far up is crucial.
Depending on the types of trades you're aiming to take, the timeframe you choose to trade on, and the leverage you use in your strategy, you may want to assign a higher risk tolerance or a lower one.
Example: Pivot High Risk Tolerance input set to 3, this means that when all other conditions are met in order to take a short position, when searching for the pivot high in order to set a stop loss, if the script finds the pivot high is greater than 3% away from the entry point, it will not take the trade.
Pivot Low Minimum
Sometimes when searching for the pivot low, the script's defined lookback may not be enough to find the proper pivot point.
This can cause improper placement of stop losses and take profits and may cause trades to be exited early before they can fully play out in your favor.
Pivot Low Minimum is an input used to combat this problem, when the script finds a pivot low that does not meet the minimum percentage away from the entry point, it will then turn to Pivot Low 2 input in order to gain a further lookback and grab the correct pivot point to set your stop loss and take profits with.
When reading and setting this input, understand that setting it to 1 means there is no minimum, setting it to 0.9 would mean the minimum is a 10% difference between the pivot low and your entry point.
Think of it in terms of decimals and their equivalent percentage, 0.1 is equal to 10%, 0.01 is equal to 1%.
Whatever percentage you want to set for a minimum, convert it to a decimal, then simply subtract it from 1.
Example: Say you desire a 1.5% minimum pivot low and as a result an equivalent stop loss of 1.5% below your long entry and furthermore a take profit 1.5% above your long entry since the script uses a 1:1 ratio. Converting 1.5% to a decimal would give you 0.015, then subtracting it from 1 would give you 0.985, this would be the input assigned to Pivot Low Minimum.
Pivot High Minimum
Sometimes when searching for the pivot high, the script's defined lookback may not be enough to find the proper pivot point.
This can cause improper placement of stop losses and take profits and may cause trades to be exited early before they can fully play out in your favor.
Pivot High Minimum is an input used to combat this problem, when the script finds a pivot high that does not meet the minimum percentage away from the entry point, it will then turn to Pivot High 2 input in order to gain a further lookback and grab the correct pivot point to set your stop loss and take profits with.
When reading and setting this input, understand that setting it to 1 means there is no minimum, setting it to 0.9 would mean the minimum is a 10% difference between the pivot high and your entry point.
Think of it in terms of decimals and their equivalent percentage, 0.1 is equal to 10%, 0.01 is equal to 1%.
Whatever percentage you want to set for a minimum, convert it to a decimal, then simply subtract it from 1.
Example: Say you desire a 1.5% minimum pivot high and as a result an equivalent stop loss of 1.5% above your short entry and furthermore a take profit 1.5% below your short entry since the script uses a 1:1 ratio. Converting 1.5% to a decimal would give you 0.015, then subtracting it from 1 would give you 0.985, this would be the input assigned to Pivot High Minimum.
Summary of Input Group: Pivot Low/High - Pivot Low/High 2 – Pivot Low/High Risk Tolerance – Pivot Low/High Minimum
The first key takeaway from all these inputs is that your stop losses and take profits will be directly affected through optimizing any of them. The second key takeaway is that these inputs are crucial in managing the risk in your strategy, and while this has been said many times throughout the guide for various inputs, when it comes to stop losses and take profits it is especially true. Having a stop loss which is too high opens up the possibility for much bigger losses, and as a result your take profits will also be too high, minimizing the chance of any of them being hit. Having a stop loss which is too low increases the chance that your trade will get stopped out preemptively, before the trade can mature and move in your favor because remember that trades will not always move immediately in the intended direction, a good amount of patience is often involved in creating consistent successful trades and a successful strategy as such. On the same note, too low of a stop loss could also mean you are missing out on unrealized profit since your take profits are a direct result of the stop loss which is found. When optimizing your pivot low/high risk tolerance, think not about how much you are willing to lose on a single trade, but how much your portfolio can actually afford to lose not just on a single trade but multiple trades, sometimes even in a row. Obviously, the goal in creating a strategy is that you avoid losing trades and especially multiple in a row, however, there are many things that can’t be accounted for. The only way to manage this unaccounted risk is to use proper risk management and not open yourself up to big losses even in the worst most unlikely scenarios. Even if you don’t lose multiple trades in a row, ask yourself, could I afford to lose multiple trades with the risk tolerance I have set if everything were to go to $hit, (hopefully it would not), but in the off chance it did, instead of beating yourself up over what you did wrong, you’ll be patting yourself on the back for what you did right.
TP2-4 Long Placement
The first thing to understand about the take profit placement is that our system of stop losses and take profits uses a 1:1 risk to reward ratio for the first stop loss and first take profit.
This means that if your stop loss falls 2% below your long entry, your first take profit will be 2% above your long entry, hence 1:1.
As for take profits 2-4, they are just extensions of that ratio. This means that if TP2 Long Placement is set to 1.5, the ratio for your second take profit is 1:1.5.
Using the same percentage from the second bullet point being 2%, we can now gather that with a 1:1.5 ratio our second take profit would be at 3% above our long entry.
The same applies for the rest of the take profits, meaning whatever the take profit is set at regardless of which one, apply that number to the second placeholder of the ratio.
Example: First stop loss falls 2% below long entry. TP2 Long Placement input set to 1.5; risk to reward ratio is 1:1.5; corresponding percentage would be a 3% gain. TP3 Long Placement input set to 2; risk to reward ratio is 1:2; corresponding percentage would be a 4% gain. TP4 Long Placement input set to 2.5; risk to reward ratio is 1:2.5; corresponding percentage would be a 5% gain.
The next key thing to understand about the trailing take profits system is the position size being sold at each take profit and therefore how the strategy tracker calculates your strategy's profit.
At the first take profit, 50% of your position is being calculated as sold, locking in good profits off the bat.
At TP2, 20% of your position is being calculated as sold, leaving a remaining 30% open to gain more profit.
At TP3, another 20% of your position is being calculated as sold, leaving 10% to collect any additional possible gains.
At TP4 the remaining 10% of your position is sold and the trade will be fully closed out.
SL2-4 Long Placement
Our system of trailing stop losses is completely similar to that of our trailing take profits.
Just like the trailing take profits, the inputs for stop losses 2-4 are also used as the second placeholders in the risk to reward ratio.
This may be confusing since generally stop losses are associated with a loss on your position, however, the only stop loss which results in a loss on your position is the first one, not stop losses 2-4.
This is because once your first take profit is hit on your long, your stop loss will automatically move up to the price equivalent to the ratio which you set using these inputs that lies in profit.
Example: Since your first take profit will always be at a 1:1 risk to reward ratio with your stop loss, your second take profit could be at a 1:0.8 ratio. So, to clarify, once your first take profit is hit at a 1:1, your original first stop loss will now be moved up in profits to just below your first take profit at a 1:0.8 risk to reward ratio. This only happens AFTER the first take profit is hit.
For stop losses 3 and 4, the same logic is true, once TP2 is hit, your second stop loss will now be moved up to the placement of SL3 which will fall somewhere below TP2. Once TP3 is hit, your third stop loss will now be moved up to the placement of SL4 which will fall somewhere below TP3. If stop loss 4 does not get hit, then the only thing left to happen is for TP4 to hit and the trade will fully close out.
The one major difference between our system of trailing stop losses and take profits is that no matter what stop loss is hit, the entire remainder of your position will be calculated as sold.
So, if your first take profit hits and sells 50% of your long position, but the trade does not continue upwards and moves down to your second stop loss, the remaining 50% of your position will be calculated as sold.
The same applies to SL3 and SL4, so at SL3 the remaining 30% of your position will be calculated as sold, and at SL4 the remaining 10% will be calculated as sold.
Your trailing stop loss placement is dependent on what types of trades you desire. For shorter scalps on smaller timeframes, it's recommended to place each stop loss just below each corresponding take profit for long trades.
This way you leave just enough room for the trade to continue upwards if there is enough momentum, but you don’t open yourself up to losing your unrealized profit if it does not make this continuation.
If you desire longer swing trades on higher timeframes, it might be a good idea to leave more room in between the take profit and corresponding stop loss.
This way you leave more room for the trade to mature and move in your favor since when trading longer moves, often they will not shoot straight up but rather have a series of small pullbacks throughout the more general upwards trend.
Note that when a long trade is first entered the only stop loss and take profit in play are your original stop loss found by the pivot low which would result in a loss, and the first take profit at a 1:1 risk to reward ratio from that pivot low.
TP2-4 Short Placement
The first thing to understand about the take profit placement is that our system of stop losses and take profits uses a 1:1 risk to reward ratio for the first stop loss and first take profit.
This means that if your stop loss falls 2% above your short entry, your first take profit will be 2% below your short entry, hence, 1:1.
As for take profits 2-4, they are just extensions of that ratio. This means that if TP2 Short Placement is set to 1.5, the ratio for your second take profit is 1:1.5.
Using the same percentage from the second bullet point being 2%, we can now gather that with a 1:1.5 ratio our second take profit would be at 3% below our short entry.
The same applies for the rest of the take profits, meaning whatever the take profit is set at regardless of which one, apply that number to the second placeholder of the ratio.
Example: First stop loss falls 2% above short entry. TP2 Short Placement input set to 1.5; risk to reward ratio is 1:1.5; corresponding percentage would be a 3% gain. TP3 Short Placement input set to 2; risk to reward ratio is 1:2; corresponding percentage would be a 4% gain. TP4 Short Placement input set to 2.5; risk to reward ratio is 1:2.5; corresponding percentage would be a 5% gain.
The next key thing to understand about the trailing take profits system is the position size being sold at each take profit and therefore how the strategy tracker calculates your strategy's profit.
At the first take profit, 50% of your position is being calculated as sold, locking in good profits off the bat.
At TP2, 20% of your position is being calculated as sold, leaving a remaining 30% open to gain more profit.
At TP3, another 20% of your position is being calculated as sold, leaving 10% to collect any additional possible gains.
At TP4 the remaining 10% of your position is sold and the trade will be fully closed out.
SL2-4 Short Placement
Our system of trailing stop losses is completely similar to that of our trailing take profits.
Just like the trailing take profits, the inputs for stop losses 2-4 are also used as the second placeholders in the risk to reward ratio.
This may be confusing since generally stop losses are associated with a loss on your position, however, the only stop loss which results in a loss on your position is the first one, not stop losses 2-4.
This is because once your first take profit is hit on your short, your stop loss will automatically move down to the price equivalent to the ratio which you set using these inputs that lies in profit.
Example: Since your first take profit will always be at a 1:1 risk to reward ratio with your stop loss, your second take profit could be at a 1:0.8 ratio. So, to clarify, once your first take profit is hit at a 1:1, your original first stop loss will now be moved down in profits to just below your first take profit at a 1:0.8 risk to reward ratio. This only happens AFTER the first take profit is hit.
For stop losses 3 and 4, the same logic is true, once TP2 is hit, your second stop loss will now be moved down to the placement of SL3 which will fall somewhere above TP2. Once TP3 is hit, your third stop loss will now be moved down to the placement of SL4 which will fall somewhere above TP3. If stop loss 4 does not get hit, then the only thing left to happen is for TP4 to hit and the trade will fully close out.
The one major difference between our system of trailing stop losses and take profits is that no matter what stop loss is hit, the entire remainder of your position will be calculated as sold.
So, if your first take profit hits and sells 50% of your short position, but the trade does not continue downwards and moves up to your second stop loss, the remaining 50% of your position will be calculated as sold.
The same applies to SL3 and SL4, so at SL3 the remaining 30% of your position will be calculated as sold, and at SL4 the remaining 10% will be calculated as sold.
Your trailing stop loss placement is dependent on what types of trades you desire. For shorter scalps on smaller timeframes, it's recommended to place each stop loss just above each corresponding take profit for short trades.
This way you leave just enough room for the trade to continue downwards if there is enough momentum, but you don’t open yourself up to losing your unrealized profit if it does not make this continuation.
If you desire longer swing trades on higher timeframes, it might be a good idea to leave more room in between the take profit and corresponding stop loss.
This way you leave more room for the trade to mature and move in your favor since when trading longer moves, often they will not shoot straight down but rather have a series of small bounces throughout the more general downwards trend.
Note that when a short trade is first entered the only stop loss and take profit in play are your original stop loss found by the pivot high which would result in a loss, and the first take profit at a 1:1 risk to reward ratio from that pivot high.
Summary of Take Profit/Stop Loss Placement:
Correctly placed take profits and stop losses are essential in having a successful strategy and proper risk management. With that being said there are also many ways in which to use this system. Deciding how to set them up is really just a matter of determining the trading style you aim to succeed with. Once this has been determined, the placement of take profits and stop losses should be easier to configure. However, if there is any confusion on either of these topics as the ratios and corresponding TP/SL can get confusing, please do not hesitate to ask further questions in our discord!
Leverage Long
Leverage Long input simply defines the leverage used in your long positions, and is used in calculating the profit in Strategy Tracker
A rundown of risk associated with using leverage will not be given here since it should assume that if you're using leverage, you should already understand the risks.
If you are not using any leverage, then set Leverage Long input to 1.
Long Position Size
This input defines the position size you are using in your long trades.
This input is also used in calculating profit in Strategy Tracker.
Long Hedge Position Size
This input is used to define the position size of long hedge positions.
This input is also used in calculating profit in Strategy Tracker.
Important: Your Long Hedge Position Size should always be half of your Long Position Size for accurate profit calculation.
Double Long Position Size
This input is used to define the position size when in a double long.
This input is also used in calculating profit in Strategy Tracker
Important: Your Double Long Position Size should always be double your Long Position Size for accurate profit calculation.
Short Position Size
This input defines the position size you are using in your short trades.
This input is also used in calculating profit in Strategy Tracker.
Short Hedge Position Size
This input is used to define the position size of short hedge positions.
This input is also used in calculating profit in Strategy Tracker.
Important: Your Short Hedge Position Size should always be half of your Short Position Size for accurate profit calculation.
Double Short Position Size
This input is used to define the position size when in a double short.
This input is also used in calculating profit in Strategy Tracker
Important: Your Double Short Position Size should always be double your Short Position Size for accurate profit calculation.
A Message From the Developer PLEASE READ!!!
If you have made it this far in the guide, I applaud you and thank you for sticking with it as I know there is a lot of information here! This is not an exaggeration when I say there are hundreds of millions of possible variations that could be applied throughout all the inputs which is why I much prefer to call this a tool rather than an algorithm. Algorithm is a loaded word in my opinion as it comes with an implication of guarantee in the trades being made. This is not meant to discourage anybody from taking trades based off the tool which is also why I provided the option for automated alerts which through third party software can turn into automated trades; if you have the confidence in your strategy by all means I encourage you to trade it, automated or not. Just please understand that it's highly recommended to also apply your own knowledge and analysis before taking a trade as historical back testing data has its limitations and cannot always account for current market conditions. The real applicability does not fall in what the back tester window is saying you would have made or how accurate your strategy would have been, it's within the sheer number of markets and scenarios this tool can be used in and the information you can get which a human just can’t comprehend all at once; its literally endless. I urge all of you to be creative and think outside the box about what you can do with such a powerful tool at your fingertips. After all this is the reason why so many inputs were provided. Another main goal of this project was to give users a better understanding of risk management. It can be hard to manage your risk when it’s all kept in your head, but when you can modify your strategy to better manage your risk by simply optimizing a few inputs, it’s a lot easier to comprehend and actually apply when trading. The last thing I want to say is have fun working through the possible learning curve in using this tool, it may be a process but enjoy it because the one thing I can guarantee is that you will come out the other side a better trader than before!
Morogan's Cloud Construction KitThis script allows you to build your own customized ribbon/cloud out of a combination of up to 10 moving averages of various lengths/types. The maximum and minimum of all the moving averages considered simultaneously at each period define the envelope of the cloud. Each moving average can be plotted or invisible and selectable for inclusion in the construction of the cloud. The defaults provide an example of a simple cloud plus individual moving averages.
Available Moving Average Algorithms:
SMA
EMA
SMMA (RMA)
WMA
VWMA
LSMA
T3
TEMA
The cloud color defaults to green when price closes above the cloud, red when price closes below, and gray when price closes within the cloud. You can disable the coloring of the cloud so that the cloud is a uniform color if that is your preference. There is also an option to highlight the boundaries of the cloud (default: OFF).
I have spent many hours testing clouds build upon various combinations of moving averages with this script. I suspect that you will, too. Enjoy!
RSI Bands [APIDEVs]RSI BANDS:
It is an exclusive product of ApiDevs, this indicator selectively integrates a series of highly advanced algorithms that aim to provide the trader with an effective and profitable trading system, based on a series of conditions that project the price direction with a reasonable probability.
This indicator bears the name of “RSI Bands”, this is because we have based this trading system on the “Relative Strength Index ( RSI )”, the strength of this indicator is centennial and we at APIDEVs have decided to focus our efforts on the development of powerful tools based on the favorite indicators of the afternoon.
WHAT IT HAS INCORPORATED:
1. Exponential Moving Average (EMAs): The RSI Bands has, by default, a band composed of two moving averages of 10 and 55 exponential periods, which can be modified in the indicator menu.
• Possibility of changing the value of the EMAs.
• Function was enabled to change the color and transparency of the bands.
• Visual alerts SHORT (L) and LONG (L) were added when there is the crossing of the EMAS.
• Hull Moving Average ( HMA ) of 100 periods was also incorporated, also modifiable for those who wish to strengthen their visual analysis. (Disabled by default)
• We also add an Exponential Moving Average ( EMA ) of 200 periods to mark the trend. (Disabled by default).
2. ATR ( Average True Range ): This indicator has two main functions in the RSI Bands, the first is to mark the trend of the asset and the second is to establish a margin of safety in price volatility , that is, a maximum estimate of the setbacks without this representing a change in the direction of the price.
3. RSI ( Relative Strength Index ): It was visually incorporated into the RSI Bands, the graph is obtained on the right side and its purpose is to visually indicate where the price is with respect to the RSI PRO+ indicator, offering the following improvements :
• ALERT SYSTEM: THE RSI PRO+ has the ADX incorporated into its algorithm, which allows establishing a filter that will provide reliable inputs, represented by the LONG (L) and SHORT (S) signals.
• FILTER AGAINST TREND: The signals described above will be activated according to the crossing of the RSI above the 50 point, provided that the ADX agrees with the market direction.
• Possibility of deactivating this graphical representation.
4. ADX ( Average Directional Index ): The ADX in this indicator is intended to estimate the strength of the movement, it is present in each part of the code, either to indicate the strength of the market or to serve as a filter against trend. In the same way, we apply certain exclusive improvements for this indicator:
• It was established as default values of the ADX that the Level Range was 10 and the Level Trend 25. This significantly changes the behavior of this indicator, almost completely eliminating the zone of disinterest that was usually considered.
• A function was activated to paint the sails the color of the ADX .
5. ADX Ocillator: Yes, we developed a Wave oscillator type ADX and incorporated it into this strategy. From this indicator, which we recommend using in conjunction with the RSI Bands, we extracted the LONG (L) and SHORT (S) signals. The ADX Oscillator is the improved version of the traditional ADX as it offers the following improvements:
• Its interpretation is much simpler.
• Allows you to set entry and exit signals during the trend change and during the price path.
• It has an integrated alert system.
STRATEGY PANEL:
This panel is an exclusive creation of APIDEVs, and its purpose is to parameterize five conditionals based on the indicators that make up our RSI strategy, giving the trader an immediate vision of the status of the asset analyzed considering this strategy. That is, we decided to transfer our experience of using this indicator on a panel that will project the price trajectory visually. It has the following characteristics:
• It can be placed anywhere on the screen through the main menu of the indicator, it can even be deactivated.
• It can be resized, we designed this to adapt to all types of screens, including those of mobile phones.
• It has an upper panel called "Project" which will calculate the percentage probability that the price has to take a direction based on all the indicators incorporated into the strategy. Their values range from (+ 100%) to (-100%).
STRATEGY PANEL PARAMETERS:
1. EMAs: This panel has 2 variables:
• LONG: If the fast EMA is above the slow EMA .
• SHORT: If the fast EMA is below the slow EMA .
2. RSI: This panel has 3 variables:
• LONG: The RSI should be bullish (green) and above the 50 point.
• SHORT: The RSI should be bearish (red) and be below the 50 point.
• RANK: (Range)this condition is activated when there is no concordance with the RSI condition and its crossing.
3. ATR: This panel has 2 variables:
• LONG: When the price is above the ATR.
• SHORT: When the price is below the ATR.
4. ADX: This panel has 3 variables:
• LONG: The ADX is green. That is, the DI + is above the DI-.
• SHORT: The ADX is red. That is, the DI- is above the DI +.
• RANK: ADX is below point 10.
It also has a numerical value that indicates the value of the ADX and two texts indicating the strength of the trend:
• Trend ( bullish or bearish ).
• Strong trend ( bullish or bearish ).
5. OSC: This panel has 3 variables:
• LONG: The oscillator slopes upward and the built-in ADX is green.
• SHORT: The oscillator slopes downward and the built-in ADX is red.
• RANK: The oscillator slopes downward and the built-in ADX is green and the opposite. In short, there is no coherence in the movement of the oscillator and the projection of the ADX .
dmn's ICT ToolkitThis is my quality of life indicator for forex trading using the methods and concepts of ICT.
The idea is to automate marking up important price levels and times of the day instead of doing it manually every day.
Killzones
Marks the most volatile times of the day on the chart, during which the intraday high/low usually takes place.
Particularly impactful when there's news released during these times.
London Open (02:00-05:00 EST)
New York Open (08:30-11:00 EST)
London Close (10:00-11:30 EST)
True Day delineation
Vertical line at the start of the "true day" (00:00 EST), start of the algorithmic trading day and aids in visualizing the intraday direction.
New York midnight price level
Noteworthy price level at the start of the "true day".
This price level is referenced by the interbank trading algorithms during the day. Buy below it on bullish days, sell above it on bearish days.
Daily open price level
Reference level for optimal trade entries. Buy below it on bullish days, sell above it on bearish days.
Central Banks Dealers Range (CBDR) (14:00-20:00 EST) &
Central Banks Dealers Flout (CBDF) (15:00-24:00 EST) &
Asian Range (AR) (20:00-24:00 EST)
The standard deviation lines available are used to make predictions for short-term future highs/lows when the CBDR and AR are smaller than 40 pips.
Trade them by looking for 5/15min key levels that converge with the projection levels.
X days Average Daily Range (ADR)
Default to 5 days back, gives an idea of how much movement to expect intraday when the ADR high/low is converging with CBDR/CBDF/AR standard deviations.
Current Daily Range (CDR)
Used for comparison against the ADR to help determine if there's enough intraday range left to enter a trade.
Dynamically changes color based on percentage of the ADR. Green below 50% of ADR, orange between 50 and 100%, red when CDR exceeds ADR.
All of the above are used in conjunction with each other and higher timeframe levels of importance to find entries and target.
Note: Preferably use New York's time zone for your charts.
BTC Indicator By Megalodon TradingThis indicator is designed help you see the potential reversal zones and it helps you accumulate for the long run.
This combines price data on any chart. The chart isolates between 0 and -100. Below -80 is a buy, above -20 is a sell location.
In these locations, try to Slowly Buy and Slowly Sell (accumulate...)
Story Of This Indicator
~I was always obsessed with Fibonacci and used Fibonacci all the time. Thus, i wanted to make a tool to see buying locations and selling locations.
Instead of drawing fibonacci's and manually interpreting buy/sell locations, i wanted algorithms to do the job for me. So, i created this algorithm and many more like it.
If you think i did a good job and want to do further work with me, feel free to contact.
I have a ton of other tools that can change everything for your trading/investing.
Best wishes
~Megalodon
Helicopter!Review
This indicator automatically calculates the best trade entry based on volume and real-time volatility. After the algorithm analyzes the current characteristics of the market, an entry signal is placed on the chart. As a result, the trader can be sure that the signal is based on data analysis. One of the key elements is reverse transactions. A long or short position can be stopped either at a profit or at a small loss without compromising the potential profit.
!Risks
The market is unstable, and it is impossible to know what the future holds for it. The only way to manage risk. You can limit the loss by setting a stop loss of 1% from the entry point. Take profit is recommended to set with a ratio of 1:1, 1:2,1:3, with partial fixation of 40%, 30%, 30%!
!Trading recommendations
Trades are opened when a green arrow appears, selling when a yellow arrow appears. Be sure to wait for the candle to close and the signal to appear (the signal may flash when the candle is formed). Recommended timeframes: 1min, 3min, 15min. The indicator is designed for scalp trades and intradays!
!Technical part
The indicator is based on the EMA 20 and EMA 200 moving averages. It is also based on the open and close of past days, weeks, months.
RSI are used.
RSI is a classic oscillator built on the basis of calculating the relative rate of change in asset prices over a given period.
Additional tools: volume and volatility.
NO REPAINT!
-------------------------------------------------------
Denial of responsibility
The information contained in my Scripts/Indicators/Ideas/Algorithms/Systems does not constitute financial advice or an offer to buy or sell any securities of any kind. I do not accept liability for any loss or damage, including but not limited to any loss of profits that may arise directly or indirectly from the use of or reliance on such information.
ICT Anchored IPDA RangesThis script is an anchored variation of my "ICT IPDA Look Back" script. Similarly, it calculates ICT's daily IPDA look back time intervals and their respective discount / equilibrium / premium; however, it also applies the Forward Cast IPDA daily ranges.
The Forward Cast can be used to estimate the time at which IPDA might initiate a change in institutional order flow. This depends on several factors such as time of the year, and time of daily structure break.
> IPDA Basics:
IPDA stands for Interbank Price Delivery Algorithm. Said algorithm appears to be referencing the past 20, 40 , and 60 days intervals as points of reference to define ranges and related PD arrays.
Intraday traders can find most value in the 20 Day Look Back box, by observing imbalances and points of interest.
Longer term traders can reference the 40 and 60 Day Look Back boxes for a clear indication of current market conditions.
Thanks to @atradesdaily for the suggestion.
ICT IPDA Look BackThis script automatically calculates and updates ICT's daily IPDA look back time intervals and their respective discount / equilibrium / premium, so you don't have to :)
IPDA stands for Interbank Price Delivery Algorithm. Said algorithm appears to be referencing the past 20, 40, and 60 days intervals as points of reference to define ranges and related PD arrays.
Intraday traders can find most value in the 20 Day Look Back box, by observing imbalances and points of interest.
Longer term traders can reference the 40 and 60 Day Look Back boxes for a clear indication of current market conditions.
Short PositionThis is a “twin” indicator to the “Long Position” indicator. Both of these indicators share very similar scripting elements, purpose, and calculation logic. Mathematical principles are basically flipped 180° if you were to compare them, although things can be very complex in the coding world.
These indicators are intended to be used separately or in conjunction with each other. The reason they’re separated into two publications is mostly to avoid confusion when navigating through the settings. Settings are also “color-coated” with default colors and we do not think that too much green belongs in the “Short Position” indicator. Also, we believe that if someone wants to sell, they shouldn’t have to think about buying and vice versa.
“How to use” & script information
Upon execution of this script, you will be asked to click on the chart’s timeline. The position will then lock onto the candlesticks in that area and automatically (according to this script’s algorithm) calculate a “reasonable” leverage , as well as stop-loss, targets , and more.
These calculated levels are based on previous volatility for that specific chart and timeframe. Volatility is determined by different elements defined in this script (closed-source). In short, the script’s volatility-based algorithms looks at previous price action and then applies a very precise logic to it.
Now the user has a starting point and can determine if the indicator did a good job or if they want to input their own values. Below are some available functions that also can be enabled in the settings.
Focus-assist: Volatility and position-based signal during strong movements relative to previous volatility.
Dynamic-target: Volatility and position-based target that closes the position when strong movements are identified.
To keep this description short, we will stop here.
Summary
With this indicator, it’s possible to set up “fake” positions and practice or “play” with buying and selling with leverage. You can look at past performance and thereafter use it from day to day and see if you can make the right decisions in the right moments. You can also “invent” your own use cases or maybe you just want to visualize leverage.
Long PositionThis is a “twin” indicator to the “Short Position” indicator. Both of these indicators share very similar scripting elements, purpose, and calculation logic. Mathematical principles are basically flipped 180° if you were to compare them, although things can be very complex in the coding world.
These indicators are intended to be used separately or in conjunction with each other. The reason they’re separated into two publications is mostly to avoid confusion when navigating through the settings. Settings are also “color-coated” with default colors and we do not think that too much red belongs in the “Long Position” indicator. Also, we believe that if someone wants to buy, they shouldn’t have to think about selling and vice versa.
“How to use” & script information
Upon execution of this script, you will be asked to click on the chart’s timeline. The position will then lock onto the candlesticks in that area and automatically (according to this script’s algorithm) calculate a “reasonable” leverage , as well as stop-loss, targets , and more.
These calculated levels are based on previous volatility for that specific chart and timeframe. Volatility is determined by different elements defined in this script (closed-source). In short, the script’s volatility-based algorithms looks at previous price action and then applies a very precise logic to it.
Now the user has a starting point and can determine if the indicator did a good job or if they want to input their own values. Below are some available functions that also can be enabled in the settings.
Focus-assist: Volatility and position-based signal during strong movements relative to previous volatility.
Dynamic-target: Volatility and position-based target that closes the position when strong movements are identified.
To keep this description short, we will stop here.
Summary
With this indicator, it’s possible to set up “fake” positions and practice or “play” with buying and selling with leverage. You can look at past performance and thereafter use it from day to day and see if you can make the right decisions in the right moments. You can also “invent” your own use cases or maybe you just want to visualize leverage.
Implied Volatility Estimator using Black Scholes [Loxx]Implied Volatility Estimator using Black Scholes derives a estimation of implied volatility using the Black Scholes options pricing model. The Bisection algorithm is used for our purposes here. This includes the ability to adjust for dividends.
Implied Volatility
The implied volatility (IV) of an option contract is that value of the volatility of the underlying instrument which, when input in an option pricing model (such as Black–Scholes), will return a theoretical value equal to the current market price of that option. The VIX , in contrast, is a model-free estimate of Implied Volatility. The latter is viewed as being important because it represents a measure of risk for the underlying asset. Elevated Implied Volatility suggests that risks to underlying are also elevated. Ordinarily, to estimate implied volatility we rely upon Black-Scholes (1973). This implies that we are prepared to accept the assumptions of Black Scholes (1973).
Inputs
Spot price: select from 33 different types of price inputs
Strike Price: the strike price of the option you're wishing to model
Market Price: this is the market price of the option; choose, last, bid, or ask to see different results
Historical Volatility Period: the input period for historical volatility ; historical volatility isn't used in the Bisection algo, this is to serve as a comparison, even though historical volatility is from price movement of the underlying asset where as implied volatility is the volatility of the option
Historical Volatility Type: choose from various types of implied volatility , search my indicators for details on each of these
Option Base Currency: this is to calculate the risk-free rate, this is used if you wish to automatically calculate the risk-free rate instead of using the manual input. this uses the 10 year bold yield of the corresponding country
% Manual Risk-free Rate: here you can manually enter the risk-free rate
Use manual input for Risk-free Rate? : choose manual or automatic for risk-free rate
% Manual Yearly Dividend Yield: here you can manually enter the yearly dividend yield
Adjust for Dividends?: choose if you even want to use use dividends
Automatically Calculate Yearly Dividend Yield? choose if you want to use automatic vs manual dividend yield calculation
Time Now Type: choose how you want to calculate time right now, see the tool tip
Days in Year: choose how many days in the year, 365 for all days, 252 for trading days, etc
Hours Per Day: how many hours per day? 24, 8 working hours, or 6.5 trading hours
Expiry date settings: here you can specify the exact time the option expires
*** the algorithm inputs for low and high aren't to be changed unless you're working through the mathematics of how Bisection works.
Included
Option pricing panel
Loxx's Expanded Source Types
Related Indicators
Cox-Ross-Rubinstein Binomial Tree Options Pricing Model
MB Darvas Box The algorithm is related to darvas theory.
Creates resistance and support levels by creating boxes on the chart layout.
It creates flag icons in the form of Down (A) or Up (Y) according to these box breaks about the trend.
Considering the Darvas strategy, it also provides convenience in trailing stop.
-Alarm adding feature is available.
-Box color change can be edited from the settings section.
-Box fill color can be changed.
-Show/unhide history boxes is available in settings.
-Box calculation can be changed in time intervals.
-You must change the Box Limit entry to see fewer boxes.
It will be more meaningful if used together with the volume indicator.
It is not recommended for use in real transactions.
Does not include investment advice.
Algorithms are useful tools for making predictions.
KERPD Noise Filter - Kaufman Efficiency Ratio and Price DensityThis indicator combines Kaufman Efficiency Ratio (KER) and Price Density theories to create a unique market noise filter that is 'right on time' compared to using KER or Price Density alone. All data is normalized and merged into a single output. Additionally, this indicator provides the ability to consider background noise and background noise buoyancy to allow dynamic observation of noise level and asset specific calibration of the indicator (if desired).
The basic theory surrounding usage is that: higher values = lower noise, while lower values = higher noise in market.
Notes: NON-DIRECTIONAL Kaufman Efficiency Ratio used. Threshold period of 30 to 40 applies to Kaufman Efficiency Ratio systems if standard length of 20 is applied; maintained despite incorporation of Price Density normalized data.
TRADING USES:
-Trend strategies, mean reversion/reversal/contrarian strategies, and identification/avoidance of ranging market conditions.
-Trend strategy where KERPD is above a certain value; generally a trend is forming/continuing as noise levels fall in the market.
-Mean reversion/reversal/contrarian strategies when KERPD exits a trending condition and falls below a certain value (additional signal confluence confirming for a strong reversal in price required); generally a reversal is forming as noise levels increase in the market.
-A filter to screen out ranging/choppy conditions where breakouts are frequently fake-outs and or price fails to move significantly; noise level is high, in addition to the background buoyancy level.
-In an adaptive trading systems to assist in determining whether to apply a trend following algorithm or a mean reversion algorithm.
THEORY / THOUGHT SPACE:
The market is a jungle. When apex predators are present it often goes quiet (institutions moving price), when absent the jungle is loud.
There is always background noise that scales with the anticipation of the silence, which has features of buoyancy that act to calibrate the beginning of the silence and return to background noise conditions.
Trend traders hunt in low noise conditions. Reversion traders hunt in the onset of low noise into static conditions. Ranges can be avoided during high noise and buoyant background noise conditions.
Distance between the noise line and background noise can help inform decision making.
CALIBRATION:
- Set the Noise Threshold % color change line so that the color cut off is where your trend/reversion should begin.
- Set the Background Noise Buoyancy Calibration Decimal % to match the beginning/end of the color change Noise Threshold % line. Match the Background Noise Baseline Decimal %' to the number set for buoyancy.
- Additionally, create your own custom settings; 33/34 and 50 length also provides interesting results.
- A color change tape option can be enabled by un-commenting the lines at the bottom of this script.
Market Usage:
Stock, Crypto, Forex, and Others
Excellent for: NDQ, J225, US30, SPX
Market Conditions:
Trend, Reversal, Ranging
End-pointed SSA of FDASMA [Loxx]End-pointed SSA of FDASMA is a modification of Fractal-Dimension-Adaptive SMA (FDASMA) using End-Pointed Singular Spectrum Analysis. This is a multilayer adaptive indicator.
What is the Fractal Dimension Index?
The goal of the fractal dimension index is to determine whether the market is trending or in a trading range. It does not measure the direction of the trend. A value less than 1.5 indicates that the price series is persistent or that the market is trending. Lower values of the FDI indicate a stronger trend. A value greater than 1.5 indicates that the market is in a trading range and is acting in a more random fashion.
See here for more info:
Fractal-Dimension-Adaptive SMA (FDASMA) w/ DSL
What is Singular Spectrum Analysis ( SSA )?
Singular spectrum analysis ( SSA ) is a technique of time series analysis and forecasting. It combines elements of classical time series analysis, multivariate statistics, multivariate geometry, dynamical systems and signal processing. SSA aims at decomposing the original series into a sum of a small number of interpretable components such as a slowly varying trend, oscillatory components and a ‘structureless’ noise. It is based on the singular value decomposition ( SVD ) of a specific matrix constructed upon the time series. Neither a parametric model nor stationarity-type conditions have to be assumed for the time series. This makes SSA a model-free method and hence enables SSA to have a very wide range of applicability.
For our purposes here, we are only concerned with the "Caterpillar" SSA . This methodology was developed in the former Soviet Union independently (the ‘iron curtain effect’) of the mainstream SSA . The main difference between the main-stream SSA and the "Caterpillar" SSA is not in the algorithmic details but rather in the assumptions and in the emphasis in the study of SSA properties. To apply the mainstream SSA , one often needs to assume some kind of stationarity of the time series and think in terms of the "signal plus noise" model (where the noise is often assumed to be ‘red’). In the "Caterpillar" SSA , the main methodological stress is on separability (of one component of the series from another one) and neither the assumption of stationarity nor the model in the form "signal plus noise" are required.
"Caterpillar" SSA
The basic "Caterpillar" SSA algorithm for analyzing one-dimensional time series consists of:
Transformation of the one-dimensional time series to the trajectory matrix by means of a delay procedure (this gives the name to the whole technique);
Singular Value Decomposition of the trajectory matrix;
Reconstruction of the original time series based on a number of selected eigenvectors.
This decomposition initializes forecasting procedures for both the original time series and its components. The method can be naturally extended to multidimensional time series and to image processing.
The method is a powerful and useful tool of time series analysis in meteorology, hydrology, geophysics, climatology and, according to our experience, in economics, biology, physics, medicine and other sciences; that is, where short and long, one-dimensional and multidimensional, stationary and non-stationary, almost deterministic and noisy time series are to be analyzed.
Included:
Bar coloring
Alerts
Signals
Loxx's Expanded Source Types
[blackcat] L3 RMI Trading StrategyLevel 3
Background
My view of correct usage of RSI and the relationship between RMI and RSI. A proposed RMI indicator with features is introduced
Descriptions
The Relative Strength Index (RSI) is a technical indicator that many people use. Its focus indicates the strength or weakness of a stock. In the traditional usage of this point, when the RSI is above 50, it is strong, otherwise it is weak. Above 80 is overbought, below 20 is oversold. This is what the textbook says. However, if you follow the principles in this textbook and enter the actual trading, you would lose a lot and win a little! What is the reason for this? When the RSI is greater than 50, that is, a stock enters the strong zone. At this time, the emotions of market may just be brewing, and as a result, you run away and watch others win profit. On the contrary, when RSI<20, that is, a stock enters the weak zone, you buy it. At this time, the effect of losing money is spreading. You just took over the chips that were dumped by the whales. Later, you thought that you had bought at the bottom, but found that you were in half mountainside. According to this cycle, there is a high probability that a phenomenon will occur: if you sell, price will rise, and if you buy, price will fall, who have similar experiences should quickly recall whether their RSI is used in this way. Technical indicators are weapons. It can be either a tool of bull or a sharp blade of bear. Don't learn from dogma and give it away. Trading is a game of people. There is an old saying called “people’s hearts are unpredictable”. Do you really think that there is a tool that can detect the true intentions of people’s hearts 100% of the time?
For the above problems, I suggest that improvements can be made in two aspects (in other words, once the strategy is widely spread, it is only a matter of time before it fails. The market is an adaptive and complex system, as long as it can be fully utilized under the conditions that can be used, it is not easy to use. throw or evolve):
1. RSI usage is the opposite. When a stock has undergone a deep adjustment from a high level, and the RSI has fallen from a high of more than 80 to below 50, it has turned from strong to weak, and cannot be bought in the short term. But when the RSI first moved from a low to a high of 80, it just proved that the stock was in a strong zone. There are funds in the activity, put into the stock pool.
Just wait for RSI to intervene in time when it shrinks and pulls back (before it rises when the main force washes the market). It is emphasized here that the use of RSI should be combined with trading volume, rising volume, and falling volume are all healthy performances. A callback that does not break an important moving average is a confirmed buying point or a second step back on an important moving average is a more certain buying point.
2. The RSI is changed to a more stable and adjustable RMI (Relative Momentum Indicator), which is characterized by an additional momentum parameter, which can not only be very close to the RSI performance, but also adjust the momentum parameter m when the market environment changes to ensure more A good fit for a changing market.
The Relative Momentum Index (RMI) was developed by Roger Altman and described its principles in his article in the February 1993 issue of the journal Technical Analysis of Stocks and Commodities. He developed RMI based on the RSI principle. For example, RSI is calculated from the close to yesterday's close in a period of time compared to the ups and downs, while the RMI is compared from the close to the close of m days ago. Therefore, in principle, when m=1, RSI should be equal to RMI. But it is precisely because of the addition of this m parameter that the RMI result may be smoother than the RSI.
Not much more to say, the below picture: when m=1, RMI and RSI overlap, and the result is the same.
The Shanghai 50 Index is from TradingView (m=1)
The Shanghai 50 Index is from TradingView (m=3)
The Shanghai 50 Index is from TradingView (m=5)
For this indicator function, I also make a brief introduction:
1. 50 is the strength line (white), do not operate offline, pay attention online. 80 is the warning line (yellow), indicating that the stock has entered a strong area; 90 is the lightening line (orange), once it is greater than 90 and a sell K-line pattern appears, the position will be lightened; the 95 clearing line (red) means that selling is at a climax. This is seen from the daily and weekly cycles, and small cycles may not be suitable.
2. The purple band indicates that the momentum is sufficient to hold a position, and the green band indicates that the momentum is insufficient and the position is short.
3. Divide the RMI into 7, 14, and 21 cycles. When the golden fork appears in the two resonances, a golden fork will appear to prompt you to buy, and when the two periods of resonance have a dead fork, a purple fork will appear to prompt you to sell.
4. Add top-bottom divergence judgment algorithm. Top_Div red label indicates top divergence; Bot_Div green label indicates bottom divergence. These signals are only for auxiliary judgment and are not 100% accurate.
5. This indicator needs to be combined with VOL energy, K-line shape and moving average for comprehensive judgment. It is still in its infancy, and open source is published in the TradingView community. A more complete advanced version is also considered for subsequent release (because the K-line pattern recognition algorithm is still being perfected).
Remarks
Feedbacks are appreciated.
STD-Filtered, Adaptive Exponential Hull Moving Average [Loxx]STD-Filtered, Adaptive Exponential Hull Moving Average is a Kaufman Efficiency Ratio Adaptive Hull Moving Average that uses EMA instead of WMA for its computation. I've also added standard deviation stepping to further smooth the signal. Using EMA instead of WMA turns the Hull into what's called the AEHMA. You can read more about the EHMA here: eceweb1.rutgers.edu
What is the traditional Hull Moving Average?
The Hull Moving Average (HMA) attempts to minimize the lag of a traditional moving average while retaining the smoothness of the moving average line. Developed by Alan Hull in 2005, this indicator makes use of weighted moving averages to prioritize more recent values and greatly reduce lag. The resulting average is more responsive and well-suited for identifying entry points.
What is Kaufman's Efficiency Ratio?
The Efficiency Ratio (ER) was first presented by Perry Kaufman in his 1995 book ‘Smarter Trading‘. It is calculated by dividing the price change over a period by the absolute sum of the price movements that occurred to achieve that change. The resulting ratio ranges between 0 and 1 with higher values representing a more efficient or trending market.
The value of the ER ranges between 0 and 1. It has the value of 1 when prices move in the same direction for the full time over which the indicator is calculated, e.g. n bars period. It has a value of 0 when prices are unchanged over the n periods. When prices move in wide swings within the interval, the sum of the denominator becomes very large compared to the numerator and ER approaches zero.
Some uses for ER:
A qualifier for a trend following trade; a trend is considered “persistent” only when RE is above a certain value, e.g. 0.3 or 0.4 .
A filter to screen out choppy stocks/markets, where breakouts are frequently “fakeouts”.
In an adaptive trading system, helping to determine whether to apply a trend following algorithm or a mean reversion algorithm.
It is used in the calculation of Kaufman’s Adaptive Moving Average (KAMA).
How to calculate the Hull Adaptive Moving Average (HAMA)
Find Signal to Noise ratio (SNR)
Normalize SNR from 0 to 1
Calculate adaptive alphas
Apply EMAs
Included
Bar coloring
Signals
Alerts
Loxx's Expanded Source Types