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.
Halftrend
Options Series - Ichimoku Cloud and HalfTrend
The provided script combines two powerful technical indicators, Ichimoku Cloud and HalfTrend, to create a hybrid trading tool. Here's an analysis of the key components and how they work together:
Ichimoku Cloud and HalfTrend
⭐ 1. Indicator Title and Settings:
The script sets the title as "Options Series - Ichimoku Cloud and HalfTrend" and uses the overlay=true option to display the indicators directly on the price chart.
⭐ 2. Color Definitions:
Several colors are defined for later use:
Green and Red for different types of candles and signals.
Fluorescent Colors for highlighting significant trends or changes in market conditions.
⭐ 3. Ichimoku Cloud Setup:
The Ichimoku Cloud is a comprehensive indicator used to identify support, resistance, and trend direction. Here’s how the script configures it:
Conversion Periods, Base Periods, Lagging Span 2 Periods, and Displacement are customizable via input options, giving flexibility to adjust Ichimoku settings based on different market conditions.
The function donchian(len) calculates the Donchian Channel average, which is used to define the Conversion Line and Base Line. The crossover of these lines is crucial in determining bullish or bearish trends.
Color Logic for Kijun Cross: If the Conversion Line is above the Base Line, the trend is bullish (green color), while a bearish trend is indicated by red. A neutral condition is marked with orange.
⭐ 4. HalfTrend Indicator Setup:
The HalfTrend indicator detects trend reversals based on high/low price deviations from a moving average:
Amplitude and Channel Deviation inputs allow users to control the sensitivity of the indicator.
showArrows and showChannels toggle the display of buy/sell arrows and trend channels.
maxLowPrice and minHighPrice variables are initialized to track significant high/low points during the trend, used to confirm trend reversals.
⭐ 5. ATR and Trend Calculations:
The Average True Range (ATR) is used to calculate the volatility-based channels. The script calculates atr2 and uses this to create atrHigh and atrLow for plotting the channel.
The trend detection logic is as follows:
When the trend is upward, the script seeks confirmation by comparing the high moving average with previous lows, signaling a continuation of the uptrend if it holds.
Conversely, a downtrend is confirmed when the low moving average exceeds previous highs.
⭐ 6. Customized Candle Coloring:
A custom color scheme is applied to candles based on a combination of trend direction and Ichimoku Cloud signals:
GreenFluorescent for strong bullish conditions where price is above the HalfTrend line, and the Conversion Line is above the Base Line.
RedFluorescent for strong bearish conditions, with price below the HalfTrend line and Conversion Line below the Base Line.
Gray for neutral or indecisive conditions.
⭐ 7. Plots and Shapes:
The script plots various elements:
HalfTrend Line: The main trendline is plotted in either green (buy) or red (sell), with adjustable line width.
Ichimoku Base Line: This is plotted with the dynamic color based on crossovers.
Buy/Sell Arrows: These are drawn on the chart when valid buy/sell conditions are met.
Custom Candles: The script overrides default chart candles with custom-colored candles based on the previously discussed logic.
⭐ 8. Improvements:
Optimization: Parameters like the amplitude, channel deviation, and Ichimoku periods can be fine-tuned based on backtesting results to maximize performance for specific assets or timeframes.
Alerts: The script could be enhanced by adding alert conditions for real-time buy/sell notifications, leveraging alertcondition() in Pine Script.
In summary, this script merges two trend-following techniques for a multi-faceted view of the market, using visual cues and trendline logic to provide a robust trading tool.
🚀 Conclusion:
Trend-Following System: The combination of Ichimoku Cloud and HalfTrend provides a comprehensive view of both long-term trends (via Ichimoku) and shorter-term reversals (via HalfTrend).
Visual Signals: The script includes clear visual signals (arrows and custom-colored candles) to help traders quickly spot buy/sell opportunities.
Dynamic Customization: Through user inputs, this indicator can be tailored to different market conditions, making it versatile.
Half Trend HeikinAshi [BigBeluga]This indicator is a cool combo of the half-trend methodology and Heikin Ashi candles. The main idea is to help spot where the market is trending and where it might be reversing by using a mix of moving averages and the highest and lowest price data values. What’s nice is that it doesn’t just give you trend lines but also converts them into Heikin Ashi candles, so you can visually gauge the strength of a trend based on candle sizes.
NIFTY50:
NVIDIA:
🔵 IDEA
The thinking behind this Half Trend HeikinAshi indicator is pretty straightforward: it’s designed to give you a flexible way to detect trends and trend reversals, but with an added bonus—measuring trend strength via Heikin Ashi candles. The core idea is based on the classic half-trend strategy, where it adjusts to the highest and lowest price values within a certain period. The Heikin Ashi transformation smooths out half-trend line, making it easier to spot solid trends and potential reversals.
🔵 KEY FEATURES & USAGE
◉ Half Trend Calculation with Reversal Signals:
The main feature here is spotting trends based on a moving average of the close price and the highest/lowest price data.
//#region ———————————————————— Calculations
// Calculate moving average of close prices
series float closeMA = ta.sma(close, amplitude)
// Calculate highest high and lowest low
series float highestHigh = ta.highest(amplitude)
series float lowestLow = ta.lowest(amplitude)
// Initialize hl_t on the first bar
if barstate.isfirst
hl_t := close
// Update hl_t based on conditions
switch
closeMA < hl_t and highestHigh < hl_t => hl_t := highestHigh
closeMA > hl_t and lowestLow > hl_t => hl_t := lowestLow
=> hl_t := hl_t
When the trend flips, you’ll see arrows on your chart—either pointing up or down—marking the exact price where that reversal occurred. This makes it easy to see where the market might turn, which is helpful for timing entries and exits.
◉ Heikin Ashi Candlestick Transformation:
There’s a Heikin Ashi mode that transforms the half-trend line into Heikin Ashi candles.
These smooth out market noise and make the overall trend much clearer.
◉ Trend Strength Calculation:
The indicator doesn’t just stop at showing trends. It also calculates trend strength based on the size of the Heikin Ashi candles. Bigger candles mean stronger trends, and smaller ones indicate weaker momentum. You can see this displayed on the dashboard, so you know exactly how strong the current trend is at any moment.
◉ Graphical Dashboard Display:
You’ve got a small dashboard right on the chart that shows key info like the ticker, timeframe, and whether the trend is up or down. If you’re in Heikin Ashi mode, it shows trend strength instead. So, no need to dig through the data—you can just glance at the dashboard for a quick market read.
🔵 CUSTOMIZATION
Amplitude Input: You can tweak the amplitude to control how sensitive the half-trend line is. A lower setting makes it more reactive to small price moves, while a higher setting smooths it out for longer-term trends.
Heikin Ashi Toggle: You can easily switch between standard half-trend lines and Heikin Ashi candle mode, depending on how you prefer to see the market.
Trend Colors: You’ve got control over the colors for up and down trends, so you can adjust the appearance to fit your charting style.
Signal Labels size: Change Labels signal sizes for your preference
🔵 CONCLUSION
The Half Trend HeikinAshi indicator is a solid tool for tracking trends and measuring their strength. By combining the usual half-trend signals with Heikin Ashi candles, you get a clearer picture of what’s happening in the market. Whether you're looking to spot potential reversals or just want to measure the strength of a current trend, this indicator gives you plenty of flexibility to do both.
AminioLibraryLibrary "AminioLibrary"
: this is my personal library that is being used in different indicators and strategies
calculateMA(source, len, maType)
This fuction returns a moving average value based on the type
Parameters:
source (float) : Is the time series source to calculate average from
len (simple int) : The length of the moving average, this should be integer
maType (string) : The type of moving average, acceptable types are : SMA, HMA, EMA, RMA, WMA, VWMA
Returns: value of moving average
atr(source, len)
This fuction returns atr value for a given source
Parameters:
source (float) : Is the time series source to calculate atr from
len (simple int) : The length of the atr, this should be integer
Returns: value of atr from source
superTrend(source, factor, len)
This fuction returns value of super trend indicator and the trend direction as a tupple
Parameters:
source (float) : Is the time series source to calculate super trend from
factor (simple float) : The multiplication factor for upper and lower band calcualtion, this can be a float
len (simple int) : The length of the super trend, this should be integer
Returns: value of atr from source
halfTrend(am, chdev)
This fuction returns a hTrend type carrying different values for half trend indicator
Parameters:
am (int) : This is the amplitude used for calcucating the half trend, use integers
chdev (float) : This is the Channel Deviation value used for calculating upper and lower atr channel boundaries, you can use floats
Returns: hTrend data type
hTrend
Fields:
halfTrend (series__float)
trend (series__integer)
atrHigh (series__float)
atrLow (series__float)
arrowUp (series__float)
arrowDown (series__float)
MTF HalfTrendIntroduction
A half-trend indicator is a technical analysis tool that uses moving averages and price data to find potential trend reversal and entry points in the form of graphical arrows showing market turning points.
The salient features of this indicator are:
- It uses the phenomenon of moving averages.
- It is a momentum indicator.
- It can indicate a trend change.
- It is capable of detecting a bullish or bearish trend reversal.
- It can signal to sell/buy.
- It is a real-time indicator.
Multi-Timeframe Application
A standout feature is its flexibility across timeframes. Traders have the liberty to choose any timeframe on the chart, enhancing the tool's versatility and making it suitable for both short-term and long-term analyses.
Principle of the Half Trend indicator
This indicator is based on the moving averages. The moving average is the average of the fluctuation or change in the price of an asset. These averages are taken for a time interval.
So, a half-trend indicator takes the moving averages phenomenon as its principle for working. The most commonly used moving averages in a half trend indicator are:
- Relative strength index (RSI)
- EMA (estimated moving average)
Components of a Half Trend indicator
There are two main components of a half trend indicator:
- Half trend line
- Arrows
- ATR lines
Half trend line
Half trend line represents this indicator on a candlestick chart. This line shows the trend of a chart in real-time. A half-trend line is based on the moving averages.
There are two further components of a half-trend line:
- Redline
- Blue line
A red line represents a bearish trend. When the half-trend line turns red, a trend is facing a dip. It is time for the bears to take control of the market. A bearish control of the market represents the domination of sellers in the market.
On the other hand, the blue line represents the bullish nature of the market. It tells a trader that the bullish sentiment of the market is prevailing. A bullish market means the number of buyers is significantly greater than the number of sellers.
Moreover, a trader can change these colors to his choice by customization.
Arrows
There are two types of arrows in this indicator which help a trader with the entry and exit points. These arrows are,
- Blue arrow
- Red arrow
A blue arrow signals a buying trade; on the other hand, a red arrow tells a trader about the selling of the assets. These arrows work with the moving average line to formulate a trading strategy.
The color of these arrows is changed if a trader desires so.
ATR lines
The ATR blue and red lines represent the Average True Range of the Half trend line. They may be used as stop loss or take profit levels.
Pros and Cons
Pros
- It is a very easy to eyes indicator.
- This is a very useful friendly indicator.
- It provides sufficient information to beginner traders.
- It provides sufficient information for entry points in a trade.
- A half-trend indicator provides a good exit strategy for a trader.
- It provides information about market reversals.
- It helps a trader to find a bullish and bearish sentiment in the market.
Cons
- It is a real-time indicator. So, it can lag.
- The lagging of this indicator can lead to miss opportunities.
- The most advanced and professional traders may not rely on this indicator for crucial trading decisions.
- The lagging of this indicator can predict false reversals of the market.
- It can create false signals.
- It requires the confluence of the other technical tools for a better success ratio.
Settings for Half Trend indicator
The default settings for half trend indicator are:
Amplitude = 2
Channel deviation = 2
Different markets or financial instruments may require different settings for optimal execution.
Amplitude: The degree that the Half trend line takes the internal variables into consideration. The higher the number, the fewer trades. The default value is 2.
Channel deviation: The ATR value calculation from the Half trend line. The default value is 2.
Trading strategy
It is an effective indicator in terms of strategy formation for a trading setup. The new and beginner trades can take benefit from this indicator for the formulation of a good trading setup. This indicator also helps seasoned and professional traders formulate a good trading setup with other technical tools.
The trading strategy involving a half-trend indicator is divided into three parts:
- Entry and exit
- Risk management
- Take profit
Entry and exit
It is an effective indicator that provides sufficient information about the entry and exit points in a trading setup. The profit of a trader is directly proportional to the appropriate entry and exit points. So, it is a crucial step in any trading setup.
The blue and red arrows provide information about the entry and exit points in a trading setup. Furthermore, the entry and exit for the bullish and bearish setups are as follows.
Entry and exit for a bullish setup
If a blue arrow appears under the half-trend line, it means the bullish sentiment of the market is getting stronger in the future. So, it is a signal for entry in a bullish setup.
As the red arrow appears on the chart, it is a signal to exit your trade. The red arrow represents a reversal in the market, so it is a good opportunity to close your trade in a bullish setup.
Entry and exit for a bearish setup
Suppose a red arrow appears above the red moving average line. It is a good opportunity to enter a trade in a bearish setup. The red line represents that sooner the sellers are going to take control and the value of the asset is about to face a dip. So it is the best time to make your move.
As the opposite arrow appears in the chart, it is time to exit from a bearish trade setup.
Re-entering a position
Bullish setup
- The half-trend line is blue.
- At least one candle closes below the blue half-trend line.
- Enter on the candle that closes above the blue half-trend line.
Bearish setup
- The half-trend line is red.
- At least one candle closes above the red half-trend line.
- Enter on the candle that closes below the red half-trend line.
Risk management
Risk management is an integral part of a trading setup. It is an important step to protect your potential profits and losses.
When trading in a bullish market, place the stop loss at the prior swing low. It will help you to cut your losses in case the prices move to the lower end.
In the case of a bearish market, place your stop loss above the prior swing high.
A trader may trail the stop loss using the ATR lines.
The new trader often makes mistakes in the placement of the stop loss. If you don’t place the stop loss at an appropriate point. It can drain your bank account and ruin your trading experience. Is is recommended not to risk more than 2% of your trading account, per trade.
Take profit
The blue ATR line may be used as one take profit level on a bullish setup followed by the previous swing high. The signal reversal would indicate the final take profit and closing of any position.
The red ATR line may be used as one take profit level on a bearish setup followed by the previous swing low. The signal reversal would indicate the final take profit and closing of any position.
Conclusion
A half trend indicator is a decent indicator that can transform your trading experience. It is a dual indicator that is based on the moving averages as well as helps you to form a trading strategy. If you are a new trader, this indicator can help you to learn and flourish in the trading universe. If you are a seasoned trader, I recommend you use this indicator with other technical analysis tools to enhance your success ratio.
All credits go to:
- @everget the original creator of this indicator (I just added the MTF capability).
- Ali Muhammad original author of much of the description used.
Strategy Myth-Busting #20 - HalfTrend+HullButterfly - [MYN]#20 on the Myth-Busting bench, we are automating the " I Found Super Easy 1 Minute Scalping System And Backtest It 100 Times " strategy from " Jessy Trading " who claims 30.58% net profit over 100 trades in a couple of weeks with a 51% win rate and profit factor of 1.56 on EURUSD .
This one surprised us quite a bit. Despite the title of this strategy indicating this is on the 1 min timeframe, the author demonstrates the backtesting manually on the 5 minute timeframe. Given the simplicity of this strategy only incorporating a couple of indicators, it's robustness being able to be profitable in both low and high timeframes and on multiple symbols was quite refreshing.
The 3 settings which we need to pay most attention to here is the Hull Butterfly length, HalfTrend amplitude and the Max Number Of Bars Between Hull and HalfTrend Trigger. Depending on the timeframe and symbol, these settings greatly impact the performance outcomes of the strategy. I've listed a couple of these below.
And as always, If you know of or have a strategy you want to see myth-busted or just have an idea for one, please feel free to message me.
This strategy uses a combination of 3 open-source public indicators:
Hull Butterfly Oscillator by LuxAlgo
HalfTrend by Everget
Trading Rules
5 min candles but higher / lower candles work too.
Stop loss at swing high/low
Take Profit 1.5x the risk
Long
Hull Butterfly gives us green column, Wait for HalfTrend to present an up arrow and enter trade.
Short
Hull Butterfly gives us a red column , Wait for HalfTrend to present a down arrow and enter trade.
Alternative Trading Settings for different time frames
1 Minute Timeframe
Move the Hull Butterfly length from the default 11 to 9
Move the HalfTrend Amplitude from the default 2 to 1
Enabling ADX Filter with a 25 threshold
2 Hour Timeframe
Move the HalfTrend Amplitude from the default 2 to 1
Laddered Take Profits from 14.5% to 19% with an 8% SL
HalfTrendA popular trend indicator based on ATR. Similar to the SuperTrend but uses a different trend's identification logic.
I am publishing a disclosed code without license. Remember that in the future you may see a lot of paid IO scripts called BuySellScalper, Trend Trader Karan, Trend Trader and etc (by other authors) which will be based on this script. I found the same script on Ebay for $10 with a free shipping. Beware, always check and follow one Russian wisdom: "Do not pay for something you can get for free".