Type/to search

Fibonacci Retracement Dynamic Stop Loss Strategy

Cryptocurrency
Created: 2024-02-06 14:33:06
Last modified: 2 years ago
1
Follow
1782
Followers

img

Overview

This strategy utilizes the Fibonacci retracement levels to automatically set stop loss and take profit prices for position management. It allows to ride trends for greater profits while mitigating losses during consolidation.

Strategy Logic

The core of this strategy relies on the Fibonacci retracement indicator to determine key support and resistance levels. It tracks the recent highs and lows to plot 10 Fibonacci price zones. Based on configuration, one of the Fibonacci levels is chosen as the entry trigger. When price breaks above that level, a long order will be placed based on the configured leverage. At the same time, a take profit price is set at certain percentage above the entry price.

After entry, the strategy keeps tracking the updated Fibonacci levels. If a lower Fib level emerges, indicating potential reversal, the strategy will cancel existing orders and re-place orders at the lower price as a stop loss mechanism. When the price eventually breaks above the take profit price, the position will be closed for profit.

Advantages

The biggest advantage of this strategy is the ability to dynamically adjust stop loss and take profit prices for trending markets. Key traits:

  1. Capture greater profits in trending conditions by trailing stops based on entry price.

  2. Mitigate losses in consolidation by stopping out at emerging lower Fib levels.

  3. Allow pyramiding by adding to position when price drops certain percentage from last entry price.

  4. Simple to operate with automatic order placement once configured correctly.

Risks

There are still some risks to be aware of:

  1. Prone to repeated stops during sideways markets, increasing fees.

  2. No fixed stop loss mechanism, risks large drawdowns.

  3. Uncapped pyramiding might exacerbate losses.

Corresponding solutions:

  1. Pause trading when price oscillating in range.

  2. Manually overseer markets and close positions if necessary.

  3. Set limits on pyramiding orders.

Enhancement Opportunities

There remains ample room for optimization:

  1. Add additional indicators like EMA, MACD for extra entry confirmation to avoid false breakouts.

  2. Incorporate fixed/trailing stop loss mechanisms to limit losses in extreme conditions.

  3. Refine pyramiding logic based on market regimes to prevent over-leveraging.

  4. Employ machine learning models like LSTM to forecast price and identify better entry/exits.

Conclusion

In summary, this strategy is suitable for trend-fading scenarios. By constantly adjusting stops it allows riding trends effectively. Proper optimizations and guard rails are needed handling more tricky market conditions.

Source
Pine
/*backtest
start: 2024-01-06 00:00:00
end: 2024-02-05 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © CryptoRox

//@version=4
Strategy parameters
Strategy parameters
Live
Start Timestamp
Start Delay
Leverage
Take Profit %
DCA when < %
Entry Level
Pivot Length
Comment
All comments (0)
No data
No data
  • 1
iPhone Download
Forums
PINE Language
© 2015 - ∞ INVENTOR PTE LTD (SG)