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.
Stop
Pure Morning 2.0 - Candlestick Pattern Doji StrategyThe new "Pure Morning 2.0 - Candlestick Pattern Doji Strategy" is a trend-following, intraday cryptocurrency trading system authored by devil_machine.
The system identifies Doji and Morning Doji Star candlestick formations above the EMA60 as entry points for long trades.
For best results we recommend to use on 15-minute, 30-minute, or 1-hour timeframes, and are ideal for high-volatility markets.
The strategy also utilizes a profit target or trailing stop for exits, with stop loss set at the lowest low of the last 100 candles. The strategy's configuration details, such as Doji tolerance, and exit configurations are adjustable.
In this new version 2.0, we've incorporated a new selectable filter. Since the stop loss is set at the lowest low, this filter ensures that this value isn't too far from the entry price, thereby optimizing the Risk-Reward ratio.
In the specific case of ALPINE, a 9% Take-Profit and and Stop-Loss at Lowest Low of the last 100 candles were set, with an activated trailing-stop percentage, Max Loss Filter is not active.
Name : Pure Morning 2.0 - Candlestick Pattern Doji Strategy
Author : @devil_machine
Category : Trend Follower based on candlestick patterns.
Operating mode : Spot or Futures (only long).
Trades duration : Intraday
Timeframe : 15m, 30m, 1H
Market : Crypto
Suggested usage : Short-term trading, when the market is in trend and it is showing high volatility .
Entry : When a Doji or Morning Doji Star formation occurs above the EMA60.
Exit : Profit target or Trailing stop, Stop loss on the lowest low of the last 100 candles.
Configuration :
- Doji Settings (tolerances) for Entry Condition
- Max Loss Filter (Lowest Low filter)
- Exit Long configuration
- Trailing stop
Backtesting :
⁃ Exchange: BINANCE
⁃ Pair: ALPINEUSDT
⁃ Timeframe: 30m
⁃ Fee: 0.075%
⁃ Slippage: 1
- Initial Capital: 10000 USDT
- Position sizing: 10% of Equity
- Start: 2022-02-28 (Out Of Sample from 2022-12-23)
- Bar magnifier: on
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.
Bollinger Bands - Breakout StrategyThe Bollinger Bands - Breakout Strategy is a trend-following optimized for short-term trading in the crypto market. This strategy employs the Bollinger Bands, a widely recognized technical indicator, as its primary instrument for pinpointing potential trades. It is capable of executing both long and short positions, depending on whether the market is in a spot or futures, and is particularly effective in trending markets.
The strategy boasts a high degree of configurability, allowing users to set the Bollinger Bands period and deviation, trend filter, volatility filter, trade direction filter, rate of change filter, and date filter. Furthermore, it offers options for Take Profit, Stop Loss, and Trailing Stop for both long and short positions, ensuring a comprehensive risk management approach. The inclusion of a maximum intraday loss feature adds another layer of protection, making this strategy a valuable tool for traders seeking a professional and adaptable trading system.
Name : Bollinger Bands - Breakout Strategy
Category : Trend Follower based on Bollinger Bands
Operating mode : Long and Short on Futures or Long on Spot
Trade duration : Intraday
Timeframe : 2H, 3H, 4H, 5H
Market : Crypto
Suggested usage : Trending Markets
Entry : When the price crosses above or below the Bollinger Bands
Exit : Opposite Cross or Profit target, Trailing stop or Stop loss
Configuration :
- Bollinger Bands period and deviation
- Trend Filter
- Volatility Filter
- Trade direction filter
- Rate of Change filter
- Date Filter (for backtesting purposes)
- Take Profit, Stop Loss and Trailing Stop for long and short positions
- Risk Management: Max Intraday Loss
Backtesting :
⁃ Exchange: BINANCE
⁃ Pair: BTCUSDT.P
⁃ Timeframe: 4H
⁃ Fee: 0.025%
⁃ Slippage: 1
- Initial Capital: 10000 USDT
- Position sizing: 10% of Equity
- Start : 2019-09-19 (Out Of Sample from 2022-12-23)
- Bar magnifier: on
Credits :
- LucF of Pine Coders for f_security function to avoid repainting using security.
- QuantNomad for Monthly Table.
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.
Dynamic Stop Loss DemoWhat does this script do ?
This script is for pine script programmers and explains how to implement a dynamic stop-loss strategy. It is different from trailing stop-loss. Trailing stop-loss can only set the retracement value, but this script can take profit on part of the position at a fixed price and allows users to decide whether to take profit on all positions based on whether a certain track is breached or other conditions author want. In this demo, it use rsi crossover and crossunder to decide the strategy condition, and use close price as open price, and use lowest low / highest high as stop price, and use 1.5 risk ratio to calculate the fixed first profit price. It will take 50% position size when the first profit price was reached. Then it will close all rest positions when the inverse condition come out or the dynamic stop(calculated by ATR) breached or when the price back to the open price or the stop price.
How is this script implemented
When start strategy by strategy.entry , it gives a custom id which contains direction, openPrice, stopPrice, profitPrice, qty, etc. It can be get from the global variable strategy.posiition_entry_name .
Moving Stop-Loss mechanism + alerts to MT4/MT5"How to code moving stop-loss mechanism", is one of the most often repeating questions in private messages I receive, so just to focus on this mechanism, I made a spin-off from my previous script: TradingView-Alerts-to-MT4-MT5-dynamic-variables-NON-REPAINTING .
The logic here moves the stop-loss each time a trade is running and a new pivot high/low is detected. When such event occurs (UpdateLongStopLoss or UpdateShortStopLoss), stoploss_long or stoploss_short mutable variable is modified. And it needs to be coded inside strategy.exit() line as "stop=stoploss_long" or "stop=stoploss_short". Entries are pretty straightforward - on Stoch crosses.
Last lines of the script show how to wrap information about such updates and send send alerts to MetaTrader via TradingConnector for execution in Forex/indices/commodities/crypto markets via MetaTrader. Please note that "tradeid=" variable must be passed with each alert, to let MetaTrader know which trade to modify. SLMOD, TPMOD are recently added commands, along with BE (as in "move stop-loss to breakeven" - but that's another topic).
Please disregard strategy backtest results, as this script is for coding education purposes only. However, it seems with the stop-loss mechanism enabled, the results are even better, than in original version of the script :)
Wilder's Volatility Trailing Stop Strategy with various MA'sFor Educational Purposes. Results can differ on different markets and can fail at any time. Profit is not guaranteed.
This only works in a few markets and in certain situations. Changing the settings can give better or worse results for other markets. This strategy is based on Wilder's Volatility System. It is an ATR trailing stop that is used for long term trends. This strategy focuses on the trailing stop alone and goes long and short only when it goes above or below the trailing line. It is similar to Donchian channels except it does not include the certain period channel breakout, only the trailing signal. This is only the trailing stop and an attempt to show how well it works standalone as Wilder described.
In his book, Wilder recommends a multiplier of 2.8-3.1 and an ATR lookback of 7 periods along with a running moving average or otherwise known as Wilder's moving average. The calculation and programming part for the trailing stop varies everywhere. I opted to keep it as simple and accurate as I could think of and interpret from the book. The variations to these types of indicators are numerous unfortunately, but Wilder seems to be the original author of ATR and this ATR-based trailing stop. In his book he says to use the significant closing price or highest/lowest closing price for the calculation part but I also included the option of choosing the highest high and lowest low, and the option to choose various moving averages in case anyone wants to experiment.
Comparing this and Donchian channels, it seems that a 2.5 multiplier is somewhat similar to the middle band of DCs and a 3.0 multiplier is somewhat similar to a double length middle band of DCs. It's hard to say which is the better trailing stop for a long term strategy. It's hard to beat the simplicity of DCs but maybe some might find a need for more inputs in a trailing stop or maybe an ATR based one like Wilder's can work better depending on what setting or strategy it's used in.
ATR Trailing Stop Strategy by ceyhunSame coding only coloring and strategy version added
//Barcolor
Green = Trail1 > Trail2 and close > Trail2 and low > Trail2
Blue = Trail1 > Trail2 and close > Trail2 and low < Trail2
Red = Trail2 > Trail1 and close < Trail2 and high < Trail2
Yellow = Trail2 > Trail1 and close < Trail2 and high > Trail2
//It gives White color where there is deterioration.
Let's not use InfoPanel in strategy, it would be wrong as it signals the next day.
[STRATEGY] Buy/Sell/TP/SL/TSL Alerts ModuleA strategy version of the Buy/Sell/TP/SL/TSL Alerts Module .
It works the same way:
1) You choose a specific indicator and apply it to your chart
2) You create a special signal form of that indicator
3) You connect that form to the module
4) Bob's your uncle
If you have any questions don't hesitate to ask and contact me either via private messages on TradingView or via Telegram.
Thanks!
Tilson T3 and MavilimW Triple Combined StrategyInspired by truly greatful Kivanç Ozbilgic (www.tradingview.com).
The strategy tries to combined three different moving average strategies into one.
Strategies covered are:
1. Tillson T3 Moving Average Strategy
Developed by Tim Tillson, the T3 Moving Average is considered superior to traditional moving averages as it is smoother, more responsive and thus performs better in ranging market conditions as well. However, it bears the disadvantage of overshooting the price as it attempts to realign itself to current market conditions.
It incorporates a smoothing technique which allows it to plot curves more gradual than ordinary moving averages and with a smaller lag. Its smoothness is derived from the fact that it is a weighted sum of a single EMA, double EMA, triple EMA and so on. When a trend is formed, the price action will stay above or below the trend during most of its progression and will hardly be touched by any swings. Thus, a confirmed penetration of the T3 MA and the lack of a following reversal often indicates the end of a trend. Here is what the calculation looks like:
T3 = c1*e6 + c2*e5 + c3*e4 + c4*e3, where:
– e1 = EMA (Close, Period)
– e2 = EMA (e1, Period)
– e3 = EMA (e2, Period)
– e4 = EMA (e3, Period)
– e5 = EMA (e4, Period)
– e6 = EMA (e5, Period)
– a is the volume factor, default value is 0.7 but 0.618 can also be used
– c1 = – a^3
– c2 = 3*a^2 + 3*a^3
– c3 = – 6*a^2 – 3*a – 3*a^3
– c4 = 1 + 3*a + a^3 + 3*a^2
T3 MovingThe T3 Moving Average generally produces entry signals similar to other moving averages and thus is traded largely in the same manner.
Strategy for Tillson T3 is if the close crossovers T3 line and for at least five bars the close was under the T3
2. Tillson T3 Fibonacci Cross
Kivanc Ozbilgic added a second T3 line with a volume factor of 0.618 (Fibonacci Ratio) and length of 3 (fibonacci number) which can be added by selecting the T3 Fibonacci Strategy input box.
Strategy for Tillson T3 Fibo is when the Fibo Line crossover the T3 it gives long signal vice versa.
3. MavilimW
MavilimW is originally a support and resistance indicator based on fibonacci injected weighted moving averages.
Strategy for MavilimW is is if the close crossovers T3 line and for at least five bars the close was under the T3
Hope you enjoy
Percent Trailing Stop %===========
Percent Trailing Stop %
===========
Another Stop Loss Indicator today - our last Fixed SL/TP script went down quite well, this one is for adding a Percent Trailing Stop from Entry Price to your own strategy.
You can ignore the actual entry/exit orders - they're based on a simple MA cross and are therefore NOT relevant, NOT profitable and NOT recommended!
You should be using this code as a way of adding a % Trailing Stop to your own scripts - hope it helps!
You should also notice that a generally considered losing strategy (a simple MA cross) could actually become profitable with careful money management - try combining this Trailing Stop script with our Fixed Stop/Take Profit script for really accurate management of your capital.
-----------
Good Luck and Happy Trading!
Fixed Percent Stop Loss & Take Profit %===========
Fixed Percent Stop Loss & Take Profit %
===========
A neat example of how to set up Fixed Stops and Take Profit as a percent of the entry price.
Yup, that's about it!
You can ignore the actual entry/exit orders - they're based on a simple MA cross and are therefore NOT relevant, NOT really profitable and NOT recommended!
You should be using this code as a way of adding Stops and Takes to your own scripts - hope it helps!
-----------
Good Luck and Happy Trading!
XPloRR S&P500 Stock Market Crash Detection Strategy v2XPloRR S&P500 Stock Market Crash Detection Strategy v2
Long-Term Trailing-Stop strategy detecting S&P500 Stock Market Crashes/Corrections and showing Volatility as warning signal for upcoming crashes
Detecting or avoiding stock market crashes seems to be the 'Holy Grail' of strategies.
Since none of the strategies that I tested can beat the long term Buy&Hold strategy, the purpose was to detect a stock market crash on the S&P500 and step out in time to minimize losses and beat the Buy&Hold strategy. So beat the Buy&Hold strategy with around 10 trades. 100% capitalize sold trade into new trade.
With the default parameters the strategy generates 10262% profit (starting at 01/01/1962 until release date), with 10 closed trades, 100% profitable, while the Buy&Hold strategy only generates 3633% profit, so this strategy beats the Buy&Hold strategy by 2.82 times !
Also the strategy detects all major S&P500 stock market crashes and corrections since 1962 depending on the Trailing Stop Smoothness parameter, and steps out in time to cut losses and steps in again after the bottom has been reached. The 5 major crashes/corrections of 1987, 1990, 2001, 2008 and 2010 were successfully detected with the default parameters.
The script was first released on November 03 2019 and detected the Corona Crash on March 04 2020 with a Volatility crash-alert and a Sell crash-alert.
I have also created an Alerter Study Script based on the engine of this script, which generates Buy, Sell and Volatility signals.
If you are interested in this Alerter version script, please drop me a mail.
The script shows a lot of graphical information:
the Close value is shown in light-green. When the Close value is temporarily lower than the Buy value, the Close value is shown in light-red. This way it is possible to evaluate the virtual losses during the current trade.
the Trailing Stop value is shown in dark-green. When the Sell value is lower than the Buy value, the last color of the trade will be red (best viewed when zoomed)
the EMA and SMA values for both Buy and Sell signals are shown as colored graphs
the Buy signals are labeled in blue and the Sell signals are labeled in purple
the Volatility is shown below in green and red. The Alert Threshold (red) is default set to 2 (see Volatility Threshold parameter below)
How to use this Strategy?
Select the SPX (S&P500) graph and add this script to the graph.
Look in the strategy tester overview to optimize the values Percent Profitable and Net Profit (using the strategy settings icon, you can increase/decrease the parameters), then keep using these parameters for future Buy/Sell signals on the S&P500.
More trades don't necessarily generate more overall profit. It is important to detect only the major crashes and avoid closing trades on the smaller corrections. Bearing the smaller corrections generates a higher profit.
Watch out for the Volatility Alerts generated at the bottom (red). The Threshold can by changed by the Volatility Threshold parameter (default=2% ATR). In almost all crashes/corrections there is an alert ahead of the crash.
Although the signal doesn't predict the exact timing of the crash/correction, it is a clear warning signal that bearish times are ahead!
The correction in December 2018 was not a major crash but there was already a red Volatility warning alert. If the Volatility Alert repeats the next weeks/months, chances are higher that a bigger crash or correction is near. As can be seen in the graphic, the deeper the crash is, the higher and wider the red Volatility signal goes. So keep an eye on the red flag!
Here are the parameters:
Fast MA Buy: buy trigger when Fast MA Buy crosses over the Slow MA Buy value (use values between 10-20)
Slow MA Buy: buy trigger when Fast MA Buy crosses over the Slow MA Buy value (use values between 21-50)
Minimum Buy Strength: minimum upward trend value of the Fast MA Buy value (directional coefficient)(use values between 10-100)
Fast MA Sell: sell trigger when Fast MA Sell crosses under the Slow MA Sell value (use values between 10-20)
Slow MA Sell: sell trigger when Fast MA Sell crosses under the Slow MA Sell value (use values between 21-50)
Minimum Sell Strength: minimum downward trend value of the Fast MA Sell value (directional coefficient)(use values between 10-100)
Trailing Stop ATR: trailing stop % distance from the smoothed Close value (use values between 2-20)
Trailing Stop Smoothness: MA value for smoothing out the Trailing Stop close value
Buy On Start Date: force Buy on start date even without Buy signal (default: true)
Sell On End Date: force Sell on end date even without Sell signal (default: true)
Volatility EMA Period: MA value of the Volatility value (default 15)
Volatility Threshold: Threshold value to change volatility graph to red (default 2)
Volatility Graph Scaler: Scaling of the volatility graph (default 5)
Important : optimizing and using these parameters is no guarantee for future winning trades!
Scripting Tutorial B - TManyMA - Commission/FeesThis script is for a triple moving average strategy where the user can select from different types of moving averages, price sources, lookback periods and resolutions.
Features:
- 3 Moving Averages with variable MA types, periods, price sources, resolutions and the ability to disable each individually.
- Crossovers are plotted on the chart with detailed information regarding the crossover (Ex: 50 SMA crossed over 200 SMA )
- Forecasting available for all three MAs. MA values are forecasted 5 values out and plotted as if a continuation to the MA.
- Forecast bias also applies to all forecasting. Bias means we can forecast based on an anticipated bullish , bearish or neutral direction in the market.
- To understand bias, please read the source code, or if you can't read the code just send me a message on here or Twitter . Twitter should be linked to my profile.
- Ribbons added and on by default. Optional setting to disable the ribbons. 5 ribbons between MA1 and MA2 and another 5 between MA2 and MA3.
- Ribbons are alpha-color coded based on their relation to their default MAs.
- Ribbons are only visible between MAs if the MAs being compared share the same Type, Resolution, and Source because there is no way to consolidate those three in a simple manner.
- Ribbon values are calculated based on calculated MA Periods between the MAs.
- Converted the existing study into a strategy.
- Strategy only enters long positions with a market order when MA crossovers occur.
- Strategy exits positions when crossunders occur.
- Trades 100% of the equity with one order/position by default.
- Ability to disable trading certain crosses with input checks.
- Ability to exit trades with a take profit or stop loss.
- User input to allow quick changes to the take profit or stop loss percentages.
- Strategy now calculates on every tick
- Strategy also includes fixed commission values based on Coinbase standard order fees
This script is meant as an educational script with well-formatted styling, and references for specific functions.
*** PLEASE NOTE - THIS STRATEGY IS MEANT FOR LEARNING PURPOSES. DEPENDING ON IT'S CONFIGURATION IT MAY OR MAY NOT BE USEFUL FOR ACTUAL TRADING. THE STRATEGY IS NOT FINANCIAL ADVICE ***
Scripting Tutorial A - TManyMA - StopsThis script is for a triple moving average strategy where the user can select from different types of moving averages, price sources, lookback periods and resolutions.
Features:
- 3 Moving Averages with variable MA types, periods, price sources, resolutions and the ability to disable each individually.
- Crossovers are plotted on the chart with detailed information regarding the crossover (Ex: 50 SMA crossed over 200 SMA )
- Forecasting available for all three MAs. MA values are forecasted 5 values out and plotted as if a continuation to the MA.
- Forecast bias also applies to all forecasting. Bias means we can forecast based on an anticipated bullish, bearish or neutral direction in the market.
- To understand bias, please read the source code, or if you can't read the code just send me a message on here or Twitter. Twitter should be linked to my profile.
- Ribbons added and on by default. Optional setting to disable the ribbons. 5 ribbons between MA1 and MA2 and another 5 between MA2 and MA3.
- Ribbons are alpha-color coded based on their relation to their default MAs.
- Ribbons are only visible between MAs if the MAs being compared share the same Type, Resolution, and Source because there is no way to consolidate those three in a simple manner.
- Ribbon values are calculated based on calculated MA Periods between the MAs.
- Converted the existing study into a strategy.
- Strategy only enters long positions with a market order when MA crossovers occur.
- Strategy exits positions when crossunders occur.
- Trades 100% of the equity with one order/position by default.
- Ability to disable trading certain crosses with input checks.
- Ability to exit trades with a take profit or stop loss.
- User input to allow quick changes to the take profit or stop loss percentages.
This script is meant as an educational script with well-formatted styling, and references for specific functions.
*** PLEASE NOTE - THIS STRATEGY IS MEANT FOR LEARNING PURPOSES. DEPENDING ON IT'S CONFIGURATION IT MAY OR MAY NOT BE USEFUL FOR ACTUAL TRADING. THE STRATEGY IS NOT FINANCIAL ADVICE ***
[STRATEGY] SuperTrendA private strategy from the Profitable SuperTrend preview for backtesting purposes.
Failure Swing Strategy (stop hunting) V1 (Made on XBT/USD 4h Bitmex)
This strategy is a first attempt to countertrade the false break of a key support/resistance.
If a candle breaks the level, but it comes back before close, it will trigger an order.
The Stop Loss is in %, the Take Profit is near the EMA.
There is a "volatility filter" to block orders when the price is near the EMA and a coefficient to adjust a little the Stop Loss and Take Profit according to the chart condition.
Ehlers Instantaneous Trendline StrategyInstantaneous Trendline Strategy by John Ehlers from his book "Cybernetic Analysis for Stocks and Futures".
You can choose implementation of stop-loss. Don't forget to define correct spread for your instrument.
BitMex Trailing Stop StrategyThis script is designed for those who want to use BitMex's trailing stop. It's not meant to be used as entry exits, but rather to get an idea of how wide the trailing stop needs to be. I suggest you backtest with different values. The script can also be integrated into an existing strategy which does give entry/exits to act as its stop loss.
XPloRR MA-Buy ATR-Trailing-Stop Long Term Strategy Beating B&HXPloRR MA-Buy ATR-MA-Trailing-Stop Strategy
Long term MA Trailing Stop strategy to beat Buy&Hold strategy
None of the strategies that I tested can beat the long term Buy&Hold strategy. That's the reason why I wrote this strategy.
Purpose: beat Buy&Hold strategy with around 10 trades. 100% capitalize sold trade into new trade.
My buy strategy is triggered by the EMA(blue) crossing over the SMA curve(orange).
My sell strategy is triggered by another EMA(lime) of the close value crossing the trailing stop(green) value.
The trailing stop value(green) is set to a multiple of the ATR(15) value.
ATR(15) is the SMA(15) value of the difference between high and low values.
Every stock has it's own "DNA", so first thing to do is find the right parameters to get the best strategy values voor EMA, SMA and Trailing Stop.
Then keep using these parameter for future buy/sell signals only for that particular stock.
Do the same for other stocks.
Here are the parameters:
Exponential MA: buy trigger when crossing over the SMA value (use values between 11-50)
Simple MA: buy trigger when EMA crosses over the SMA value (use values between 20 and 200)
Stop EMA: sell trigger when Stop EMA of close value crosses under the trailing stop value (use values between 8 and 16)
Trailing Stop #ATR: defines the trailing stop value as a multiple of the ATR(15) value
Example parameters for different stocks (Start capital: 1000, Order=100% of equity, Period 1/1/2005 to now):
BAR(Barco): EMA=11, SMA=82, StopEMA=12, Stop#ATR=9
Buy&HoldProfit: 45.82%, NetProfit: 294.7%, #Trades:8, %Profit:62.5%, ProfitFactor: 12.539
AAPL(Apple): EMA=12, SMA=45, StopEMA=12, Stop#ATR=6
Buy&HoldProfit: 2925.86%, NetProfit: 4035.92%, #Trades:10, %Profit:60%, ProfitFactor: 6.36
BEKB(Bekaert): EMA=12, SMA=42, StopEMA=12, Stop#ATR=7
Buy&HoldProfit: 81.11%, NetProfit: 521.37%, #Trades:10, %Profit:60%, ProfitFactor: 2.617
SOLB(Solvay): EMA=12, SMA=63, StopEMA=11, Stop#ATR=8
Buy&HoldProfit: 43.61%, NetProfit: 151.4%, #Trades:8, %Profit:75%, ProfitFactor: 3.794
PHIA(Philips): EMA=11, SMA=80, StopEMA=8, Stop#ATR=10
Buy&HoldProfit: 56.79%, NetProfit: 198.46%, #Trades:6, %Profit:83.33%, ProfitFactor: 23.07
I am very curious to see the parameters for your stocks and please make suggestions to improve this strategy.
GunbotXT TSSLSimulation of GunbotXT TSSL (trailing stop / stop limit) strategy useful for fine tuning settings and backtesting.
Once you have been granted access, you will receive notification in TradingView (Bell).
Then right click on Chart area -> click "Insert Indicator..." -> click "Invite-Only Scripts" -> click "GunbotXT TSSL" -> Add To Chart
At bottom -> click "Strategy Tester" -> click the "Gear" icon (Format) -> Input your desired settings to test.
Red = SellSTEP
Purple = SellGAIN
Red = SellSTOP
Blue/Yellow (changes) = FLowMA (lowest of 2 EMA's)
Blue = FastMA (off by default)
Yellow = SlowMA (off by default)
Orange = BuyPROTECT (BUY_LEVEL)
Green = BuySTOP
Green = BuySTEP
NOTICE: By requesting access to this script you acknowledge that you have read and understood that this is for research purposes only and I am not responsible for any financial losses you may incur by using this script!
B3 Edge Trail-TraderAnswer to the locked strategy... Formerly "High-Low Trader" .. Changed the name to Edge Trail Trader to delineate from the locked version, which is no different. You can add this one to your favorites now.
Similar to SuperTrend or the ATR trailing stop lines that are common-place in chart indicator circles, the B3 High-Low Trail-Trader works as a back-break line to flip binary long and short biasing. Here is the strategy set to 7 bars back. You can find this style of trading system in several books, and there are many ways to come to the trailing stop line, so I imagine the bars back length can be slid around to suit certain charts. This happens to be my favorite trailing line.