Chande Kroll Trend Strategy (SPX, 1H) | PINEINDICATORSThe "Chande Kroll Stop Strategy" is designed to optimize trading on the SPX using a 1-hour timeframe. This strategy effectively combines the Chande Kroll Stop indicator with a Simple Moving Average (SMA) to create a robust method for identifying long entry and exit points. This detailed description will explain the components, rationale, and usage to ensure compliance with TradingView's guidelines and help traders understand the strategy's utility and application.
Objective
The primary goal of this strategy is to identify potential long trading opportunities in the SPX by leveraging volatility-adjusted stop levels and trend-following principles. It aims to capture upward price movements while managing risk through dynamically calculated stops.
Chande Kroll Stop Parameters:
Calculation Mode: Offers "Linear" and "Exponential" options for position size calculation. The default mode is "Exponential."
Risk Multiplier: An adjustable multiplier for risk management and position sizing, defaulting to 5.
ATR Period: Defines the period for calculating the Average True Range (ATR), with a default of 10.
ATR Multiplier: A multiplier applied to the ATR to set stop levels, defaulting to 3.
Stop Length: Period used to determine the highest high and lowest low for stop calculation, defaulting to 21.
SMA Length: Period for the Simple Moving Average, defaulting to 21.
Calculation Details:
ATR Calculation: ATR is calculated over the specified period to measure market volatility.
Chande Kroll Stop Calculation:
High Stop: The highest high over the stop length minus the ATR multiplied by the ATR multiplier.
Low Stop: The lowest low over the stop length plus the ATR multiplied by the ATR multiplier.
SMA Calculation: The 21-period SMA of the closing price is used as a trend filter.
Entry and Exit Conditions:
Long Entry: A long position is initiated when the closing price crosses over the low stop and is above the 21-period SMA. This condition ensures that the market is trending upward and that the entry is made in the direction of the prevailing trend.
Exit Long: The long position is exited when the closing price falls below the high stop, indicating potential downward movement and protecting against significant drawdowns.
Position Sizing:
The quantity of shares to trade is calculated based on the selected calculation mode (linear or exponential) and the risk multiplier. This ensures position size is adjusted dynamically based on current market conditions and user-defined risk tolerance.
Exponential Mode: Quantity is calculated using the formula: riskMultiplier / lowestClose * 1000 * strategy.equity / strategy.initial_capital.
Linear Mode: Quantity is calculated using the formula: riskMultiplier / lowestClose * 1000.
Execution:
When the long entry condition is met, the strategy triggers a buy signal, and a long position is entered with the calculated quantity. An alert is generated to notify the trader.
When the exit condition is met, the strategy closes the position and triggers a sell signal, accompanied by an alert.
Plotting:
Buy Signals: Indicated with an upward triangle below the bar.
Sell Signals: Indicated with a downward triangle above the bar.
Application
This strategy is particularly effective for trading the SPX on a 1-hour timeframe, capitalizing on price movements by adjusting stop levels dynamically based on market volatility and trend direction.
Default Setup
Initial Capital: $1,000
Risk Multiplier: 5
ATR Period: 10
ATR Multiplier: 3
Stop Length: 21
SMA Length: 21
Commission: 0.01
Slippage: 3 Ticks
Backtesting Results
Backtesting indicates that the "Chande Kroll Stop Strategy" performs optimally on the SPX when applied to the 1-hour timeframe. The strategy's dynamic adjustment of stop levels helps manage risk effectively while capturing significant upward price movements. Backtesting was conducted with a realistic initial capital of $1,000, and commissions and slippage were included to ensure the results are not misleading.
Risk Management
The strategy incorporates risk management through dynamically calculated stop levels based on the ATR and a user-defined risk multiplier. This approach ensures that position sizes are adjusted according to market volatility, helping to mitigate potential losses. Trades are sized to risk a sustainable amount of equity, adhering to the guideline of risking no more than 5-10% per trade.
Usage Notes
Customization: Users can adjust the ATR period, ATR multiplier, stop length, and SMA length to better suit their trading style and risk tolerance.
Alerts: The strategy includes alerts for buy and sell signals to keep traders informed of potential entry and exit points.
Pyramiding: Although possible, the strategy yields the best results without pyramiding.
Justification of Components
The Chande Kroll Stop indicator and the 21-period SMA are combined to provide a robust framework for identifying long trading opportunities in trending markets. Here is why they work well together:
Chande Kroll Stop Indicator: This indicator provides dynamic stop levels that adapt to market volatility, allowing traders to set logical stop-loss levels that account for current price movements. It is particularly useful in volatile markets where fixed stops can be easily hit by random price fluctuations. By using the ATR, the stop levels adjust based on recent market activity, ensuring they remain relevant in varying market conditions.
21-Period SMA: The 21-period SMA acts as a trend filter to ensure trades are taken in the direction of the prevailing market trend. By requiring the closing price to be above the SMA for long entries, the strategy aligns itself with the broader market trend, reducing the risk of entering trades against the overall market direction. This helps to avoid false signals and ensures that the trades are in line with the dominant market movement.
Combining these two components creates a balanced approach that captures trending price movements while protecting against significant drawdowns through adaptive stop levels. The Chande Kroll Stop ensures that the stops are placed at levels that reflect current volatility, while the SMA filter ensures that trades are only taken when the market is trending in the desired direction.
Concepts Underlying Calculations
ATR (Average True Range): Used to measure market volatility, which informs the stop levels.
SMA (Simple Moving Average): Used to filter trades, ensuring positions are taken in the direction of the trend.
Chande Kroll Stop: Combines high and low price levels with ATR to create dynamic stop levels that adapt to market conditions.
Risk Disclaimer
Trading involves substantial risk, and most day traders incur losses. The "Chande Kroll Stop Strategy" is provided for informational and educational purposes only. Past performance is not indicative of future results. Users are advised to adjust and personalize this trading strategy to better match their individual trading preferences and risk tolerance.
LONG
BigBeluga - BacktestingThe Backtesting System (SMC) is a strategy builder designed around concepts of Smart Money.
What makes this indicator unique is that users can build a wide variety of strategies thanks to the external source conditions and the built-in one that are coded around concepts of smart money.
🔶 FEATURES
🔹 Step Algorithm
Crafting Your Strategy:
You can add multiple steps to your strategy, using both internal and external (custom) conditions.
Evaluating Your Conditions:
The system evaluates your conditions sequentially.
Only after the previous step becomes true will the next one be evaluated.
This ensures your strategy only triggers when all specified conditions are met.
Executing Your Strategy:
Once all steps in your strategy are true, the backtester automatically opens a market order.
You can also configure exit conditions within the strategy builder to manage your positions effectively.
🔹 External and Internal build-in conditions
Users can choose to use external or internal conditions or just one of the two categories.
Build-in conditions:
CHoCH or BOS
CHoCH or BOS Sweep
CHoCH
BOS
CHoCH Sweep
BOS Sweep
OB Mitigated
Price Inside OB
FVG Mitigated
Raid Found
Price Inside FVG
SFP Created
Liquidity Print
Sweep Area
Breakdown of each of the options:
CHoCH: Change of Character (not Charter) is a change from bullish to bearish market or vice versa.
BOS: Break of Structure is a continuation of the current trend.
CHoCH or BOS Sweep: Liquidity taken out from the market within the structure.
OB Mitigated: An order block mitigated.
FVG Mitigated: An imbalance mitigated.
Raid Found: Liquidity taken out from an imbalance.
SFP Created: A Swing Failure Pattern detected.
Liquidity Print: A huge chunk of liquidity taken out from the market.
Sweep Area: A level regained from the structure.
Price inside OB/FVG: Price inside an order block or an imbalance.
External inputs can be anything that is plotted on the chart that has valid entry points, such as an RSI or a simple Supertrend.
Equal
Greather Than
Less Than
Crossing Over
Crossing Under
Crossing
🔹 Direction
Users can change the direction of each condition to either Bullish or Bearish. This can be useful if users want to long the market on a bearish condition or vice versa.
🔹 Build-in Stop-Loss and Take-Profit features
Tailoring Your Exits:
Similar to entry creation, the backtesting system allows you to build multi-step exit strategies.
Each step can utilize internal and external (custom) conditions.
This flexibility allows you to personalize your exit strategy based on your risk tolerance and trading goals.
Stop-Loss and Take-Profit Options:
The backtesting system offers various options for setting stop-loss and take-profit levels.
You can choose from:
Dynamic levels: These levels automatically adjust based on market movements, helping you manage risk and secure profits.
Specific price levels: You can set fixed stop-loss and take-profit levels based on your comfort level and analysis.
Price - Set x point to a specific price
Currency - Set x point away from tot Currency points
Ticks - Set x point away from tot ticks
Percent - Set x point away from a fixed %
ATR - Set x point away using the Averge True Range (200 bars)
Trailing Stop (Only for stop-loss order)
🔶 USAGE
Users can create a variety of strategies using this script, limited only by their imagination.
Long entry : Bullish CHoCH after price is inside a bullish order block
Short entry : Bearish CHoCH after price is inside a bearish order block
Stop-Loss : Trailing Stop set away from price by 0.2%
Example below using external conditions
Long entry : Bullish Liquidity Prints after bullish CHoCH
Short entry : Bearish Liquidity Prints after Bearish CHoCH
Long Exit : RSI Crossing over 70 line
Short Exit : RSI Crossing over 30 line
Stop-Loss : Trailing Stop set away from price by 0.3%
🔶 PROPERTIES
Users will need to adjust the property tabs according to their individual balance to achieve realistic results.
An important aspect to note is that past performance does not guarantee future results. This principle should always be kept in mind.
🔶 HOW TO ACCESS
You can see the Author Instructions to get access.
Rainbow IndicatorName of the indicator: Rainbow indicator
A brief description of the indicator:
Using this indicator, you can see the "margin of safety" for opening a position in shares of fundamentally strong companies with an acceptable P/E level, as well as the price range for closing a position.
The background to the creation of the indicator:
I got the idea to create this indicator thanks to the concept of the "margin of safety", which was invented by the father of value investing - Benjamin Graham. According to his idea, it is reasonable to buy shares of a company only when the price offered by the market is lower than the "intrinsic value" calculated on the basis of financial statements. The value of this difference is the "margin of safety”. At the same time, the indicator does not copy Graham's idea but develops it relying on my own methodology.
So, according to Graham, the "margin of safety" is a good discount to the intrinsic value of the company. That is, if a company's stock is trading at prices that are well below the company's intrinsic value (on a per-share basis), it's a good opportunity to consider buying it. In this case, you will have a certain margin of safety in case the company is in financial distress and its stock price goes down. Accordingly, the greater the discount, the better.
When it comes to the intrinsic value of a company, there are many approaches to determining it - from calculating the Price-to-book value financial ratio to the discounted cash flow method. As for my approach, I am not trying to find the cherished intrinsic value, but I am trying to understand how fundamentally strong the company is in front of me, and in how many years the investment in it will pay off. To determine fundamental strength, I use the appropriate Fundamental Strength Indicator . To estimate the payback period, I use the P/E ratio (*). If I am satisfied with both of these indicators, I move on to the Rainbow Indicator.
(*) If you want to learn more about the P/E ratio, I suggest reading my two articles on TradingView:
Price / Earnings: Interpretation #1
Price/Earnings: amazing interpretation #2
Indicator calculation methodology:
The Rainbow indicator starts with a simple moving average of one year (this is the thick red line in the center). Hereinafter a year will mean the last 252 trading days.
Applying a moving average of this length - is a good way to smooth out sharp price fluctuations which can happen during a year as much as possible, keeping the trend direction as much as possible. Thus, the moving average becomes for me the center of fluctuations of the imaginary pendulum of the market price.
Then the deviations are calculated from the center of fluctuations. To do this, a certain amount of earnings per share is subtracted from and added to the moving average. This is the diluted EPS of the last year.
Deviations with a "-" sign form the Lower Rainbow of four colors:
- The blue spectrum of the lower rainbow begins with a deflection of -4 EPS and ends with a deflection of -8 EPS.
- Green spectrum of the lower rainbow begins with a deflection of -8 EPS and ends with a deflection of -16 EPS.
- The orange spectrum of the lower rainbow begins with a deflection of -16 EPS and ends with a deflection of -32 EPS.
- Red spectrum of the lower rainbow begins with a deflection of -32 EPS and goes to infinity.
The Lower Rainbow is used to determine the price ranges that can be considered for buying stocks. It is in the spectra of the Lower Rainbow that the very "margin of safety" according to my methodology is located. The Lower Rainbow has the boundaries between the spectra as a solid line . And only the red spectrum of the Lower Rainbow has only one boundary.
Deviations with a "+" sign form the Upper Rainbow of four similar colors:
- The red spectrum of the upper rainbow begins with a deflection of 0 EPS and ends with a deflection of +4 EPS.
- The orange spectrum of the upper rainbow begins with a deflection of +4 EPS and ends with a deflection of +8 EPS.
- Green spectrum top rainbow begins with a deflection of +8 EPS and ends with a deflection of +16 EPS.
- The blue spectrum of the upper rainbow begins with a deflection of +16 EPS and goes to infinity.
The Upper Rainbow is used to determine the price ranges that can be considered for selling stocks already purchased. The top rainbow has boundaries between the spectra in the form of crosses . And only the blue spectrum of the upper rainbow has only one boundary.
The presence of the Empty Area (the size of 4 EPS) above the Lower Rainbow creates some asymmetry between the two rainbows - the Lower Rainbow looks wider than the Upper Rainbow. This asymmetry is deliberate because the market tends to fall much faster and deeper than it grows . Therefore, a wider Lower Rainbow is conducive to buying stocks at a good discount during a period of massive "sell-offs.
The situation, when the Lower Rainbow is below the center of fluctuations (the thick red line) and the Upper Rainbow, is above the center of fluctuations is called an Obverse . It is only possible to buy a stock in an Obverse situation .
The situation when the Lower Rainbow is above the center of fluctuations and the Upper Rainbow is below the center of fluctuations is called Reverse . In this situation, the stock cannot be considered for purchase , according to my approach.
Selling a previously purchased stock is possible in both situations: Reverse and Obverse. After loading the indicator, you can see a hint next to the closing price - Reverse or Obverse now.
Due to the fact that the size of the deviation from the center of fluctuation depends on the size of the diluted EPS, several important conclusions can be made:
- The Obverse situation is characteristic of companies that show a profit over the last year.
- The Reverse situation is typical for companies that show a loss over the last year.
- An increase in the width of both rainbows in the Obverse situation tells us about an increase in profits for the company.
- A decrease in the width of both rainbows in the Obverse situation tells us about a decrease in the company's profits.
- An increase in the width of both rainbows in the Reverse situation tells us about an increase in the company's losses.
- A decrease in the width of both rainbows in the Reverse situation tells us about a decrease in the company's losses.
- The higher the profit level of the company, the greater your "margin of safety" should be. This will provide the necessary margin of safety in case you go into a cycle of declining financial results. The appropriate width of the Lower Rainbow will just create this "margin".
- Increased profits in the company (after buying its stock) will allow you to stay in position longer by widening the Upper Rainbow.
- A decrease in profits in the company (after buying its stock) will allow you to close your position more quickly by narrowing the Upper Rainbow.
Conditions for opening and closing positions:
So, the Lower Rainbow has four differently colored spectra: blue, green, orange, and red. Each one highlights the desired range of prices acceptable for buying in an Obverse situation. The blue spectrum is upper with respect to the green spectrum, and the green spectrum is lower with respect to the blue spectrum, etc.
- If the current price is in the Blue Spectrum of the Lower Rainbow, that is a reason to consider that company for buying the first portion (*) of the stock.
- If the current price has fallen below (into the Green Spectrum of the Lower Rainbow), that is a reason to consider this company to buy a second portion of the stock.
- If the current price has fallen below (into the Orange Spectrum of the Lower Rainbow), it is a reason to consider this company to buy a third portion of the stock.
- If the current price has fallen below (into the Red Spectrum of the Lower Rainbow), that is a reason to consider that company to buy a fourth portion of the stock.
(*) The logic of the Rainbow Indicator implies that no more than 4 portions of one company's stock can be purchased. One portion refers to the number of shares you can consider buying at the current price (depending on your account size and personal diversification ratio - see information below).
The Upper Rainbow also has four differently colored spectra: blue, green, orange, and red. Each of them highlights the appropriate range of prices acceptable for closing an open position.
- If the current price is in the red spectrum of the Upper Rainbow, I close one portion of an open position bought in the red spectrum of the Lower Rainbow.
- If the current price is in the orange spectrum of the Upper Rainbow, I close one portion of an open position bought in the orange spectrum of the Lower Rainbow.
- If the current price is in the green spectrum of the Upper Rainbow, I close one portion of an open position bought in the green spectrum of the Lower Rainbow.
- If the current price is in the blue spectrum of the Upper Rainbow, I close one portion of an open position bought in the blue spectrum of the Lower Rainbow.
This position-closing logic applies to both the Obverse and Reverse situations. In both cases, the position is closed in portions in four steps. However, there are 3 exceptions to this rule when it is possible to close an entire position in whole rather than in parts:
- If there is a Reverse situation and the current price is above the thick red line.
- If I decide to invest in another company and I do not have enough available cash to purchase the necessary number of portions.
- If I find out about events that pose a real threat to the further existence of the company (for example, a bankruptcy filing), I can close the position earlier, without waiting for the price to hit the corresponding Upper Rainbow spectrum.
So, the basic scenario of opening and closing a position assumes the gradual purchase of shares in 4 stages and their gradual sale in 4 stages. However, there is a situation where one of the stages is skipped in the case of buying shares and in the case of selling them. For example, because the Fundamental Strength Indicator and the P/E ratio became acceptable for me only at a certain stage (spectrum) or the moment was missed for a transaction due to technical reasons. In such cases, I buy or sell more than one portion of a stock in the spectrum I am in. The number of additional portions will depend on the number of missed spectra. For example, if I have no position in the stock of the company in question, all conditions for buying the stock have been met, and the current price is in the orange spectrum of the Lower Rainbow, I can buy three portions of the stock at once (for the blue, green, and orange spectrum). I will sell these three portions in the corresponding Upper Rainbow spectra (orange, green, and blue). However, if for some reason the orange spectrum of the Upper Rainbow was missed, and the current price is in the green spectrum - I will sell two portions of the three (in the green spectrum). I will sell the last, third portion only when the price reaches the blue spectrum of the Upper Rainbow.
The Rainbow Indicator also helps calculate the number of shares that can be considered for purchase at the current price position in the Lower Rainbow spectra. To do this, you need to go to the indicator settings.
+ Cash in - Cash out +/- Closed profit/loss + Dividends - Fees - Taxes
Here I indicate the amount of funds deposited to my account, withdrawn from it, profit/loss on closed positions, dividends credited to the account, and taxes deducted from the account.
Diversification coefficient
The diversification coefficient determines how diversified I want my portfolio to be. For example, a diversification coefficient of 20 means that I plan to buy 20 share portions of different companies, but no more than 4 portions per company (based on the number of Lower Rainbow spectra).
The cost of purchased shares of this company (fees excluded)
Here I specify the amount of already purchased shares of the company in question in the currency of my portfolio. For example, if at this point in time, I have purchased 1000 shares at $300 per share, and my portfolio is expressed in $, I enter - $300,000.
The cost of all purchased shares in the portfolio (fees excluded)
Here I enter the amount of all purchased shares for all companies in the currency of my portfolio (without commissions spent on the purchase). This is necessary to determine the amount of available funds available to purchase shares.
After entering all the necessary data, I go to the checkbox, by checking it I confirm that the company in question has been studied with the Fundamental Strength Indicator and the P/E ratio, and their values are satisfactory to me. No calculation is performed without the checkbox checked. This is done intentionally because the application of the Rainbow Indicator for stock acquisition purposes is possible only after studying the Fundamental Strength of the company and an acceptable P/E value.
Next, I click "Ok" and get the calculation in the form of a table on the left.
Free cash in the portfolio
This is the amount of free cash available to purchase stocks. Please note that the price of the stock and the funds in your portfolio must be denominated in the same currency. On TradingView, you can choose which currency to display the stock price in.
Cash amount for one portion
The amount of cash needed to buy one portion of a stock. Depends on the diversification ratio entered.
Potential portions amount
Number of portions, available for purchase at the current price. Can be a fractional number.
Cash amount to buy
The amount of cash needed to buy portions available for purchase at the current price.
Shares amount to buy
Number of shares in portions available for purchase at the current price.
The table also contains additional information in the form of the current value of the company's market capitalization and P/E ratio.
Mandatory requirements for using the indicator:
- works only on a daily timeframe;
- the indicator is only applicable to shares of public companies;
- quarterly income statements for the last year are required;
- an acceptable for you P/E ratio is required to consider the company's stock for purchase;
- the Rainbow Indicator only applies in tandem with the Fundamental Strength Indicator. To consider a company's stock for purchase, you need confirmation that the company is fundamentally strong.
What is the value of the Rainbow Indicator?
- clearly demonstrates a company's profit and loss dynamics;
- shows the price ranges that can be used to open and close a position;
- takes into account the principle of gradual increase and decrease of a position;
- allows calculating the number of shares to be purchased;
- shows the current value of the P/E ratio;
- shows the current capitalization of the company.
Example:
As an example, consider the situation with NVIDIA Corporation stock (ticker - NVDA).
September 02, 2022:
Fundamental Strength Indicator - 11.46 (fundamentally strong company).
P/E - 39.58 (acceptable to me).
Current Price - $136.47 (is in the Orange Spectrum of the Lower Rainbow).
Situation - Obverse.
The basic conditions for buying this company's stock are met. The Rainbow Indicator settings are filled out as follows:
The table to the left of the Rainbow Indicator shows how many shares are possible to buy in the Orange Spectrum of Lower Rainbow at the current price = 10 shares. This corresponds to 2.73 portions.
To give you an example, I buy 10 shares of NVDA at $136.47 per share.
October 14, 2022:
NVDA's stock price has moved into the red spectrum of the Lower Rainbow.
The Fundamental Strength Indicator is 10.81 (fundamentally strong company).
P/E is 35.80 (an acceptable level for me).
Current Price - $112.27 (is in the Red Spectrum of the Lower Rainbow).
Situation - Obverse.
The basic conditions for buying this company's stock are still met. The Rainbow Indicator settings are populated as follows:
The table to the left of the Rainbow Indicator shows how many shares are possible to buy in the Lower Rainbow Red Spectrum at the current price (5 shares). This corresponds to 1.12 portions.
To give you an example, I buy 5 shares of NVDA at $112.27 per share. A total of 3.85 portions were purchased, which is the maximum possible number of portions at the current price level. The remainder in the form of 0.15 portions can be purchased only at a price level below $75 per share.
January 23, 2023:
The price of NVDA stock passes through the red spectrum of the Upper Rainbow and stops in the orange spectrum. As an example, I sell 5 shares bought in the red spectrum of the Lower Rainbow, for example at $180 per share (+60%). And also a third of the shares bought in the orange spectrum, 3 shares out of 10, for example at $190 a share (+39%). That leaves me with 7 shares.
January 27, 2023:
NVDA's stock price has continued to rise and has moved into the green spectrum of the Upper Rainbow. This is a reason to close some of the remaining 7 shares. I divide the 7 shares by 2 and round up to a whole number - that's 4 shares. For my example, I sell 4 shares at $199 a share (+46%). Now I am left with 3 shares of stock.
February 02, 2023:
The price of NVDA stock moves into the blue spectrum of the Upper Rainbow, and I close the remaining 3 shares, for example, at $216 per share (+58%). The entire position in NVDA stock is closed.
As you can see, the Fundamental Strength Indicator and the P/E ratio were not used in the process of closing the position. Decisions were made only on the basis of the Rainbow Indicator.
As another example, let's look at the situation with the shares of Papa Johns International, Inc. (ticker PZZA).
November 01, 2017:
Fundamental Strength Indicator - 13.22 points (fundamentally strong company).
P/E - 21.64 (acceptable to me).
Current Price - $62.26 (is in the blue spectrum of the Lower Rainbow).
Situation - Obverse.
The basic conditions for buying shares of this company are met. The settings of the Rainbow Indicator are filled as follows:
The table to the left of the Rainbow Indicator shows how many shares are possible to buy in the Lower Rainbow Blue Spectrum at the current price - 8 shares. This corresponds to 1 portion.
To give you an example, I buy 8 shares of PZZA at a price of $62.26.
August 8, 2018:
PZZA's share price has moved into the green spectrum of the Lower Rainbow.
The Fundamental Strength Indicator is a 9.83 (fundamentally strong company).
P/E is 16.07 (an acceptable level for me).
Current Price - $38.94 (is in the green spectrum of the Lower Rainbow).
Situation - Obverse.
The basic conditions for buying shares of this company are still met. The Rainbow Indicator settings are populated as follows:
The table to the left of the Rainbow Indicator shows how many shares are possible to buy in the Lower Rainbow Green Spectrum at the current price - 12 shares. This corresponds to 0.93 portions.
To give you an example, I buy 12 shares of PZZA at a price of $38.94. A total of 1.93 portions were purchased.
October 31, 2018:
PZZA's stock price moves into the Upper Rainbow red spectrum and is $54.54 per share. Since I did not have any portions purchased in the Lower Rainbow red spectrum, there is no closing part of the position.
February 01, 2019:
After a significant decline, PZZA's stock price moves into the orange spectrum of the Lower Rainbow at $38.51 per share. However, I am not taking any action because the company's Fundamental Strength on this day is 5.02 (a fundamentally mediocre company).
March 27, 2019:
PZZA's stock price passes the green and blue spectrum of the Upper Rainbow. This allowed to close the previously purchased 12 shares, for example, at $50 a share (+28%) and 8 shares at $50.38 a share (-19%).
Closing the entire position at once was facilitated by a significant narrowing in both rainbows. As we now know, this indicates a decline in earnings at the company.
Risk disclaimer:
When working with the Rainbow Indicator, keep in mind that the release of the Income statement (from which diluted EPS is derived) occurs some time after the end of the fiscal quarter. This means that the new relevant data for the calculation will only appear after the publication of the new statement. In this regard, there may be a significant change in the Rainbow Indicator after the publication of the new statement. The magnitude of this change will depend on both the content of the new statement and the number of days between the end of the financial quarter and the publication date of the statement. Prior to the publication date of the new statement, the latest actual data will be used for the calculations. Also, once again, please note that the Rainbow Indicator can only be used in tandem with the Fundamental Strength Indicator and the P/E ratio. Without these additional filters, the Rainbow Indicator loses its intended meaning.
The Rainbow Indicator allows you to determine the price ranges for opening and closing a position gradually, based on available data and the methodology I created. You can also use it to calculate the number of shares you can consider buying taking into account the position you already have. However, this Indicator and/or its description and examples cannot be used as the sole reason for buying or selling stocks or for any other action or inaction related to stocks.
Fundamental Strength IndicatorName of the indicator: Fundamental Strength Indicator
A brief description of the indicator:
Using this indicator, you can evaluate a company in terms of the strength of its financial performance and see how that score has changed over time.
The background to the creation of the indicator:
The main idea that inspired me to create this indicator is: " Even if you buy just 1 share of a company, treat it like buying the whole business ". However, when I need to evaluate the business of thousands of public companies traded on exchanges, there is an objective difficulty: it is very time-consuming. To solve this problem, I had to create a scoring system of the fundamental analysis of the company, embodied in this indicator.
What the indicator looks like:
- First, it is a Histogram with bars of three colors: green, orange, and red. The width of the histogram depends on the depth of data from the company statements. The more historical data, the wider the histogram over time.
The green color of the bars means that the company has been showing excellent financial results by the sum of the factors in that time period. According to my terminology, the company has a " strong foundation " during this period. Green corresponds to values between 8 and 15 (where 15 is the maximum possible positive value on the sum of the factors).
The orange color of the bars means that according to the sum of factors during this period the company demonstrated mediocre financial results, i.e. it has a " mediocre foundation ". Orange color corresponds to values from 1 to 7.
The red color of the bars means that according to the sum of factors in this period of time, the company demonstrated weak financial results, i.e. it has a " weak foundation ". The red color corresponds to values from -15 to 0 (where -15 is the maximum possible negative value on the sum of factors).
- Second, this is the Blue Line , which is the moving average of the Histogram bars over the last year (*). Averaging over the year is necessary in order to obtain a weighted estimate that is not subject to medium-term fluctuations. It is by the last value of the blue line that the actual Fundamental Strength of the company is determined.
(*) The last year means the last 252 trading days, including the current trading day.
- Third, these are operating, investing, and financing Cash Flows expressed in Diluted net income. These flows look like thick green, orange, and red lines, respectively.
- Fourth, this is the Table on the left, which shows the latest actual value of the Fundamental Strength and Cash Flows.
Indicator settings:
In the indicator settings, I can disable the visibility of the Histogram, Blue Line, Cash Flows (each separately), and Table. It helps to study each of the parameters separately. It is also possible to change the color, transparency, and thickness of lines.
Mandatory requirements for using the indicator:
- works only on a daily timeframe;
- only applies to shares of public companies;
- company financial statements for the last 4 quarters and more are required;
- it is necessary to have the data from the Balance sheet, Income statement, and Cash flow statement, required for the calculation.
If at least one component required for calculating the Fundamental Strength is missing, the message " no data to calculate the Fundamental Strength correctly " is displayed. In the same case, but for the operating cash flow, the message " no data to calculate the Operating Cash Flow correctly " is shown, and similarly for other flows.
What is the value of the Fundamental Strength Indicator:
- allows for a quantitative assessment of a company's financial performance in points (from -15 to 15 points);
- allows you to visually track how the company's financial performance has changed (positively/negatively) over time;
- allows to visually trace the movement of main cash flows over time;
- speeds up the process of selecting companies for your shortlist (if you are focused on financial results when selecting companies);
- allows you to protect yourself from investing in companies with weak and mediocre fundamentals.
Indicator calculation methodology:
Guided by the "Treat stock investments as buying the whole business" approach, you can imagine what kind of business an investor is interested in owning and simultaneously determine the input parameters for calculating the indicator.
(!) Here it is important to emphasize that the idea of a benchmark business for investment is a subjective notion, so be sure to check whether it coincides with your own opinion.
For me, a benchmark business is:
- A business that operates efficiently without diminishing the return on shareholders' investment. To assess the efficiency and profitability of a business, I use the following financial ratios (*): Diluted EPS and Return on Equity (ROE). The first two parameters for calculating the indicator are there.
- A business that scales sales and optimizes its costs. From this point of view, the following financial ratios are suitable: Gross margin, Operating expense ratio, and Total revenue. Plus three other metrics.
- A business that turns goods/services into cash quickly and does not fall behind on payments to suppliers. The following financial ratios will fit here: Days payable, Days sales outstanding, and Inventory to revenue ratio. These are three more metrics.
- A business that does not resort to significant accounts payable and shows financial strength. Here I use the following financial ratios: Current ratio, Interest coverage, and Debt to revenue ratio. These are the last three parameters.
(*) If you want to learn more about these financial ratios, I suggest reading my two articles on TradingView:
Financial ratios: digesting them together
What can financial ratios tell us?
Next, each of the parameters is assigned a certain number of points based on its last value or the position of that value relative to the annual maximum and minimum.
For example, if the Current ratio:
- greater than or equal to 2 (+1 point);
- less than or equal to 1 (-1 point);
- more than 1 but less than 2 (0 points).
Or for example, if Diluted EPS:
- near or above the annual high (+2 points);
- near the annual minimum and below (-2 points);
- between the annual maximum and minimum (0 points).
And so on with each of the parameters.
As a result, the maximum number of points a company can score is 15 points. The minimum number of points a company can score is -15 points. These levels are marked with horizontal dotted lines: the green line is for the maximum value, and the red line is for the minimum.
I track the number of points for each day of a company's life on a three-color Histogram. The resulting average value for the last year is on the Blue Line. For me, it is the last value of the Blue Line that determines - this is the actual Fundamental Strength of the company.
The business valuation model I created is more suitable for companies that produce goods or services, and where tangible assets play a significant role in the business. For example, when analyzing companies in the financial sector, you may see the message "no data to calculate the Fundamental Strength correctly". Many of them may simply be missing data that is used as input for the calculation: Inventory to revenue ratio, Days sales outstanding, etc.
Examples:
Below I will evaluate various companies using the Fundamental Strength Indicator.
Tesla, Inc.
The indicator shows that since 2020, Tesla Inc. has been steadily increasing its Fundamental Strength (from 3.27 in Q1 2020 to 12.79 in Q1 2023). This is noticeable both by the color change of the Histogram from orange to green and by the rising Blue Line. If you look in detail at what has been happening with the financials during this time, it's clear what meaningful work the company has done. Revenues have almost quadrupled. Earnings per share have increased 134 times. At the same time, total debt to revenue fell almost 10 times.
Keurig Dr Pepper Inc.
The company, formed in 2018 by the merger of Keurig Green Mountain and Dr Pepper Snapple Group, has failed to deliver outstanding financial results, causing its Fundamental Strength to fall from 4.63 in Q1 2018 to -0.53 in Q1 2023. During this period, the drop in diluted earnings per share was accompanied by higher debt and deteriorating liquidity.
Costco Wholesale Corporation
Wholesaler Costco has been surprisingly stable in its financial performance and with steady growth in both earnings and revenue. This is the reason why the Histogram bars are exceptionally green throughout the calculation of the indicator. The Fundamental Strength has not changed in three years and is high at 11 points.
As an additional filter, for example, when comparing two companies where all other conditions are equal - I use the dynamics of Cash Flows expressed in Diluted net income (*). These are the thick green, orange, and red lines over the Histogram.
Why do I use income as a unit of measure of Cash Flows? Because it is a good way to make the scale of indicator values the same for companies from different countries, with different currencies. It also allows you to use a single value scale for both Cash Flows and Fundamental Strength.
(*) If you want to learn more about Cash Flows, I suggest reading my two articles on TradingView:
Cash flow statement or Three great rivers
Cash flow vibrations
So, an additional filter shows the dynamics of Cash Flows over time.
To interpret the dynamics of Cash Flows, I pay attention to the following patterns:
- How the cash flows are positioned in relation to each other;
- In which zone each of the cash flows is located - in the positive or negative;
- What is the trend of each of the cash flows;
- How volatile each of the cash flows is.
As an example, let's look at several companies in order to interpret the dynamics of their Cash Flows.
John B. Sanfilippo & Son, Inc.
This is the most ideal situation for me: operating cash flow (green line) is above the other cash flows, investment cash flow (orange line) is near zero and practically unchanged, and financial cash flow (red line) is consistently below zero. This picture shows that the company lives off its operating cash flow, does not increase its debt, does not spend a substantial amount of money on expensive purchases, and retains (does not sell off) assets.
Parker Hannifin Corporation
With stable operating cash flow (green line), the company implements investment programs by raising additional funding. This is noticeable due to an increase in financial cash flow (red line) and a simultaneous decrease in investment cash flow (orange line) with a significant deepening into negative areas. Apparently, there is not enough operating cash flow to realize the planned investments. One has to wonder how sustainable a company can be if it invests in its development using borrowed funds without a subsequent increase in operating cash flow.
Schlumberger N. V.
The chaotic intertwining of cash flows outside of the Fundamental Strength range (-15 to 15) is indicative of the company's rich life, but to me, it is an indicator of high riskiness of its actions. And as we can see, Fundamental Strength has only begun to strengthen in the last year, when the external appearance of cash flow has normalized.
Risk disclaimer:
When working with the Fundamental Strength Indicator and the additional filter in the form of Cash Flows, you should understand that the publication of the Balance sheet, Income statement, and Cash flow statement takes place sometime after the end of the financial quarter. This means that new relevant data for the calculation will only appear after the publication of the new statements. In this regard, there may be a significant change in the values of the Indicator after the publication of new statements. The magnitude of this change will depend both on the content of the new statements and on the number of days between the end of the financial quarter and the publication date of the statements. Until the date of publication of the new statements, the latest relevant data will be used for calculations.
I would like to draw your attention to the fact that the calculation of Fundamental Strength and Cash Flows requires the availability of data for all parameters of the valuation model . It uses data that is exclusively available on TradingView (there is no reconciliation with other sources). If at least one parameter is missing, I switch to another company's analysis to continue using the indicator.
Thus, the Fundamental Strength Indicator and an additional filter in the form of Cash Flows make it possible to evaluate the financial results of the company based on the available data and the methodology I created. A simple visualization in the form of a three-color Histogram, a Blue line, and three thick Cash Flow lines significantly reduces the time for selecting fundamentally strong companies that fit the criteria of the selected model. However, this Indicator and/or its description and/or examples cannot be used as the sole reason for buying or selling stocks or for any other action or inaction related to stocks.
Advanced Trend Detection StrategyThe Advanced Trend Detection Strategy is a sophisticated trading algorithm based on the indicator "Percent Levels From Previous Close".
This strategy is based on calculating the Pearson's correlation coefficient of logarithmic-scale linear regression channels across a range of lengths from 50 to 1000. It then selects the highest value to determine the length for the channel used in the strategy, as well as for the computation of the Simple Moving Average (SMA) that is incorporated into the strategy.
In this methodology, a script is applied to an equity in which multiple length inputs are taken into consideration. For each of these lengths, the slope, average, and intercept are calculated using logarithmic values. Deviation, the Pearson's correlation coefficient, and upper and lower deviations are also computed for each length.
The strategy then selects the length with the highest Pearson's correlation coefficient. This selected length is used in the channel of the strategy and also for the calculation of the SMA. The chosen length is ultimately the one that best fits the logarithmic regression line, as indicated by the highest Pearson's correlation coefficient.
In short, this strategy leverages the power of Pearson's correlation coefficient in a logarithmic scale linear regression framework to identify optimal trend channels across a broad range of lengths, assisting traders in making more informed decisions.
MACD TrueLevel StrategyThis strategy uses the MACD indicator to determine buy and sell signals. In addition, the strategy employs the use of "TrueLevel Bands," which are essentially envelope bands that are calculated based on the linear regression and standard deviation of the price data over various lengths.
The TrueLevel Bands are calculated for 14 different lengths and are plotted on the chart as lines. The bands are filled with a specified color to make them more visible. The highest upper band and lowest lower band values are stored in variables for easy access.
The user can input the lengths for the TrueLevel Bands and adjust the multiplier for the standard deviation. They can also select the bands they want to use for entry and exit, and enable long and short positions.
The entry conditions for a long position are either a crossover of the MACD line over the signal line or a crossover of the price over the selected entry lower band. The entry conditions for a short position are either a crossunder of the MACD line under the signal line or a crossunder of the price under the selected exit upper band.
The exit conditions for both long and short positions are not specified in the code and are left to the user to define.
Overall, the strategy aims to capture trends by entering long or short positions based on the MACD and TrueLevel Bands, and exiting those positions when the trend reverses.
RSI TrueLevel StrategyThis strategy is a momentum-based strategy that uses the Relative Strength Index (RSI) indicator and a TrueLevel envelope to generate trade signals.
The strategy uses user-defined input parameters to calculate TrueLevel envelopes for 14 different lengths. The TrueLevel envelope is a volatility-based technical indicator that consists of upper and lower bands. The upper band is calculated by adding a multiple of the standard deviation to a linear regression line of the price data, while the lower band is calculated by subtracting a multiple of the standard deviation from the same regression line.
The strategy generates long signals when the RSI crosses above the oversold level or when the price crosses above the selected lower band of the TrueLevel envelope. It generates short signals when the RSI crosses below the overbought level or when the price crosses below the selected upper band of the TrueLevel envelope.
The strategy allows for long and short trades and sets the trade size as a percentage of the account equity. The colors of the bands and fills are also customizable through user-defined input parameters.
In this strategy, the 12th TrueLevel band was chosen due to its ability to capture significant price movements while still providing a reasonable level of noise reduction. The strategy utilizes a total of 14 TrueLevel bands, each with varying lengths. The 12th band, with a length of 2646, strikes a balance between sensitivity to market changes and reducing false signals, making it a suitable choice for this strategy.
RSI Parameters:
In this strategy, the RSI overbought and oversold levels are set at 65 and 40, respectively. These values were chosen to filter out more noise in the market and focus on stronger trends. Traditional RSI overbought and oversold levels are set at 70 and 30, respectively. By raising the oversold level and lowering the overbought level, the strategy aims to identify more significant trend reversals and potential trade opportunities.
Of course, the parameters can be adjusted to suit individual preferences.
Jesse Livermore Strategy [Buy & Sell]Jesse Livermore was a famous trader who made a fortune in the early 20th century through his unique approach to trading.
While he did not leave behind a single, specific trading strategy that is attributed to him, I have tried to reproduce one.
His trading strategy was based on understanding market trends and sentiment, and he used several technical indicators to identify potential entry and exit points.
Some of the indicators he used include:
Price Action:
Jesse Livermore relied heavily on price action to make trading decisions.
He believed that the price itself was the best indicator of market sentiment, and that by analyzing the price movement, he could identify trends and market behavior.
Volume:
Livermore also used volume to confirm price movements.
He believed that a rise in volume along with a price increase indicated a strong bullish trend, while a decrease in volume with a price increase indicated a weak trend.
Pivot Points:
Another key component of Jesse Livermore's trading strategy was pivot points.
He used pivot points to identify potential support and resistance levels in the market, which he then used to identify potential entry and exit points.
Jesse Livermore outlined a simple trading system: wait for pivotal points before entering a trade.
When the points come into play, trade them using a buffer, trading in the direction of the overall market.
Let the price dictate your actions and stay with profitable trades until there is good reason to exit the trade.
The one I have tried to reproduce it's based on Pivot High and Low looking back 5 Days, and the average price oscillator.
When the price is bellow the support defined line it's time to Buy ( Long Position ), when the Price line is over the Resistance Line it's time to Sell ( Short Position )
This indicator has to be checked, and tried into a Real-Time context, so using the Replay functionality of TradingView is the best way to see and understand how Signals comes
(NB: look back into the chart without Replay should give you wrong Buy/Sell information)
The Indicator can be used on every TimeFrames, but the better ones are 5min - 15min.
I will add the possibility to choose the TimeFrames value for Pivot High and Low.
I will create a version with Alerts for Buy and Sell and the possibility to integrate it with "3commas Bot" where the best deal can be to set a TP to 1% for each Long or Short Entry.
Let's try it and comment for doubts or questions.
SuperTrend Long Strategy +TrendFilterThis strategy aims to identify long (buy) opportunities in the market using the SuperTrend indicator. It utilizes the Average True Range (ATR) and a multiplier to determine the dynamic support levels for entering long positions. This presentation will provide an overview of the strategy's components, explain its usage, and highlight that it focuses on long trades.
Components of the Strategy:
1. ATR Period: This input determines the period used for calculating the Average True Range (ATR). A higher value may result in smoother trend lines but may lag behind recent price changes.
2. Source (src): This input determines the price source used for calculations, with "hl2" (the average of high and low prices) set as the default.
3. ATR Multiplier: This input specifies the multiplier applied to the ATR value to determine the distance of the support levels from the source.
4. Change ATR Calculation Method: This input allows toggling between two methods of ATR calculation: the default method using atr() or a simple moving average (SMA) of ATR values (sma(tr, Periods)).
5. Show Buy/Sell Signals: This input enables or disables the display of buy and sell signals on the chart.
6. Highlighter On/Off: This input controls whether highlighting of up and down trends is displayed on the chart.
7. Bar Coloring On/Off: This input determines whether the bars on the chart are colored based on the trend direction.
8. The "SuperTrend Long STRATEGY" has been enhanced by incorporating a trend filter. A moving average is used as the filter to confirm the prevailing trend before executing trades. This addition effectively reduces false signals and improves the strategy's reliability, all while maintaining its original name.
Strategy Logic:
1. The strategy calculates the upper (up) and lower (dn) trend lines based on the ATR value and the chosen multiplier.
2. The trend variable keeps track of the current trend, with 1 indicating an uptrend and -1 indicating a downtrend.
3. Buy and sell signals are generated based on the change in trend direction.
4. The strategy includes an optional highlighting feature that colors the chart background based on the current trend.
5. Additionally, the bar coloring feature colors the bars based on the direction of the last trend change.
Usage:
1. ATR Period and ATR Multiplier can be adjusted based on the desired sensitivity and risk tolerance.
2. Buy and sell signals can be displayed using the Show Buy/Sell Signals input, providing clear indications of entry and exit points.
3. The Highlighter On/Off input allows users to visually identify the prevailing trend by coloring the chart background.
4. The Bar Coloring On/Off input offers a quick visual reference for the most recent trend change.
Long Strategy:
The SuperTrend Long Strategy is specifically designed to identify long (buy) opportunities. It generates buy signals when the current trend changes from a downtrend to an uptrend, indicating a potential entry point for long positions. The strategy aims to capture upward price movements and maximize profits during bullish market conditions.
The SuperTrend Long Strategy provides traders with a systematic approach to identifying long trade opportunities. By leveraging the SuperTrend indicator and dynamic support levels, this strategy aims to generate buy signals in uptrending markets. Traders can customize the inputs and utilize the visual features to adapt the strategy to their specific trading preferences.
The modification adds a trend filter to the "SuperTrend Long STRATEGY" to improve its effectiveness. The trend filter uses a moving average to confirm the prevailing trend before taking trades. This addition helps filter out false signals and enhances the strategy's reliability without changing its name.
Bollinger Bands - Breakout StrategyThe Bollinger Bands - Breakout Strategy is a trend-following optimized for short-term trading in the crypto market. This strategy employs the Bollinger Bands, a widely recognized technical indicator, as its primary instrument for pinpointing potential trades. It is capable of executing both long and short positions, depending on whether the market is in a spot or futures, and is particularly effective in trending markets.
The strategy boasts a high degree of configurability, allowing users to set the Bollinger Bands period and deviation, trend filter, volatility filter, trade direction filter, rate of change filter, and date filter. Furthermore, it offers options for Take Profit, Stop Loss, and Trailing Stop for both long and short positions, ensuring a comprehensive risk management approach. The inclusion of a maximum intraday loss feature adds another layer of protection, making this strategy a valuable tool for traders seeking a professional and adaptable trading system.
Name : Bollinger Bands - Breakout Strategy
Category : Trend Follower based on Bollinger Bands
Operating mode : Long and Short on Futures or Long on Spot
Trade duration : Intraday
Timeframe : 2H, 3H, 4H, 5H
Market : Crypto
Suggested usage : Trending Markets
Entry : When the price crosses above or below the Bollinger Bands
Exit : Opposite Cross or Profit target, Trailing stop or Stop loss
Configuration :
- Bollinger Bands period and deviation
- Trend Filter
- Volatility Filter
- Trade direction filter
- Rate of Change filter
- Date Filter (for backtesting purposes)
- Take Profit, Stop Loss and Trailing Stop for long and short positions
- Risk Management: Max Intraday Loss
Backtesting :
⁃ Exchange: BINANCE
⁃ Pair: BTCUSDT.P
⁃ Timeframe: 4H
⁃ Fee: 0.025%
⁃ Slippage: 1
- Initial Capital: 10000 USDT
- Position sizing: 10% of Equity
- Start : 2019-09-19 (Out Of Sample from 2022-12-23)
- Bar magnifier: on
Credits :
- LucF of Pine Coders for f_security function to avoid repainting using security.
- QuantNomad for Monthly Table.
Disclaimer : Risk Management is crucial, so adjust stop loss to your comfort level. A tight stop loss can help minimise potential losses. Use at your own risk.
How you or we can improve? Source code is open so share your ideas!
Leave a comment and smash the boost button!
Thanks for your attention, happy to support the TradingView community.
ViPlay Signal demo versionViPlay Signal is a trading indicator designed for the TradingView platform that generates buy and sell signals based on a combination of technical indicators. The indicator uses two different Moving Averages, the Market Range Oscillator (MRO), and the Williams Percent Range (WPR) to provide traders with a comprehensive set of tools for identifying potential entry and exit points, confirming trends, and managing risk.
The Moving Averages used in the indicator are the 50-period and 200-period Simple Moving Averages (SMA) of the closing price, which are widely used in technical analysis to identify trends and support/resistance levels. The Market Range Oscillator (MRO) is a proprietary indicator that measures the range of the market, which can help identify extreme market conditions. The MRO is used to determine buy and sell signals, with two different calculations performed to identify each type of signal.
The Williams Percent Range (WPR) is a momentum indicator that helps traders identify overbought and oversold conditions in the market. By using the WPR in combination with the Moving Averages and the MRO, the ViPlay Signal indicator can provide more accurate and reliable signals to traders.
The indicator allows users to select a strategy from a dropdown menu that includes BTC 1m, 3m, 15m, 4H, and LTC 3m, ideal 5m, and 15m super. The values of some of the parameters change based on the selected strategy, allowing traders to customize the indicator to their specific needs.
The ViPlay Signal indicator plots buy and sell signals on the chart as labels with arrows pointing up or down to indicate the direction of the trade. A green arrow represents a buy signal, and a red arrow represents a sell signal. The chart is clean and easy to read, with complete symbol/timeframe and script name information provided.
In summary, the ViPlay Signal indicator is a powerful and customizable tool for traders looking to improve their trading performance. The indicator provides a comprehensive set of technical analysis tools, including Moving Averages, the MRO, and the WPR, to help traders identify potential trading opportunities and manage risk.
Ichimoku Cloud and ADX with Trailing Stop Loss (by Coinrule)The Ichimoku Cloud is a collection of technical indicators that show support and resistance levels, as well as momentum and trend direction. It does this by taking multiple averages and plotting them on a chart. It also uses these figures to compute a “cloud” that attempts to forecast where the price may find support or resistance in the future.
The Ichimoku Cloud was developed by Goichi Hosoda, a Japanese journalist, and published in the late 1960s. It provides more data points than the standard candlestick chart. While it seems complicated at first glance, those familiar with how to read the charts often find it easy to understand with well-defined trading signals.
The Ichimoku Cloud is composed of five lines or calculations, two of which comprise a cloud where the difference between the two lines is shaded in.
The lines include a nine-period average, a 26-period average, an average of those two averages, a 52-period average, and a lagging closing price line.
The cloud is a key part of the indicator. When the price is below the cloud, the trend is down. When the price is above the cloud, the trend is up.
The above trend signals are strengthened if the cloud is moving in the same direction as the price. For example, during an uptrend, the top of the cloud is moving up, or during a downtrend, the bottom of the cloud is moving down.
DMI is simple to interpret. When +DI > - DI, it means the price is trending up. On the other hand, when -DI > +DI, the trend is weak or moving on the downside. The ADX does not give an indication of the direction but about the strength of the trend.
Typically values of ADX above 25 mean that the trend is steeply moving up or down, based on the -DI and +DI positioning. This script aims to capture swings in the DMI, and thus, in the trend of the asset, using a contrarian approach.
Trading on high values of ADX, the strategy tries to spot extremely oversold and overbought conditions. Values of ADX above 45 may suggest that the trend has overextended and is maybe about to reverse.
This strategy combines the Ichimoku Cloud with the ADX indicator to better enter trades.
Long orders are placed when these basic signals are triggered.
Long Position:
Tenkan-Sen is above the Kijun-Sen
Chikou-Span is above the close of 26 bars ago
Close is above the Kumo Cloud
MACD line crosses over the signal line
-DI is greater than +DI
ADX is greater than 45
Close Position:
3% increase trailing
3% decrease trailing
The script is backtested from December 2022 and provides good returns.
A trading fee of 0.1% is also taken into account and is aligned to the base fee applied on Binance.
Most Power V5 Most Power V5
The MOST indicator is an indicator used as a Moving Stoploss. The MOST indicator also generates a buy signal in case the prices rise, unlike the traditional indicators that allow you to make stop losses.In the MOST POWER V5 indicator, stoploss generates its signals using moving averages such as 'SMA', 'EMA', 'WMA', 'VWMA', 'HMA', 'SMMA', 'DEMA' rather than just the current price. In this way, it aims to prevent false signals that may be produced by excessive price movements during the day.
MOST POWER Indicator follows the average by preserving the stop loss distance in the movement of the moving average in the same direction.
The second variable that creates the MOST POWER curve is the stop loss distance that gives power to MOST with the moving average used and the shift rate that provides the stop signal. In this version, this distance is prepared with 2 separate inputs for both buy and sell.You can set these values as "percentage for long trend" and "percentage for short trend" in the indicator input properties.
You can also enter your Take Profit-1, Take Profit-2-, Take Profit-3- and Stop Loss levels in the indicator input properties, especially if you are interested in algo trading or to take advantage of the wonderful alarm setup features of tradingview and get the chance to get maximum profit. (If you enter Take Profit-1, Take Profit-2-, Take Profit-3- and Stop Loss levels as 0. Only buy and sell labels will appear on the indicator.)
Also, activate the amplitude filter option from the indicator input settings to get less signal and filter our inputs.
In addition, the entry price, take profit1, take profit2, take profit3 values for the last transaction opened to make things easier are located in the upper right corner of your graph as a table.
Important note: No indicator guarantees investment. That's why the tests you will do before real trades are very important in this indicator. I wish you all successful trades.
i will show how works with examples
Example 1
If you enter Take Profit-1, Take Profit-2-, Take Profit-3- and Stop Loss levels greater than 0
Example 2
If you enter Take Profit-1, Take Profit-2-, Take Profit-3- and Stop Loss levels as 0 (u will see only buy - sell labels)
Example 3
if select Amplitude Filter is on . you will see less signal
how works Amplitude Filter whats logic ?
if Amplitude Filter is active the signal from mostpower will be combined with Amplitude Filter.
for example, if the amplitude value is 2, the highest price and the lowest price of the last 2 bars are calculated. then this amplitude value is calculated for sma with its source high and low. Based on these values, the trend is determined in the amplitude of the price movement.
Important note: No indicator guarantees investment. That's why the tests you will do before real trades are very important in this indicator. I wish you all successful trades.
Fast EMA above Slow EMA with MACD (by Coinrule)An exponential moving average ( EMA ) is a type of moving average (MA) that places a greater weight and significance on the most recent data points. The exponential moving average is also referred to as the exponentially weighted moving average . An exponentially weighted moving average reacts more significantly to recent price changes than a simple moving average simple moving average ( SMA ), which applies an equal weight to all observations in the period.
Moving average convergence divergence ( MACD ) is a trend-following momentum indicator that shows the relationship between two moving averages of a security’s price. The MACD is calculated by subtracting the 26-period exponential moving average ( EMA ) from the 12-period EMA .
The result of that calculation is the MACD line. A nine-day EMA of the MACD called the "signal line," is then plotted on top of the MACD line, which can function as a trigger for buy and sell signals. Traders may buy the coin when the MACD crosses above its signal line and sell—or short—the security when the MACD crosses below the signal line. Moving average convergence divergence ( MACD ) indicators can be interpreted in several ways, but the more common methods are crossovers, divergences, and rapid rises/falls.
The Strategy enters and closes the trade when the following conditions are met:
LONG
The MACD histogram turns bullish
EMA8 is greater than EMA26
EXIT
Price increases 3% trailing
Price decreases 1% trailing
This strategy is back-tested from 1 January 2022 to simulate how the strategy would work in a bear market and provides good returns.
Pairs that produce very strong results include AXSUSDT on the 5-minute timeframe. This short timeframe means that this strategy opens and closes trades regularly.
Additionally, the trailing stop loss and take profit conditions can also be changed to match your needs.
The strategy assumes each order is using 30% of the available coins to make the results more realistic and to simulate you only ran this strategy on 30% of your holdings. A trading fee of 0.1% is also taken into account and is aligned to the base fee applied on Binance.
Band of Filtered RS by Mustafa ÖZVERBand of Filtered RS by Mustafa ÖZVER
This code shows a range (max-min values) price may get if we get strong movements. These values is based on RSI (Relative Strange Index). And also these are calculated using RSI, if we get trades to make rsi is equal to 25 (or rsi down limit) or 75 (rsi up limit) or any value you set, how much will price value get? This code calculate these and shows these to you on graph.
This price are between these band limits because we expect cross reaction to hard movements on price.
For scalping, we can use these values as
long signal when price under down limit,
short signal when price over up limit,
But only these values can not guarantee good results for trading. BE CAREFUL
Simple RSI and SMA Long and Short (by Coinrule)The relative strength index ( RSI ) is a momentum indicator used in technical analysis . RSI measures the speed and magnitude of a security's recent price changes to evaluate overvalued or undervalued conditions in the price of that security. The RSI is displayed as an oscillator (a line graph) on a scale of zero to 100. The RSI can do more than point to overbought and oversold securities. It can also indicate securities that may be primed for a trend reversal or corrective pullback in price. It can signal when to buy and sell. Traditionally, an RSI reading of 70 or above indicates an overbought situation. A reading of 30 or below indicates an oversold condition.
A simple moving average ( SMA ) calculates the average of a selected range of prices, usually closing prices, by the number of periods in that range.
The Strategy enters and closes the trade when the following conditions are met:
LONG
SMA100 is greater than SMA150
RSI is greater than 50
SHORT
SMA100 is less than SMA150
RSI is less than 50
When a long position is opened, it remains open until the conditions for a short are met at which point the long position is closed and the short position is opened. Then, when the conditions for the long position are met, the short will be closed and a long will be opened.
This strategy is back tested from 1 January 2022 to simulate how the strategy would work in a bear market. The strategy provides good returns.
The strategy assumes each order is using 30% of the available coins to make the results more realistic and to simulate you only ran this strategy on 30% of your holdings. A trading fee of 0.1% is also taken into account and is aligned to the base fee applied on Binance.
Stock Gaps SPY Correlation StrategyThis is daytrade stock strategy, designed to take the best out of the daily gaps that are forming between the close of previous day and opening of present day.
At the same time its logic has been adapted for SPY chart, in order to use correlation with the other stocks/assets/ etf which are linked with SP500 movement.
Lastly it has been added 2 new confirmation logics, based on the USI: advance/decline chart and percentage above vwap among all US stocks.
The rules for entry are simple :
We are at the opening daily candle, we have a long/short gap based on where the opening is happening and at the same time we are checking to see that the current different between the current difference between low and previous high (or viceversa) is higher than an established parameter(minimal deviation )
For exit, we exit based on time/clock parameter, in this case by default I selected 1h and half before close of the US session.
For testing purposes I have used 10% of the available capital, with a 0.0035$ comission per each share bought ( IBKR comissions)
If there are any questions, please let me know either here or in private !
Pierre_crypt0 Medium/Long Term Trend EMAEMA / MA used by pierre_crypt0 to identify the medium / long-term trend
- Green = 100 EMA
- Blue = 200 MA
- Pink = 300 MA
- Black = 200 EMA
These three are used to refer to the short-term trend. The leading indicator he uses alongside horizontal levels to decide on his exposure/positioning.
Everyone keeps asking on Twitter, just compiled them into an indicator.
Price change scalping short and long strategy indicatorPrice change scalping Short and Long indicator uses a rate of change momentum oscillator to calculate the percent change in price between a period of time. Rate of change calculation takes the current price and compares it to a price of "n" periods while the period of time can be defined by a user. The calculated rate of change value is then compared to the upper threshold and the lower threshold values to determine if a position should be opened. If the threshold is crossed and filtering conditions are met a strategy position will be triggered. Entry, take profit, and stop loss prices are calculated and displayed on the chart as well as positions directions. Once the entry price is crossed, a long or short position is created and once the take profit price is crossed, the stop loss price will begin to trail behind the price action using the close of the previous bar. Once the trailing stop price is crossed, the position is closed. If the entry price is not crossed and the price action crosses the stop level, the trade setup is cancelled. The indicator is enhanced by DCA algorithm which allows to average entry price with safety orders. The script also allows to use Martingale coefficient to increase averaging power
Advantages of this script:
The indicator has custom alert settings for each strategy action
The indicator can be used with 3Commas, Cryptohopper, Alertatron or Zignaly bots
High frequency and low duration of trades
Can be used with short-term timeframes ranging from 5 to 60 minutes
Indicator is sustainable to market slumps due to DCA implementation
Can be used for short and long positions (can be adjusted to long only, short only or both)
Can be applied to any market and quote currency
Easy to configure user interface settings
Built in detailed statistic menu
How to use?
1. Apply the indicator to a trading pair your are interested in using 5 to 60 minutes timeframe chart
2. Configure the indicator: change layer values, order size multiple and take profit/stop loss values according to current market cycle stage
3. Set up a TradingView custom alert using the indicator settings to trigger on a condition you are interested in
4. indicator will send alerts when to enter and when to exit positions which can be applied to your portfolio using external trading platforms
5. Update settings once market conditions are changed using backtests on a monthly period
Price change scalping short and long strategyPrice change scalping Short and Long strategy uses a rate of change momentum oscillator to calculate the percent change in price between a period of time. Rate of change calculation takes the current price and compares it to a price of "n" periods while the period of time can be defined by a user. The calculated rate of change value is then compared to the upper threshold and the lower threshold values to determine if a position should be opened. If the threshold is crossed and filtering conditions are met a strategy position will be triggered. Entry, take profit, and stop loss prices are calculated and displayed on the chart as well as positions directions. Once the entry price is crossed, a long or short position is created and once the take profit price is crossed, the stop loss price will begin to trail behind the price action using the close of the previous bar. Once the trailing stop price is crossed, the position is closed. If the entry price is not crossed and the price action crosses the stop level, the trade setup is cancelled. The strategy is enhanced by DCA algorithm which allows to average entry price with safety orders. The script also allows to use Martingale coefficient to increase averaging power
Advantages of this script:
Strategy has high net profit of 293% at backtests
Backtests show high accuracy around 71%
High frequency and low duration of trades
Can be used with short-term timeframes ranging from 5 to 60 minutes
Strategy is sustainable to market slumps due to DCA implementation
Can be used for short and long positions (can be adjusted to long only, short only or both)
Can be applied to any market and quote currency
Easy to configure user interface settings
Built in detailed statistic menu
How to use?
1. Apply the strategy to a trading pair your are interested in using 5 to 60 minutes timeframe chart
2. Configure the strategy: change layer values, order size multiple and take profit/stop loss values according to current market cycle stage
3. Set up a TradingView alert to trigger when strategy conditions are met
4. Strategy will send alerts when to enter and when to exit positions which can be applied to your portfolio using external trading platforms
5. Update settings once market conditions are changed using backtests on a monthly period
Ichimoku Cloud with ADX (By Coinrule)The Ichimoku Cloud is a collection of technical indicators that show support and resistance levels, as well as momentum and trend direction. It does this by taking multiple averages and plotting them on a chart. It also uses these figures to compute a “cloud” that attempts to forecast where the price may find support or resistance in the future.
The Ichimoku Cloud was developed by Goichi Hosoda, a Japanese journalist, and published in the late 1960s. It provides more data points than the standard candlestick chart. While it seems complicated at first glance, those familiar with how to read the charts often find it easy to understand with well-defined trading signals.
The Ichimoku Cloud is composed of five lines or calculations, two of which comprise a cloud where the difference between the two lines is shaded in.
The lines include a nine-period average, a 26-period average, an average of those two averages, a 52-period average, and a lagging closing price line.
The cloud is a key part of the indicator. When the price is below the cloud, the trend is down. When the price is above the cloud, the trend is up.
The above trend signals are strengthened if the cloud is moving in the same direction as the price. For example, during an uptrend, the top of the cloud is moving up, or during a downtrend, the bottom of the cloud is moving down.
DMI is simple to interpret. When +DI > - DI, it means the price is trending up. On the other hand, when -DI > +DI , the trend is weak or moving on the downside. The ADX does not give an indication about the direction but about the strength of the trend.
Typically values of ADX above 25 mean that the trend is steeply moving up or down, based on the -DI and +D positioning. This script aims to capture swings in the DMI, and thus, in the trend of the asset, using a contrarian approach.
Trading on high values of ADX , the strategy tries to spot extremely oversold and overbought conditions. Values of ADX above 45 may suggest that the trend has overextended and is may be about to reverse.
This strategy combines the Ichimoku Cloud with the ADX indicator to better enter trades.
Long/Short orders are placed when these basic signals are triggered.
Long Position:
Tenkan-Sen is above the Kijun-Sen
Chikou-Span is above the close of 26 bars ago
Close is above the Kumo Cloud
MACD line crosses over the signal line
-DI is greater than +DI
ADX is greater than 45
Short Position:
Tenkan-Sen is below the Kijun-Sen
Chikou-Span is below the close of 26 bars ago
Close is below the Kumo Cloud
MACD line crosses under the signal line
+DI is greater than -DI
ADX is less than 45
The script is backtested from 1 January 2022 and provides good returns.
The strategy assumes each order is using 30% of the available coins to make the results more realistic and to simulate you only ran this strategy on 30% of your holdings. A trading fee of 0.1% is also taken into account and is aligned to the base fee applied on Binance.
This script also works well on MATIC (15m timeframe), ETH (5m timeframe), and SOL (15m timeframe).
Crypto Longs & Shorts (Multi Exchange) - InFinitoThis indicator uses data provided by different crypto derivative exchanges to estimate and display the potential Longs and Shorts opened and closed during a determined period. The indicator supports multiple exchanges and coins.
Knowing the the behavior of traders as in how they're positioning can be useful for different things like:
Get a sense of market sentiment
Better anticipating which way liquidity/stop hunts might potentially go.
All data is calculated based off OI data provided by exchanges except for Bitfinex which provides both Longs and Shorts opened and closed
Preset exchanges included are:
Bitfinex
Binance: USDT, USDPERP & BUSD pairs
Bitmex: USDT & USD pairs
Kraken
The indicator is preset to work with BTC but it can be easily changed to any coin by typing it's name (Capitalized) in the Coin Name box
BBSS - Bollinger Bands Scalping SignalsModified Bollinger Bands Indicator
Added:
- color change divergence (green) and narrowing (red) of the upper and lower bands
- color change of the moving average - upward trend (green) and downward trend (red)
- the appearance of a potential signal for long and short positions when the candle closes behind the upper or lower bands.
How to use the indicator:
Long conditions:
- the price breaks through the upper band
- Bollinger bands are expanding and should be green
- the mid-line is green
- the trigger candle should be green
Short conditions:
- the price breaks through the lower band
- Bollinger bands are expanding and should be red
- the mid-line is red
- the trigger candle should be red