TradingView
nioboi
22 Apr 2024 pukul 16.11

Fibonacci Trend Reversal Strategy 

WIFUSDT Perpetual ContractBybit

Deskripsi

Introduction
This publication introduces the "Fibonacci Retracement Trend Reversal Strategy," tailored for traders aiming to leverage shifts in market momentum through advanced trend analysis and risk management techniques. This strategy is designed to pinpoint potential reversal points, optimizing trading opportunities.

Overview
The strategy leverages Fibonacci retracement levels derived from @IMBA_TRADER's [Imba]lance Algo to identify potential trend reversals. It's further enhanced by a method called "Trend Strength Over Time" (TSOT) (by @federalTacos5392b), which utilizes percentile rankings of price action to measure trend strength. This also has implemented Dynamic SL finder by utilizing @veryfid's ATR Stoploss Finder which works pretty well

Indicators:
  1. Fibonacci Retracement Levels: Identifies critical reversal zones at 23.6%, 50%, and 78.6% levels.
  2. TSOT (Trend Strength Over Time): Employs percentile rankings across various timeframes to gauge the strength and direction of trends, aiding in the confirmation of Fibonacci-based signals.
  3. ATR (Average True Range): Implements dynamic stop-loss settings for both long and short positions, enhancing trade security.


Strategy Settings:
- Sensitivity: Set default at 18, adjustable for more frequent or sparse signals based on market volatility.
- ATR Stop Loss Finder: Multiplier set at 3.5, applying the ATR value to determine stop losses dynamically.
- ATR Length: Default set to 14 with RMA smoothing.
- TSOT Settings: Hard-coded to identify percentile ranks, with no user-adjustable inputs due to its intrinsic calculation method.

Trade Direction Options: Configurable to support long, short, or both directions, adaptable to the trader's market assessment.

Entry Conditions:
- Long Entry: Triggered when the price surpasses the mid Fibonacci level (50%) with a bullish TSOT signal.
- Short Entry: Activated when the price falls below the mid Fibonacci level with a bearish TSOT indication.

Exit Conditions:
- Employs ATR-based dynamic stop losses, calibrated according to current market volatility, ensuring effective risk management.

Strategy Execution:
- Risk Management: Features adjustable risk-reward settings and enables partial take profits by default to systematically secure gains.
- Position Reversal: Includes an option to reverse positions based on new TSOT signals, improving the strategy's responsiveness to evolving market conditions.

The strategy is optimized for the BYBIT:WIFUSDT.P market on a scalping (5-minute) timeframe, using the default settings outlined above.

I spent a lot of time creating the dynamic exit strategies for partially taking profits and reversing positions so please make use of those and feel free to adjust the settings, tool tips are also provided.

For Developers: this is published as open-sourced code so that developers can learn something especially on dynamic exits and partial take profits!

Good Luck!

Disclaimer
This strategy is shared for educational purposes and must be thoroughly tested under diverse market conditions. Past performance does not guarantee future results. Traders are advised to integrate this strategy with other analytical tools and tailor it to specific market scenarios. I was only sharing what I've crafted while strategizing over a Solana Meme Coin.

Catatan Rilis

Change Notes:
  • Added credits to the open source code

  • Added pretty visual fills for the dynamic strategy on SLs and TPs so it can easily be tracked


Note you can allways turn the visuals on or off from the style tab/section of the indicator

For a clean chart, I recommend turning the ATR Long stop Loss and ATR Short Stop Loss to OFF since it's already plotted by the entry visuals, but for refrence you can always turn it back on.

Also, feel free to customize the colors, lines, background, to your preference.

Catatan Rilis

Updates:
  • Enhanced default ATR SL colors

  • Fixed BG and Plots of Entries

Catatan Rilis

Update Notes:
  • It now does execute TP 1 and TP 2 for partial take profits


Unfortunately, Pinescript is a still bit buggy and limited when handling stoploss and adjusting stoploss for it to b executed at market order and we will still keep the closing of SL and Break Evens with our current method, (at least our TPs are now securely exiting exacly)
Komentar
AbuFragile
Great work !
I just have a question regarding the exits, if it exits after close, is there a risk of big loss during high price volatility ? and is it possible to trigger the exits once the price reaches the exit price in real time ? because it can reach the take profit and then goes the other way and becomes a loss, right ?
nioboi
@AbuFragile, You are correct yes there is a risk, but it's also why it's optimized for lower timeframes since the volatility of price can only move "so much" within a single bar on lower timeframes so the difference in target and close are (for me) within an acceptable range.

Unfortunately, that's one limitation pinescript has, (and I spent so much time working on)
so the way I did it is checking for high and low of the candle so that if it "touched" the candle, it will exit upon close.

However, that only happens when the partial take profit setting is set to true. if it's turned off, the strategy will exit normally depending on the risk reward ratio and will exit instantaneously once it reached stops and targets.
nioboi
@AbuFragile, Yo, I updated it so that it exits without waiting for close but only applicable for the take profits, see the recent update notes! Cheers!
nioboi
If you want it to be just an indicator, turn off trades on chart on the below in the style tab
- Trades on Chart
- ATR Long Stop Loss
- ATR Short Stop Loss
- Long and Short Markers and BG Fills :)
Faith_and_Focus
Does it fire off alerts for every type of move?
nioboi
@Faith_and_Focus, If you create an alert on the strategy, then it will alert every entry and exits
SaVagePanda36
Hi, good job, i used [IMBA] Algo indicator too, can you add fixed TP/SL?
nioboi
@SaVagePanda36, Hi, what needs to be fixed specifically?
SaVagePanda36
@nioboi, add the option to select ATR SL/fixed SL and add the option to select TP as a percentage, I think there will be more space to get more benefits
nioboi
Feel free to comment out your desired changes if there's any.
Lebih lanjut