Minkiu Bollinger Band Strategy Convert all Indicator specific code to Strategy specific code. Don't use any code that a TradingView Strategy won't support. Especially timeframes and gaps. Define those in code so they are semantically the same as before.
Supertrend
Entropy-Based Adaptive SuperTrendOverview:
Introducing the Entropy-Based Adaptive SuperTrend – a groundbreaking trading indicator designed to adapt dynamically to market conditions using market entropy. This enhanced SuperTrend indicator adjusts its sensitivity according to the level of chaos (or order) in price movements, providing more stable signals during volatile periods and more responsive signals when the market becomes orderly.
Key Features:
Entropy-Adaptive Mechanism: By incorporating an entropy measure, this indicator estimates the degree of unpredictability in the market. During high entropy periods (more chaotic), signals are made less sensitive, while during low entropy periods, the indicator reacts more quickly to price changes.
Adaptive ATR Multiplier: Unlike traditional SuperTrend indicators that use a fixed ATR multiplier, this version calculates a dynamic ATR multiplier based on the entropy score, ensuring more flexibility and adaptability in setting stop levels.
Visual Clarity: The indicator is overlayed on the price chart with customizable visual elements. The bullish and bearish trends are color-coded for ease of use, and optional entry signals ("L" for long and "S" for short) are plotted to clearly mark potential entry opportunities.
Alerts for Key Opportunities : Never miss an opportunity with built-in alerts for buy and sell signals. Traders can easily configure these alerts to be notified instantly when market conditions trigger a new trend.
How It Works:
Entropy Calculation: The entropy of the price data is calculated over a user-defined period, giving an indication of the degree of randomness in the price movements. The result is then smoothed to reduce noise and create a meaningful trend indication.
Dynamic ATR Adjustment: The ATR (Average True Range) multiplier, which controls the distance of the trailing stop, is adjusted based on the entropy score. This allows the SuperTrend line to widen in chaotic times, reducing false signals, while tightening in orderly times, allowing quicker trend captures.
Parameters Explained:
Entropy Settings: Control the sensitivity of entropy calculations, including the look-back period, number of bins for price distribution, and smoothing length.
Adaptive Settings: Adjust how the indicator adapts to different levels of entropy, including the adaptation period and the filtering weight.
SuperTrend Settings : Customize the ATR period and the dynamic multiplier range to fine-tune the trailing stops for your trading style.
Visual Settings: Choose your preferred colors for bullish and bearish trends, and decide if you want the entry labels displayed directly on the chart.
Use Cases:
Swing Traders can utilize the indicator to capture trend reversals while filtering out the noise during high entropy periods.
Intraday Traders can adapt the settings for shorter time frames to benefit from dynamic adjustments that reduce overtrading and false signals.
Risk Management: The entropy-based adaptive feature provides an edge in risk management by reducing sensitivity during times of increased chaos, thus helping to limit unnecessary trades.
How to Use It:
Look for entry labels ("L" for long, "S" for short) to identify potential opportunities.
Use the color-coded trendlines to determine market bias: greenish hue for bullish trends, reddish hue for bearish trends.
Customize the input settings to align with your preferred market timeframe and risk profile.
Alerts & Notifications:
Built-in alerts notify you of significant trend changes. Simply enable these alerts to receive updates when a new long or short opportunity is detected, helping you stay ahead without needing to watch the screen constantly.
Customization Tips:
Longer Timeframes : Increase the Entropy Period to better capture macro trends in high timeframe charts.
Higher Volatility Markets: Increase the ATR Max Multiplier to ensure stops are set farther away during high entropy.
Lower Volatility Markets: Use a lower ATR Base Multiplier and tighter entropy thresholds to capture rapid price movements.
Final Thoughts:
The Entropy-Based Adaptive SuperTrend indicator merges traditional trend-following logic with an adaptive mechanism driven by market entropy, aiming to address the challenges of whipsaws and false signals common in conventional SuperTrend setups. This indicator offers an intelligent and flexible way to track market trends, suitable for both beginners and experienced trade
Supertrend with EMASupertrend + EMA Indicator
This custom indicator combines the popular Supertrend and Exponential Moving Average (EMA) indicators to enhance trend analysis and signal accuracy. The Supertrend tracks price volatility to identify potential trend directions, while the EMA provides a smooth moving average to help refine entries and exits based on trend momentum.
Features:
Supertrend: Detects trend reversals by using price action and volatility, making it effective in trending markets.
Exponential Moving Average (EMA): Smoothens price fluctuations, helping you gauge the trend’s strength and filter out false signals.
Versatile for multiple timeframes and asset classes.
Ideal for traders looking to catch sustained trends and avoid false breakouts, this indicator offers an improved way to follow market momentum and confirm trend strength. Customize the Supertrend ATR multiplier and EMA length to suit your trading style and timeframe.
Supertrend StrategyThe Supertrend Strategy was created based on the Supertrend and Relative Strength Index (RSI) indicators, widely respected tools in technical analysis. This strategy combines these two indicators to capture market trends with precision and reliability, looking for optimizing exit levels at oversold or overbought price levels.
The Supertrend indicator identifies trend direction based on price and volatility by using the Average True Range (ATR). The ATR measures market volatility by calculating the average range between an asset’s high and low prices over a set period. It provides insight into price fluctuations, with higher ATR values indicating increased volatility and lower values suggesting stability. The Supertrend Indicator plots a line above or below the price, signaling potential buy or sell opportunities: when the price closes above the Supertrend line, an uptrend is indicated, while a close below the line suggests a downtrend. This line shifts as price movements and volatility levels change, acting as both a trailing stop loss and trend confirmation.
To enhance the Supertrend strategy, the Relative Strength Index (RSI) has been added as an exit criterion. As a momentum oscillator, the RSI indicates overbought (usually above 70) or oversold (usually below 30) conditions. This integration allows trades to close when the asset is overbought or oversold, capturing gains before a possible reversal, even if the percentage take profit level has not been reached. This mechanism aims to prevent losses due to market reversals before the Supertrend signal changes.
### Key Features
1. **Entry criteria**:
- The strategy uses the Supertrend indicator calculated by adding or subtracting a multiple of the ATR from the closing price, depending on the trend direction.
- When the price crosses above the Supertrend line, the strategy signals a long (buy) entry. Conversely, when the price crosses below, it signals a short (sell) entry.
- The strategy performs a reversal if there is an open position and a change in the direction of the supertrend occurs
2. **Exit criteria**:
- Take profit of 30% (default) on the average position price.
- Oversold (≤ 5) or overbought (≥ 95) RSI
- Reversal when there is a change in direction of the Supertrend
3. **No Repainting**:
- This strategy is not subject to repainting, as long as the timeframe configured on your chart is the same as the supertrend timeframe .
4. **Position Sizing by Equity and risk management**:
- This strategy has a default configuration to operate with 35% of the equity. At the time of opening the position, the supertrend line is typically positioned at about 12 to 16% of the entry price. This way, the strategy is putting at risk about 16% of 35% of equity, that is, around 5.6% of equity for each trade. The percentage of equity can be adjusted by the user according to their risk management.
5. **Backtest results**:
- This strategy was subjected to deep backtesting and operations in replay mode, including transaction fees of 0.12%, and slippage of 5 ticks.
- The past results in deep backtest and replay mode were compatible and profitable (Variable results depending on the take profit used, supertrend and RSI parameters). However, it should be noted that few operations were evaluated, since the currency in question has been created for a short time and the frequency of operations is relatively small.
- Past results are no guarantee of future results. The strategy's backtest results may even be due to overfitting with past data.
Default Settings
Chart timeframe: 2h
Supertrend Factor: 3.42
ATR period: 14
Supertrend timeframe: 2 h
RSI timeframe: 15 min
RSI Lenght: 5 min
RSI Upper limit: 95
RSI Lower Limit: 5
Take Profit: 30%
BYBIT:1000000MOGUSDT.P
Multi Fibonacci Supertrend with Signals【FIbonacciFlux】Multi Fibonacci Supertrend with Signals (MFSS)
Overview
The Multi Fibonacci Supertrend with Signals (MFSS) is an advanced technical analysis tool that combines multiple Supertrend indicators using Fibonacci ratios to identify trend directions and potential trading opportunities.
Key Features
1. Fibonacci-Based Supertrend Levels
* Factor 1 (Weak) : 0.618 - The golden ratio
* Factor 2 (Medium) : 1.618 - The Fibonacci ratio
* Factor 3 (Strong) : 2.618 - The extension ratio
2. Visual Components
* Multi-layered Trend Lines
* Different line weights for easy identification
* Progressive transparency from Factor 1 to Factor 3
* Color-coded trend directions (Green for bullish, Red for bearish)
* Dynamic Fill Areas
* Gradient fills between price and trend lines
* Visual representation of trend strength
* Automatic color adjustment based on trend direction
* Signal Indicators
* Clear BUY/SELL labels on chart
* Position-adaptive signal placement
* High-visibility color scheme
3. Signal Generation Logic
The system generates signals based on two key conditions:
* Primary Condition :
* BUY : Price crossunder Supertrend2 (Factor 1.618)
* SELL : Price crossover Supertrend2 (Factor 1.618)
* Confirmation Filter :
* Signals only trigger when Supertrend3 confirms the trend direction
* Reduces false signals in volatile markets
Technical Details
Input Parameters
* ATR Period : 10 (default)
* Customizable for different market conditions
* Affects sensitivity of all Supertrend levels
* Factor Settings :
* All factors are customizable
* Default values based on Fibonacci sequence
* Minimum value: 0.01
* Step size: 0.01
Alert System
* Built-in alert conditions
* Customizable alert messages
* Real-time notification support
Use Cases
* Trend Trading
* Identify strong trend directions
* Filter out weak signals
* Confirm trend continuations
* Risk Management
* Multiple trend levels for stop-loss placement
* Clear entry and exit signals
* Trend strength visualization
* Market Analysis
* Multi-timeframe analysis capability
* Trend strength assessment
* Market structure identification
Benefits
* Reliability
* Based on proven Supertrend algorithm
* Enhanced with Fibonacci mathematics
* Multiple confirmation levels
* Clarity
* Clear visual signals
* Easy-to-interpret interface
* Reduced noise in signal generation
* Flexibility
* Customizable parameters
* Adaptable to different markets
* Suitable for various trading styles
Performance Considerations
* Optimized code structure
* Efficient calculation methods
* Minimal resource usage
Installation and Usage
Setup
* Add indicator to chart
* Adjust parameters if needed
* Enable alerts as required
Best Practices
* Use with other confirmation tools
* Adjust factors based on market volatility
* Consider timeframe appropriateness
Backtesting Results and Strategy Performance
This indicator is specifically designed for pullback trading with optimized risk-reward ratios in trend-following strategies. Below are the detailed backtesting results from our proprietary strategy implementation:
BTCUSDT Performance (Binance)
* Test Period: Approximately 7 years
* Risk-Reward Ratio: 2:1
* Take Profit: 8%
* Stop Loss: 4%
Key Metrics (BTCUSDT):
* Net Profit: +2,579%
* Total Trades: 551
* Win Rate: 44.8%
* Profit Factor: 1.278
* Maximum Drawdown: 42.86%
ETHUSD Performance (Binance)
* Risk-Reward Ratio: 4.33:1
* Take Profit: 13%
* Stop Loss: 3%
Key Metrics (ETHUSD):
* Net Profit: +8,563%
* Total Trades: 581
* Win Rate: 32%
* Profit Factor: 1.32
* Maximum Drawdown: 55%
Strategy Highlights:
* Optimized for pullback trading in strong trends
* Focus on high risk-reward ratios
* Proven effectiveness in major cryptocurrency pairs
* Consistent performance across different market conditions
* Robust profit factor despite moderate win rates
Note: These results are from our proprietary strategy implementation and should be used as reference only. Individual results may vary based on market conditions and implementation.
Important Considerations:
* The strategy demonstrates strong profitability despite lower win rates, emphasizing the importance of proper risk-reward ratios
* Higher drawdowns are compensated by significant overall returns
* The system shows adaptability across different cryptocurrencies with consistent profit factors
* Results suggest optimal performance in volatile crypto markets
Real Trading Examples
BTCUSDT 4-Hour Chart Analysis
Example of pullback strategy implementation on Bitcoin, showing clear trend definition and entry points
ETHUSDT 4-Hour Chart Analysis
Ethereum chart demonstrating effective signal generation during strong trends
BTCUSDT Detailed Signal Example (15-Minute Scalping)
Close-up view of signal generation and trend confirmation process on 15-minute timeframe, demonstrating the indicator's effectiveness for scalping operations
Chart Analysis Notes:
* Green and red zones clearly indicate trend direction
* Multiple timeframe confirmation visible through different Supertrend levels
* Clear entry signals during pullbacks in established trends
* Precise stop-loss placement opportunities below support levels
Implementation Guidelines:
* Wait for main trend confirmation from Factor 3 (2.618)
* Enter trades on pullbacks to Factor 2 (1.618)
* Use Factor 1 (0.618) for fine-tuning entry points
* Place stops below the relevant Supertrend level
Footnotes:
* Charts provided are from Binance exchange, using both 4-hour and 15-minute timeframes
* Trading view screenshots captured during actual market conditions
* Indicators shown: Multi Fibonacci Supertrend with all three factors
* Time period: Recent market activity showing various market conditions
Important Notice:
These charts are for educational purposes only. Past performance does not guarantee future results. Always conduct your own analysis and risk management.
Disclaimer
This indicator is for informational purposes only. Past performance is not indicative of future results. Always conduct proper risk management and due diligence.
License
Open source under MIT License
Author's Note
Contributions and suggestions for improvement are welcome. Please feel free to fork and enhance.
Dynamic Score Supertrend [QuantAlgo]Dynamic Score Supertrend 📈🚀
The Dynamic Score Supertrend by QuantAlgo introduces a sophisticated trend-following tool that combines the well-known Supertrend indicator with an innovative dynamic trend scoring technique . By tracking market momentum through a scoring system that evaluates price behavior over a customizable window, this indicator adapts to changing market conditions. The result is a clearer, more adaptive tool that helps traders and investors detect and capitalize on trend shifts with greater precision.
💫 Conceptual Foundation and Innovation
At the core of the Dynamic Score Supertrend is the dynamic trend score system , which measures price movements relative to the Supertrend’s upper and lower bands. This scoring technique adds a layer of trend validation, assessing the strength of price trends over time. Unlike traditional Supertrend indicators that rely solely on ATR calculations, this system incorporates a scoring mechanism that provides more insight into trend direction, allowing traders and investors to navigate both trending and choppy markets with greater confidence.
✨ Technical Composition and Calculation
The Dynamic Score Supertrend utilizes the Average True Range (ATR) to calculate the upper and lower Supertrend bands. The dynamic trend scoring technique then compares the price to these bands over a customizable window, generating a trend score that reflects the current market direction.
When the score exceeds the uptrend or downtrend thresholds, it signals a possible shift in market direction. By adjusting the ATR settings and window length, the indicator becomes more adaptable to different market conditions, from steady trends to periods of higher volatility. This customization allows users to refine the Supertrend’s sensitivity and responsiveness based on their trading or investing style.
📈 Features and Practical Applications
Customizable ATR Settings: Adjust the ATR length and multiplier to control the sensitivity of the Supertrend bands. This allows the indicator to smooth out noise or react more quickly to price shifts, depending on market conditions.
Window Length for Dynamic Scoring: Modify the window length to adjust how many data points the scoring system considers, allowing you to tailor the indicator’s responsiveness to short-term or long-term trends.
Uptrend/Downtrend Thresholds: Set thresholds for identifying trend signals. Increase these thresholds for more reliable signals in choppy markets, or lower them for more aggressive entry points in trending markets.
Bar and Background Coloring: Visual cues such as bar coloring and background fills highlight the direction of the current trend, making it easier to spot potential reversals and trend shifts.
Trend Confirmation: The dynamic trend score system provides a clearer confirmation of trend strength, helping you identify strong, sustained movements while filtering out false signals.
⚡️ How to Use
✅ Add the Indicator: Add the Dynamic Score Supertrend to your favourites, then apply it to your chart. Adjust the ATR length, multiplier, and dynamic score settings to suit your trading or investing strategy.
👀 Monitor Trend Shifts: Track price movements relative to the Supertrend bands and use the dynamic trend score to confirm the strength of a trend. Bar and background colors make it easy to visualize key trend shifts.
🔔 Set Alerts: Configure alerts when the dynamic trend score crosses key thresholds, so you can act on significant trend changes without constantly monitoring the charts.
🌟 Summary and Usage Tips
The Dynamic Score Supertrend by QuantAlgo is a robust trend-following tool that combines the power of the Supertrend with an advanced dynamic scoring system. This approach provides more adaptable and reliable trend signals, helping traders and investors make informed decisions in trending markets. The customizable ATR settings and scoring thresholds make it versatile across various market conditions, allowing you to fine-tune the indicator for both short-term momentum and long-term trend following. To maximize its effectiveness, adjust the settings based on current market volatility and use the visual cues to confirm trend shifts. The Dynamic Score Supertrend offers a refined, probabilistic approach to trading and investing, making it a valuable addition to your toolkit.
Options Series - Supertrend, HalfTrend, Ichimoku Cloud and P_SAR➤ Supertrend:
➤ HalfTrend:
➤ Ichimoku Cloud:
➤ Parabolic SAR:
⭐ Overview and How It Works:
This script combines multiple popular technical indicators—Supertrend, HalfTrend, Ichimoku Cloud, and Parabolic SAR—into a single, cohesive tool for analyzing price trends and reversals. Designed for traders who prefer multi-layered confirmation, it displays non-overlay signals in a candlestick format, helping users make sense of intricate market dynamics. It also includes a "Master Candle" condition, which aggregates the signals from all indicators, providing a powerful snapshot of market sentiment.
References for study,
Supertrend and HalfTrend and Ichimoku Cloud and Parabolic SAR
⭐ Key Features and Functionality:
The script integrates four indicators and visually represents them in a non-overlay fashion, meaning that each indicator's signal appears on separate candlestick layers. It uses color coding to differentiate between bullish and bearish signals. The Master Candle is a unique feature that aggregates the signals from all indicators to show the overall sentiment.
Supertrend: It uses ATR and a multiplier factor to create a trailing stop, identifying bullish and bearish trends.
HalfTrend: It analyzes market volatility that provides buy and sell signals based on volatility channels and historical highs and lows.
Ichimoku Cloud: It leverages historical highs and lows to form the conversion and baseline, which are compared to assess market strength.
Parabolic SAR: A stop-and-reverse system that highlights potential reversals. It is based on time and price, offering traders potential reversal points.
Master Candle: It computes a score based on the confluence of all four indicators, adding another layer of confirmation.
🎨 Visualizations and User Experience:
The script's user interface is highly visual, with color-coded candlesticks plotted across multiple layers. Each indicator has its own color coding for bullish and bearish signals, ensuring clarity:
➤ Green for bullish signals.
➤ Red for bearish signals.
➤ Each candlestick layer represents a different indicator (e.g., Supertrend, HalfTrend, etc.), making it easy for the trader to isolate and interpret signals.
➤ The "Master Candle" provides an overarching view of the market by displaying a consolidated signal, which can reduce confusion from mixed indicator signals.
⭐ Settings and Customization:
The script is highly customizable, allowing users to adjust the settings for each indicator. Key customizable parameters include:
• Supertrend ATR Period and Factor
• HalfTrend Amplitude and Channel Deviation
• Ichimoku Conversion, Base, and Lagging Span Periods
• Parabolic SAR Start, Increment, and Maximum value
Additionally, users can toggle the visibility of each indicator and customize the look of the plot to suit their preferences.
⭐ Uniqueness of the Concept:
No repaints. This is the advanced representation and the combination of multiple indicators into a single script, along with a powerful "Master Candle" that aggregates them, makes this tool unique. Most scripts provide isolated indicator signals, while this one brings together four powerful indicators and visually simplifies the analysis. The non-overlay style and color-coded candlesticks offer traders an easy-to-understand, actionable visual cue, which stands out from traditional indicator overlays.
🚀 Conclusion:
This script is a comprehensive, multi-indicator trading tool suitable for traders looking for reliable trend-following and reversal detection. Its ability to provide an aggregated "Master Candle" signal reduces noise and aids in better decision-making. Customization options allow users to tailor it to their trading style, while its clear visualizations provide an excellent user experience.
Multi-timeframe 24 moving averages + BB+SAR+Supertrend+VWAP █ OVERVIEW
The script allows to display up to 24 moving averages ("MA"'s) across 5 timeframes plus two bands (Bollinger Bands or Supertrend or Parabolic SAR or VWAP bands) each from its own timeframe.
The main difference of this script from many similar ones is the flexibility of its settings:
- Bulk enable/disable and/or change properties of several MAs at once.
- Save 3 of your frequently used templates as presets using CSV text configurations.
█ HOW TO USE
Some use examples:
In order to "show 31, 50, 200 EMAs and 20, 100, 200 SMAs for each of 1H, 4H, D, W, M timeframes using blue for short MA, yellow for mid MA and red for long MA" use the settings as shown on a screenshot below.
In order to "Show a band of chart timeframe MA's of lengths 5, 8, 13, 21, 34, 55, 100 and 200 plus some 1H, 4H, D and W MAs. Be able to quickly switch off the band of chart tf's MAs. For chart timeframe MA's only show labels for 21, 100 and 200 EMAs". You can set TF1 and TF2 to chart's TF and set you fib MAs there and configure fixed higher timeframe MAs using TF3, TF4 and TF5 (e.g. using 1H, D and W timeframes and using 1H 800 in place of 4H 200 MA). However, quicker way may be using CSV - the syntax is very simple and intuitive, see Preset 2 as it comes in the script. You can easily switch chart tf's band of MAs by toggling on/off your chart timeframe TF's (in our example, TF1 and TF2).
The settings are either obvious or explained in tooltips.
Note 1: When using group settings and CSV presets do not forget that individual setting affected will no have any effect. So, if some setting does not work, check whether it is overridden with some group setting or a CSV preset.
Note 2: Sometimes you can notice parts of MA's hanging in the air, not lasting up to the last bar. This is not a bug as explained on this screenshot:
█ FOR DEVELOPERS
The script is a use case of my CSVParser library, which in turn uses Autotable library, both of which I hope will be quite helpful. Autotable is so powerful and comprehensive that you will hardly ever wish to use normal table functions again for complex tables.
The indicator was inspired by Pablo Limonetti's url=https://www.tradingview.com/script/nFs56VUZ/]Multi Timeframe Moving Averages and Raging @RagingRocketBull's # Multi SMA EMA WMA HMA BB (5x8 MAs Bollinger Bands) MAX MTF - RRB
HTFBands█ OVERVIEW
Contains type and methods for drawing higher-timeframe bands of several types:
Bollinger bands
Parabolic SAR
Supertrend
VWAP
By copy pasting ready made code sections to your script you can add as many multi-timeframe bands as necessary.
█ HOW TO USE
Please see instructions in the code. (Important: first fold all sections of the script: press Cmd + K then Cmd + - (for Windows Ctrl + K then Ctrl + -)
█ FULL LIST OF FUNCTIONS AND PARAMETERS
atr2(length)
An alternate ATR function to the `ta.atr()` built-in, which allows a "series float"
`length` argument.
Parameters:
length (float) : (series int/float) Length for the smoothing parameter calculation.
Returns: (float) The ATR value.
pine_supertrend2(factor, atrLength, wicks)
An alternate SuperTrend function to `supertrend()`, which allows a "series float"
`atrLength` argument.
Parameters:
factor (float) : (series int/float) Multiplier for the ATR value.
atrLength (float) : (series int/float) Length for the ATR smoothing parameter calculation.
wicks (simple bool) : (simple bool) Condition to determine whether to take candle wicks into account when
reversing trend, or to use the close price. Optional. Default is false.
Returns: ( ) A tuple of the superTrend value and trend direction.
method getDefaultBandQ1(bandType)
For a given BandType returns its default Q1
Namespace types: series BandTypes
Parameters:
bandType (series BandTypes)
method getDefaultBandQ2(bandType)
For a given BandType returns its default Q2
Namespace types: series BandTypes
Parameters:
bandType (series BandTypes)
method getDefaultBandQ3(bandType)
For a given BandType returns its default Q3
Namespace types: series BandTypes
Parameters:
bandType (series BandTypes)
method init(this, bandsType, q1, q2, q3, vwapAnchor)
Initiates RsParamsBands for each band (used in htfUpdate() withi req.sec())
Namespace types: RsParamsBands
Parameters:
this (RsParamsBands)
bandsType (series BandTypes)
q1 (float) : (float) Depending on type: BB - length, SAR - AF start, ST - ATR's prd
q2 (float) : (float) Depending on type: BB - StdDev mult, SAR - AF step, ST - mult
q3 (float) : (float) Depending on type: BB - not used, SAR - AF max, ST - not used
vwapAnchor (series VwapAnchors) : (VwapAnchors) VWAP ahcnor
method init(this, bandsType, tf, showRecentBars, lblsShow, lblsMaxLabels, lblSize, lnMidClr, lnUpClr, lnLoClr, fill, fillClr, lnWidth, lnSmoothen)
Initialises object with params (incl. input). Creates arrays if any.
Namespace types: HtfBands
Parameters:
this (HtfBands)
bandsType (series BandTypes) : (BandTypes) Just used to enable/disable - if BandTypes.none then disable )
tf (string) : (string) Timeframe
showRecentBars (int) : (int) Only show over this number of recent bars
lblsShow (bool) : (bool) Show labels
lblsMaxLabels (int) : (int) Max labels to show
lblSize (string) : (string) Size of the labels
lnMidClr (color) : (color) Middle band color
lnUpClr (color) : (color) Upper band color
lnLoClr (color) : (color) Lower band color
fill (bool)
fillClr (color) : (color) Fill color
lnWidth (int) : (int) Line width
lnSmoothen (bool) : (bool) Smoothen the bands
method htfUpdateTuple(rsPrms, repaint)
(HTF) Calculates Bands within request.security(). Returns tuple . If any or all of the bands are not available returns na as their value.
Namespace types: RsParamsBands
Parameters:
rsPrms (RsParamsBands) : (RsParamsBands) Parameters of the band.
repaint (bool) : (bool) If true does not update on realtime bars.
Returns: A tuple (corresponds to fields in RsReturnBands)
method importRsRetTuple(this, htfBi, mid, up, lo, dir)
Imports a tuple returned from req.sec() into an HtfBands object
Namespace types: HtfBands
Parameters:
this (HtfBands) : (HtfBands) Object to import to
htfBi (int) : (float) Higher timeframe's bar index (Default = na)
mid (float)
up (float) : (float) Value of upper band (Default = na)
lo (float) : (float) Value of lower band (Default = na)
dir (int) : (int) Direction (for bands like Parabolic SAR) (Default = na)
method addUpdDrawings(this, rsPrms)
Draws band's labels
Namespace types: HtfBands
Parameters:
this (HtfBands)
rsPrms (RsParamsBands)
method update(this)
Sets band's values to na on intrabars if `smoothen` is set.
Namespace types: HtfBands
Parameters:
this (HtfBands)
method newRsParamsBands(this)
A wraper for RsParamsBands.new()
Namespace types: LO_A
Parameters:
this (LO_A)
method newHtfBands(this)
A wraper for HtfBands.new()
Namespace types: LO_B
Parameters:
this (LO_B)
RsParamsBands
Used to pass bands' params to req.sec()
Fields:
bandsType (series BandTypes) : (enum BandTypes) Type of the band (BB, SAR etc.)
q1 (series float) : (float) Depending on type: BB - length, SAR - AF start, ST - ATR's prd
q2 (series float) : (float) Depending on type: BB - StdDev mult, SAR - AF step, ST - mult
q3 (series float) : (float) Depending on type: BB - not used, SAR - AF max, ST - not used
vwapAnchor (series VwapAnchors)
RsReturnBands
Used to return bands' data from req.sec(). Params of the bands are in RsParamsBands
Fields:
htfBi (series float) : (float) Higher timeframe's bar index (Default = na)
upBand (series float) : (float) Value of upper band (Default = na)
loBand (series float) : (float) Value of lower band (Default = na)
midBand (series float) : (float) Value of middle band (Default = na)
dir (series int) : (float) Direction (for bands like Parabolic SAR) (Default = na)
BandsDrawing
Contains plot visualization parameters and stores and keeps track of lines, labels and other visual objects (not plots)
Fields:
lnMidClr (series color) : (color) Middle band color
lnLoClr (series color) : (color) Lower band color
lnUpClr (series color) : (color) Upper band color
fillUpClr (series color)
fillLoClr (series color)
lnWidth (series int) : (int) Line width
lnSmoothen (series bool) : (bool) Smoothen the bands
showHistory (series bool) : (bool) If true show bands lines, otherwise only current level
showRecentBars (series int) : (int) Only show over this number of recent bars
arLbl (array) : (label Labels
lblsMaxLabels (series int) : (int) Max labels to show
lblsShow (series bool) : (bool) Show labels
lblSize (series string) : (string) Size of the labels
HtfBands
Calcs and draws HTF bands
Fields:
rsRet (RsReturnBands) : (RsReturnBands) Bands' values
rsRetNaObj (RsReturnBands) : (RsReturnBands) Dummy na obj for returning from request.security()
rsPrms (RsParamsBands) : (RsParamsBands) Band parameters (for htfUpdate() called in req.sec() )
drw (BandsDrawing) : (BandsDrawing) Contains plot visualization parameters and stores and keeps track of lines, labels and other visual objects (not plots)
enabled (series bool) : (bool) Toggles bands on/off
tf (series string) : (string) Timeframe
LO_A
LO Library object, whose only purpose is to serve as a shorthand for library name in script code.
Fields:
dummy (series string)
LO_B
LO Library object, whose only purpose is to serve as a shorthand for library name in script code.
Fields:
dummy (series string)
Multi-Step FlexiSuperTrend - Indicator [presentTrading]This version of the indicator is built upon the foundation of a strategy version published earlier. However, this indicator version focuses on providing visual insights and alerts for traders, rather than executing trades. This one is mostly for @thorcmt.
█ Introduction and How it is Different
The **Multi-Step FlexiSuperTrend Indicator** is a versatile tool designed to provide traders with a highly customizable and flexible approach to trend analysis. Unlike traditional supertrend indicators, which focus on a single factor or threshold, the **FlexiSuperTrend** allows users to define multiple levels of take-profit targets and incorporate different trend normalization methods.
It comes with several advanced customization features, including multi-step take profits, deviation plotting, and trend normalization, making it suitable for both novice and expert traders.
BTCUSD 6hr Performance
█ Strategy, How It Works: Detailed Explanation
The **Multi-Step FlexiSuperTrend** works by calculating a supertrend based on multiple factors and incorporating oscillations from trend deviations. Here’s a breakdown of how it functions:
🔶 SuperTrend Calculation
At the heart of the indicator is the SuperTrend formula, which dynamically adjusts based on price movements.
🔶 Normalization of Deviations
To enhance accuracy, the **FlexiSuperTrend** calculates multiple deviations from the trend and normalizes them.
🔶 Multi-Step Take Profit Levels
The indicator allows setting up to three take profit levels, which are displayed via price level alerts. lows traders to exit part of their position at various profit intervals.
For more detail, please check the strategy version - Multi-Step-FlexiSuperTrend-Strategy:
and 'FlexiSuperTrend-Strategy'
█ Trade Direction
The **Multi-Step FlexiSuperTrend Indicator** supports both long and short trade directions.
This flexibility allows traders to adapt to trending, volatile, or sideways markets.
█ Usage
To use the **FlexiSuperTrend Indicator**, traders can set up their preferences for the following key features:
- **Trading Direction**: Choose whether to focus on long, short, or both signals.
- **Indicator Source**: The price source to calculate the trend (e.g., close, hl2).
- **Indicator Length**: The number of periods to calculate the ATR and trend (the larger the value, the smoother the trend).
- **Starting and Increment Factor**: These adjust how reactive the trend is to price movements. The starting factor dictates how far the initial trend band is from the price, and the increment factor adjusts subsequent trend deviations.
The indicator then displays buy and sell signals on the chart, along with alerts for each take-profit level.
Local picture
█ Default Settings
The default settings of the **Multi-Step FlexiSuperTrend** are carefully designed to provide an optimal balance between sensitivity and accuracy. Let’s examine these default parameters and their effect on performance:
🔶 Indicator Length (Default: 10)
The **Indicator Length** determines the lookback period for the ATR calculation. A smaller value makes the indicator more reactive to price changes, but may generate more false signals. A longer length smooths the trend and reduces noise but may delay signals.
Effect on performance: Shorter lengths perform better in volatile markets, while longer lengths excel in trending markets.
🔶 Starting Factor (Default: 0.618)
This factor adjusts the starting distance of the SuperTrend from the current price. The smaller the starting factor, the closer the trend is to the price, making it more sensitive. Conversely, a larger factor allows more distance, reducing sensitivity but filtering out false signals.
Effect on performance: A smaller factor provides quicker signals but can lead to frequent false positives. A larger factor generates fewer but more reliable signals.
🔶 Increment Factor (Default: 0.382)
The **Increment Factor** controls how the trend bands adjust as the price moves. It increases the distance of the bands from the price with each iteration.
Effect on performance: A higher increment factor can result in wider stop-loss or trend reversal bands, allowing for longer trends to develop without frequent exits. A lower factor keeps the bands closer to the price and is more suited for shorter-term trades.
🔶 Take Profit Levels (Default: 2%, 8%, 18%)
The default take-profit levels are set at 2%, 8%, and 18%. These values represent the thresholds at which the trader can partially exit their positions. These multi-step levels are highly customizable depending on the trader’s risk tolerance and strategy.
Effect on performance: Lower take-profit levels (e.g., 2%) capture small, quick profits in volatile markets, while higher levels (8%-18%) allow for a more gradual exit in strong trends.
🔶 Normalization Method (Default: None)
The default normalization method is **None**, meaning the deviations are not normalized. However, enabling normalization (e.g., **Max-Min**) can improve the clarity of the indicator’s signals in volatile or choppy markets by smoothing out the noise.
Effect on performance: Using a normalization method can reduce the effect of extreme deviations, making signals more stable and less prone to false positives.
Multi-Step FlexiMA - Strategy [presentTrading]It's time to come back! hope I can not to be busy for a while.
█ Introduction and How It Is Different
The FlexiMA Variance Tracker is a unique trading strategy that calculates a series of deviations between the price (or another indicator source) and a variable-length moving average (MA). Unlike traditional strategies that use fixed-length moving averages, the length of the MA in this system varies within a defined range. The length changes dynamically based on a starting factor and an increment factor, creating a more adaptive approach to market conditions.
This strategy integrates Multi-Step Take Profit (TP) levels, allowing for partial exits at predefined price increments. It enables traders to secure profits at different stages of a trend, making it ideal for volatile markets where taking full profits at once might lead to missed opportunities if the trend continues.
BTCUSD 6hr Performance
█ Strategy, How It Works: Detailed Explanation
🔶 FlexiMA Concept
The FlexiMA (Flexible Moving Average) is at the heart of this strategy. Unlike traditional MA-based strategies where the MA length is fixed (e.g., a 50-period SMA), the FlexiMA varies its length with each iteration. This is done using a **starting factor** and an **increment factor**.
The formula for the moving average length at each iteration \(i\) is:
`MA_length_i = indicator_length * (starting_factor + i * increment_factor)`
Where:
- `indicator_length` is the user-defined base length.
- `starting_factor` is the initial multiplier of the base length.
- `increment_factor` increases the multiplier in each iteration.
Each iteration applies a **simple moving average** (SMA) to the chosen **indicator source** (e.g., HLC3) with a different length based on the above formula. The deviation between the current price and the moving average is then calculated as follows:
`deviation_i = price_current - MA_i`
These deviations are normalized using one of the following methods:
- **Max-Min normalization**:
`normalized_i = (deviation_i - min(deviations)) / range(deviations)`
- **Absolute Sum normalization**:
`normalized_i = deviation_i / sum(|deviation_i|)`
The **median** and **standard deviation (stdev)** of the normalized deviations are then calculated as follows:
`median = median(normalized deviations)`
For the standard deviation:
`stdev = sqrt((1/(N-1)) * sum((normalized_i - mean)^2))`
These values are plotted to provide a clear indication of how the price is deviating from its variable-length moving averages.
For more detail:
🔶 Multi-Step Take Profit
This strategy uses a multi-step take profit system, allowing for exits at different stages of a trade based on the percentage of price movement. Three take-profit levels are defined:
- Take Profit Level 1 (TP1): A small, quick profit level (e.g., 2%).
- Take Profit Level 2 (TP2): A medium-level profit target (e.g., 8%).
- Take Profit Level 3 (TP3): A larger, more ambitious target (e.g., 18%).
At each level, a corresponding percentage of the trade is exited:
- TP Percent 1: E.g., 30% of the position.
- TP Percent 2: E.g., 20% of the position.
- TP Percent 3: E.g., 15% of the position.
This approach ensures that profits are locked in progressively, reducing the risk of market reversals wiping out potential gains.
Local
🔶 Trade Entry and Exit Conditions
The entry and exit signals are determined by the interaction between the **SuperTrend Polyfactor Oscillator** and the **median** value of the normalized deviations:
- Long entry: The SuperTrend turns bearish, and the median value of the deviations is positive.
- Short entry: The SuperTrend turns bullish, and the median value is negative.
Similarly, trades are exited when the SuperTrend flips direction.
* The SuperTrend Toolkit is made by @EliCobra
█ Trade Direction
The strategy allows users to specify the desired trade direction:
- Long: Only long positions will be taken.
- Short: Only short positions will be taken.
- Both: Both long and short positions are allowed based on the conditions.
This flexibility allows the strategy to adapt to different market conditions and trading styles, whether you're looking to buy low and sell high, or sell high and buy low.
█ Usage
This strategy can be applied across various asset classes, including stocks, cryptocurrencies, and forex. The primary use case is to take advantage of market volatility by using a flexible moving average and multiple take-profit levels to capture profits incrementally as the market moves in your favor.
How to Use:
1. Configure the Inputs: Start by adjusting the **Indicator Length**, **Starting Factor**, and **Increment Factor** to suit your chosen asset. The defaults work well for most markets, but fine-tuning them can improve performance.
2. Set the Take Profit Levels: Adjust the three **TP levels** and their corresponding **percentages** based on your risk tolerance and the expected volatility of the market.
3. Monitor the Strategy: The SuperTrend and the FlexiMA variance tracker will provide entry and exit signals, automatically managing the positions and taking profits at the pre-set levels.
█ Default Settings
The default settings for the strategy are configured to provide a balanced approach that works across different market conditions:
Indicator Length (10):
This controls the base length for the moving average. A lower length makes the moving average more responsive to price changes, while a higher length smooths out fluctuations, making the strategy less sensitive to short-term price movements.
Starting Factor (1.0):
This determines the initial multiplier applied to the moving average length. A higher starting factor will increase the average length, making it slower to react to price changes.
Increment Factor (1.0):
This increases the moving average length in each iteration. A larger increment factor creates a wider range of moving average lengths, allowing the strategy to track both short-term and long-term trends simultaneously.
Normalization Method ('None'):
Three methods of normalization can be applied to the deviations:
- None: No normalization applied, using raw deviations.
- Max-Min: Normalizes based on the range between the maximum and minimum deviations.
- Absolute Sum: Normalizes based on the total sum of absolute deviations.
Take Profit Levels:
- TP1 (2%): A quick exit to capture small price movements.
- TP2 (8%): A medium-term profit target for stronger trends.
- TP3 (18%): A long-term target for strong price moves.
Take Profit Percentages:
- TP Percent 1 (30%): Exits 30% of the position at TP1.
- TP Percent 2 (20%): Exits 20% of the position at TP2.
- TP Percent 3 (15%): Exits 15% of the position at TP3.
Effect of Variables on Performance:
- Short Indicator Lengths: More responsive to price changes but prone to false signals.
- Higher Starting Factor: Slows down the response, useful for longer-term trend following.
- Higher Increment Factor: Widens the variability in moving average lengths, making the strategy adapt to both short-term and long-term price trends.
- Aggressive Take Profit Levels: Allows for quick profit-taking in volatile markets but may exit positions prematurely in strong trends.
The default configuration offers a moderate balance between short-term responsiveness and long-term trend capturing, suitable for most traders. However, users can adjust these variables to optimize performance based on market conditions and personal preferences.
Options Series - P_SAR And Supertrend
The provided PineScript combines two well-known indicators—Parabolic SAR (P_SAR) and Supertrend—to create a comprehensive trading tool. Here are some powerful insights and the importance of this script:
⭐ 1. Supertrend Indicator:
What it does: The Supertrend indicator is based on the Average True Range (ATR) and is used to identify trend direction. When the price is above the Supertrend line, it suggests an uptrend, and when below, a downtrend.
Insights:
Trend Following: By adjusting the ATR length (atrPeriod) and the multiplier (factor), you can fine-tune the sensitivity of the Supertrend. A smaller ATR or factor results in more frequent trend changes, whereas larger values make the indicator more robust but slower to react.
Trend Visualization: The script highlights trends with the help of green and red lines, offering a clear visual cue for traders. The uptrend is filled with a translucent green and the downtrend with red, allowing quick identification of market momentum.
⭐ 2. Parabolic SAR (P_SAR):
What it does: The Parabolic SAR is a time/price-based indicator that helps identify potential reversals in the market. The dots (SAR) follow the price and move closer to it as the trend progresses.
Insights:
Trailing Stops: This is commonly used by traders to trail stop losses, as the SAR moves closer to price as the trend strengthens.
Combining with Supertrend: The SAR dots in this script act as an additional confirmation for trend direction. For instance, when the price is above both the SAR and Supertrend, it strongly suggests an uptrend.
⭐ 3. Bar Coloring Based on Trend Confirmation:
What it does: The script calculates conditions based on whether the price is above or below both the Supertrend and SAR values.
Insights:
Bullish/Bearish Confirmation: The combination of these two indicators provides a stronger confirmation of trend direction compared to using either one alone. For example:
Green Bars: If the price is above both the Supertrend and SAR, it signals a strong uptrend (bullish).
Red Bars: If the price is below both, it suggests a strong downtrend (bearish).
Visual Alerts: The candle colors are adjusted based on these conditions, providing a quick visual alert for traders to take action.
⭐ 4. Importance of Using Both Supertrend and P_SAR:
Multiple Confirmations: Combining the Supertrend and Parabolic SAR increases the accuracy of trend-following strategies. Each indicator has its strengths: Supertrend is good for identifying the overall trend, while the SAR excels at identifying potential reversals.
Risk Management: This script can help you not only identify trends but also manage your positions more effectively. The Parabolic SAR, for example, can serve as a dynamic stop-loss level, while the Supertrend can help you stay in trades longer by smoothing out noise in the market.
⭐ 5. Customizable Inputs:
Adaptability: The user can adjust the ATR period, factor, start, increment, and maximum values, tailoring the script to different market conditions and timeframes. This flexibility is essential, as each asset class or market may require different parameter settings.
⭐ 6. Practical Application in Trading:
Entry and Exit Signals: The script can be used to generate entry and exit signals. For instance:
Buy Signal: When the bar turns green (price is above Supertrend and SAR), it could be a signal to go long.
Sell Signal: When the bar turns red (price is below Supertrend and SAR), it could be a signal to go short or exit a long position.
Stop-Loss Placement: The Parabolic SAR dots can act as trailing stop-loss levels, helping traders lock in profits as trends progress.
Trend Continuation vs. Reversal: The Supertrend provides a broader view of the trend, while the Parabolic SAR provides pinpoint entry/exit signals for reversals.
🚀 Conclusion:
This script is a robust combination of trend-following and reversal indicators, making it a versatile tool for traders. The dual confirmation from Supertrend and Parabolic SAR reduces false signals, and the color-coded bars provide quick insights into market conditions. When used properly, this can greatly improve your ability to catch trends early, exit at the right moment, and manage risk effectively.
Volatility-Adjusted DEMA Supertrend [QuantAlgo]Introducing the Volatility-Adjusted DEMA Supertrend by QuantAlgo 📈💫
Take your trading and investing strategies to the next level with the Volatility-Adjusted DEMA Supertrend , a dynamic tool designed to adapt to market volatility and provide clear, actionable trend signals. This innovative indicator is ideal for both traders and investors looking for a more responsive approach to market trends, helping you capture potential shifts with greater precision.
🌟 Key Features:
🛠 Customizable Trend Settings: Adjust the period for trend calculation and fine-tune the sensitivity to price movements. This flexibility allows you to tailor the Supertrend to your unique trading or investing strategy, whether you're focusing on shorter or longer timeframes.
📊 Volatility-Responsive Multiplier: The Supertrend dynamically adjusts its sensitivity based on real-time market volatility. This could help filter out noise in calmer markets and provide more accurate signals during periods of heightened volatility.
✨ Trend-Based Color-Coding: Visualize bullish and bearish trends with ease. The indicator paints candles and plots trend lines with distinct colors based on the current market direction, offering quick, clear insights into potential opportunities.
🔔 Custom Alerts: Set up alerts for key trend shifts to ensure you're notified of significant market changes. These alerts would allow you to act swiftly, potentially capturing opportunities without needing to constantly monitor the charts.
📈 How to Use:
✅ Add the Indicator: Add the Volatility-Adjusted DEMA Supertrend to your chart. Customize the trend period, volatility settings, and price source to match your trading or investing style. This ensures the indicator aligns with your market strategy.
👀 Monitor Trend Shifts: Watch the color-coded trend lines and candles as they dynamically shift based on real-time market conditions. These visual cues help you spot potential trend reversals and confirm your entries and exits with greater confidence.
🔔 Set Alerts: Configure alerts for key trend shifts, allowing you to stay informed of potential market reversals or continuation patterns, even when you're not actively watching the market.
⚙️ How It Works:
The Volatility-Adjusted DEMA Supertrend is designed to adapt to changes in market conditions, making it highly responsive to price volatility. The indicator calculates a trend line based on price and volatility, dynamically adjusting it to reflect recent market behavior. When the market experiences higher volatility, the trend line becomes more flexible, potentially allowing for greater sensitivity to rapid price movements. Conversely, during periods of low volatility, the indicator tightens its range, helping to reduce noise and avoid false signals.
The indicator includes a volatility-responsive multiplier, which further enhances its adaptability to market conditions. This means the trend direction would always be based on the latest market data, potentially helping you stay ahead of shifts or continuation trends. The Supertrend's visual color-coding simplifies the process of identifying bullish or bearish trends, while customizable alerts ensure you can stay on top of significant changes in market direction.
This tool is versatile and could be applied across various markets and timeframes, making it a valuable addition for both traders and investors. Whether you’re trading in fast-moving markets or focusing on longer-term investments, the Volatility-Adjusted DEMA Supertrend could help you remain aligned with the current market environment.
Disclaimer:
This indicator is designed to enhance your analysis by providing trend information, but it should not be used as the sole basis for making trading or investing decisions. Always combine it with other forms of analysis and risk management practices. No statements or claims aim to be financial advice, and no signals from us or our indicators should be interpreted as such. Past performance is not indicative of future results.
N Bar Reversal Detector [LuxAlgo]The N Bar Reversal Detector is designed to detect and highlight N-bar reversal patterns in user charts, where N represents the length of the candle sequence used to detect the patterns. The script incorporates various trend indicators to filter out detected signals and offers a range of customizable settings to fit different trading strategies.
🔶 USAGE
The N-bar reversal pattern extends the popular 3-bar reversal pattern. While the 3-bar reversal pattern involves identifying a sequence of three bars signaling a potential trend reversal, the N-bar reversal pattern builds on this concept by incorporating additional bars based on user settings. This provides a more comprehensive indication of potential trend reversals. The script automates the identification of these patterns and generates clear, visually distinct signals to highlight potential trend changes.
When a reversal chart pattern is confirmed and aligns with the price action, the pattern's boundaries are extended to create levels. The upper boundary serves as resistance, while the lower boundary acts as support.
The script allows users to filter patterns based on the trend direction identified by various trend indicators. Users can choose to view patterns that align with the detected trend or those that are contrary to it.
🔶 DETAILS
🔹 The N-bar Reversal Pattern
The N-bar reversal pattern is a technical analysis tool designed to signal potential trend reversals in the market. It consists of N consecutive bars, with the first N-1 bars used to identify the prevailing trend and the Nth bar confirming the reversal. Here’s a detailed look at the pattern:
Bullish Reversal : In a bullish reversal setup, the first bar is the highest among the first N-1 bars, indicating a prevailing downtrend. Most of the remaining bars in this sequence should be bearish (closing lower than where they opened), reinforcing the existing downward momentum. The Nth (most recent) bar confirms a bullish reversal if its high price is higher than the high of the first bar in the sequence (standard pattern). For a stronger signal, the closing price of the Nth bar should also be higher than the high of the first bar.
Bearish Reversal : In a bearish reversal setup, the first bar is the lowest among the first N-1 bars, indicating a prevailing uptrend. Most of the remaining bars in this sequence should be bullish (closing higher than where they opened), reinforcing the existing upward momentum. The Nth bar confirms a bearish reversal if its low price is lower than the low of the first bar in the sequence (standard pattern). For a stronger signal, the closing price of the Nth bar should also be lower than the low of the first bar.
🔹 Min Percentage of Required Candles
This parameter specifies the minimum percentage of candles that must be bullish (for a bearish reversal) or bearish (for a bullish reversal) among the first N-1 candles in a pattern. For higher values of N, it becomes more challenging for all of the first N-1 candles to be consistently bullish or bearish. By setting a percentage value, P, users can adjust the requirement so that only a minimum of P percent of the first N-1 candles need to meet the bullish or bearish condition. This allows for greater flexibility in pattern recognition, accommodating variations in market conditions.
🔶 SETTINGS
Pattern Type: Users can choose the type of the N-bar reversal patterns to detect: Normal, Enhanced, or All. "Normal" detects patterns that do not necessarily surpass the high/low of the first bar. "Enhanced" detects patterns where the last bar surpasses the high/low of the first bar. "All" detects both Normal and Enhanced patterns.
Reversal Pattern Sequence Length: Specifies the number of candles (N) in the sequence used to identify a reversal pattern.
Min Percentage of Required Candles: Sets the minimum percentage of the first N-1 candles that must be bullish (for a bearish reversal) or bearish (for a bullish reversal) to qualify as a valid reversal pattern.
Derived Support and Resistance: Toggles the visibility of the support and resistance levels/zones.
🔹 Trend Filtering
Filtering: Allows users to filter patterns based on the trend indicators: Moving Average Cloud, Supertrend, and Donchian Channels. The "Aligned" option only detects patterns that align with the trend and conversely, the "Opposite" option detects patterns that go against the trend.
🔹 Trend Indicator Settings
Moving Average Cloud: Allows traders to choose the type of moving averages (SMA, EMA, HMA, etc.) and set the lengths for fast and slow moving averages.
Supertrend: Options to set the ATR length and factor for Supertrend.
Donchian Channels: Option to set the length for the channel calculation.
🔶 RELATED SCRIPTS
Reversal-Candlestick-Structure.
Reversal-Signals.
Double SuperTrend [CrossTrade]The Double SuperTrend indicator enhances the classic SuperTrend indicator's functionality by filtering out countertrend signals and keeping you out of chop. By adding another larger trend filter, it helps to keep you taking trades in the direction of the major trend. This dual analysis allows users to identify and trade in the direction of the major trend, thereby increasing the likelihood of successful trades.
Adjustable Parameters for Minor and Major Trends:
Users can customize both the major and minor trends according to their trading strategy. This includes adjusting the ATR (Average True Range) period and the ATR multiplier for each trend.
For the minor trend, the default ATR period is set at 10, and the multiplier at 3.0.
For the major trend, the ATR period defaults to 14, with a multiplier of 6.0.
These settings allow traders to tailor the sensitivity of the trends to their specific market view or strategy.
Source Selection:
Users can select the data source (such as high/low, open/close) that the SuperTrend calculations are based on, offering further customization.
Signal Visualization and Customization:
It plots the major and minor trend lines, with options to display buy/sell signals. These signals are only shown when they align with the major trend, reducing the likelihood of false signals.
The minor trend signals are displayed in green (for uptrends) and red (for downtrends), while the major trend lines are shown in blue (for uptrends) and purple (for downtrends).
Additionally, users can choose to display or hide these buy/sell signals.
Custom Alerts:
The indicator includes the functionality to set custom alerts for buy and sell signals. These alerts are specifically designed to notify users when a signal aligns with the confirmed major trend.
Multi-Step FlexiSuperTrend - Strategy [presentTrading]At the heart of this endeavor is a passion for continuous improvement in the art of trading
█ Introduction and How it is Different
The "Multi-Step FlexiSuperTrend - Strategy " is an advanced trading strategy that integrates the well-known SuperTrend indicator with a nuanced and dynamic approach to market trend analysis. Unlike conventional SuperTrend strategies that rely on static thresholds and fixed parameters, this strategy introduces multi-step take profit mechanisms that allow traders to capitalize on varying market conditions in a more controlled and systematic manner.
What sets this strategy apart is its ability to dynamically adjust to market volatility through the use of an incremental factor applied to the SuperTrend calculation. This adjustment ensures that the strategy remains responsive to both minor and major market shifts, providing a more accurate signal for entries and exits. Additionally, the integration of multi-step take profit levels offers traders the flexibility to scale out of positions, locking in profits progressively as the market moves in their favor.
BTC 6hr Long/Short Performance
█ Strategy, How it Works: Detailed Explanation
The Multi-Step FlexiSuperTrend strategy operates on the foundation of the SuperTrend indicator, but with several enhancements that make it more adaptable to varying market conditions. The key components of this strategy include the SuperTrend Polyfactor Oscillator, a dynamic normalization process, and multi-step take profit levels.
🔶 SuperTrend Polyfactor Oscillator
The SuperTrend Polyfactor Oscillator is the heart of this strategy. It is calculated by applying a series of SuperTrend calculations with varying factors, starting from a defined "Starting Factor" and incrementing by a specified "Increment Factor." The indicator length and the chosen price source (e.g., HLC3, HL2) are inputs to the oscillator.
The SuperTrend formula typically calculates an upper and lower band based on the average true range (ATR) and a multiplier (the factor). These bands determine the trend direction. In the FlexiSuperTrend strategy, the oscillator is enhanced by iteratively applying the SuperTrend calculation across different factors. The iterative process allows the strategy to capture both minor and significant trend changes.
For each iteration (indexed by `i`), the following calculations are performed:
1. ATR Calculation: The Average True Range (ATR) is calculated over the specified `indicatorLength`:
ATR_i = ATR(indicatorLength)
2. Upper and Lower Bands Calculation: The upper and lower bands are calculated using the ATR and the current factor:
Upper Band_i = hl2 + (ATR_i * Factor_i)
Lower Band_i = hl2 - (ATR_i * Factor_i)
Here, `Factor_i` starts from `startingFactor` and is incremented by `incrementFactor` in each iteration.
3. Trend Determination: The trend is determined by comparing the indicator source with the upper and lower bands:
Trend_i = 1 (uptrend) if IndicatorSource > Upper Band_i
Trend_i = 0 (downtrend) if IndicatorSource < Lower Band_i
Otherwise, the trend remains unchanged from the previous value.
4. Output Calculation: The output of each iteration is determined based on the trend:
Output_i = Lower Band_i if Trend_i = 1
Output_i = Upper Band_i if Trend_i = 0
This process is repeated for each iteration (from 0 to 19), creating a series of outputs that reflect different levels of trend sensitivity.
Local
🔶 Normalization Process
To make the oscillator values comparable across different market conditions, the deviations between the indicator source and the SuperTrend outputs are normalized. The normalization method can be one of the following:
1. Max-Min Normalization: The deviations are normalized based on the range of the deviations:
Normalized Value_i = (Deviation_i - Min Deviation) / (Max Deviation - Min Deviation)
2. Absolute Sum Normalization: The deviations are normalized based on the sum of absolute deviations:
Normalized Value_i = Deviation_i / Sum of Absolute Deviations
This normalization ensures that the oscillator values are within a consistent range, facilitating more reliable trend analysis.
For more details:
🔶 Multi-Step Take Profit Mechanism
One of the unique features of this strategy is the multi-step take profit mechanism. This allows traders to lock in profits at multiple levels as the market moves in their favor. The strategy uses three take profit levels, each defined as a percentage increase (for long trades) or decrease (for short trades) from the entry price.
1. First Take Profit Level: Calculated as a percentage increase/decrease from the entry price:
TP_Level1 = Entry Price * (1 + tp_level1 / 100) for long trades
TP_Level1 = Entry Price * (1 - tp_level1 / 100) for short trades
The strategy exits a portion of the position (defined by `tp_percent1`) when this level is reached.
2. Second Take Profit Level: Similar to the first level, but with a higher percentage:
TP_Level2 = Entry Price * (1 + tp_level2 / 100) for long trades
TP_Level2 = Entry Price * (1 - tp_level2 / 100) for short trades
The strategy exits another portion of the position (`tp_percent2`) at this level.
3. Third Take Profit Level: The final take profit level:
TP_Level3 = Entry Price * (1 + tp_level3 / 100) for long trades
TP_Level3 = Entry Price * (1 - tp_level3 / 100) for short trades
The remaining portion of the position (`tp_percent3`) is exited at this level.
This multi-step approach provides a balance between securing profits and allowing the remaining position to benefit from continued favorable market movement.
█ Trade Direction
The strategy allows traders to specify the trade direction through the `tradeDirection` input. The options are:
1. Both: The strategy will take both long and short positions based on the entry signals.
2. Long: The strategy will only take long positions.
3. Short: The strategy will only take short positions.
This flexibility enables traders to tailor the strategy to their market outlook or current trend analysis.
█ Usage
To use the Multi-Step FlexiSuperTrend strategy, traders need to set the input parameters according to their trading style and market conditions. The strategy is designed for versatility, allowing for various market environments, including trending and ranging markets.
Traders can also adjust the multi-step take profit levels and percentages to match their risk management and profit-taking preferences. For example, in highly volatile markets, traders might set wider take profit levels with smaller percentages at each level to capture larger price movements.
The normalization method and the incremental factor can be fine-tuned to adjust the sensitivity of the SuperTrend Polyfactor Oscillator, making the strategy more responsive to minor market shifts or more focused on significant trends.
█ Default Settings
The default settings of the strategy are carefully chosen to provide a balanced approach between risk management and profit potential. Here is a breakdown of the default settings and their effects on performance:
1. Indicator Length (10): This parameter controls the lookback period for the ATR calculation. A shorter length makes the strategy more sensitive to recent price movements, potentially generating more signals. A longer length smooths out the ATR, reducing sensitivity but filtering out noise.
2. Starting Factor (0.618): This is the initial multiplier used in the SuperTrend calculation. A lower starting factor makes the SuperTrend bands closer to the price, generating more frequent trend changes. A higher starting factor places the bands further away, filtering out minor fluctuations.
3. Increment Factor (0.382): This parameter controls how much the factor increases with each iteration of the SuperTrend calculation. A smaller increment factor results in more gradual changes in sensitivity, while a larger increment factor creates a wider range of sensitivity across the iterations.
4. Normalization Method (None): The default is no normalization, meaning the raw deviations are used. Normalization methods like Max-Min or Absolute Sum can make the deviations more consistent across different market conditions, improving the reliability of the oscillator.
5. Take Profit Levels (2%, 8%, 18%): These levels define the thresholds for exiting portions of the position. Lower levels (e.g., 2%) capture smaller profits quickly, while higher levels (e.g., 18%) allow positions to run longer for more significant gains.
6. Take Profit Percentages (30%, 20%, 15%): These percentages determine how much of the position is exited at each take profit level. A higher percentage at the first level locks in more profit early, reducing exposure to market reversals. Lower percentages at higher levels allow for a portion of the position to benefit from extended trends.
Multi-Step Vegas SuperTrend - strategy [presentTrading]Long time no see! I am back : ) Please allow me to gain some warm-up.
█ Introduction and How it is Different
The "Vegas SuperTrend Strategy" is an enhanced trading strategy that leverages both the Vegas Channel and SuperTrend indicators to generate buy and sell signals.
What sets this strategy apart from others is its dynamic adjustment to market volatility and its multi-step take profit mechanism. Unlike traditional single-step profit-taking approaches, this strategy allows traders to systematically scale out of positions at predefined profit levels, thereby optimizing their risk-reward ratio and maximizing potential gains.
BTCUSD 6hr performance
█ Strategy, How it Works: Detailed Explanation
The Vegas SuperTrend Strategy combines the strengths of the Vegas Channel and SuperTrend indicators to identify market trends and generate trade signals. The following subsections delve into the details of how each component works and how they are integrated.
🔶 Vegas Channel Calculation
The Vegas Channel is based on a simple moving average (SMA) and the standard deviation (STD) of the closing prices over a specified period. The channel is defined by upper and lower bounds that are dynamically adjusted based on market volatility.
Simple Moving Average (SMA):
SMA_vegas = (1/N) * Σ(Close_i) for i = 0 to N-1
where N is the length of the Vegas Window.
Standard Deviation (STD):
STD_vegas = sqrt((1/N) * Σ(Close_i - SMA_vegas)^2) for i = 0 to N-1
Vegas Channel Upper and Lower Bounds:
VegasChannelUpper = SMA_vegas + STD_vegas
VegasChannelLower = SMA_vegas - STD_vegas
The details are here:
🔶 Trend Detection and Trade Signals
The strategy determines the current market trend based on the closing price relative to the SuperTrend bounds:
Market Trend:
MarketTrend = 1 if Close > SuperTrendPrevLower
-1 if Close < SuperTrendPrevUpper
Previous Trend otherwise
Trade signals are generated when there is a shift in the market trend:
Bullish Signal: When the market trend shifts from -1 to 1.
Bearish Signal: When the market trend shifts from 1 to -1.
🔶 Multi-Step Take Profit Mechanism
The strategy incorporates a multi-step take profit mechanism that allows for partial exits at predefined profit levels. This helps in locking in profits gradually and reducing exposure to market reversals.
Take Profit Levels:
The take profit levels are calculated as percentages of the entry price:
TakeProfitLevel_i = EntryPrice * (1 + TakeProfitPercent_i/100) for long positions
TakeProfitLevel_i = EntryPrice * (1 - TakeProfitPercent_i/100) for short positions
Multi-steps take profit local picture:
█ Trade Direction
The trade direction can be customized based on the user's preference:
Long: The strategy only takes long positions.
Short: The strategy only takes short positions.
Both: The strategy can take both long and short positions based on the market trend.
█ Usage
To use the Vegas SuperTrend Strategy, follow these steps:
Configure Input Settings:
- Set the ATR period, Vegas Window length, SuperTrend Multiplier, and Volatility Adjustment Factor.
- Choose the desired trade direction (Long, Short, Both).
- Enable or disable the take profit mechanism and set the take profit percentages and amounts for each step.
█ Default Settings
The default settings of the strategy are designed to provide a balanced approach to trading. Below is an explanation of each setting and its effect on the strategy's performance:
ATR Period (10): This setting determines the length of the ATR used in the SuperTrend calculation. A longer period smoothens the ATR, making the SuperTrend less sensitive to short-term volatility. A shorter period makes the SuperTrend more responsive to recent price movements.
Vegas Window Length (100): This setting defines the period for the Vegas Channel's moving average. A longer window provides a broader view of the market trend, while a shorter window makes the channel more responsive to recent price changes.
SuperTrend Multiplier (5): This base multiplier adjusts the sensitivity of the SuperTrend to the ATR. A higher multiplier makes the SuperTrend less sensitive, reducing the frequency of trade signals. A lower multiplier increases sensitivity, generating more signals.
Volatility Adjustment Factor (5): This factor dynamically adjusts the SuperTrend multiplier based on the width of the Vegas Channel. A higher factor increases the sensitivity of the SuperTrend to changes in market volatility, while a lower factor reduces it.
Take Profit Percentages (3.0%, 6.0%, 12.0%, 21.0%): These settings define the profit levels at which portions of the trade are exited. They help in locking in profits progressively as the trade moves in favor.
Take Profit Amounts (25%, 20%, 10%, 15%): These settings determine the percentage of the position to exit at each take profit level. They are distributed to ensure that significant portions of the trade are closed as the price reaches the set levels, reducing exposure to reversals.
Adjusting these settings can significantly impact the strategy's performance. For instance, increasing the ATR period or the SuperTrend multiplier can reduce the number of trades, potentially improving the win rate but also missing out on some profitable opportunities. Conversely, lowering these values can increase trade frequency, capturing more short-term movements but also increasing the risk of false signals.
Machine Learning Adaptive SuperTrend [AlgoAlpha]📈🤖 Machine Learning Adaptive SuperTrend - Take Your Trading to the Next Level! 🚀✨
Introducing the Machine Learning Adaptive SuperTrend , an advanced trading indicator designed to adapt to market volatility dynamically using machine learning techniques. This indicator employs k-means clustering to categorize market volatility into high, medium, and low levels, enhancing the traditional SuperTrend strategy. Perfect for traders who want an edge in identifying trend shifts and market conditions.
What is K-Means Clustering and How It Works
K-means clustering is a machine learning algorithm that partitions data into distinct groups based on similarity. In this indicator, the algorithm analyzes ATR (Average True Range) values to classify volatility into three clusters: high, medium, and low. The algorithm iterates to optimize the centroids of these clusters, ensuring accurate volatility classification.
Key Features
🎨 Customizable Appearance: Adjust colors for bullish and bearish trends.
🔧 Flexible Settings: Configure ATR length, SuperTrend factor, and initial volatility guesses.
📊 Volatility Classification: Uses k-means clustering to adapt to market conditions.
📈 Dynamic SuperTrend Calculation: Applies the classified volatility level to the SuperTrend calculation.
🔔 Alerts: Set alerts for trend shifts and volatility changes.
📋 Data Table Display: View cluster details and current volatility on the chart.
Quick Guide to Using the Machine Learning Adaptive SuperTrend Indicator
🛠 Add the Indicator: Add the indicator to favorites by pressing the star icon. Customize settings like ATR length, SuperTrend factor, and volatility percentiles to fit your trading style.
📊 Market Analysis: Observe the color changes and SuperTrend line for trend reversals. Use the data table to monitor volatility clusters.
🔔 Alerts: Enable notifications for trend shifts and volatility changes to seize trading opportunities without constant chart monitoring.
How It Works
The indicator begins by calculating the ATR values over a specified training period to assess market volatility. Initial guesses for high, medium, and low volatility percentiles are inputted. The k-means clustering algorithm then iterates to classify the ATR values into three clusters. This classification helps in determining the appropriate volatility level to apply to the SuperTrend calculation. As the market evolves, the indicator dynamically adjusts, providing real-time trend and volatility insights. The indicator also incorporates a data table displaying cluster centroids, sizes, and the current volatility level, aiding traders in making informed decisions.
Add the Machine Learning Adaptive SuperTrend to your TradingView charts today and experience a smarter way to trade! 🌟📊
Trend Strength | Flux Charts💎 GENERAL OVERVIEW
Introducing the new Trend Strength indicator! Latest trends and their strengths play an important role for traders. This indicator aims to make trend and strength detection much easier by coloring candlesticks based on the current strength of trend. More info about the process in the "How Does It Work" section.
Features of the new Trend Strength Indicator :
3 Trend Detection Algorithms Combined (RSI, Supertrend & EMA Cross)
Fully Customizable Algorithm
Strength Labels
Customizable Colors For Bullish, Neutral & Bearish Trends
📌 HOW DOES IT WORK ?
This indicator uses three different methods of trend detection and combines them all into one value. First, the RSI is calculated. The RSI outputs a value between 0 & 100, which this indicator maps into -100 <-> 100. Let this value be named RSI. Then, the Supertrend is calculated. Let SPR be -1 if the calculated Supertrend is bearish, and 1 if it's bullish. After that, latest EMA Cross is calculated. This is done by checking the distance between the two EMA's adjusted by the user. Let EMADiff = EMA1 - EMA2. Then EMADiff is mapped from -ATR * 2 <-> ATR * 2 to -100 <-> 100.
Then a Total Strength (TS) is calculated by given formula : RSI * 0.5 + SPR * 0.2 + EMADiff * 0.3
The TS value is between -100 <-> 100, -100 being fully bearish, 0 being true neutral and 100 being fully bullish.
Then the Total Strength is converted into a color adjusted by the user. The candlesticks in the chart will be presented with the calculated color.
If the Labels setting is enabled, each time the trend changes direction a label will appear indicating the new direction. The latest candlestick will always show the current trend with a label.
EMA = Exponential Moving Average
RSI = Relative Strength Index
ATR = Average True Range
🚩 UNIQUENESS
The main point that differentiates this indicator from others is it's simplicity and customization options. The indicator interprets trend and strength detection in it's own way, combining 3 different well-known trend detection methods: RSI, Supertrend & EMA Cross into one simple method. The algorithm is fully customizable and all styling options are adjustable for the user's liking.
⚙️ SETTINGS
1. General Configuration
Detection Length -> This setting determines the amount of candlesticks the indicator will look for trend detection. Higher settings may help the indicator find longer trends, while lower settings will help with finding smaller trends.
Smoothing -> Higher settings will result in longer periods of time required for trend to change direction from bullish to bearish and vice versa.
EMA Lengths -> You can enter two EMA Lengths here, the second one must be longer than the first one. When the shorter one crosses under the longer one, this will be a bearish sign, and if it crosses above it will be a bullish sign for the indicator.
Labels -> Enables / Disables trend strength labels.
Custom Supertrend Multi-Timeframe Indicator [Pineify]Supertrend Multi-Timeframe Indicator
Introduction
The Supertrend Multi-Timeframe Indicator is an advanced trading tool designed to help traders identify trend directions and potential buy/sell signals by combining Supertrend indicators from multiple timeframes. This script is original in its approach to integrating Supertrend calculations across different timeframes, providing a more comprehensive view of market trends.
Concepts and Calculations
The indicator utilizes the Supertrend algorithm, which is based on the Average True Range (ATR). The Supertrend is a popular tool for trend-following strategies, and this script enhances its capabilities by incorporating data from a larger timeframe.
Supertrend Factor: Determines the sensitivity of the Supertrend line.
ATR Length: Defines the period for calculating the Average True Range.
Larger Supertrend Factor and ATR Length: Applied to the larger timeframe for a broader trend perspective.
Larger Timeframe: The higher timeframe from which the secondary Supertrend data is sourced.
How It Works
The script calculates the Supertrend for the current timeframe using the specified factor and ATR length.
Simultaneously, it requests Supertrend data from a larger timeframe.
Buy and sell signals are generated based on crossovers and crossunders of the Supertrend lines from both timeframes.
Visual cues (up and down arrows) are plotted on the chart to indicate buy and sell signals.
Background colors change to reflect the trend direction: green for an uptrend and red for a downtrend.
Usage
Add the indicator to your TradingView chart.
Customize the Supertrend factors, ATR lengths, and larger timeframe according to your trading strategy.
Enable or disable buy and sell alerts as needed.
Monitor the chart for visual signals and background color changes to make informed trading decisions.
Note: The indicator is best used in conjunction with other technical analysis tools and should not be relied upon as the sole basis for trading decisions.
Conclusion
The Supertrend Multi-Timeframe Indicator offers a unique and powerful way to analyze market trends by leveraging the strengths of the Supertrend algorithm across multiple timeframes. Its customizable settings and clear visual signals make it a valuable addition to any trader's toolkit.
Candlestick Structure [LuxAlgo]The Candlestick Structure indicator detects major market trends and displays various candlestick patterns aligning with the detected trend, filtering out potentially unwanted patterns as a result. Multiple trend detection methods are included and can be selected by the users.
A dashboard showing the alignment percentage of each individual pattern is also provided.
🔶 USAGE
By distinguishing major and minor trend detection, we can still detect patterns based on minor trends, yet filter out the patterns that do not align with the major trend.
By detecting candlestick patterns that align with a major trend, we can effectively detect the ending points of retracements, potentially providing various entry points of interest within a trend.
Users are able to track the alignment of each candlestick pattern in the dashboard to reveal which patterns typically align with the trend and which may not.
Note: Alignment % only checks if the pattern's direction is the same as the current trend direction. These are only raw readings and not any type of confidence score.
🔶 DETAILS
In this indicator, we are identifying and tracking 16 different Candlestick Patterns.
🔹 Bullish Patterns
Hammer: Identified by a small upper wick (or no upper wick) with a small body, and an elongated lower wick whose length is 2X greater than the candle body’s width.
Inverted Hammer: Identified by a small lower wick (or no lower wick) with a small body, and an elongated upper wick whose length is 2X greater than the candle body’s width.
Bullish Engulfing: A 2 bar pattern identified by a large bullish candle body fully encapsulating (opening lower and closing higher) the previous small (bearish) candle body.
Rising 3: A 5 bar pattern identified by an initial full-bodied bullish candle, followed by 3 bearish candles that trade within the high and low of the initial candle, followed by another full-bodied bullish candle closing above the high of the initial candle.
3 White Soldiers: Identified by 3 full-bodied bullish candles, each opening within the body and closing below the high, of the previous candle.
Morning Star: A 3 bar pattern identified by a full-bodied bearish candle, followed by a small-bodied bearish candle, followed by a full-bodied bullish candle that closes above the halfway point of the first candle.
Bullish Harami: A 2 bar pattern, identified by an initial bearish candle, followed by a small bullish candle whose range is entirely contained within the body of the initial candle.
Tweezer Bottom: A 2 bar pattern identified by an initial bearish candle, followed by a bullish candle, both having equal lows.
🔹 Bearish Patterns
Hanging Man: Identified by a small upper wick (or no upper wick) with a small body, and an elongated lower wick whose length is 2X greater than the candle body’s width.
Shooting Star: Identified by a small lower wick (or no lower wick) with a small body, and an elongated upper wick whose length is 2X greater than the candle body’s width.
Bearish Engulfing: A 2 bar pattern identified by a large bearish candle body fully encapsulating (opening higher and closing lower) the previous small (bullish) candle body.
Falling 3: A 5 bar pattern identified by an initial full-bodied bearish candle, followed by 3 bullish candles that trade within the high and low of the initial candle, followed by another full-bodied bearish candle closing below the low of the initial candle.
3 Black Crows: Identified by 3 full-bodied bearish candles, each open within the body and closing below the low, of the previous candle.
Evening Star: A 3 bar pattern identified by a full-bodied bullish candle, followed by a small-bodied bullish candle, followed by a full-bodied bearish candle that closes below the halfway point of the first candle.
Bearish Harami: A 2 bar pattern, identified by an initial bullish candle, followed by a small bearish candle whose range is entirely contained within the body of the initial candle.
Tweezer Top: A 2 bar pattern identified by an initial bullish candle, followed by a bearish candle, both having equal highs.
🔹 Trend Types
Major trend is displayed at all times, the display will change depending on the trend method selected.
The minor trend can also be visualized; to avoid confusion, the minor trend can optionally be displayed through the candle colors.
Supertrend: Displays Upper and Lower SuperTrend, When we break above the upper, it is considered an Uptrend. When we break below the lower, it is considered a Downtrend.
EMAs: Displays Fast and Slow EMAs, When Fast>Slow, it is considered an Uptrend. When Fast<Slow, it is considered a Downtrend.
ChoCh: Displays ChoCh Lines and Labels, When a Bullish ChoCh occurs, it is now considered as an Uptrend. When a Bearish ChoCh occurs, it is now considered a Downtrend.
Donchian Channel: Displays the Highest and Lowest Values, When we break above the Highest, it is considered an Uptrend. When we break below the Lowest, it is considered a Downtrend.
Below is an example of the Change of Character (ChoCh) method of trend detection.
Note: In this description, each screenshot has a different trend method in use, scroll through if you are looking for a specific one.
🔶 SETTINGS
Candlestick Patterns: Choose which candlestick patterns to include in calculations.
Minor Trend Length: Determines the Donchian Channel length to use for minor trend identification.
Major Trend Method: Determines which trend method to use for identifying Major Trend.
Major Trend Parameters: Various inputs for controlling Major trends, depending on the specific method you have selected.
Color Candles: Colors the chart candles based on minor trend.
Dashboard: Control display size and location of Alignment Dashboard.
TSI w SuperTrend decision - Strategy [presentTrading]This strategy aims to improve upon the performance of Traidngview's newly published "Trend Strength Index" indicator by incorporating the SuperTrend for better trade execution and risk management. Enjoy :)
█ Introduction and How it is Different
The "TSI with SuperTrend Decision - Strategy" combines the Trend Strength Index (TSI) with SuperTrend indicators to determine entry and exit points. Unlike traditional strategies that rely solely on one indicator, this method leverages the strengths of both TSI and SuperTrend to provide a more nuanced and adaptive trading strategy.
This dual approach allows for capturing trends more effectively, especially in volatile markets.
BTCUSD 8h LS Performance
█ Strategy, How it Works: Detailed Explanation
🔶 Trend Strength Index (TSI)
The TSI is a momentum oscillator that shows both the direction and strength of a trend. It is calculated by comparing the price movement with the bar index over a specified period. The formula for TSI is as follows:
```
TSI = (PC / |PC|)
where:
PC = Change in price over the period
```
In this strategy, TSI is calculated using the closing prices and a default period of 64 bars. The TSI values help identify overbought and oversold conditions, providing signals for potential market reversals.
🔶 SuperTrend Indicator
The SuperTrend is a trend-following indicator based on the average true range (ATR). It helps in identifying the direction of the market trend. The SuperTrend calculation involves:
```
SuperTrend = HLC3 ± (Factor * ATR)
where:
HLC3 = (High + Low + Close) / 3
Factor = User-defined multiplier
ATR = Average True Range over a period
```
The SuperTrend settings in this strategy include a length of 10 bars and a factor of 3.0.
Last Bull Cycle of BTC
🔶 Entry and Exit Conditions
The strategy uses the TSI and SuperTrend together to determine entry and exit points:
- Long Entry: When the SuperTrend indicates a downward trend (st.d < 0) and the TSI is above the oversold level (-0.241).
- Long Exit: When the SuperTrend indicates an upward trend (st.d > 0) and the TSI is below the overbought level (0.241).
- Short Entry: When the SuperTrend indicates an upward trend (st.d > 0) and the TSI is below the overbought level (0.241).
- Short Exit: When the SuperTrend indicates a downward trend (st.d < 0) and the TSI is above the oversold level (-0.241).
█ Trade Direction
The strategy allows users to select the trade direction through the `tradeDirection` input. The options are:
- Both: Enables both long and short trades.
- Long: Enables only long trades.
- Short: Enables only short trades.
█ Default Settings
- TSI Length: 64
- SuperTrend Length: 10
- SuperTrend Factor: 3.0
- Trade Direction: Both
- Take Profit (%): 30.0
- Stop Loss (%): 20.0
Impact of Default Settings
- TSI Length: A longer TSI period smooths out noise but may lag in identifying trends. A shorter period is more responsive but can generate false signals.
- SuperTrend Length: A shorter length provides quicker signals but can be prone to whipsaws. A longer length is more reliable but may delay entries and exits.
- SuperTrend Factor: A higher factor increases the distance of the SuperTrend from the price, reducing sensitivity to minor price fluctuations.
- Trade Direction: Allows flexibility in trading strategies by enabling both long and short trades based on market conditions.
- Take Profit and Stop Loss: These settings manage risk by automatically closing trades at predefined profit or loss levels. Higher percentages provide larger potential gains but also higher risk.
SuperThreeThe SuperThree is a comprehensive technical indicator designed to identify and visualize market trends and counter-trend momentum in trading. It uses a unique color-coding system to represent different market conditions and potential trading opportunities.
Uptrend (Green Fill) : This is indicated by a green fill. An uptrend is a period where prices are increasing overall, suggesting a strong market. It’s an ideal time for traders to consider entering long positions or exiting short positions.
Downtrend (Red Fill) : This is represented by a red fill. A downtrend is a period where prices are decreasing overall, indicating a bearish market. Traders might consider entering short positions or exiting long positions during this phase.
Sideways Trend (Blue Fill) : This is shown by a blue fill. A sideways trend, also known as a horizontal trend, is when the price is relatively stable and not making significant upward or downward movements. It’s often a period of consolidation before the price moves up or down.
Counter-Trend Momentum (Blue Arrows) : Blue arrows indicate counter-trend momentum, which can be a signal to exit trades or look for potential trend reversals. These are crucial points where the market’s momentum is shifting and may be about to move in the opposite direction.
The SuperThree indicator is an enhancement of the Supertrend indicator, providing additional features and visual cues to help traders make informed decisions. However, like all indicators, it should be used in conjunction with other forms of analysis to confirm signals and avoid potential false positives. Always consider your risk tolerance and investment goals before making trading decisions.
Happy trading! 😊