Optimized Heikin Ashi Strategy with Buy/Sell OptionsStrategy Name:
Optimized Heikin Ashi Strategy with Buy/Sell Options
Description:
The Optimized Heikin Ashi Strategy is a trend-following strategy designed to capitalize on market trends by utilizing the smoothness of Heikin Ashi candles. This strategy provides flexible options for trading, allowing users to choose between Buy Only (long-only), Sell Only (short-only), or using both in alternating conditions based on the Heikin Ashi candle signals. The strategy works on any market, but it performs especially well in markets where trends are prevalent, such as cryptocurrency or Forex.
This script offers customizable parameters for the backtest period, Heikin Ashi timeframe, stop loss, and take profit levels, allowing traders to optimize the strategy for their preferred markets or assets.
Key Features:
Trade Type Options:
Buy Only: Enter a long position when a green Heikin Ashi candle appears and exit when a red candle appears.
Sell Only: Enter a short position when a red Heikin Ashi candle appears and exit when a green candle appears.
Stop Loss and Take Profit:
Customizable stop loss and take profit percentages allow for flexible risk management.
The default stop loss is set to 2%, and the default take profit is set to 4%, maintaining a favorable risk/reward ratio.
Heikin Ashi Timeframe:
Traders can select the desired timeframe for Heikin Ashi candle calculation (e.g., 4-hour Heikin Ashi candles for a 1-hour chart).
The strategy smooths out price action and reduces noise, providing clearer signals for entry and exit.
Inputs:
Backtest Start Date / End Date: Specify the period for testing the strategy’s performance.
Heikin Ashi Timeframe: Select the timeframe for Heikin Ashi candle generation. A higher timeframe helps smooth the trend, which is beneficial for trading lower timeframes.
Stop Loss (in %) and Take Profit (in %): Enable or disable stop loss and take profit, and adjust the levels based on market conditions.
Trade Type: Choose between Buy Only or Sell Only based on your market outlook and strategy preference.
Strategy Performance:
In testing with BTC/USD, this strategy performed well in a 4-hour Heikin Ashi timeframe applied on a 1-hour chart over a period from January 1, 2024, to September 12, 2024. The results were as follows:
Initial Capital: 1 USD
Order Size: 100% of equity
Net Profit: +30.74 USD (3,073.52% return)
Percent Profitable: 78.28% of trades were winners.
Profit Factor: 15.825, indicating that the strategy's profitable trades far outweighed its losses.
Max Drawdown: 4.21%, showing low risk exposure relative to the large profit potential.
This strategy is ideal for both beginner and advanced traders who are looking to follow trends and avoid market noise by using Heikin Ashi candles. It is also well-suited for traders who prefer automated risk management through the use of stop loss and take profit levels.
Recommended Use:
Best Markets: This strategy works well on trending markets like cryptocurrency, Forex, or indices.
Timeframes: Works best when applied to lower timeframes (e.g., 1-hour chart) with a higher Heikin Ashi timeframe (e.g., 4-hour candles) to smooth out price action.
Leverage: The strategy performs well with leverage, but users should consider using 2x to 3x leverage to avoid excessive risk and potential liquidation. The strategy's low drawdown allows for moderate leverage use while maintaining risk control.
Customization: Traders can adjust the stop loss and take profit percentages based on their risk appetite and market conditions. A default setting of a 2% stop loss and 4% take profit provides a balanced risk/reward ratio.
Notes:
Risk Management: Traders should enable stop loss and take profit settings to maintain effective risk management and prevent large drawdowns during volatile market conditions.
Optimization: This strategy can be further optimized by adjusting the Heikin Ashi timeframe and risk parameters based on specific market conditions and assets.
Backtesting: The built-in backtesting functionality allows traders to test the strategy across different market conditions and historical data to ensure robustness before applying it to live trading.
How to Apply:
Select your preferred market and chart.
Choose the appropriate Heikin Ashi timeframe based on the chart's timeframe. (e.g., use 4-hour Heikin Ashi candles for 1-hour chart trends).
Adjust stop loss and take profit based on your risk management preference.
Run backtesting to evaluate its performance before applying it in live trading.
This strategy can be further modified and optimized based on personal trading style and market conditions. It’s important to monitor performance regularly and adjust settings as needed to align with market behavior.
Heikin
Heikin Ashi SupertrendAbout this Strategy
This supertrend strategy uses the Heikin Ashi candles to generate the supertrend but enters and exits trades using normal candle close prices. If you use the standard built in Supertrend indicator on Heikin Ashi candles, it will produce very unrealistic backtesting results because it uses the Heikin Ashi prices instead of the real prices. However, by signaling the supertrend reversals using Heikin Ashi while using standard candle close prices for the entries and exits, it corrects the backtesting errors and gives you a more realistic equity curve. You should set the chart to use standard candles and then hide them (the strategy creates the candles).
This strategy includes:
Plotting of Heikin Ashi candles
Heikin Ashi Supertrend
Long and Short Entry Signals
Move stop loss after trade is X% in profit
Profit Target
Stop Loss
Built in Alertatron automation
Alertatron Trade Automation Integration
For Alertatron integration, be sure to configure the strategy settings and "Enable Webhook Messages" before creating an alert with {{strategy.order.alert_message}} in the body of your alert message. Be sure to enable webhooks and point it to your Incoming Alertatron webhook URL.
Notes
While this strategy does pretty well during trending markets, It's worth noting that the Buy and Hold ROI is much better during peak times of the bull market
Not financial advice. Do not risk more than you can afford to lose.
Heikin Ashi - The WhaleThe strategy is based on Heikin Ashi calculation, you do not need to switch the candle to HA.
The HA is used as a base entry, if a candle or two candles are bullish, then is valid to open a position, you can select the validation, one or two candles.
Also, the strategy mainly uses volume indicators as a confluence, you can select VWAP , VWMA , and Volume Oscillator, in addition to ADX which has two ways to validate the entry.
Base entry: One or two bullish HA candles (candles without a lower wick)
Confluence Indicators:
ADX: Will give a positive signal only if ADX is above the threshold, or if +DI is above -DI, or both.
VWAP: will give a positive signal if HA close is above VWAP.
VWMA: composite of 3 MA (20, 25, 50). There are multiple options to set it as confluence, the first option is to check if the short is bigger than the long and long is bigger than the base. The other options are to check the close status, which is bigger than which MA. You can find the description of each option in the strategy box
The sell is based on trailing stop loss (TSL), while the stop loss is based lowest X candle, the strategy will look back to the lowest number of the HA candles and set it as stop loss.
Smoothed Heikin Ashi Trend on Chart - TraderHalai BACKTESTSmoothed Heikin Ashi Trend on chart - Backtest
This is a backtest of the Smoothed Heikin Ashi Trend indicator, which computes the reverse candle close price required to flip a Heikin Ashi trend from red to green and vice versa. The original indicator can be found in the scripts section of my profile.
This particular back test uses this indicator with a Trend following paradigm with a percentage-based stop loss.
Note, that backtesting performance is not always indicative of future performance, but it does provide some basis for further development and walk-forward / live testing.
Testing was performed on Bitcoin , as this is a primary target market for me to use this kind of strategy.
Sample Backtesting results as of 10th June 2022:
Backtesting parameters:
Position size: 10% of equity
Long stop: 1% below entry
Short stop: 1% above entry
Repainting: Off
Smoothing: SMA
Period: 10
8 Hour:
Number of Trades: 1046
Gross Return: 249.27 %
CAGR Return: 14.04 %
Max Drawdown: 7.9 %
Win percentage: 28.01 %
Profit Factor (Expectancy): 2.019
Average Loss: 0.33 %
Average Win: 1.69 %
Average Time for Loss: 1 day
Average Time for Win: 5.33 days
1 Day:
Number of Trades: 429
Gross Return: 458.4 %
CAGR Return: 15.76 %
Max Drawdown: 6.37 %
Profit Factor (Expectancy): 2.804
Average Loss: 0.8 %
Average Win: 7.2 %
Average Time for Loss: 3 days
Average Time for Win: 16 days
5 Day:
Number of Trades: 69
Gross Return: 1614.9 %
CAGR Return: 26.7 %
Max Drawdown: 5.7 %
Profit Factor (Expectancy): 10.451
Average Loss: 3.64 %
Average Win: 81.17 %
Average Time for Loss: 15 days
Average Time for Win: 85 days
Analysis:
The strategy is typical amongst trend following strategies with a less regular win rate, but where profits are more significant than losses. Most of the losses are in sideways, low volatility markets. This strategy performs better on higher timeframes, where it shows a positive expectancy of the strategy.
The average win was positively impacted by Bitcoin’s earlier smaller market cap, as the percentage wins earlier were higher.
Overall the strategy shows potential for further development and may be suitable for walk-forward testing and out of sample analysis to be considered for a demo trading account.
Note in an actual trading setup, you may wish to use this with volatility filters, combined with support resistance zones for a better setup.
As always, this post/indicator/strategy is not financial advice, and please do your due diligence before trading this live.
Original indicator links:
On chart version -
Oscillator version -
Update - 27/06/2022
Unfortunately, It appears that the original script had been taken down due to auto-moderation because of concerns with no slippage / commission. I have since adjusted the backtest, and re-uploaded to include the following to address these concerns, and show that I am genuinely trying to give back to the community and not mislead anyone:
1) Include commission of 0.1% - to match Binance's maker fees prior to moving to a fee-less model.
2) Include slippage of 10 ticks (This is a realistic slippage figure from searching online for most crypto exchanges)
3) Adjust account balance to 10,000 - since most of us are not millionaires.
The rest of the backtesting parameters are comparable to previous results:
Backtesting parameters:
Initial capital: 10000 dollars
Position size: 10% of equity
Long stop: 2% below entry
Short stop: 2% above entry
Repainting: Off
Smoothing: SMA
Period: 10
Slippage: 10 ticks
Commission: 0.1%
This script still remains to shows viability / profitablity on higher term timeframes (with slightly higher drawdown), and I have included the backtest report below to document my findings:
8 Hour:
Number of Trades: 1082
Gross Return: 233.02%
CAGR Return: 14.04 %
Max Drawdown: 7.9 %
Win percentage: 25.6%
Profit Factor (Expectancy): 1.627
Average Loss: 0.46 %
Average Win: 2.18 %
Average Time for Loss: 1.33 day
Average Time for Win: 7.33 days
Once again, please do your own research and due dillegence before trading this live. This post is for education and information purposes only, and should not be taken as financial advice.
Multi Entry Signal Strategy by TradeSmartThis strategy is intended to test different entry signals. You can use 13 different entry signals in the strategy.
Available signals with all their settings:
Heikin Ashi
RSI + EMA
Wavetrend
MACD
Stochastic RSI
Squeeze Momentum
Kairi Relative Index
SSL
Supertrend
Parabolic SAR
Chandelier Exit
Directional Movement Index
Quantitative Qualitative Estimation
For exact rules of entries please relate to the tooltips of each entry signal. All the signals can be used together or separately in the strategy.
Additional settings that can be used:
Trend Filter (limit long or short entries based on a moving average of your choice)
Exit Strategy settings (ATR is used to determine stop loss and take profit levels)
Trailing Loss Setups (you can use 3 different types of trailing losses)
Setups (you can set Long and Short entries as well as the order size based on either Capital % or Risk %)
Date Range (you can limit trades to specific date ranges)
Trading Time (you can limit on which days to trade)
HARSI - The WHALE v2This strategy is credited to the "Heikin Ashi RSI Oscillator" By JayRogers.
The core of this strategy is "Heikin Ashi RSI Oscillator (HARSI)" By JayRogers, with multiple confirmation indicators. The buy signal is generated by HARSI when there is green HA, and there is a positive stochastic cross under the line OB line.
To confirm the buys signal, you can use one or all of the following:
- EMA: the buy confirmation is positive if the candle closes above the EMA.
- Volume Oscillator: the buy confirmation is positive if the volume value is above the zero line.
- ADX: the buy confirmation is positive if the D+ is above the D- and the D+ is above the threshold level.
- Vortex: the buy confirmation is positive if VI+ is above VI-.
You can enable the take profit, trailing stop loss (TSL), and stop lose (SL), if not, then the strategy will give a sell signal by itself when there is a negative stochastic cross above OB Extreme line.
Note, that the TSL arming value should be lower than the TSL %.
The strategy can give a different result based on your selection. However, the best timeframe is 4 hours without TP.
Heikin Ashi EMA v5 no repaint This script was inspired by the "Heikin/Kaufman Strategy" from marco valente built on v2.
The script was rebuilt on the v5 and most importantly removed the repaint function that was driving surrealistic backtesting inflated numbers.
This script is now fully functional and not repainting - At the time of testing worked efficiently 90% WR and 2x profit factor on CFD WTI OIL with a 15m time frame indexed on forex.com price.
You should utilize this script with caution, especially on high volatility cycles you can try plotting against a volatility relative index or stop.
I also strongly recommend understanding the fundamentals of WTI OIL to balance the indications of the strategy with fundamentals.
Thanks to Clovis Warlop and Nilesh Sharma for their contribution.
Cheers,
Gustavo Bramao
Heikin Ashi Candle Startegy for Long PositionThis strategy utilize Heikin-Ashi candlestick chart.
Heikin-Ashi technique is a Japanese candlestick-based technical trading tool that uses candlestick charts to represent and visualize market price data.
Heikin-Ashi candle is essentially taking an average of the movement.
There is a tendency with Heikin-Ashi for the candles to stay red during a downtrend and green during an uptrend.
This strategy only apply for long trading position.
The idea is trader will waiting 3 green candles for validation period (confirmation) before entering long position.
Different timeframe will result different result.
Number of validation period can be changed to see different result
This strategy has parameter for take profit percentage, trailing stop and stop loss.
User can set maximum active position to minimize risk and qty order.
This tool is useful for user who wants to backtest Heikin-Ashi trading strategy.
Script will emit alert when long position is opened and closed.
Warning of Backtesting
Backtesting is backward-looking. As the name implies, you are testing how something would have worked if you traded it perfectly in the past.
Past performance does not indicate future performance and you should not assume it does.
Backtesting assumes you never miss-fire, that you get in and out at the exactly perfect moment each time.
Backtesting assumes you have perfect liquidity, and your limit orders fill at a specific, pre-defined price every time (either the open, close, low, high, or some average of these).
Disclaimer
Do your own research and consider fundamental price of asset.
The indicators provided on this script is for educational purposes only.
Author does not offer advisory or brokerage services, nor does it recommend or advise users to buy or sell particular stocks or securities.
Please examined script and give feedback for further improvement.
Script are open to public, everyone see and clone source code or just apply to chart. Please make comment for improvement.
[TVExtBot]Heikinashi Upswing Strategy(30m&1h&2h)The Heikin-Ashi Upswing Strategy is a trend-following strategy suitable for short-term trading that utilizes Heikin-Ashi to follow an upward trend and realizes profits only in a rising market.
하이킨아시 업스윙 전략은 하이킨아시를 활용하여 상승하는 추세를 따라가며 상승장에서만 수익을 실현하는 단기매매에 적합한 추세추종 전략입니다.
* Buy Signal
The close price of the Heikin-Ashi candle was higher than the open price, and a golden cross occurred in the short-term EMA.
하이킨아시 캔들의 종가가 시가보다 크고 단기 EMA에 골든클로스가 발생.
* Sell Signal
The open price of the Heikin-Ashi candle is higher than the close price, the short-term EMA is dead cross, and overbought occurs.
하이킨아시 캔들의 시가가 종가보다 크고 단기 EMA가 데드클로스이고 과매수가 발생.
※Long만 사용가능한 전략입니다.(This is a strategy that only Long can use.)
Default Options(기본설정)
Short-Term Volatility (단기변동성) : 96 (※1)
Long-Term Volatility (장기변동성) : 97 (※1)
Take Profit (%) (익절) : 15%
Trailing Stop(%) (트레일링 스탑) : 10%
(※1) The lower the value, the more aggressive the buy.(값이 낮을수록 매수가 공격적입니다.)
Ichimoku + RSI Crypto trending strategyThis is a crypto trending strategy designed for big timeframes such as 3-4h+.
Its components are:
RSI
ICHIMOKU full pack
Heikin Ashi candles for logic calculation inside
Rules for entry.
For long : we have a long cross condition on ichimoku and price is above the ichimoku lines, and at the same time RSI value is > 50.
For long : we have a short cross condition on ichimoku and price is below the ichimoku lines, and at the same time RSI value is < 50.
Rules for exit
We exit whenever we receive an opposite signal of the initial entry.
SInce this strategy is using no risk management inside, I recommend to be careful with it .
If you have any questions, let me know !
Hi-Lo Channel StrategyHaven't seen a strategy quite like it. Buy when Heikin Ashi candle closes above a moving average that is sourced on highs - Sell when Heikin Ashi candle closes above a moving average that is sourced on lows. Moving average length should be between 5 and 20 ideally.
NOTE: the Heikin Ashi close values are calculated when the box is checkmarked. You do not need to view the chart with Heikin Ashi candles enabled on the chart. The buy and sell points of the strategy do not change whether or not you are viewing Heikin Ashi candles on the chart as long as the Heikin Ashi setting is enabled.
Heikin-Ashi candles strategy CRYPTO Long termThis is a simple and efficient trading strategies which relies entirely on Heikin ashi candles logic, but used with normal candles in order to avoid false signals.
For entry we have
Long condition : when we have a green candle and previous close was lower than the previous open(previous candle was red)
For short: when we have a short candle and previous cande was green.
For the better function of this strategy, is best to use big timeframes like 12h or 1day or even higher than that.
If you have any questions, please let me know !
Heatmap - Multi-Timeframe Indicators - StrategyHeatmap - Multi-Timeframe Indicators - Strategy
▪ Main features :
- 19 Timeframes: 1m, 3m, 5m, 10m, 15m, 30m, 45m, 1h, 2h, 3h, 4h, 5h, 6h, 8h, 10h, 12h, 1D, 1W, 1M
- 6 indicators per timeframe
- choose specific timeframes for indicators (example - 1 hour)
- or choose specific timeframe ranges (example - 1 hour to 1 month)
The general idea is that the higher timeframe signals are stronger than the lower timeframe ones.
When a trend is starting, it is first visible on the lower timeframes.
The more time passes, the more the trend propagates through higher timeframes.
The default settings are meant to show all the available features. You may fine-tune it to your specific needs.
How to choose the timeframe for the chart : use the lowest of the choosen timeframes for indicators.
If the heatmap doesn't display correctly on your device, you may check the Heatmap Theme 🎨 setting.
It doesn't repaint.
"Repaint" version available though - good to check the past history, but very bad for real-time analysis.
▪ Indicators used for trend detection
1. MACD Cross
2. Stochastic Cross
3. Stochastic Cross and Overbought or Oversold
4. Moving Average
5. Parabolic SAR
6. Heikin Ashi
▪ Find the best Heatmap settings with the Strategy Tester version.
The signals generated by the Heatmap are considered to be valid at the bar open .
The Strategy Tester, however, uses the bar close in its calculations.
Therefore, the results may seem to be worse than they can be.
The Profitability, Profit Factor and other stats should be taken into consideration relatively to other configurations of the same Heatmap.
▪ Using a score system to consider a change in trend valid.
Example: consider the signal valid if 65% or more of all indicators (max 6) among all timeframes (max 19) hint at a change in trend.
The % percent value can be inserted in settings.
When using the default settings or when all timeframes and indicators are activated,
the ratio of 100% downtrend or 100% uptrend may be less occuring. Adjust accordingly.
The signals across timeframes and indicators are aggregated to show simple entry and exit signals.
▪ Combined Alerts, to be set to fire once per bar open :
0 - 📈 Long! - Heatmap - Multi-TFI
0 - 📈 Short! - Heatmap - Multi-TFI
0 - 📈 Long Exit! - Heatmap - Multi-TFI
0 - 📈 Short Exit! - Heatmap - Multi-TFI
1 *** BUY or SELL (single alert) ***
1 *** Entries or Exits (single alert) ***
▪ Note : The initial load may be slow. If something doesn't seem to work, you can try the following:
- wait more time for it to load
- hide & show or remove & add back to chart
- don't add the indicator to chart multiple times in a short amount of time, as you may be rate limited
▪ Related Studies :
- Heatmap - Multi-Timeframe Indicators - Alerts
- Risk Management System (Stop Loss, Take Profit, Trailing Stop Loss, Trailing Take Profit) - it can be connected to Heatmap - Multi-Timeframe Indicators - Alerts
▪ Layout example:
Heikin-Ashi MACD"Heikin-Ashi, also sometimes spelled Heiken-Ashi, means "average bar" in Japanese. The Heikin-Ashi technique can be used in conjunction with candlestick charts when trading securities to spot market trends and predict future prices. It's useful for making candlestick charts more readable and trends easier to analyze. For example, traders can use Heikin-Ashi charts to know when to stay in trades while a trend persists but get out when the trend pauses or reverses. Most profits are generated when markets are trending, so predicting trends correctly is necessary."
HA bars help us to smooth the price action, and I think MACD gives me a lot of signals and I need to eliminate them and add MACD strategy on Heiken-Ashi candles to look performance.
Mostly, it eliminates %75 of the signals, and most of the time it did increase backtest performance significantly.
There is still a way to it to combine other indicators for complete strategy, but at least We can achieve better MACD with this approach.
HEINKI ASHI SUPERTRENDHi friends....publishing Heikin ashi supertrend strategy... which shows the movement of price over time and how strong those movements are/will be, regardless of the direction the price moves, up, or down. Indicator specifically useful, as it helps traders and analysts spot points where the market can and will reverse by providing signals long (buy) and short (sell). Show the relative strength of price movements but leave out the directionality of the price movements, best utilized in combination with other technical indicators – such as trend lines and moving averages – which show price trends and directions. Having an alert feature to make aware market players from signals provided by strategy.
HA charts are a great way to help those who can be spooked by the chaos of the markets (I'm one!), but they have a big drawback in that the price you see on a HA candle is often significantly different from the real price that you would trade on. This brings issues of unrealistic expectations of profits/losses, and also makes back testing a strategy very difficult. I still wouldn't recommend ever using TradingView's "strategy" tool when using HA charts, but using this indicator you can do accurate back tests.
***************This uses Heikin Ashi Candles as source on normal chart..dont use it on heikin ashi chart*****************************
There is an option for use normal japanes candle supertrend..so we can compare how this heikin ashi prevent false trades.
some tips for new traders to become successful trader
1: always follow risk management...
2: every stock/ forex / crypto has it own cycle.. So pls dont jump from one stock / forex pair to another when u hear some stock / crypto has
made new high or low... Bcs after that consolidation period starts.. During consolidation we can not make more profit as in trending market.. So be patient when u had made some position or tarde in one stock/ pair...
3 : we dont require to trade in every stocks / forex/crypto.. Just one stock and pair trading daily make u profitable beyond ur expection.. Bcs
trading in one stock / forex pair.. make u very comfortable and u may always know its movement... And u also trade in every cycle of this
stock/ pair.. So u also trdae its trend days which made highest profit. We dont know when is trend of any stock... Compare with it
business... Trading is business not one day rich game... Its business... It takes time and u have to do same thing agian and again to become
sucessfull trader for this u can use tradingview alerts. .for that u dont need to seat infrot of ur terminal screen.. u can also do algo trading
by using tradingview alerts
4 : By following risk management and incerase lot size as profit increased... This is the key 🔑 of sucess in stocks / forex / crypto market.
I thinks this tips may help new trader. U can modified according to ur trading style..
You can personal message me if u want to use this strategy
******************if u want to use this indicator u can personal message me********************************************************
Heiken Ashi MTF Strategy- IndicatorHello, this is both a strategy and indicator that revolves around Heikin Ashi candles.
In this case we take 3 different time frames, in this example we use daily , weekly and monthly.
The conditions for entry are :
For long : we check that we have a green daily candle, at the same time we check that the weekly and monthly candles are also green.
For short : We check that all candles, daily, weekly and monthly and red.
For exit of long : as soon as 1 of the 3 candles, daily or weekly or monthly converts to red, we exit.
For exit of short : as soon as 1 of the 3 candles converts to green, we exit.
This strategy- indicator can be adapted to any type of market.
CRYPTO HA Strategy money maker long termToday I bring you another amazing strategy.
Its made of 2 EMA in this case 50 and 100.
At the same time, internaly for candles we calculate the candles using the HA system ( while still using in live the normal candles). This way we can assure that even if we use HA candles, we avoid repainting, and its legit.
We first calculate the HA candles based on the EMA 50 values, and after that , we use that candle properties to apply to EMA 100.
Once we have that, for entries we have the next conditions :
sell = o2 > c2 and o2 < c2 and time_cond
buy = o2 < c2 and o2 > c2 and time_cond
For sell : Our open from HA 100 is bigger than Close from ha 100, and the previous open is smaller than previous close
For long : Our open from ha 100 is smaller than close from ha 100 and the previous open is bigger than previous close.
Then we have 2 options :
If we wnat to go only long , which is my prefered version ,or the original one where we go both long and short.
I found that the best results are in general around bigger timeframes, 1h+ , 3h works the best so far on my tests.
For exit we have 2 versions :
1 lets say we had a long signal, as soon as we have a short signal we close the trade. Viceversa for short.
2. Is based on price % movement. In this case I use 7.5% price movement of asset.
We have no TP in use for this system.
For the purpose of this test I use 10.000 $ account. For test I use 100% of it, without any leverage.
I use the SL based on price movement , which is a very risky tool, since it can fluctuate even at 20-30% of our capital.
For comission I used 0.1% for each deal, and a slippage of 5 points.
Be cautious with this system !
If you have any questions , message me.
QuantNomad - Heikin-Ashi PSAR StrategyContinue experimenting with different combinations of strategies.
Here is the PSAR Strategy calculated based on HA candles. HA is already calculated inside the script, do not apply it to HA candles.
Strategy is calculated based on 25% equity invested with 0.1% commission.
####################
Disclaimer
Please remember that past performance may not be indicative of future results.
Due to various factors, including changing market conditions, the strategy may no longer perform as good as in historical backtesting.
This post and the script don’t provide any financial advice.
Trend trader StrategyFirst I would like to thank to @JustUncleL since this strategy started from one of his scalper strategies
This strategy can be adapted to all time charts .
First it has the session where we want to trade, for this example I choosed the EURUSD so I only take in consideration london/neywork session.
Its made from 3 EMA :
normal
slow
ultra slow
It has has the capacity to use HA candles into consideration if its needed.
At the same time we have a price channel made from faster MAs, that act like a bollinger band .
Together with all of them, we establish which trend we have if its uptrend or downtrend
Then we check the candles if they are below or above the MA , and based on the condition if they crossed recently we can suggest if its a buy or a long condition
At the same time we have 2 options of stop conditions:
Through a trailing stop made from ATR or % based
And second, a SL/TP made from pip points or % based.
For this example I used % based.
Let me know what you think about it, and if you found some nice settings for it. So far I only adapted to EURUSD 1 min time.
Heikin Ashi ScriptThis is a backtested Heikin-Ashi candles color change strategy.
You have to use this strategy on normal candles and not Heikin-Ashi!!!
Why normal candles? :- Because if you'll apply this strategy on Heikin Ashi candles then your backtesting won't be valid.
Here's how to use it.
Go LONG in case of ALL of the condition matches:-
1) When Buy arrow appeared under the last daily candle.
2) Candle background color should be green.
3) When the MA line changes the color from red to green.
Go SHORT in case of ALL of the condition matches:-
1) When Sell arrow appeared above the last daily candle.
2) Candle background color should be red.
3) When the MA line changes the color from green to red.
This strategy work in all the asset and all the timeframe.
Happy Trading!!!
Heikin ashi power (lirshah)Heikin Ashi power strategy has been written based on the heikin ashi candles movement.
the strategy is composed from two different line, bullish candle line and bearish candle line.
the bullish line is a representative of bull power which is directly related to number of positive candles and also power of candles.
so the more positive candles and the more upward trends causes the powerful bullish line and conducted to an extreme level.
the strategy trigger buy signals when bullish line passes the extreme and similar scenario for selling signals.
this strategy has very good results on 5 Sec , 5 min and 15 min time frames.
also it can be applied to variety of markets, crypto, indices , cfd and futures.
the standard parameters are as below:
period:200
internal smooth: 5
external smooth: 10
extreme level: 1
take profit
stop-loss
below overview is results of XBTUSD on 5 min chart, with 1 contract trade and 0.075% commission per trade.
in order to access scripts contact me directly.
Backtesting on Non-Standard Charts: Caution! - PineCoders FAQMuch confusion exists in the TradingView community about backtesting on non-standard charts. This script tries to shed some light on the subject in the hope that traders make better use of those chart types.
Non-standard charts are:
Heikin Ashi (HA)
Renko
Kagi
Point & Figure
Range
These chart types are called non-standard because they all transform market prices into synthetic views of price action. Some focus on price movement and disregard time. Others like HA use the same division of bars into fixed time intervals but calculate artificial open, high, low and close (OHLC) values.
Non-standard chart types can provide traders with alternative ways of interpreting price action, but they are not designed to test strategies or run automated traded systems where results depend on the ability to enter and exit trades at precise price levels at specific times, whether orders are issued manually or algorithmically. Ironically, the same characteristics that make non-standard chart types interesting from an analytical point of view also make them ill-suited to trade execution. Why? Because of the dislocation that a synthetic view of price action creates between its non-standard chart prices and real market prices at any given point in time. Switching from a non-standard chart price point into the market always entails a translation of time/price dimensions that results in uncertainty—and uncertainty concerning the level or the time at which orders are executed is detrimental to all strategies.
The delta between the chart’s price when an order is issued (which is assumed to be the expected price) and the price at which that order is filled is called slippage . When working from normal chart types, slippage can be caused by one or more of the following conditions:
• Time delay between order submission and execution. During this delay the market may move normally or be subject to large orders from other traders that will cause large moves of the bid/ask levels.
• Lack of bids for a market sell or lack of asks for a market buy at the current price level.
• Spread taken by middlemen in the order execution process.
• Any other event that changes the expected fill price.
When a market order is submitted, matching engines attempt to fill at the best possible price at the exchange. TradingView strategies usually fill market orders at the opening price of the next candle. A non-standard chart type can produce misleading results because the open of the next candle may or may not correspond to the real market price at that time. This creates artificial and often beneficial slippage that would not exist on standard charts.
Consider an HA chart. The open for each candle is the average of the previous HA bar’s open and close prices. The open of the HA candle is a synthetic value, but the real market open at the time the new HA candle begins on the chart is the unrelated, regular open at the chart interval. The HA open will often be lower on long entries and higher on short entries, resulting in unrealistically advantageous fills.
Another example is a Renko chart. A Renko chart is a type of chart that only measures price movement. The purpose of a Renko chart is to cluster price action into regular intervals, which consequently removes the time element. Because Trading View does not provide tick data as a price source, it relies on chart interval close values to construct Renko bricks. As a consequence, a new brick is constructed only when the interval close penetrates one or more brick thresholds. When a new brick starts on the chart, it is because the previous interval’s close was above or below the next brick threshold. The open price of the next brick will likely not represent the current price at the time this new brick begins, so correctly simulating an order is impossible.
Some traders have argued with us that backtesting and trading off HA charts and other non-standard charts is useful, and so we have written this script to show traders what happens when order fills from backtesting on non-standard charts are compared to real-world fills at market prices.
Let’s review how TV backtesting works. TV backtesting uses a broker emulator to execute orders. When an order is executed by the broker emulator on historical bars, the price used for the fill is either the close of the order’s submission bar or, more often, the open of the next. The broker emulator only has access to the chart’s prices, and so it uses those prices to fill orders. When backtesting is run on a non-standard chart type, orders are filled at non-standard prices, and so backtesting results are non-standard—i.e., as unrealistic as the prices appearing on non-standard charts. This is not a bug; where else is the broker emulator going to fetch prices than from the chart?
This script is a strategy that you can run on either standard or non-standard chart types. It is meant to help traders understand the differences between backtests run on both types of charts. For every backtest, a label at the end of the chart shows two global net profit results for the strategy:
• The net profits (in currency) calculated by TV backtesting with orders filled at the chart’s prices.
• The net profits (in currency) calculated from the same orders, but filled at market prices (fetched through security() calls from the underlying real market prices) instead of the chart’s prices.
If you run the script on a non-standard chart, the top result in the label will be the result you would normally get from the TV backtesting results window. The bottom result will show you a more realistic result because it is calculated from real market fills.
If you run the script on a normal chart type (bars, candles, hollow candles, line, area or baseline) you will see the same result for both net profit numbers since both are run on the same real market prices. You will sometimes see slight discrepancies due to occasional differences between chart prices and the corresponding information fetched through security() calls.
Features
• Results shown in the Data Window (third icon from the top right of your chart) are:
— Cumulative results
— For each order execution bar on the chart, the chart and market previous and current fills, and the trade results calculated from both chart and market fills.
• You can choose between 2 different strategies, both elementary.
• You can use HA prices for the calculations determining entry/exit conditions. You can use this to see how a strategy calculated from HA values can run on a normal chart. You will notice that such strategies will not produce the same results as the real market results generated from HA charts. This is due to the different environment backtesting is running on where for example, position sizes for entries on the same bar will be calculated differently because HA and standard chart close prices differ.
• You can choose repainting/non-repainting signals.
• You can show MAs, entry/exit markers and market fill levels.
• You can show candles built from the underlying market prices.
• You can color the background for occurrences where an order is filled at a different real market price than the chart’s price.
Notes
• On some non-standard chart types you will not obtain any results. This is sometimes due to how certain types of non-standard types work, and sometimes because the script will not emit orders if no underlying market information is detected.
• The script illustrates how those who want to use HA values to calculate conditions can do so from a standard chart. They will then be getting orders emitted on HA conditions but filled at more realistic prices because their strategy can run on a standard chart.
• On some non-standard chart types you will see market results surpass chart results. While this may seem interesting, our way of looking at it is that it points to how unreliable non-standard chart backtesting is, and why it should be avoided.
• In order not to extend an already long description, we do not discuss the particulars of executing orders on the realtime bar when using non-standard charts. Unless you understand the minute details of what’s going on in the realtime bar on a particular non-standard chart type, we recommend staying away from this.
• Some traders ask us: Why does TradingView allow backtesting on non-standard chart types if it produces unrealistic results? That’s somewhat like asking a hammer manufacturer why it makes hammers if hammers can hurt you. We believe it’s a trader’s responsibility to understand the tools he is using.
Takeaways
• Non-standard charts are not bad per se, but they can be badly used.
• TV backtesting on non-standard charts is not broken and doesn’t require fixing. Traders asking for a fix are in dire need of learning more about trading. We recommend they stop trading until they understand why.
• Stay away from—even better, report—any vendor presenting you with strategies running on non-standard charts and implying they are showing reliable results.
• If you don’t understand everything we discussed, don’t use non-standard charts at all.
• Study carefully how non-standard charts are built and the inevitable compromises used in calculating them so you can understand their limitations.
Thanks to @allanster and @mortdiggiddy for their help in editing this description.
Look first. Then leap.
HeikinAshi_Atr_StrategyThis strategy combines HeikinAshi and ATR, have better performance on 5min XBTUSD pair after parameter optimization.
Different from the original HeikinAshi chart provided by Tradingview (which is Repainting ), this script does not use the HeikinAshi SECURITY function so there is no Repainting!
Try it by yourself !!