Fibonacci-Only StrategyFibonacci-Only Strategy
This script is a custom trading strategy designed for traders who leverage Fibonacci retracement levels to identify potential trade entries and exits. The strategy is versatile, allowing users to trade across multiple timeframes, with built-in options for dynamic stop loss, trailing stops, and take profit levels.
Key Features:
Custom Fibonacci Levels:
This strategy calculates three specific Fibonacci retracement levels: 19%, 82.56%, and the reverse 19% level. These levels are used to identify potential areas of support and resistance where price reversals or breaks might occur.
The Fibonacci levels are calculated based on the highest and lowest prices within a 100-bar period, making them dynamic and responsive to recent market conditions.
Dynamic Entry Conditions:
Touch Entry: The script enters long or short positions when the price touches specific Fibonacci levels and confirms the move with a bullish (for long) or bearish (for short) candle.
Break Entry (Optional): If the "Use Break Strategy" option is enabled, the script can also enter positions when the price breaks through Fibonacci levels, providing more aggressive entry opportunities.
Stop Loss Management:
The script offers flexible stop loss settings. Users can choose between a fixed percentage stop loss or an ATR-based stop loss, which adjusts based on market volatility.
The ATR (Average True Range) stop loss is multiplied by a user-defined factor, allowing for tailored risk management based on market conditions.
Trailing Stop Mechanism:
The script includes an optional trailing stop feature, which adjusts the stop loss level as the market moves in favor of the trade. This helps lock in profits while allowing the trade to run if the trend continues.
The trailing stop is calculated as a percentage of the difference between the entry price and the current market price.
Multiple Take Profit Levels:
The strategy calculates seven take profit levels, each at incremental percentages above (for long trades) or below (for short trades) the entry price. This allows for gradual profit-taking as the market moves in the trade's favor.
Each take profit level can be customized in terms of the percentage of the position to be closed, providing precise control over exit strategies.
Strategy Backtesting and Results:
Realistic Backtesting:
The script has been backtested with realistic account sizes, commission rates, and slippage settings to ensure that the results are applicable to actual trading scenarios.
The backtesting covers various timeframes and markets to ensure the strategy's robustness across different trading environments.
Default Settings:
The script is published with default settings that have been optimized for general use. These settings include a 15-minute timeframe, a 1.0% stop loss, a 2.0 ATR multiplier for stop loss, and a 1.5% trailing stop.
Users can adjust these settings to better fit their specific trading style or the market they are trading.
How It Works:
Long Entry Conditions:
The strategy enters a long position when the price touches the 19% Fibonacci level (from high to low) or the reverse 19% level (from low to high) and confirms the move with a bullish candle.
If the "Use Break Strategy" option is enabled, the script will also enter a long position when the price breaks below the 19% Fibonacci level and then moves back up, confirming the break with a bullish candle.
Short Entry Conditions:
The strategy enters a short position when the price touches the 82.56% Fibonacci level and confirms the move with a bearish candle.
If the "Use Break Strategy" option is enabled, the script will also enter a short position when the price breaks above the 82.56% Fibonacci level and then moves back down, confirming the break with a bearish candle.
Stop Loss and Take Profit Logic:
The stop loss for each trade is calculated based on the selected method (fixed percentage or ATR-based). The strategy then manages the trade by either trailing the stop or taking profit at predefined levels.
The take profit levels are set at increments of 0.5% above or below the entry price, depending on whether the position is long or short. The script gradually exits the trade as these levels are hit, securing profits while minimizing risk.
Usage:
For Fibonacci Traders:
This script is ideal for traders who rely on Fibonacci retracement levels to find potential trade entries and exits. The script automates the process, allowing traders to focus on market analysis and decision-making.
For Trend and Swing Traders:
The strategy's flexibility in handling both touch and break entries makes it suitable for trend-following and swing trading strategies. The multiple take profit levels allow traders to capture profits in trending markets while managing risk.
Important Notes:
Originality: This script uniquely combines Fibonacci retracement levels with dynamic stop loss management and multiple take profit levels. It is not just a combination of existing indicators but a thoughtful integration designed to enhance trading performance.
Disclaimer: Trading involves risk, and it is crucial to test this script in a demo account or through backtesting before applying it to live trading. Users should ensure that the settings align with their individual risk tolerance and trading strategy.
Swing-trading
Swing Algo V1.4◆ Introduction
The latest version of the Swing Algo features a complementary system consisting of two internal swing trading logics: an enhanced Swing Algo V1.3 and a secondary control engine to stabilize the overall strategy behaviour in times of increased market chop. Both algorithms feature different averaging lines as well as oscillators, leading to a higher strategy diversification for swing trading as well as a reduced maximum drawdown in comparison to each stand-alone strategy.
While the Swing Algo V1.x series so far featured a single trend-following swing algorithm for each release, where one just switches between Long and Short trades based on one general logic, here two strategies, which act independently of each other, are applied. Due to this, we introduce a third position a trader can be in: the Hedge. The overall logic is as follows:
When both sub-logics are Long, the overall strategy is Long.
When both sub-logics are Short, the overall strategy is Short.
When one sub-logic is Long and the other is Short, the overall strategy is in a Hedge position. It doesn't matter which component is Short and which is Long.
As PineScript doesn't currently offer a real steady hedging-function for two competing swing trading sub-logics (in the sense of a continuously applied Hedge state after hedging conditions are met at least once for an entry), a workaround via position closes was created for this release. For each new internal sub-signal, the overall strategy changes its state (Long/Short/Hedge) visibly on the chart, and the trader can adjust their position accordingly.
For detailed differences to previous Swing Algo V1.x releases, see further below.
◆ Purpose of this Script
This indicator will give Long, Short and Hedge signals on the chart that can be used for e.g. swing trading. Each of the aforementioned sub-logics uses a combination of several (custom) functions and rules to find good entry points for trend trading. After many iterations and tests I came up with this particular setup, which is highly optimized for the ETH/USD trading pair on the daily (D) timeframe.
Attention was also paid to stability, as all parameters are set onto plateaus, so that smaller changes in the characteristic price action should not affect the efficiancy too much, done as an attempt to reduce overfitting as much as possible. Additionally this dual algorithm system is specifically designed to have a safety net: should for the unlikely scenario one swing trading algorithm not trigger at a certain mid-term reversal point, the probability is high that the other will trigger, resulting in an overall hedged position (so that no money is lost in the meantime) until the first algorithm can rejoin at the next mid-term trend change.
For other assets and/or timeframes it is in principle possible to change algorithmic parameters within the indicator settings to tune the swing algorithms, though it is strongly recommended to use the standard asset and timeframe mentioned above.
◆ Viability
For the here presented backtest data, we omitted the biggest portion of the cryptocurrency bullrun in 2017 (starting only at 1st July 2017) so that the results become more realistic for long-term swing traders (investing at least 2-4 years into trading) if such large runs do not happen again. As cryptocurrencies like Ethereum are still to this date capable of doing comparatively smaller runs of about 2-3x in a few weeks/months during accumulation phases (as witnessed e.g. in 2020 and more recently in 2023) and bigger runs during bullmarkets (as witnessed in 2021), the quality of the shown results is still realistic for long-term trend trading efforts over several years, Note that very conservative trading parameters as mentioned below in "Forwardtesting and Backtesting" are used here.
Generally do not expect results in a matter of days or weeks, and of course as with any trading strategy past performances are not indicative of future results.
◆ Forwardtesting and Backtesting
The individual components have been back- and partially forwardtested: The first sub-logic is an advancement of Swing Algo V1.3, with which we have extensive experience running back to October 2020 for its release, while the secondary control strategy, which was privately published for DeanTrader members as a stand-alone script on TradingView in June 2022 and was running in the background since then, is showing good & expected behaviour so far.
While this does not mean that fowardtesting was performed specifically for the combined Swing Algo V1.4 system we have now (which cannot be done realistically considering the timeframes used, i.e. months and especially years), we can at least look at some considerable experience with the individual components. Then again, as I have implemented an exact hedging-function so that both sub-algorithms run independently from each other, it is not likely to see any unexpected behaviour resulting purely from the combination into one script.
For strategy backtesting you can choose the backtest time interval to test the performance of this algorithm for different time windows and different trading pairs. Here various backtesting parameters (e.g. trading fees) can be customized. Default settings for the shown backtest are a starting balance of $1000, a slippage of 20 ticks (= $0.20) and a trading fee of 0.05 % (which is the worst taker fee on the Kraken Pro futures exchange) to have realistic settings. However as we do not conduct many trades with this strategy, fees should not impact our performance too much. As long-term swing traders, we at DeanTrader generally devote one initial portion of our portfolio to swing trading and from then on always use 100% of this portion for the next trade to get the compounding starting. This is in difference to other trading styles which use various, often very small, percentage values for their short- or mid-term trades. Please note that for the here presented backtest only 10% of compounded equity is used for each successive trade to show an estimation for a lower risk & lower reward approach . Keep this in mind when evaluating the backtest data. You can set appropriate values for each backtest parameter in the "Properties" setting menu of the strategy, including the order size percentage of equity value for your trades. Also note that due to the small number of trades the statistical significance is low. It is not possible to gather an abundance of long-term trend signals in the order of hundreds or thousands trades, as much more time would have to pass for this in the case of rather new assets like Ethereum.
Additionally to the TradingView Strategy Tester you can also plot your equity directly on the chart to get a sense for the performance. For this you can also scale the equity graph to e.g. match the starting point of your equity with some price point on the chart to get a direct comparison to 'Buy & Hold' strategies over time.
This indicator (and all other content I provide) is no financial advice. If you use this indicator you agree to my Terms and Conditions which can be found on my website linked on my TradingView profile or in my signature.
◆ Visual Representation on the Chart
Shown below is a screenshot of how the chart looks like when the strategy is applied. Here we can see two different averaging lines, where each line belongs to one of the two sub-logics respectively. Note that this is not a MA-crossover strategy, and the crossing of the lines is not accounted for in the code at all and therefore has no effect on the strategy's signal output. Also note that the price scale is set on logarithmic.
The space between the lines is filled with a faint background color as a rough visual indicator. Magenta-colored fills indicate zones where only Short or Hedge signals can appear, while green-colored fills indicate zones where only Long or Hedge signals can appear. Gray-colored fills mark zones where only Hedge signals can appear, which also means that Hedge signals can appear in any zone. So treat those background fills more as a visual aid to roughly know what can happen next, but pay most attention to the actual signals (with arrows) that appear on the chart.
◆ Differences to Other Versions
Consists now of two competing sub-algorithms instead of just one algorithm. The new system outputs Long, Short and Hedge signals instead of just Long and Short signals.
The first sub-logic is the spiritual successor of the original Swing Algo V1.3 release, with a modified oscillator part.
The second sub-logic serves as a control algorithm (while still having equal rights in terms of strategy impact), newly introduced to the Swing Algo series, but already forwardtested for roughly a year at time of release.
Lowers risk significantly by diversifying swing trading strategies, so that for the rare scenario of a missed trend on one sub-algorithm, losses are prevented as the overall strategy is hedged during that time.
Lowers risk further as the maximum drawdown of the combined strategy is reduced by roughly 1/3 in comparison to each stand-alone strategy while almost retaining the same net profit over a 6-year backtest compared to the first, leading sub-logic.
No guesswork anymore when to use which short leverage (1x corresponding to a Hedge, or 2x corresponding to a Short with an asset-value-change-to-gain-proportionality of -1) as it is clearly defined within the trading system via the displayed signals. In earlier Swing Algo versions, the short leverage for any particular Short signal had to be chosen by hand dependent on market sentiment, which required further market analysis, or was fixed at 2x, leading to less flexibility.
◆ Access
For access please contact me via DM on TradingView or via other channels (linked on my TradingView profile and in my signature).
Damage Indicator by Scipio ProScipio Pro's Damage Indicator detects strong momentum on tops and bottoms. It is intended for swing trading.
The script analyzes both recent and less-recent price action and performs candle stick analysis. It also uses SDs and multiple Bollinger Bands to find dynamic levels for entries.
A Bears Damaged signal emerges whenever there is convincing proof of strength at a bottom. Often, when the market reverses quickly, traders are caught offside and are forced to buy higher. The reverse goes for Bulls Damaged signals, which mean there is convincing proof of bearish strength at a (local?) top.
Whether the move gets legs depends in large part on the structure in which the show of momentum takes place. It is sensible to wonder after each signal whether the market structure (and other relevant context such as the majority of cash having been sidelined) dictates that risk-reward is skewed to the upside or to the downside. If, for example, a Bears Damaged signal emerges on the daily and risk-reward on the weekly is skewed to the upside, go 4x larger (again, just an example). If, on the other hand, the same signal emerges on the daily while the risk-reward is skewed to the downside on the weekly, bet much smaller and tighten your stop-loss. For best results, I suggest you always check one timeframe higher for your long-term risk-reward bias. (No financial advice, of course.)
Under Settings you'll find the so-called Noise Protection , which is switched "on" by default. We recommend you keep this switched on. Noise Protection ensures you do not see Damage signals on timeframes lower than the 4 hour. After all, chasing momentum on low timeframes is a losing game. The amount of noise increases exponentially as you move lower down the timeframes. Again, this indicator is for swing trades. Don't use it for scalping.
It should be useful for all assets, but is of course more useful on some than on others. As with all indicators, signals tend to be more meaningful if the asset in question is at least somewhat liquid, for instance.
As always, use at your own risk. Using indicators is no substitute for using one's brain.
Theory Affinity TrendlinesThis indicator is perfect for traders who want to identify trend lines on a chart. It draws higher low uptrends and lower high downtrends, making it easy to see where the trend is going. You can also customize the settings to fit your needs, making it the perfect tool for your trading arsenal.
With this new tool, you can easily customize your experience to get the most out of your trading and analysis. With options like max lines, strength multiplier, pivot plots/text, and more, you can easily create the perfect trading analysis environment.
So why wait? Try it out today!
Leave feedback and let me know what you think.
// ############################################################################################## Input Descriptions
Pivot Left ----------------- look left n bars
Pivot Right ---------------- look right n bars
Strength ------------------- Pivot multiplier (Higher = Wider Trend lines)
Max Lines ------------------ Number of lines for each Uptrend and Downtrend
Structure Text ------------ Show HH, LL, etc. on chart
Structure Markers -------- Dots at the Pivot Highs and Lows
Plots ------------------------ Draw a line at Pivot Highs and Lows
Last Up Width ------------- Width of the current Uptrend line
Historical Up Width ------ Width of previous Uptrend lines
Last Down Width --------- Width of the current Downtrend lines
Historical Down Width --- Width of previous Downtrend lines
Line Offset ---------------- Shift trend lines right or left
* Lines may or may not "repaint". For use to identify trends that are more than likely already established and to identify trend line breaks.
v1 Swing TradeHello friends
I have completed the "Swing Trading" Indicator that I have been working on for a long time.
I would like to briefly explain what it does and how it works.
Cryptocurrency Markets have high volatility. Of course, money is made by holding, but we are aware that there are more opportunities in the market as the ebb and flow. I must underline that it is "SMALL" by taking small risks to seize this opportunity. This indicator, which will help us to turn these opportunities to our advantage by taking small risks, briefly works as follows.
It is a blend of 1 indicator, which is based on fibonacci and pivot points, and supports atr indicator data in the background.
I determined the important values of Fibonnaci as entry and exit points. I then completed it with the atr indicator. atr fibonacci automatically pulls the walking graph invisibly.
This data is automatically mixed with the atr indicator.
When the price candles rise above the atr band, the long entry of the entry price comes. immediately after, the stop loss level is set “SMALL”.
Likewise, at the end of 1 Rising Trend, Stuck Prices Will Correct. When the price candles fall below the Atr Band, a short signal comes. and then a "SMALL" Stoploss level is determined together with the entry price.
After entering the position, the following stoploss and take profit work. ( Moves with the Trend, Stop Price Does Not Slip In The Opposite Direction After The First Entry. )
If the trade turns into profit after the stop loss level you entered, you should move your stop loss level together with the algorithm and exit the trade with minimum loss and maximum profit.
Trailing Stoploss
Now it's time to close the position. Price started to shrink. Swing trading Opportunity May Come.
What should the user pay attention to ?
Signal should be expected as in the first image.
When entering the trade, you should definitely put a stoploss.
If the Trade Opportunity is Late, the Transaction should not be entered.
And most importantly, you should carry your stoploss level with the algorithm.
Matters to be Considered in the Settings Tab;
Candles to lookback ( Do not reduce the number of past candles below 50.)
Reverse Target Point ( Definitely Must Stay Active. Don't turn it off.)
Formula a and formula b values increase the signal rate. But Too Many Signals Are Not Healthy.
I wish everyone a lot of earnings.
CuandoCrypto's Swing Trade IndicatorThis indicator combines RSI, MACD, Williams %R and Z-Score to determine if there's a high probability of an imminent trend reversal. This indicator is best used on higher timeframes.
AYN: Buy-, Sell-, Trend- and SwingSignals incl. AutoFibo
Hi,
i want to introduce you to my AllYouNeed-Indicator. I calculate the buy sell signals within different timeframes independent in wich timeframe you are, therefore Pinescript suppose the Signal could be repainted. I was not able to fix this error, but after frequent checks of the result i haven't found a single repaint. Please try it out and let me know me, if you still get caught by a repaint.
Features:
- Short, Mid and Longterm-Trends
- Buy and Sell Signals and Results as well with Labels (Prices, Percentage, Win/Lose)
- Length Multiplier for different Marketsituations
- Trend-Signals with Barcolors (Lime=Uptrend, Fuchsia=Downtrend)
- Swing-Signals with Barcolors (Lime=Upswing, Orange=Downswing)
- Auto-Fibonacci with changing Linecolors as Support(green) / Resistance(red)
Hope you like it, feel free to contact me for further informations.
Please leave a comment on what I can do better, thanks.
Best regards,
snurk