Yesterday’s High Breakout it is a trading system based on the analysis of yesterday's highs, it works in trend-following mode therefore it opens a long position at the breakout of yesterday's highs even if they occur several times in one day.
There are several methods for exiting a trade, each with its own unique strategy. The first method involves setting Take-Profit and Stop-Loss percentages, while the second utilizes a trailing-stop with a specified offset value. The third method calls for a conditional exit when the candle closes below a reference EMA. Additionally, operational filters can be applied based on the volatility of the currency pair, such as calculating the percentage change from the opening or incorporating a gap to the previous day's high levels. These filters help to anticipate or delay entry into the market, mitigating the risk of false breakouts. In the specific case of INJ, a 12% Take-Profit and a 1.5% Stop-Loss were set, with an activated trailing-stop percentage, TRL 1 and OFF 0.5.
To postpone entry and avoid false breakouts, a 1% gap was added to the price of yesterday's highs.
Name: Yesterday's High Breakout - Trend Follower Strategy
Category: Trend Follower, Breakout of Yesterday's High.
Operating mode: Spot or Futures (only long).
Trade duration: Intraday.
Timeframe: 30M, 1H, 2H, 4H
Market: Crypto
Suggested usage: Short-term trading, when the market is in trend and it is showing high volatility.
Entry: When there is a breakout of Yesterday's High.
Exit: Profit target or Trailing stop, Stop loss or Crossunder EMA.
Configuration: - Gap to anticipate or postpone the entry before or after the identified level - Rate of Change for Entry Condition - Take Profit, Stop Loss and Trailing Stop - EMA length
Backtesting: ⁃ Exchange: BINANCE ⁃ Pair: INJUSDT ⁃ Timeframe: 4H - Treshold: 1 - Gap%: 1 - SL: 1.5 - TP:12 - TRL: 1 - OFF-TRL: 0.5 ⁃ Fee: 0.075% ⁃ Slippage: 1 - Initial Capital: 10000 USDT - Position sizing: 10% of Equity - Start : 2018-07-26 (Out Of Sample from 2022-12-23) - Bar magnifier: on
Credits: LucF for Pine Coders (f_security function to avoid repainting using security)
Disclaimer: Risk Management is crucial, so adjust stop loss to your comfort level. A tight stop loss can help minimise potential losses. Use at your own risk.
How you or we can improve? Source code is open so share your ideas! Leave a comment and smash the boost button!
Thanks for your attention, happy to support the TradingView community.
@reteid2222, i cant delete comments, contact trading view help desk. Have nice day!
jeffrey7381
⋅
Thank you for sharing us the code. The code is great by the way. I had backtested the code. I found the code only best for backtesting only. I found the way it open an order and close an order have serious issues. I saw when the current bar is close, it open an order or close an order on the previous bar not at current bar. I hope we can solve the problem so that we can use the code in real trade but not just backtesting.
tumiza999
⋅
@jeffrey7381, If you want to use this strategy, you can only use it on an intraday timeframe.
@reteid2222, of course!! This is a simple strategy without important filters; the ultimate version is a work in progress! ;-)
Bias sometimes improves performance, especially in forex and stock markets.
RSI or Stochastic are very important tools that may improve performance, but in the Crypto market, I focus on the first hours of the daily session. The code is open, I am very curious to see your version. Thank you, and have a nice day! ;-)