Adaptive Trend Finder (log)In the dynamic landscape of financial markets, the Adaptive Trend Finder (log) stands out as an example of precision and professionalism. This advanced tool, equipped with a unique feature, offers traders a sophisticated approach to market trend analysis: the choice between automatic detection of the long-term or short-term trend channel.
Key Features:
1. Choice Between Long-Term or Short-Term Trend Channel Detection: Positioned first, this distinctive feature of the Adaptive Trend Finder (log) allows traders to customize their analysis by choosing between the automatic detection of the long-term or short-term trend channel. This increased flexibility adapts to individual trading preferences and changing market conditions.
2. Autonomous Trend Channel Detection: Leveraging the robust statistical measure of the Pearson coefficient, the Adaptive Trend Finder (log) excels in autonomously locating the optimal trend channel. This data-driven approach ensures objective trend analysis, reducing subjective biases, and enhancing overall precision.
3. Precision of Logarithmic Scale: A distinctive characteristic of our indicator is its strategic use of the logarithmic scale for regression channels. This approach enables nuanced analysis of linear regression channels, capturing the subtleties of trends while accommodating variations in the amplitude of price movements.
4. Length and Strength Visualization: Traders gain a comprehensive view of the selected trend channel, with the revelation of its length and quantification of trend strength. These dual pieces of information empower traders to make informed decisions, providing insights into both the direction and intensity of the prevailing trend.
In the demanding universe of financial markets, the Adaptive Trend Finder (log) asserts itself as an essential tool for traders, offering an unparalleled combination of precision, professionalism, and customization. Highlighting the choice between automatic detection of the long-term or short-term trend channel in the first position, this indicator uniquely caters to the specific needs of each trader, ensuring informed decision-making in an ever-evolving financial environment.
Trendfollowing
Triple Confirmation Kernel Regression Overlay [QuantraSystems]Kernel Regression Oscillator - Overlay
Introduction
The Kernel Regression Oscillator (ᏦᏒᎧ) represents an advanced tool for traders looking to capitalize on market trends.
This Indicator is valuable in identifying and confirming trend directions, as well as probabilistic and dynamic oversold and overbought zones.
It achieves this through a unique composite approach using three distinct Kernel Regressions combined in an Oscillator.
The additional Chart Overlay Indicator adds confidence to the signal.
Which is this Indicator.
This methodology helps the trader to significantly reduce false signals and offers a more reliable indication of market movements than more widely used indicators can.
Legend
The upper section is the Overlay. It features the Signal Wave to display the current trend.
Its Overbought and Oversold zones start at 50% and end at 100% of the selected Standard Deviation (default σ = 3), which can indicate extremely rare situations which can lead to either a softening momentum in the trend or even a mean reversion situation.
The lower one is the Base Chart.
The Indicator is linked here
It features the Kernel Regression Oscillator to display a composite of three distinct regressions, also displaying current trend.
Its Overbought and Oversold zones start at 50% and end at 100% of the selected Standard Deviation (default σ = 2), which can indicate extremely rare situations.
Case Study
To effectively utilize the ᏦᏒᎧ, traders should use both the additional Overlay and the Base
Chart at the same time. Then focus on capturing the confluence in signals, for example:
If the 𝓢𝓲𝓰𝓷𝓪𝓵 𝓦𝓪𝓿𝓮 on the Overlay and the ᏦᏒᎧ on the Base Chart both reside near the extreme of an Oversold zone the probability is higher than normal that momentum in trend may soften or the token may even experience a reversion soon.
If a bar is characterized by an Oversold Shading in both the Overlay and the Base Chart, then the probability is very high to experience a reversion soon.
In this case the trader may want to look for appropriate entries into a long position, as displayed here.
If a bar is characterized by an Overbought Shading in either Overlay or Base Chart, then the probability is high for momentum weakening or a mean reversion.
In this case the trade may have taken profit and closed his long position, as displayed here.
Please note that we always advise to find more confluence by additional indicators.
Recommended Settings
Swing Trading (1D chart)
Overlay
Bandwith: 45
Width: 2
SD Lookback: 150
SD Multiplier: 2
Base Chart
Bandwith: 45
SD Lookback: 150
SD Multiplier: 2
Fast-paced, Scalping (4min chart)
Overlay
Bandwith: 75
Width: 2
SD Lookback: 150
SD Multiplier: 3
Base Chart
Bandwith: 45
SD Lookback: 150
SD Multiplier: 2
Notes
The Kernel Regression Oscillator on the Base Chart is also sensitive to divergences if that is something you are keen on using.
For maximum confluence, it is recommended to use the indicator both as a chart overlay and in its Base Chart.
Please pay attention to shaded areas with Standard Deviation settings of 2 or 3 at their outer borders, and consider action only with high confidence when both parts of the indicator align on the same signal.
This tool shows its best performance on timeframes lower than 4 hours.
Traders are encouraged to test and determine the most suitable settings for their specific trading strategies and timeframes.
The trend following functionality is indicated through the "𝓢𝓲𝓰𝓷𝓪𝓵 𝓦𝓪𝓿𝓮" Line, with optional "Up" and "Down" arrows to denote trend directions only (toggle “Show Trend Signals”).
Methodology
The Kernel Regression Oscillator takes three distinct kernel regression functions,
used at similar weight, in order to calculate a balanced and smooth composite of the regressions. Part of it are:
The Epanechnikov Kernel Regression: Known for its efficiency in smoothing data by assigning less weight to data points further away from the target point than closer data points, effectively reducing variance.
The Wave Kernel Regression: Similarly assigning weight to the data points based on distance, it captures repetitive and thus wave-like patterns within the data to smoothen out and reduce the effect of underlying cyclical trends.
The Logistic Kernel Regression: This uses the logistic function in order to assign weights by probability distribution on the distance between data points and target points. It thus avoids both bias and variance to a certain level.
kernel(source, bandwidth, kernel_type) =>
switch kernel_type
"Epanechnikov" => math.abs(source) <= 1 ? 0.75 * (1 - math.pow(source, 2)) : 0.0
"Logistic" => 1/math.exp(source + 2 + math.exp(-source))
"Wave" => math.abs(source) <= 1 ? (1 - math.abs(source)) * math.cos(math.pi * source) : 0.
kernelRegression(src, bandwidth, kernel_type) =>
sumWeightedY = 0.
sumKernels = 0.
for i = 0 to bandwidth - 1
base = i*i/math.pow(bandwidth, 2)
kernel = kernel(base, 1, kernel_type)
sumWeightedY += kernel * src
sumKernels += kernel
(src - sumWeightedY/sumKernels)/src
// Triple Confirmations
Ep = kernelRegression(source, bandwidth, 'Epanechnikov' )
Lo = kernelRegression(source, bandwidth, 'Logistic' )
Wa = kernelRegression(source, bandwidth, 'Wave' )
By combining these regressions in an unbiased average, we follow our principle of achieving confluence for a signal or a decision, by stacking several edges to increase the probability that we are correct.
// Average
AV = math.avg(Ep, Lo, Wa)
The Standard Deviation bands take defined parameters from the user, in this case sigma of ideally between 2 to 3,
to help the indicator detect extremely improbable conditions and thus take an inversely probable signal from it to forward to the user.
The parameter settings and also the visualizations allow for ample customizations by the trader. The indicator comes with default and recommended settings.
For questions or recommendations, please feel free to seek contact in the comments.
Liquidity Weighted Moving Averages [AlgoAlpha]Description:
The Liquidity Weighted Moving Averages by AlgoAlpha is a unique approach to identifying underlying trends in the market by looking at candle bars with the highest level of liquidity. This script offers a modified version of the classical MA crossover indicator that aims to be less noisy by using liquidity to determine the true fair value of price and where it should place more emphasis on when calculating the average.
Rationale:
It is common knowledge that liquidity makes it harder for market participants to move the price of assets, using this logic, we can determine the coincident liquidity of each bar by looking at the volume divided by the distance between the opening and closing price of that bar. If there is a higher volume but the opening and closing prices are near each other, this means that there was a high level of liquidity in that bar. We then use standard deviations to filter out high spikes of liquidity and record the closing prices on those bars. An average is then applied to these recorded prices only instead of taking the average of every single bar to avoid including outliers in the data processing.
Key features:
Customizable:
Fast Length - the period of the fast-moving average
Slow Length - the period of the slow-moving average
Outlier Threshold Length - the period of the outlier processing algorithm to detect spikes in liquidity
Significant Noise reduction from outliers:
Amazing Oscillator (AO) [Algoalpha]Description:
Introducing the Amazing Oscillator indicator by Algoalpha, a versatile tool designed to help traders identify potential trend shifts and market turning points. This indicator combines the power of the Awesome Oscillator (AO) and the Relative Strength Index (RSI) to create a new indicator that provides valuable insights into market momentum and potential trade opportunities.
Key Features:
Customizable Parameters: The indicator allows you to customize the period of the RSI calculations to fine-tune the indicator's responsiveness.
Visual Clarity: The indicator uses user-defined colors to visually represent upward and downward movements. You can select your preferred colors for both bullish and bearish signals, making it easy to spot potential trade setups.
AO and RSI Integration: The script combines the AO and RSI indicators to provide a comprehensive view of market conditions. The RSI is applied to the AO, which results in a standardized as well as a less noisy version of the Awesome Oscillator. This makes the indicator capable of pointing out overbought or oversold conditions as well as giving fewer false signals
Signal Plots: The indicator plots key levels on the chart, including the RSI threshold(Shifted down by 50) at 30 and -30. These levels are often used by traders to identify potential trend reversal points.
Signal Alerts: For added convenience, the indicator includes "x" markers to signal potential buy (green "x") and sell (red "x") opportunities based on RSI crossovers with the -30 and 30 levels. These alerts can help traders quickly identify potential entry and exit points.
Trend Flow Profile [AlgoAlpha]Description:
The "Trend Flow Profile" indicator is a powerful tool designed to analyze and interpret the underlying trends and reversals in a financial market. It combines the concepts of Order Flow and Rate of Change (ROC) to provide valuable insights into market dynamics, momentum, and potential trade opportunities. By integrating these two components, the indicator offers a comprehensive view of market sentiment and price movements, facilitating informed trading decisions.
Rationale:
The combination of Order Flow and ROC in the "Trend Flow Profile" indicator stems from the recognition that both factors play critical roles in understanding market behavior. Order Flow represents the net buying or selling pressure in the market, while ROC measures the rate at which prices change. By merging these elements, the indicator captures the interplay between market participants' actions and the momentum of price movements, enabling traders to identify trends, spot reversals, and gauge the strength of price acceleration or deceleration.
Calculation:
The Order Flow component is computed by summing the volume when prices move up and subtracting the volume when prices move down. This cumulative measure reflects the overall order imbalance in the market, providing insights into the dominant buying or selling pressure.
The ROC component calculates the percentage change in price over a given period. It compares the current price to a previous price and expresses the change as a percentage. This measurement indicates the velocity and direction of price movement, allowing traders to assess the market's momentum.
How to Use It?
The "Trend Flow Profile" indicator offers valuable information to traders for making informed trading decisions. It enables the identification of underlying trends and potential reversals, providing a comprehensive view of market sentiment and momentum. Here are some key ways to utilize the indicator:
Spotting Trends: The indicator helps identify the prevailing market trend, whether bullish or bearish. A consistent positive (green) histogram indicates a strong uptrend, while a consistent negative (red) histogram suggests a robust downtrend.
Reversal Signals: Reversal patterns can be identified when the histogram changes color, transitioning from positive to negative (or vice versa). These reversals can signify potential turning points in the market, highlighting opportunities for counter-trend trades.
Momentum Assessment: By observing the width and intensity of the histogram, traders can assess the acceleration or deceleration of price momentum. A wider histogram suggests strong momentum, while a narrower histogram indicates a potential slowdown.
Utility:
The "Trend Flow Profile" indicator serves as a valuable tool for traders, providing several benefits. Traders can easily identify the prevailing market trend, enabling them to align their trading strategies with the dominant direction of the market. The indicator also helps spot potential reversals, allowing traders to anticipate market turning points and capture counter-trend opportunities. Additionally, the green and red histogram colors provide visual cues to determine the optimal duration of a long or short position. Following the green histogram signals when in a long position and the red histogram signals when in a short position can assist traders in managing their trades effectively. Moreover, the width and intensity of the histogram offer insights into the acceleration or deceleration of momentum. Traders can gauge the strength of price movements and adjust their trading strategies accordingly. By leveraging the "Trend Flow Profile" indicator, traders gain a comprehensive understanding of market dynamics, which enhances their decision-making and improves their overall trading outcomes.
Bollinger Bands Percentile + Stdev Channels (BBPct) [AlgoAlpha]Description:
The "Bollinger Bands Percentile (BBPct) + STD Channels" mean reversion indicator, developed by AlgoApha, is a technical analysis tool designed to analyze price positions using Bollinger Bands and Standard Deviation Channels (STDC). The combination of these two indicators reinforces a stronger reversal signal. BBPct calculates the percentile rank of the price's standard deviation relative to a specified lookback period. Standard deviation channels operate by utilizing a moving average as the central line, with upper and lower lines equidistant from the average based on the market's volatility, helping to identify potential price boundaries and deviations.
How it Works:
The BBPct indicator utilizes Bollinger Bands, which consist of a moving average (basis) and upper and lower bands based on a specified standard deviation multiplier. By default, it uses a 20-period moving average and a standard deviation multiplier of 2. The upper band is calculated by adding the basis to the standard deviation multiplied by the multiplier, while the lower band is calculated by subtracting the same value. The BBPct indicator calculates the position of the current price between the lower and upper Bollinger Bands as a percentile value. It determines this position by comparing the price's distance from the lower band to the overall range between the upper and lower bands. A value of 0 indicates that the price is at the lower band, while a value of 100 indicates that the price is at the upper band. The indicator also includes an optional Bollinger Band standard deviation percentage (%Stdev) histogram, representing the deviation of the current price from the moving average as a percentage of the price itself.
Standard deviation channels, also known as volatility channels, aid in identifying potential buying and selling opportunities while minimizing unfavorable trades. These channels are constructed by two lines that run parallel to a moving average. The separation between these lines is determined by the market's volatility, represented by standard deviation. By designating upper and lower channel lines, the channels demarcate the borders between typical and atypical price movements. Consequently, when the market's price falls below the lower channel line, it suggests undervaluation, whereas prices surpassing the upper channel line indicate overvaluation.
Signals
The chart displays potential reversal points through the use of red and green arrows. A red arrow indicates a potential bearish retracement, signaling a possible downward movement, while a green arrow represents a potential pullback to the positive, suggesting a potential upward movement. These signals are generated only when both the BBPct (Bollinger Bands Percentage) and the STDC (Standard Deviation Channel) indicators align with bullish or bearish conditions. Consequently, traders might consider opening long positions when the green arrow appears and short positions when the red arrow is plotted.
Usage:
This indicator can be utilized by traders and investors to effectively identify pullbacks, reversals, and mean regression, thereby enhancing their trading opportunities. Notably, extreme values of the BBPct, such as below -5 or above 105, indicate oversold or overbought conditions, respectively. Moreover, the presence of extreme STDC zones occurs when prices fall below the lower channel line or cross above the upper channel line. Traders can leverage this information as a mean reversion tool by identifying instances of peak overbought and oversold values. These distinctive characteristics facilitate the identification of potential entry and exit points, thus augmenting trading decisions and enhancing market analysis.
The indicator's parameters, such as the length of the moving average, the data source, and the standard deviation multiplier, can be customized to align with individual trading strategies and preferences.
Originality:
The BBPct + STDC indicator, developed by AlgoAlpha, is an original implementation that combines the calculation of Bollinger Bands, percentile ranking, the %Stdev histogram and the STDC. While it shares some similarities with the Bollinger Bands %B indicator, the BBPct indicator introduces additional elements and customization options tailored to AlgoAlpha's methodology. The script is released under the Mozilla Public License 2.0, granting users the freedom to utilize and modify it while adhering to the license terms.
Donchian Quest Research// =================================
Trend following strategy.
// =================================
Strategy uses two channels. One channel - for opening trades. Second channel - for closing.
Channel is similar to Donchian channel, but uses Close prices (not High/Low). That helps don't react to wicks of volatile candles (“stop hunting”). In most cases openings occur earlier than in Donchian channel. Closings occur only for real breakout.
// =================================
Strategy waits for beginning of trend - when price breakout of channel. Default length of both channels = 50 candles.
Conditions of trading:
- Open Long: If last Close = max Close for 50 closes.
- Close Long: If last Close = min Close for 50 closes.
- Open Short: If last Close = min Close for 50 closes.
- Close Short: If last Close = max Close for 50 closes.
// =================================
Color of lines:
- black - channel for opening trade.
- red - channel for closing trade.
- yellow - entry price.
- fuchsia - stoploss and breakeven.
- vertical green - go Long.
- vertical red - go Short.
- vertical gray - close in end, don't trade anymore.
// =================================
Order size calculated with ATR and volatility.
You can't trade 1 contract in BTC and 1 contract in XRP - for example. They have different price and volatility, so 1 contract BTC not equal 1 contract XRP.
Script uses universal calculation for every market. It is based on:
- Risk - USD sum you ready to loss in one trade. It calculated as percent of Equity.
- ATR indicator - measurement of volatility.
With default setting your stoploss = 0.5 percent of equity:
- If initial capital is 1000 USD and used parameter "Permit stop" - loss will be 5 USD (0.5 % of equity).
- If your Equity rises to 2000 USD and used parameter "Permit stop"- loss will be 10 USD (0.5 % of Equity).
// =================================
This Risk works only if you enable “Permit stop” parameter in Settings.
If this parameter disabled - strategy works as reversal strategy:
⁃ If close Long - channel border works as stoploss and momentarily go Short.
⁃ If close Short - channel border works as stoploss and momentarily go Long.
Channel borders changed dynamically. So sometime your loss will be greater than ‘Risk %’. Sometime - less than ‘Risk %’.
If this parameter enabled - maximum loss always equal to 'Risk %'. This parameter also include breakeven: if profit % = Risk %, then move stoploss to entry price.
// =================================
Like all trend following strategies - it works only in trend conditions. If no trend - slowly bleeding. There is no special additional indicator to filter trend/notrend. You need to trade every signal of strategy.
Strategy gives many losses:
⁃ 30 % of trades will close with profit.
⁃ 70 % of trades will close with loss.
⁃ But profit from 30% will be much greater than loss from 70 %.
Your task - patiently wait for it and don't use risky setting for position sizing.
// =================================
Recommended timeframe - Daily.
// =================================
Trend can vary in lengths. Selecting length of channels determine which trend you will be hunting:
⁃ 20/10 - from several days to several weeks.
⁃ 20/20 or 50/20 - from several weeks to several months.
⁃ 50/50 or 100/50 or 100/100 - from several months to several years.
// =================================
Inputs (Settings):
- Length: length of channel for trade opening/closing. You can choose 20/10, 20/20, 50/20, 50/50, 100/50, 100/100. Default value: 50/50.
- Permit Long / Permit short: Longs are most profitable for this strategy. You can disable Shorts and enable Longs only. Default value: permit all directions.
- Risk % of Equity: for position sizing used Equity percent. Don't use values greater than 5 % - it's risky. Default value: 0.5%.
⁃ ATR multiplier: this multiplier moves stoploss up or down. Big multiplier = small size of order, small profit, stoploss far from entry, low chance of stoploss. Small multiplier = big size of order, big profit, stop near entry, high chance of stoploss. Default value: 2.
- ATR length: number of candles to calculate ATR indicator. It used for order size and stoploss. Default value: 20.
- Close in end - to close active trade in the end (and don't trade anymore) or leave it open. You can see difference in Strategy Tester. Default value: don’t close.
- Permit stop: use stop or go reversal. Default value: without stop, reversal strategy.
// =================================
Properties (Settings):
- Initial capital - 1000 USD.
- Script don't uses 'Order size' - you need to change 'Risk %' in Inputs instead.
- Script don't uses 'Pyramiding'.
- 'Commission' 0.055 % and 'Slippage' 0 - this parameters are for crypto exchanges with perpetual contracts (for example Bybit). If use on other markets - set it accordingly to your exchange parameters.
// =================================
Big dataset used for chart - 'BITCOIN ALL TIME HISTORY INDEX'. It gives enough trades to understand logic of script. It have several good trends.
// =================================
PhantomFlow TrendDetectorThe TrendDetector calculates waves on the chart using the built-in ZigZag indicator and detects a trend change after the last high/low update occurs in a minimum sequence of non-updated highs/lows. This assumes a continuation of the trend for the subsequent update of the remaining high/low.
For trend determination:
When you see a pink or light yellow trend color, it means that a new trend may potentially be emerging right now, and you can join it almost at the beginning. So, if you see patterns from your trading system aligning with the TrendDetector indicator and they have the same direction, it further increases the likelihood of your plan working out.
In the case where the trend phase has a red or green color, it may indicate that the primary market impulse has already occurred, and therefore, joining the trend at this time may not be advisable.
For trade entry:
Additionally, you can use the indicator specifically for entering the market using market orders. Depending on the timeframe (the smaller the timeframe, the more confirmation candles are needed), you can open a trade when one trend replaces another at the close, for example, the second candle in the case of a 10-minute timeframe. Stop-loss can be placed under the signal candle, a local peak, or a reversal trend valley, a global peak, or a reversal trend valley. In the example above, the second option was used.
Settings
You cannot technically adjust anything in this indicator because all the logic is hardcoded. However, for a better chart visualization, after adding it to the chart, click on the three dots next to the indicator name, select "Visual order," and then "Bring to front".
Dynamic GANN Square Of 9 BandsDynamic GANN Square Of 9 Bands
Created on 3 Sept 2023
Adjust Increment Value:
Customize increment to match symbol and price characteristics for accuracy.
Green Line:
200 EMA. Identifies trend direction; moves with the prevailing trend.
Red Lines:
Mark prominent reversal levels closer to the red range; ideal for mean reversion strategies.
Crossing red levels may indicate trend continuation to the next red level.
Grey Lines:
Show immediate target reversal levels; watch for potential reversals.
Key Features:
Levels are different from Standard Deviation Lines.
Levels remain fixed and parallel, unaffected by volatility.
Despite its dynamism, it can serve as a leading indicator, revealing potential trend changes.
Primarily designed for trend-following strategies.
Additional Tips:
Use additional confirmations
Manage predefined risk and quantity
Additional Resources:
GANN Square Of 9 Pivots:
Ultimate RSI [LuxAlgo]The Ultimate RSI indicator is a new oscillator based on the calculation of the Relative Strength Index that aims to put more emphasis on the trend, thus having a less noisy output. Opposite to the regular RSI, this oscillator is designed for a trend trading approach instead of a contrarian one.
🔶 USAGE
While returning the same information as a regular RSI, the Ultimate RSI puts more emphasis on trends, and as such can reach overbought/oversold levels faster as well as staying longer within these areas. This can avoid the common issue of an RSI regularly crossing an overbought or oversold level while the trend makes new higher highs/lower lows.
The Ultimate RSI crossing above the overbought level can be indicative of a strong uptrend (highlighted as a green area), while an Ultimate RSI crossing under the oversold level can be indicative of a strong downtrend (highlighted as a red area).
The Ultimate RSI crossing the 50 midline can also indicate trends, with the oscillator being above indicating an uptrend, else a downtrend. Unlike a regular RSI, the Ultimate RSI will cross the midline level less often, thus generating fewer whipsaw signals.
For even more timely indications users can observe the Ultimate RSI relative to its signal line. An Ultimate RSI above its signal line can indicate it is increasing, while the opposite would indicate it is decreasing.
🔹 Smoothing Methods
Users can return more reactive or smoother results depending on the selected smoothing method used for the calculation of the Ultimate RSI. Options include:
Exponential Moving Average (EMA)
Simple Moving Average (SMA)
Wilder's Moving Average (RMA)
Triangular Moving Average (TMA)
These are ranked by the degree of reactivity of each method, with higher ones being more reactive (but less smooth).
Users can also select the smoothing method used by the signal line.
🔶 DETAILS
The RSI returns a normalized exponential average of price changes in the range (0, 100), which can be simply calculated as follows:
ema(d) / ema(|d|) × 50 + 50
where d represent the price changes. In order to put more emphasis on trends we can put higher weight on d . We can perform this on the occurrence of new higher highs/lower lows, and by replacing d with the rolling range instead (the rolling period used to detect the higher highs/lower lows is equal to the length setting).
🔶 SETTINGS
Length: Calculation period of the indicator
Method: Smoothing method used for the calculation of the indicator.
Source: Input source of the indicator
🔹 Signal Line
Smooth: Degree of smoothness of the signal line
Method: Smoothing method used to calculation the signal line.
Regularized-Moving-Average Oscillator SuiteThe Regularized-MA Oscillator Suite is a versatile indicator that transforms any moving average into an oscillator. It comprises up to 13 different moving average types, including KAMA, T3, and ALMA. This indicator serves as a valuable tool for both trend following and mean reversion strategies, providing traders and investors with enhanced insights into market dynamics.
Methodology:
The Regularized MA Oscillator Suite calculates the moving average (MA) based on user-defined parameters such as length, moving average type, and custom smoothing factors. It then derives the mean and standard deviation of the MA using a normalized period. Finally, it computes the Z-Score by subtracting the mean from the MA and dividing it by the standard deviation.
KAMA (Kaufman's Adaptive Moving Average):
KAMA is a unique moving average type that dynamically adjusts its smoothing period based on market volatility. It adapts to changing market conditions, providing a smoother response during periods of low volatility and a quicker response during periods of high volatility. This allows traders to capture trends effectively while reducing noise.
T3 (Tillson's Exponential Moving Average):
T3 is an exponential moving average that incorporates additional smoothing techniques to reduce lag and provide a more responsive indicator. It aims to maintain a balance between responsiveness and smoothness, allowing traders to identify trend reversals with greater accuracy.
ALMA (Arnaud Legoux Moving Average):
ALMA is a moving average type that utilizes a combination of linear regression and exponential moving average techniques. It offers a unique way of calculating the moving average by providing a smoother and more accurate representation of price trends. ALMA reduces lag and noise, enabling traders to identify trend changes and potential entry or exit points more effectively.
Z-Score:
The Z-Score calculation in the Regularized-MA Oscillator Suite standardizes the values of the moving average. It measures the deviation of each data point from the mean in terms of standard deviations. By normalizing the moving average through the Z-Score, the indicator enables traders to assess the relative position of price in relation to its mean and volatility. This information can be valuable for identifying overbought and oversold conditions, as well as potential trend reversals.
Utility:
The Regularized-MA Oscillator Suite with its unique moving average types and Z-Score calculation offers traders and investors powerful analytical tools. It can be used for trend following strategies by analyzing the oscillator's position relative to the midline. Traders can also employ it as a mean reversion tool by identifying peak values above user-defined deviations. These features assist in identifying potential entry and exit points, enhancing trading decisions and market analysis.
Key Features:
Variety of 13 MA types.
Potential reversal point bubbles.
Bar coloring methods - Trend (Midline cross), Extremities, Reversions, Slope
Example Charts:
AlphaTrend - ScreenerScreener version of AlphaTrend indicator:
BUY / LONG when AlphaTrend line crosses above its 2 bars offsetted line, and there would be a green filling between them
SELL / SHORT when AlphaTrend line crosses below its 2 bars offsetted line, and filling would be red then.
Default values:
Coefficient: 1, which is the factor of the trailing ATR value
Common Period: 14, which is the length of ATR MFI and RSI
AlphaTrend default uses MFI in the calculation, and MFI (Money Flow Index) needs the volume data of the chart.
If your chart doesn't have the volume data, please select the "Change Calculation" option to use RSI instead of MFI.
Screener Panel:
You can explore 20 different and user-defined tickers, which can be changed from the SETTINGS (shares, crypto, commodities...) on this screener version.
The screener panel shows up right after the bars on the right side of the chart.
Tickers seen in green are the ones that are in an uptrend, according to AlphaTrend.
The ones that appear in red are those in the SELL signal, in a downtrend.
The numbers in front of each Ticker indicate how many bars passed after the last BUY or SELL signal of AlphaTrend.
For example, according to the indicator, when BTCUSDT appears in (3) and in GREEN, Bitcoin switched to BUY signal 3 bars ago.
Fetch ATR + MA StrategyA trend following indicator that allows traders/investors to enter trades for the long term, as it is mainly tested on the daily chart. The indicator fires off buy and sell signals. The sell signals can be turned off as trader can decide to use this indicator for long term buy signals. The buy signals are indicated by the green diamonds, and the red diamonds show the points on then chart where the asset can be sold.
The indicator uses a couple indicators in order to generate the buy signals:
- ADX
- ATR
- Moving Average of ATR
- 50 SMA
- 200 SMA
The buy signal is generated at the cross overs of the 50 and 200 SMA's while the ATR is lower than then Moving Average of the ATR. The buy signal is fired when these conditions are met and if the ADX is lower than 30.
The thought process is as follows:
When the ATR is lower than its moving average, the price should be in a low volatilty environment. An ADX between 25 and 50 signals a Strong trend. Every value below 25 is an absent or weak trend. So entering a trade when the volatilty is still low but increasing, you'll be entering a trade at the start of a new uptrend. This mechanism also filters out lots of false signals of the simple cross overs.
The sell signals are fired every time the 50 SMA drops below the 200 SMA.
Lorentzian Classification Strategy Based in the model of Machine learning: Lorentzian Classification by @jdehorty, you will be able to get into trending moves and get interesting entries in the market with this strategy. I also put some new features for better backtesting results!
Backtesting context: 2022-07-19 to 2023-04-14 of US500 1H by PEPPERSTONE. Commissions: 0.03% for each entry, 0.03% for each exit. Risk per trade: 2.5% of the total account
For this strategy, 3 indicators are used:
Machine learning: Lorentzian Classification by @jdehorty
One Ema of 200 periods for identifying the trend
Supertrend indicator as a filter for some exits
Atr stop loss from Gatherio
Trade conditions:
For longs:
Close price is above 200 Ema
Lorentzian Classification indicates a buying signal
This gives us our long signal. Stop loss will be determined by atr stop loss (white point), break even(blue point) by a risk/reward ratio of 1:1 and take profit of 3:1 where half position will be closed. This will be showed as buy.
The other half will be closed when the model indicates a selling signal or Supertrend indicator gives a bearish signal. This will be showed as cl buy.
For shorts:
Close price is under 200 Ema
Lorentzian Classification indicates a selling signal
This gives us our short signal. Stop loss will be determined by atr stop loss (white point), break even(blue point) by a risk/reward ratio of 1:1 and take profit of 3:1 where half position will be closed. This will be showed as sell.
The other half will be closed when the model indicates a buying signal or Supertrend indicator gives a bullish signal. This will be showed as cl sell.
Risk management
To calculate the amount of the position you will use just a small percent of your initial capital for the strategy and you will use the atr stop loss or last swing for this.
Example: You have 1000 usd and you just want to risk 2,5% of your account, there is a buy signal at price of 4,000 usd. The stop loss price from atr stop loss or last swing is 3,900. You calculate the distance in percent between 4,000 and 3,900. In this case, that distance would be of 2.50%. Then, you calculate your position by this way: (initial or current capital * risk per trade of your account) / (stop loss distance).
Using these values on the formula: (1000*2,5%)/(2,5%) = 1000usd. It means, you have to use 1000 usd for risking 2.5% of your account.
We will use this risk management for applying compound interest.
> In settings, with position amount calculator, you can enter the amount in usd of your account and the amount in percentage for risking per trade of the account. You will see this value in green color in the upper left corner that shows the amount in usd to use for risking the specific percentage of your account.
> You can also choose a fixed amount, so you will have to activate fixed amount in risk management for trades and set the fixed amount for backtesting.
Script functions
Inside of settings, you will find some utilities for display atr stop loss, break evens, positions, signals, indicators, a table of some stats from backtesting, etc.
You will find the settings for risk management at the end of the script if you want to change something or trying new values for other assets for backtesting.
If you want to change the initial capital for backtest the strategy, go to properties, and also enter the commisions of your exchange and slippage for more realistic results.
In risk managment you can find an option called "Use leverage ?", activate this if you want to backtest using leverage, which means that in case of not having enough money for risking the % determined by you of your account using your initial capital, you will use leverage for using the enough amount for risking that % of your acount in a buy position. Otherwise, the amount will be limited by your initial/current capital
I also added a function for backtesting if you had added or withdrawn money frequently:
Adding money: You can choose how often you want to add money (Monthly, yearly, daily or weekly). Then a fixed amount of money and activate or deactivate this function
Withdraw money: You can choose if you want to withdraw a fixed amount or a percentage of earnings. Then you can choose a fixed amount of money, the period of time and activate or deactivate this function. Also, the percentage of earnings if you choosed this option.
Some other assets where strategy has worked
BTCUSD 4H, 1D
ETHUSD 4H, 1D
BNBUSD 4H
SPX 1D
BANKNIFTY 4H, 15 min
Some things to consider
USE UNDER YOUR OWN RISK. PAST RESULTS DO NOT REPRESENT THE FUTURE.
DEPENDING OF % ACCOUNT RISK PER TRADE, YOU COULD REQUIRE LEVERAGE FOR OPEN SOME POSITIONS, SO PLEASE, BE CAREFULL AND USE CORRECTLY THE RISK MANAGEMENT
Do not forget to change commissions and other parameters related with back testing results!. If you have problems loading the script reduce max bars back number in general settings
Strategies for trending markets use to have more looses than wins and it takes a long time to get profits, so do not forget to be patient and consistent !
Please, visit the post from @jdehorty called Machine Learning: Lorentzian Classification for a better understanding of his script!
Any support and boosts will be well received. If you have any question, do not doubt to ask!
Momentum Covariance Oscillator by TenozenWell, guess what? A new indicator is here! Again it's a coincidence, as I experiment with my formula. So far it's less noisy than Autoregressive Covariance Oscillator, so possibly this one is better. The formula is much simpler, care me to explain.
___________________________________________________________________________________________________
Yt = close - previous average
Val = Yt/close
___________________________________________________________________________________________________
Welp that's the formula lol. Funny thing is that it's so simple, but it's good! What matters is the use of it haha.
So how to use this Oscillator? If the value is above 0, we expect a bullish response, if the value is below 0 we expect a bearish response. That simple. Ciao.
(Any questions and suggestions? feel free to comment!)
Autoregressive Covariance Oscillator by TenozenWell to be honest I don't know what to name this indicator lol. But anyway, here is my another original work! Gonna give some background of why I create this indicator, it's all pretty much a coincidence when I'm learning about time series analysis.
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Well, the formula of Auto-covariance is:
E{(X(t)-(t) * (X(t-s)-(t-s))}= Y_s
But I don't multiply both values but rather subtract them:
E{(X(t)-(t) - (X(t-s)-(t-s))}= Y_s?
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
For arm_vald, the equation is as follows:
arm_vald = val_mu + mu_plus_lsm + et
val_mu --> mean of time series
mu_plus_lsm --> val_mu + LSM
et --> error term
As you can see, val_mu^2. I did this so the oscillator is much smoother.
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
After I get the value, I normalize them:
aco = Y_s? / arm_vald
So by this calculation, I get something like an oscillator!
(more details in the code)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
So how to use this indicator? It's so easy! If the value is above 0, we gonna expect a bullish response, if the value is below 0, we gonna expect a bearish response; that simple. Be aware that you should wait for the price to be closed before executing a trade.
Well, try it out! So far this is the most powerful indicator that I've created, hope it's useful. Ciao.
(more updates for the indicator if needed)
Strategy for UT Bot Alerts indicator Using the UT Bot alerts indicator by @QuantNomad, this strategy was designed for showing an example of how this indicator could be used, also, it has the goal to help some people from a group that use to use this indicator for their trading. Under any circumstance I recommend to use it without testing it before in real time.
Backtesting context: 2020-02-05 to 2023-02-25 of BTCUSD 4H by Tvc. Commissions: 0.03% for each entry, 0.03% for each exit. Risk per trade: 2.5% of the total account
For this strategy, 3 indicators are used:
UT Bot Alerts indicator by Quantnomad
One Ema of 200 periods for indicate the trend
Atr stop loss from Gatherio
Trade conditions:
For longs:
Close price is higher than Atr from UT Bot
Ema from UT Bot cross over Atr from UT Bot.
This gives us our long signal. Stop loss will be determined by atr stop loss (white point), break even(blue point) by a risk/reward ratio of 0.75:1 and take profit of 3:1 where half position will be closed. This will be showed as buy (open long position)
The other half will be closed when close price is lower than Atr and Ema from UT Bot cross under Atr. This will be showed as cl buy (close long position)
For shorts:
Close price is lower than Atr from UT Bot
Ema from UT Bot cross over Atr from UT Bot.
This gives us our short signal. Stop loss will be determined by atr stop loss (white point), break even(blue point) by a risk/reward ratio of 0.75:1 and take profit of 3:1 where half position will be closed. This will be showed as sell (open short position)
The other half will be closed when close price is higher than Atr and Ema from UT Bot cross over Atr. This will be showed as cl sell (close short position)
Risk management
For calculate the amount of the position you will use just a small percent of your initial capital for the strategy and you will use the atr stop loss for this.
Example: You have 1000 usd and you just want to risk 2,5% of your account, there is a long signal at price of 20,000 usd. The stop loss price from atr stop loss is 19,000. You calculate the distance in percent between 20,000 and 19,000. In this case, that distance would be of 5,0%. Then, you calculate your position by this way: (initial or current capital * risk per trade of your account) / (stop loss distance).
Using these values on the formula: (1000*2,5%)/(5,0%) = 500usd. It means, you have to use 500 usd for risking 2.5% of your account.
We will use this risk management for apply compound interest.
In settings, with position amount calculator, you can enter the amount in usd of your account and the amount in percentage for risking per trade of the account. You will see this value in green color in the upper left corner that shows the amount in usd to use for risking the specific percentage of your account.
Script functions
Inside of settings, you will find some utilities for display atr stop loss, break evens, positions, signals, indicators, etc.
You will find the settings for risk management at the end of the script if you want to change something. But rebember, do not change values from indicators, the idea is to not over optimize the strategy.
If you want to change the initial capital for backtest the strategy, go to properties, and also enter the commisions of your exchange and slippage for more realistic results.
In risk managment you can find an option called "Use leverage ?", activate this if you want to backtest using leverage, which means that in case of not having enough money for risking the % determined by you of your account using your initial capital, you will use leverage for using the enough amount for risking that % of your acount in a buy position. Otherwise, the amount will be limited by your initial/current capital
---> Do not forget to deactivate Trades on chart option in style settings for a cleaner look of the chart <---
Some things to consider
USE UNDER YOUR OWN RISK. PAST RESULTS DO NOT REPRESENT THE FUTURE.
DEPENDING OF % ACCOUNT RISK PER TRADE, YOU COULD REQUIRE LEVERAGE FOR OPEN SOME POSITIONS, SO PLEASE, BE CAREFULL AND USE CORRECTLY THE RISK MANAGEMENT
Do not forget to change commissions and other parameters related with back testing results!
Strategies for trending markets use to have more looses than wins and it takes a long time to get profits, so do not forget to be patient and consistent !
---> The strategy can still be improved, you can change some parameters depending of the asset and timeframe like risk/reward for taking profits, for break even, also the main parameters of the UT Bot Alerts <----
Investments/swing trading strategy for different assetsStop worrying about catching the lowest price, it's almost impossible!: with this trend-following strategy and protection from bearish phases, you will know how to enter the market properly to obtain benefits in the long term.
Backtesting context: 1899-11-01 to 2023-02-16 of SPX by Tvc. Commissions: 0.05% for each entry, 0.05% for each exit. Risk per trade: 2.5% of the total account
For this strategy, 5 indicators are used:
One Ema of 200 periods
Atr Stop loss indicator from Gatherio
Squeeze momentum indicator from LazyBear
Moving average convergence/divergence or Macd
Relative strength index or Rsi
Trade conditions:
There are three type of entries, one of them depends if we want to trade against a bearish trend or not.
---If we keep Against trend option deactivated, the rules for two type of entries are:---
First type of entry:
With the next rules, we will be able to entry in a pull back situation:
Squeeze momentum is under 0 line (red)
Close is above 200 Ema and close is higher than the past close
Histogram from macd is under 0 line and is higher than the past one
Once these rules are met, we enter into a buy position. Stop loss will be determined by atr stop loss (white point) and break even(blue point) by a risk/reward ratio of 1:1.
For closing this position: Squeeze momentum crosses over 0 and, until squeeze momentum crosses under 0, we close the position. Otherwise, we would have closed the position due to break even or stop loss.
Second type of entry:
With the next rules, we will not lose a possible bullish movement:
Close is above 200 Ema
Squeeze momentum crosses under 0 line
Once these rules are met, we enter into a buy position. Stop loss will be determined by atr stop loss (white point) and break even(blue point) by a risk/reward ratio of 1:1.
Like in the past type of entry, for closing this position: Squeeze momentum crosses over 0 and, until squeeze momentum crosses under 0, we close the position. Otherwise, we would have closed the position due to break even or stop loss.
---If we keep Against trend option activated, the rules are the same as the ones above, but with one more type of entry. This is more useful in weekly timeframes, but could also be used in daily time frame:---
Third type of entry:
Close is under 200 Ema
Squeeze momentum crosses under 0 line
Once these rules are met, we enter into a buy position. Stop loss will be determined by atr stop loss (white point) and break even(blue point) by a risk/reward ratio of 1:1.
Like in the past type of entries, for closing this position: Squeeze momentum crosses over 0 and, until squeeze momentum crosses under 0, we close the position. Otherwise, we would have closed the position due to break even or stop loss.
Risk management
For calculating the amount of the position you will use just a small percent of your initial capital for the strategy and you will use the atr stop loss for this.
Example: You have 1000 usd and you just want to risk 2,5% of your account, there is a buy signal at price of 4,000 usd. The stop loss price from atr stop loss is 3,900. You calculate the distance in percent between 4,000 and 3,900. In this case, that distance would be of 2.50%. Then, you calculate your position by this way: (initial or current capital * risk per trade of your account) / (stop loss distance).
Using these values on the formula: (1000*2,5%)/(2,5%) = 1000usd. It means, you have to use 1000 usd for risking 2.5% of your account.
We will use this risk management for applying compound interest.
In settings, with position amount calculator, you can enter the amount in usd of your account and the amount in percentage for risking per trade of the account. You will see this value in green color in the upper left corner that shows the amount in usd to use for risking the specific percentage of your account.
Script functions
Inside of settings, you will find some utilities for display atr stop loss, break evens, positions, signals, indicators, etc.
You will find the settings for risk management at the end of the script if you want to change something. But rebember, do not change values from indicators, the idea is to not over optimize the strategy.
If you want to change the initial capital for backtest the strategy, go to properties, and also enter the commisions of your exchange and slippage for more realistic results.
If you activate break even using rsi, when rsi crosses under overbought zone break even will be activated. This can work in some assets.
---Important: In risk managment you can find an option called "Use leverage ?", activate this if you want to backtest using leverage, which means that in case of not having enough money for risking the % determined by you of your account using your initial capital, you will use leverage for using the enough amount for risking that % of your acount in a buy position. Otherwise, the amount will be limited by your initial/current capital---
Some things to consider
USE UNDER YOUR OWN RISK. PAST RESULTS DO NOT REPRESENT THE FUTURE.
DEPENDING OF % ACCOUNT RISK PER TRADE, YOU COULD REQUIRE LEVERAGE FOR OPEN SOME POSITIONS, SO PLEASE, BE CAREFULL AND USE CORRECTLY THE RISK MANAGEMENT
Do not forget to change commissions and other parameters related with back testing results!
Some assets and timeframes where the strategy has also worked:
BTCUSD : 4H, 1D, W
SPX (US500) : 4H, 1D, W
GOLD : 1D, W
SILVER : 1D, W
ETHUSD : 4H, 1D
DXY : 1D
AAPL : 4H, 1D, W
AMZN : 4H, 1D, W
META : 4H, 1D, W
(and others stocks)
BANKNIFTY : 4H, 1D, W
DAX : 1D, W
RUT : 1D, W
HSI : 1D, W
NI225 : 1D, W
USDCOP : 1D, W
Trend Oscillatorwhat is "Trend Oscillator"?
it is an indicator for determining the trend.
what it does?
analyzes the price action by reducing it to 4 different situations. Red means strong bear, orange means bearish, yellow means weak bull and green means strong bull. It was developed to help traders who trade in the direction of the trend and its biggest promise is to simplify price action.
how it does it?
He defines 4 different situations as follows. If the velocity of the price is positive and the acceleration is positive, it is a strong bull, if the velocity is positive and the acceleration is negative, it is a weak bull, if the velocity is negative and the acceleration is positive, it is a weak bear, if both velocity and acceleration are negative, it is a strong bear.
2 for strong bull
1 for the weak bull
-1 for weak bear
Creates a function that takes values of -2 for the strong bear. this function is the velocity of the principal indicator, and then the integral of this function forms the principal indicator.
how to use it?
"source" is used to change the source of the indicator,
"length" makes the indicator give a later but less signal.
you can use it to follow or analyze the trend. colors make it easy to use. learns about current or past trends by looking at colors. Like any trend indicator, it can give unsuccessful signals in a horizontal trend.
VWAP filtered MACD Bars with positive MACD histogram value and closing above VWAP are colored, long positions should be taken in areas made of those bars.
Similarly, bars with negative MACD histogram value and closing below VWAP are also colored, short positions should be taken there.
This indicator by default should be a part of your trend following trading system.
In the setting you can change colors
Above grow: positive and rising MACD histogram value
Above fall: positive and falling MACD histogram value
Below fall: negative and falling MACD histogram value
Below grow: negative and rising MACD histogram value
Rocket Grid Algorithm - The Quant ScienceThe Rocket Grid Algorithm is a trading strategy that enables traders to engage in both long and short selling strategies. The script allows traders to backtest their strategies with a date range of their choice, in addition to selecting the desired strategy - either SMA Based Crossunder or SMA Based Crossover.
The script is a combination of trend following and short-term mean reversing strategies. Trend following involves identifying the current market trend and riding it for as long as possible until it changes direction. This type of strategy can be used over a medium- to long-term time horizon, typically several months to a few years.
Short-term mean reversing, on the other hand, involves taking advantage of short-term price movements that deviate from the average price. This type of strategy is usually applied over a much shorter time horizon, such as a few days to a few weeks. By rapidly entering and exiting positions, the strategy seeks to capture small, quick gains in volatile market conditions.
Overall, the script blends the best of both worlds by combining the long-term stability of trend following with the quick gains of short-term mean reversing, allowing traders to potentially benefit from both short-term and long-term market trends.
Traders can configure the start and end dates, months, and years, and choose the length of the data they want to work with. Additionally, they can set the percentage grid and the upper and lower destroyers to manage their trades effectively. The script also calculates the Simple Moving Average of the chosen data length and plots it on the chart.
The trigger for entering a trade is defined as a crossunder or crossover of the close price with the Simple Moving Average. Once the trigger is activated, the script calculates the total percentage of the side and creates a grid range. The grid range is then divided into ten equal parts, with each part representing a unique grid level. The script keeps track of each grid level, and once the close price reaches the grid level, it opens a trade in the specified direction.
The equity management strategy in the script involves a dynamic allocation of equity to each trade. The first order placed uses 10% of the available equity, while each subsequent order uses 1% less of the available equity. This results in the allocation of 9% for the second order, 8% for the third order, and so on, until a maximum of 10 open trades. This approach allows for risk management and can help to limit potential losses.
Overall, the Rocket Grid Algorithm is a flexible and powerful trading strategy that can be customized to meet the specific needs of individual traders. Its user-friendly interface and robust backtesting capabilities make it an excellent tool for traders looking to enhance their trading experience.
Fibonacci Step IndicatorThe Fibonacci Step Indicator assumes irregularity in calculating a moving average. It is measured as the mean of the previous lows and highs situated at Fibonacci past periods. For example, the mean of the lows from 2, 3, 5, 8, etc. periods ago form the Fibonacci step indicator.
The indicator uses the formula for the first twelve Fibonacci numbers on highs and lows so that it creates a moving support/resistance zone. Afterwards, the zone is stabilized by taking the highest highs of the upper indicator and the lowest lows of the lower indicator part.
The indicator is used as a trend following way. It can be compared to the Ichimoku Kinko Hyo cloud (without the future projection). The zone form a support and resistance area. During ranging periods, the market will fluctuate within the area which is a bad time to follow the trend (if any).
Simple SuperTrend Strategy for BTCUSD 4HHello guys!, If you are a swing trader and you are looking for a simple trend strategy, you should check this one. Based in the supertrend indicator, this strategy will help you to catch big movements in BTCUSD 4H and avoid losses as much as possible in consolidated situations of the market
This strategy was designed for BTCUSD in 4H timeframe
Backtesting context: 2020-01-02 to 2023-01-05 (The strategy has also worked in previous years)
Trade conditions:
Rules are actually simple, the most important thing is the risk and position management of this strategy
For long:
Once Supertrend changes from a downtrend to a uptrend, you enter into a long position. The stop loss will be defined by the atr stop loss
The first profit will be of 0.75 risk/reward ratio where half position will be closed. When this happens, you move the stop loss to break even.
Now, just will be there two situations:
Once Supertrend changes from a uptrend to a downtrend, you close the other half of the initial long position.
If price goes againts the position, the position will be closed due to breakeven.
For short:
Once Supertrend changes from a uptrend to a downtrend, you enter into a short position. The stop loss will be defined by the atr stop loss
The first profit will be of 0.75 risk/reward ratio where half position will be closed. When this happens, you move the stop loss to break even.
Like in the long position, just will be there two situations:
Once Supertrend changes from a downtrend to a uptrend, you close the other half of the initial short position.
If price goes againts the position, the position will be closed due to breakeven.
Risk management
For calculate the amount of the position you will use just a small percent of your initial capital for the strategy and you will use the atr stop loss for this.
Example: You have 1000 usd and you just want to risk 2,5% of your account, there is a long signal at price of 20,000 usd. The stop loss price from atr stop loss is 19,000. You calculate the distance in percent between 20,000 and 19,000. In this case, that distance would be of 5,0%. Then, you calculate your position by this way: (initial or current capital * risk per trade of your account) / (stop loss distance).
Using these values on the formula: (1000*2,5%)/(5,0%) = 500usd. It means, you have to use 500 usd for risking 2.5% of your account.
We will use this risk management for apply compound interest.
Script functions
Inside of settings, you will find some utilities for display atr stop loss, supertrend or positions.
You will find the settings for risk management at the end of the script if you want to change something. But rebember, do not change values from indicators, the idea is to not over optimize the strategy.
If you want to change the initial capital for backtest the strategy, go to properties, and also enter the commisions of your exchange and slippage for more realistic results.
Signals meanings:
L for long position. CL for close long position.
S for short position. CS for close short position.
Tp for take profit (it also appears when the position is closed due to stop loss, this due to the script uses two kind of positions)
Exit due to break even or due to stop loss
Some things to consider
USE UNDER YOUR OWN RISK. PAST RESULTS DO NOT REPRESENT THE FUTURE.
DEPENDING OF % ACCOUNT RISK PER TRADE, YOU COULD REQUIRE LEVERAGE FOR OPEN SOME POSITIONS, SO PLEASE, BE CAREFULL AND USE CORRECTLY THE RISK MANAGEMENT
The amount of trades closed in the backtest are not exactly the real ones. If you want to know the real ones, go to settings and change % of trade for first take profit to 100 for getting the real ones. In the backtest, the real amount of opened trades was of 194.
Indicators used:
Supertrend
Atr stop loss by garethyeo
This is the fist strategy that I publish in tradingview, I will be glad with you for any suggestion, support or advice for future scripts. Do not doubt in make any question you have and if you liked this content, leave a boost. I plan to bring more strategies and useful content for you!