RSI and ATR Trend Reversal SL/TPQuick History:
I was frustrated with a standard fixed percent TP/SL as they often were not receptive to quick market rallies/reversals. I developed this TP/SL and eventually made it into a full fledge strategy and found it did well enough to publish. This strategy can be used as a standalone or tacked onto another strategy as a TP/SL. It does function as both with a single line. This strategy has been tested with TSLA , AAPL, NVDA, on the 15 minutes timeframe.
HOW IT WORKS:
Inputs:
Length: Simple enough, it determines the length of the RSI and ATR used.
Multiplier: This multiplies the RSI and ATR calculation, more on this later.
Delay to prevent Idealization: TradingView will use the open of the bar the strategy triggers on when calculating the backtest. This can produce unrealistic results depending on the source. If your source is open, set to 0, if anything else, set to 1.
Minimum Difference: This is essentially a traditional SL/TP, it is borderline unnecessary, but if the other parameters are wacky this can be used to ensure the SL/TP. It multiplies the source by the percent, so if it is set to 10, the SL/TP is initialized at src +- 10%.
Source input: Self Explanatory, be sure to update the Delay if you use open.
CALCULATION:
Parameters Initialization:
The strategy uses Heikinashi values for calculations, this is not toggleable in parameters, but can be easily changed by changing hclose to equal src.
FUNCTION INITIALIZATION:
highest_custom and lowest_custom do the same thing as ta.highest and ta.lowest, however the built in ta library does not allow for var int input, so I had to create my own functions to be used here. I actually developed these years ago and have used them in almost every strategy since. Feel especially free to use these in your own scripts.
The rsilev is where the magic happens.
SL/TP min/max are initially calculated to be used later.
Then we begin by establishing variables.
BullGuy is used to determine the length since the last crossup or crossdown, until one happens, it returns na, breaking the function. BearGuy is used in all the calculations, and is the same as BullGuy, unless BullGuy is na, where BearGuy counts up from 1 on each bar from 0.
We create our rsi and have to modify the second one to suit the function. In the case of the upper band, we mirror the lower one. So if the RSI is 80, we want it to be 20 on the upper band.
the upper band and lower band are calculated the exact same way, but mirrored. For the purpose of writing, I'm going to talk about the lower band. Assume everything is mirrored for the upper one. It finds the highest source since the last crossup or crossdown. It then multiplies from 1 / the RSI, this means that a rapid RSI increase will increase the band dramatically, so it is able to capture quick rally/reversals. We add this to the atr to source ratio, as the general volatility is a massive factor to be included. We then multiply this number by our chosen amount, and subtract it from the highest source, creating the band.
We do this same process but mirrored with both bands and compared it to the source. If the source is above the lower band, it suggests an uptrend, so the lower band is outputted, and vice versa for the upper one.
PLOTTING:
We also determine the line color in the same manner as we do the trend direction.
STRATEGY:
We then use the source again, and if it crosses up or down relative to the selected band, we enter a long or short respectively.
This may not be the most superb independent strategy, but it can be very useful as a TP/SL for your chosen entry conditions, especially in volatile markets or tickers.
Thank you for taking the time to read, and please enjoy.
Indikatoren und Strategien
Trend Catcher Strategywhat is Trend Catcher Strategy?
it is a strategy that opens long or short positions in the direction of the trend.
what it does?
TCS detects trend formations using its own unique method. Then, it opens a position in the direction of the trend and closes a part of the opened transaction (half according to default values) when the price reaches a certain level, and moves the remaining position to the point where it thinks the trend is over. You can easily understand how it works by looking at the images:
how it does it?
It obtains a value called a "limit" by dividing the difference between the highest value and the lowest value in a certain range (that is, the vector sum) to the sum of the lengths of the candles in a certain range (the total distance traveled). then multiplies this by 100 to get a percentage value. The closer this value is to 100, the stronger the trend.
Calculus Free Trend Strategy for Crypto & StocksObjective :
The Correlation Channel Trading Strategy is designed to identify potential entry points based on the relationship between price movements and a correlation channel. The strategy aims to capture trends within the channel while managing risk effectively.
Parameters :
Length: Determines the period for calculating moving averages and the true range, influencing the sensitivity of the strategy to price movements.
Multiplier: Adjusts the width of the correlation channel, providing flexibility to adapt to different market conditions.
Inputs :
Asset Symbol: Allows users to specify the financial instrument for analysis.
Timeframe: Defines the timeframe for data aggregation, enabling customization based on trading preferences.
Plot Correlation Channel: Optional input to visualize the correlation channel on the price chart.
Methodology :
Data Acquisition: The strategy fetches OHLC (Open, High, Low, Close) data for the specified asset and timeframe. In this case we use COINBASE:BTCUSD
Calculation of Correlation Channel: It computes the squared values for OHLC data, calculates the average value (x), and then calculates the square root of x to derive the source value. Additionally, it calculates the True Range as the difference between high and low prices.
Moving Averages: The strategy calculates moving averages (MA) for the source value and the True Range, which form the basis for defining the correlation channel.
Upper and Lower Bands: Using the MA and True Range, the strategy computes upper and lower bands of the correlation channel, with the width determined by the multiplier.
Entry Conditions: Long positions are initiated when the price crosses above the upper band, signaling potential overbought conditions. Short positions are initiated when the price crosses below the lower band, indicating potential oversold conditions.
Exit Conditions: Stop-loss mechanisms are incorporated directly into the entry conditions to manage risk. Long positions are exited if the price falls below a predefined stop-loss level, while short positions are exited if the price rises above the stop-loss level.
Strategy Approach: The strategy aims to capitalize on trends within the correlation channel, leveraging systematic entry signals while actively managing risk through stop-loss orders.
Backtest Details : For the purpose of this test I used the entire data available for BTCUSD Coinbase, with 10% of capital allocation and 0.1% comission for entry/exit(0.2% total). Can be also used with other both directly correlated with current settings of BTC or with new ones
Advantages :
Provides a systematic approach to trading based on quantifiable criteria.
Offers flexibility through customizable parameters to adapt to various market conditions.
Integrates risk management through predefined stop-loss mechanisms.
Limitations :
Relies on historical price data and technical indicators, which may not always accurately predict future price movements.
May generate false signals during periods of low volatility or erratic price behavior.
Requires continuous monitoring and adjustment of parameters to maintain effectiveness.
Conclusion :
The Correlation Channel Trading Strategy offers traders a structured framework for identifying potential entry points within a defined price channel. By leveraging moving averages and true range calculations, the strategy aims to capture trends while minimizing risk through stop-loss mechanisms. While no strategy can guarantee success in all market conditions, the Correlation Channel Trading Strategy provides a systematic approach to trading that can enhance decision-making and risk management for traders.
ORB Heikin Ashi SPY 5min Correlation StrategyOverview:
The ORB (Opening Range Breakout) strategy combined with Heikin Ashi candles and Relative Volume (RVOL) indicator aims to capitalize on significant price movements that occur shortly after the market opens. This strategy identifies breakouts above or below the opening range, using Heikin Ashi candles for smoother price visualization and RVOL to gauge the strength of the breakout.
Components:
Opening Range Breakout (ORB): The strategy starts by defining the opening range, typically the first few minutes of the trading session. It then identifies breakouts above the high or below the low of this range as potential entry points.
Heikin Ashi Candles: Heikin Ashi candles are used to provide a smoother representation of price movements compared to traditional candlesticks. By averaging open, close, high, and low prices of the previous candle, Heikin Ashi candles reduce noise and highlight trends more effectively.
Relative Volume (RVOL): RVOL compares the current volume of a stock to its average volume over a specified period. It helps traders identify abnormal trading activity, which can signal potential price movements.
Candle for correlation : In this case we are using SPY candles. It can also use different asset
Strategy Execution:
Initialization: The strategy initializes by setting up variables and parameters, including the ORB period, session timings, and Heikin Ashi candle settings.
ORB Calculation: It calculates the opening range by identifying the high and low prices during the specified session time. These values serve as the initial reference points for potential breakouts. For this we are looking for the first 30 min of the US opening session.
After that we are going to use the next 2 hours to check for breakout opportunities.
Heikin Ashi Transformation: Optionally, the strategy transforms traditional candlestick data into Heikin Ashi format for smoother visualization and trend identification.
Breakout Identification: It continuously monitors price movements within the session and checks if the current high breaches the ORB high or if the current low breaches the ORB low. These events trigger potential long or short entry signals, respectively.
RVOL Analysis: Simultaneously, the strategy evaluates the relative volume of the asset to gauge the strength of the breakout. A surge in volume accompanying the breakout confirms the validity of the signal. In this case we are looking for at least a 1 value of the division between currentVolume and pastVolume
Entry and Exit Conditions: When a breakout occurs and is confirmed by RVOL and is within our session time, the strategy enters a long or short position accordingly. It does not have a stop loss or a takie profit level, instead it will always exit at the end of the trading session, 5 minutes before
Position Sizing and Commissions: For the purpose of this backtest, the strategy allocated 10% of the capital for each trade and assumes a trading commission of 0.01$ per share ( twice the IBKR broker values)
Session End: At the end of the trading session, the strategy closes all open positions to avoid overnight exposure.
Conclusion:
The combination of ORB breakout strategy, Heikin Ashi candles, and RVOL provides traders with a robust framework for identifying and capitalizing on early trends in the market. By leveraging these technical indicators together, traders can make more informed decisions and improve the overall performance of their trading strategies. However, like any trading strategy, it's essential to backtest thoroughly and adapt the strategy to different market conditions to ensure its effectiveness over time.
Strategy Container_Variable Pyramiding & Leverage [Tradingwhale]This is a strategy container . It doesn’t provide a trading strategy. What it does is provide functionality that is not readily available with standard strategy ’shells.’
More specifically, this Strategy Container enables Tradingview users to create trading strategies without knowing any Pine Script code .
Furthermore, you can use most indicators on tradingview to build a strategy without any coding at all, whether or not you have access to the code.
To illustrate a possible output in the image (buy and sell orders) of this strategy container, we are using here an indicator that provides buy and sell signals, only for illustration purposes. Again, this is a strategy container, not a strategy. So we need to include an indicator with this published strategy to be able to show the strategy execution.
What can you do with this strategy container? Please read below.
Trade Direction
You can select to trade Long trades only, Short trades only, or both, assuming that whatever strategy you create with this container will produce buy and sell signals.
Exit on Opposite
You can select if Long signals cause the exit of Short positions and vice versa. If you turn this on, then a sell/short signal will cause the closing of your entire long position, and a buy/long signal will cause the closing of your entire short position.
Use external data sources (indicators) to (a) import signals, or (b) create trading signals using almost any of the indicators available on Tradingview.
Option 1:
When you check the box ‘Use external indicator Buy & Sell signals?’ and continue to select an external indicator that plots LONG/BUY signals as value '1' and SHORT/SELL signals as value '-1, then this strategy container will use those signals for the strategy, in combination with all other available settings.
Here an example of code in an indicator that you could use to import signals with this strategy container:
buy = long_cond and barstate.isconfirmed
sell = short_cond and barstate.isconfirmed
//—------- Signal for Strategy
signal = buy ? 1 : sell ? -1 : 0
plot(plot_connector? signal : na, title="OMEGA Signals", display = display.none)
Option 2:
You can create buy/long and sell/short signals from within this strategy container under the sections called “ Define 'LONG' Signal ” and “ Define 'SHORT' Signal .”
You can do this with a single external indicator, by comparing two external indicators, or by comparing one external indicator with a fixed value. The indicator/s you use need to be on the same chart as this strategy container. You can add up to two (2) external indicators that can be compared to each other at a time. A checkbox allows you to select whether the logical operation is executed between Source #1 and #2, between Source # 1 and an absolute value, or just by analyzing the behavior of Source #1.
Without an image of the strategy container settings it’s a bit hard to explain. However, below you see a list of all possible operations.
Operations available , whenever possible based on source data, include:
- "crossing"
- "crossing up"
- "crossing down"
- "rejected from resistance (Source #1) in the last bar", which means ‘High’ was above Source #1 (resistance level) in the last completed bar and 'Close' (current price of the symbol) is now below Source #1" (resistance level).
- "rejected from resistance (Source #1) in the last 2 bars", which means ‘High’ was above Source #1 (resistance level) in one of the last two (2) completed bars and 'Close' (current price of the symbol) is now below Source #1" (resistance level).
- "rejected from support (Source #1) in the last bar" --- similar to above except with Lows and rejection from support level
- "rejected from support (Source #1) in the last 2 bars" --- similar to above except with Lows and rejection from support level
- "greater than"
- "less than"
- "is up"
- "is down"
- "is up %"
- "is down %"
Variable Pyramiding, Leverage, and Pyramiding Direction
Variable Pyramiding
With this strategy container, you can define how much capital you want to invest for three consecutive trades in the same direction (pyramiding). You can define what percentage of your equity you want to invest for each pyramid-trade separately, which means they don’t have to be identical.
As an example: You can invest 5% in the first trade let’s call this pyramid trade #0), 10% in the second trade (pyramid trade #1), and 7% in the third trade (pyramid trade #2), or any other combination. If your trading strategy doesn’t produce pyramid trading opportunities (consecutive trades in the same direction), then the pyramid trade settings won’t come to bear for the second and third trades, because only the first trade will be executed with each signal.
Leverage
You can enter numbers for the three pyramid trades that are combined greater than 100%. Once that is the case, you are using leverage in your trades and have to manage the risk that is associated with that.
Pyramiding Direction
You can decide to scale only into Winners, Losers, or Both. Pyramid into a:
- Losers : A losing streak occurs when the price of the underlying security at the current signal is lower than the average cost of the position.
- Winners : A winning streak occurs when the price of the underlying security at the current signal is higher than the average cost of the position.
- Both means that you are selecting to scale/pyramid into both Winning and Losing streaks.
Other Inputs that influence signal execution:
You can choose to turn these on or off.
1. Limit Long exits with a WMA to stay longer in Long positions: If you check this box and enter a Length number (integer) for the WMA (Weighted Moving Average), then Long positions can only be exited with short signals when the current WMA is lower than on the previous bar/candle. Short signals sometimes increase with uptrends. We’re using this WMA here to limit short signals by adding another condition (WMA going down) for the short signal to be valid.
2. Maximum length of trades in the number of candles. Positions that have been in place for the specified number of trades are excited automatically.
3. Set the backtest period (from-to). Only trades within this range will be executed.
4. Market Volatility Adjustment Settings
- Use ATR to limit when Long trades can be entered (enter ATR length and Offset). We’re using the 3-day ATR here, with your entries for ATR length and offset. When the 3-day ATR is below its signal line, then Long trades are enabled; otherwise, they are not.
- Use VIX to limit when Short trades can be entered (enter VIX). If you select this checkbox, then Short trades will only be executed if the daily VIX is above your set value.
- Use Momentum Algo functions to limit Short trades. This uses the average distance of Momentum Highs and Lows over the lookback period to gauge whether markets are calm or swinging more profoundly. Based on that you can limit short entries to more volatile market regimes.
Set:
- Fast EMA and Slow EMA period lengths
- Number of left and right candles for High and Low pivots
- Lookback period to calculate the High/Low average and then the distance between the two.
The assumption here is that greater distances between momentum highs and lows correlate positively with greater volatility and greater swings in the underlying security.
Stop-Loss
Set separate stop-losses based on % for Long and Short positions. If the position loses X% since entry, then the position will be closed.
Take-Profit
Set separate take-profit levels based on % for Long and Short positions. If the position wins X% since entry, then the position will be closed.
GM-8 and ADX Strategy with Second EMADescription:
This TradingView script implements a trading strategy based on the Moving Average (GM-8), the Average Directional Index (ADX), and the second Exponential Moving Average (EMA). The strategy utilizes these indicators to identify potential buy and sell signals on the chart.
Indicators:
GM-8 (Moving Average 8): This indicator calculates the average price of the last 8 periods and is used to identify trends.
ADX (Average Directional Index): The ADX measures the strength of a trend and is used to determine whether the market is moving in a particular direction or not.
Second EMA (Exponential Moving Average): This is an additional EMA line with a period of 59, which is used to provide additional confirmation signals for the trend.
Trading Conditions:
Buy Condition: A buy signal is generated when the closing price is above the GM-8 and the second EMA, and the ADX value is above the specified threshold.
Sell Condition: A sell signal is generated when the closing price is below the GM-8 and the second EMA, and the ADX value is above the specified threshold.
Trading Logic:
If a buy condition is met, a long position is opened with a user-defined lot size.
If a sell condition is met, a short position is opened with the same user-defined lot size.
Positions are closed when the opposite conditions are met.
User Parameters:
Users can adjust the periods for the GM-8, the second EMA, and the ADX, as well as the threshold for the ADX and the lot size according to their preferences.
Note:
This script has been developed for use on a $100,000 account with FTMO, therefore the account size is set to $100,000. Please ensure that the strategy parameters and settings meet the requirements of your trading strategy and carefully review the results before committing real capital.
--------------------------------------------------------------------------------------------------------------
Beschreibung:
Dieses TradingView-Skript implementiert eine Handelsstrategie, die auf dem gleitenden Mittelwert (GM-8), dem Average Directional Index (ADX) und der zweiten exponentiellen gleitenden Durchschnittslinie (EMA) basiert. Die Strategie verwendet diese Indikatoren, um potenzielle Kauf- und Verkaufssignale auf dem Chart zu identifizieren.
Indikatoren:
GM-8 (Gleitender Mittelwert 8): Dieser Indikator berechnet den Durchschnittspreis der letzten 8 Perioden und wird verwendet, um Trends zu identifizieren.
ADX (Average Directional Index): Der ADX misst die Stärke eines Trends und wird verwendet, um festzustellen, ob sich der Markt in eine bestimmte Richtung bewegt oder nicht.
Zweite EMA (Exponential Moving Average): Dies ist eine zusätzliche EMA-Linie mit einer Periode von 59, die verwendet wird, um zusätzliche Bestätigungssignale für den Trend zu liefern.
Handelsbedingungen:
Kaufbedingung: Es wird ein Kaufsignal generiert, wenn der Schlusskurs über dem GM-8 und der zweiten EMA liegt und der ADX-Wert über dem angegebenen Schwellenwert liegt.
Verkaufsbedingung: Es wird ein Verkaufssignal generiert, wenn der Schlusskurs unter dem GM-8 und der zweiten EMA liegt und der ADX-Wert über dem angegebenen Schwellenwert liegt.
Handelslogik:
Wenn eine Kaufbedingung erfüllt ist, wird eine Long-Position mit einer benutzerdefinierten Losgröße eröffnet.
Wenn eine Verkaufsbedingung erfüllt ist, wird eine Short-Position mit derselben benutzerdefinierten Losgröße eröffnet.
Positionen werden geschlossen, wenn die Gegenbedingungen erfüllt sind.
Benutzerparameter:
Benutzer können die Perioden für den GM-8, die zweite EMA und den ADX sowie den Schwellenwert für den ADX und die Losgröße nach ihren eigenen Präferenzen anpassen.
Hinweis:
Dieses Skript wurde für die Verwendung auf einem $100.000-Konto bei FTMO entwickelt, daher ist die Kontogröße auf $100.000 festgelegt. Bitte stellen Sie sicher, dass die Strategieparameter und -einstellungen den Anforderungen Ihrer Handelsstrategie entsprechen und dass Sie die Ergebnisse sorgfältig überprüfen, bevor Sie echtes Kapital einsetzen.
RunRox - Backtesting System (SM)RunRox - Backtesting System (SM) is designed for flexible and comprehensive testing of trading strategies, closely integrated with our RunRox - Signals Master indicator. This combination enhances your ability to refine strategies efficiently, providing you with insights to adapt and optimize your trading tactics seamlessly.
The Backtesting System (SM) excels in pinpointing the optimal settings for the RunRox - Signals Master indicator, efficiently highlighting the most effective configurations.
Capabilities of the Backtesting System (SM)
Optimal Settings Determination: Identifies the best configurations for the Signals Master indicator to enhance its effectiveness.
Timeframe-Specific Strategy Testing: Allows strategies to be tested over specific historical time periods to assess their viability.
Customizable Initial Conditions: Enables setting of initial deposit, risk per trade, and commission rates to mirror real-world trading conditions.
Flexible Money Management: Provides options to set take profits and stop losses, optimizing potential returns and risk management.
Intuitive Dashboard: Features a user-friendly dashboard that visually displays all pertinent information, making it easy to analyze and adjust strategies.
Trading Flexibility Across Three Modes:
Dual-Direction Trading: Engage in both buying and selling with this mode. Our dashboard optimizes and identifies the best settings for trading in two directions, streamlining the process to maximize effectiveness for both buy and sell orders.
Buy-Only Mode: Tailored for traders focusing exclusively on purchasing assets. In this mode, our backtester pinpoints the most advantageous sensitivity, speed reaction, and filter settings specifically for buying. Optimal settings in this mode may differ from those used in dual-direction trading, providing a customized approach to single-direction strategies.
Sell-Only Mode: Perfect for strategies primarily based on selling. This setting allows you to discover the ideal configurations for asset sales, which can be particularly useful if you are looking for optimal exit points in long-term transactions or under specific market conditions.
Here's an example of how profits can differ on the same asset when trading using two distinct strategies: exclusively buying or trading in both directions.
Above in the image, you can see how one-directional trading influences the results of backtests on historical data. While this does not guarantee future outcomes, it provides insight into how the strategy's performance can vary with different trading directions.
As you can also see from the image, one-directional trading has affected the optimal combination of settings for Sensitivity, Speed Reaction, and Filters.
Stop Loss and Take Profit
Our backtesting system, as you might have gathered, includes flexible settings for take profits and stop losses. Here are the main features:
Multiple Take Profits: Ability to set from 1 to 4 take profit levels.
Fixed Percentage: Option to assign a fixed percentage for each take profit.
Trade Proportion Fixation: Ability to set a fixed size from the trade for securing profits.
Stop Loss Installation: Option to establish a stop loss.
Break-Even Stop Loss: Ability to move the stop loss to a break-even point upon reaching a specified take profit level.
These settings offer extensive flexibility and can be customized according to your preferences and trading style. They are suitable for both novice and professional traders looking to test their trading strategies on historical data.
As illustrated in the image above, we have implemented money management by setting fixed take profits and stop losses. Utilizing money management has improved indicators such as profit, maximum drawdown, and profit factor, turning even historically unprofitable strategies into profitable ones. Although this does not guarantee future results, it serves as a valuable tool for understanding the effectiveness of money management.
Additionally, as you can see, the optimal settings for Signals Master have been adjusted, highlighting the best configurations for the most favorable outcomes.
Disclaimer:
Historical data is not indicative of future results. All indicators and strategies provided by RunRox are intended for integration with traders' strategies and should be used as tools for analysis rather than standalone solutions. Traders should use their own discretion and understand that all trading involves risk.
Wunder OI breakout1. The basic concept for this strategy is to breakout open interest levels.
2. Open interest indicates the total number of active positions in the market a sharp increase in which we will use to enter a trade.
3. The main concept of this strategy is to break open interest levels.The strategy is based on building levels based on the highs and lows over a certain period. The breakdown of the set levels is used for entry. You can change the period as well as the percentage of change in open interest to find setups based on your pair and timeframe.
4. A function for calculating risk on the portfolio (your deposit) has been added to the Wunder OI breakout. When this option is enabled, you get a calculation of the entry amount in dollars relative to your Stop Loss. In the settings, you can select the risk percentage on your portfolio. The loss will be calculated from the amount that will be displayed on the chart.
5. For example, if your deposit is $1000 and you set the risk to 1%, with a Stop Loss of 5%, the entry volume will be $200. The loss at SL will be $10. 10$, which is your 1% risk or 1% of the deposit.
Important! The risk per trade must be less than the Stop Loss value. If the risk is greater than SL, then you should use leverage.
The amount of funds entering the trade is calculated in dollars. This option was created if you want to send the dollar amount from Tradingview to the exchange. However, putting your volume in dollars you get the incorrect net profit and drawdown indication in the backtest results, as TradingView calculates the backtest volume in contracts.
To display the correct net profit and drawdown values in Tradingview Backtest results, use the ”Volume in contract” option.
Advanced Trend Strategy [BITsPIP]The BITsPIP team is super excited to share our latest trading gem with you all. We're all about diving deep and ensuring our strategies can stand the test of time. So, we invite you to join us in exploring the awesome potential of this new strategy and really put it through its pace with some deep backtesting. This isn't just another strategy; it boasts a profit factor hovering around 1.5 across over 1000 trades, which is quite an achievement. Consider integrating it with your trading bots to further enhance your trading efficiency and profit generation. Curious? Ask for trial access or drop by our website for more details.
I. Deep Backtesting
We're all in on transparency and solid results, which is why we didn't stop at 100... or even 500 trades. We went over 1000, making sure this strategy is as robust as they come. No flimsy forecasts or sneaky repainting here. Just good, solid strategy that's ready for the real deal. Curious about the details? Check out our detailed backtesting screenshot for the BINANCE:BTCUSDT in a 5-minute timeframe. It's all about giving you the clear picture.
#No Overfitting
#No Repainting
Backtesting Screenshot
II. Algorithmic Trading
Thinking of trading as a manual game? Think again! Manual trading is a bit like rolling the dice - fun, but kind of risky if you're aiming for consistent wins. Instead, why not lean into the future with algorithmic trading? It's all about trusting the market's rhythm over the long term. By integrating your strategy with a trading bot, you can enjoy peace of mind, rest easy, and keep those emotional trades at bay.
III) Applications
Dive into the Advanced Trend Strategy, your versatile tool for navigating the market's waters. This strategy shines in under an hour timeframes, offering adaptability across stocks, commodities, forex, and cryptocurrencies. Initially fine-tuned for low-volatility cryptos like BINANCE:BTCUSDT , its default settings are a solid starting point.
But here's where your expertise comes into play. Each market beats to its own drum, necessitating nuanced adjustments to stop loss and take profit settings. This customization is key to maximizing the strategy's effectiveness in your chosen arena.
IV) Strategy's Logic
The Advanced Trend Strategy is a powerhouse, blending the precision of Hull Suite, RSI, and our unique trend detector technique. At its core, it’s designed for savvy risk management, aiming to lock in substantial profits while steering clear of minor market ripples. It utilizes stop-loss and take-profit thresholds to form a profit channel, providing a safety net for each trade. This is a trend-following strategy at heart, where these profit channels play a critical role in maximizing returns by securing positions within these "warranty channels."
1. Trend-Following
The market's complexity, influenced by countless factors, makes small movements seem almost chaotic. Yet, the principle of #Trend-Following shines in less volatile markets in long term. The strategy excels by pinpointing the ideal moments to enter the market, coupled with refined risk management to secure profits. It’s tailored for you, the individual trader, enabling you to ride the waves of market trends upwards or downwards.
2. Risk Management
A key facet of the strategy is its emphasis on pragmatic risk management. Traders are empowered to establish practical stop-loss and take-profit levels, tailoring these crucial parameters to the specific market they are engaging in. This customization is instrumental in optimizing long-term profitability, ensuring that the strategy adapts fluidly to the unique characteristics and volatility patterns of different trading environments.
V) Strategy's Input Settings and Default Values
1. Alerts
The strategy comes equipped with a flexible alert system designed to keep you informed and ready to act. Within the settings, you’ll find options to configure order/exit and comment/alert messages to your preference. This feature is particularly useful for staying on top of the strategy’s activities without constant manual oversight.
2. Hull Suite
i. Hull Suite Length: Designed for capturing long-term trends, the Hull Suite Length is configured at 1000. Functioning comparably to moving averages, the Hull Suite features upper and lower bands. Currently, it is set to 1000.
ii. Length Multiplier: It's advisable to maintain a minimal value for the Length Multiplier, prioritizing the optimization of the Hull Suite Length. Presently, it is set to 1.
3. RSI Indicator
i. The RSI is a widely recognized tool in trading. Adapt the oversold and overbought thresholds to better match the specifics of your market for optimal results.
4. StopLoss and TakeProfit
i. StopLoss and TakeProfit Settings: Two distinct approaches are available. Semi-Automatic StopLoss/TakeProfit Setting and Manual StopLoss/TakeProfit Setting. The Semi-Automatic mode streamlines the process by allowing you to input values for a 5-minute timeframe, subsequently auto-adjusting these values across various timeframes, both lower and higher. Conversely, the Manual mode offers full control, enabling you to meticulously define TakeProfit values for each individual timeframe.
ii. TakeProfit Threshold # and TakeProfit Value #: Imagine this mechanism as an ascending staircase. Each step represents a range, with the lower boundary (TakeProfit Value) designed to close the trade upon being reached, and the upper boundary (TakeProfit Threshold) upon being hit, propelling the trade to the next level, and forming a new range. This stair-stepping approach enhances risk management and increases profitability. The pre-set configurations are tailored for $BINANCE:BTCUSDT. It's advisable to devote time to tailoring these settings to your specific market, aiming to achieve optimal results based on backtesting.
iii. StopLoss Value: In line with its name, this value marks the limit of loss you're prepared to accept should the market trend go against your expectations. It's crucial to note that once your asset reaches the first TakeProfit range, the initial StopLoss value becomes obsolete, supplanted by the first TakeProfit Value. The default StopLoss value is pegged at 1.6(%), a figure worth considering in your trading strategy.
VI) Entry Conditions
The primary signal for entry is generated by our custom trend detection mechanism and hull suite values (ascending/descending). This is supported by additional indicators acting as confirmation.
VII) Exit Conditions
The strategy stipulates exit conditions primarily governed by stop loss and take profit parameters. On infrequent occasions, if the trend lacks confirmation post-entry, the strategy mandates an exit upon the issuance of a reverse signal (whether confirmed or unconfirmed) by the strategy itself.
BITsPIP
BBSR Extreme Strategy [nachodog]The Bollinger Bands Stochastic RSI Extreme Strategy is a comprehensive trading approach designed for use on the TradingView platform, employing a combination of Bollinger Bands and the Stochastic RSI to identify potential entry and exit points in the market. This strategy is converted into Pine Script version 5 and is specifically tailored as a strategy rather than a mere study, allowing traders to simulate and backtest their trades within the TradingView environment.
Strategy Overview:
Bollinger Bands serve as the primary tool for volatility and price level analysis. By calculating the standard deviation of price movements around a simple moving average (SMA), this strategy identifies the upper and lower bounds of price fluctuations, helping traders spot potential reversal points.
Stochastic RSI is used to gauge the momentum by comparing the closing price's position relative to its price range over a certain period. This indicator helps in determining overbought or oversold conditions, providing insights into potential bullish or bearish momentum.
Entry Signals:
Bullish Entry: The strategy signals a long entry when the price moves from below to above the lower Bollinger Band, coupled with a Stochastic RSI indicating an exit from oversold conditions. This suggests an uptrend initiation, prompting a buy order.
Bearish Entry: Conversely, a short entry is signaled when the price drops from above to below the upper Bollinger Band while the Stochastic RSI moves from overbought territory. This condition indicates a potential downtrend, triggering a sell order.
Exit Criteria:
Stop Loss: A key feature of this strategy is the inclusion of a user-defined stop loss percentage, which helps manage risk by specifying the maximum allowable loss per trade.
Bearish Exit for Long Positions: Long positions are exited either when a bearish signal is detected or when the price crosses below the lower Bollinger Band, suggesting a reversal or weakening of the bullish trend.
Bullish Exit for Short Positions: Short positions are closed upon a bullish signal or when the price crosses above the upper Bollinger Band, indicating a potential reversal or diminishing bearish momentum.
Strategy Benefits:
The strategy provides a structured framework for entering and exiting trades, leveraging the strengths of both Bollinger Bands and Stochastic RSI.
It includes parameters for customization, such as the stop loss percentage, allowing traders to align the strategy with their risk tolerance and trading objectives.
The ability to backtest and simulate trades on TradingView enhances its utility, offering insights into the strategy's performance under historical market conditions.
Overall, the Bollinger Bands Stochastic RSI Extreme Strategy is designed for traders who seek to capitalize on trend reversals and momentum shifts, with built-in risk management features to safeguard against significant losses.
Brilliance Academy Secret StrategyThe Brilliance Academy Secret Strategy is a powerful trading strategy designed to identify potential trend reversals and optimize entry and exit points in the market. This strategy incorporates a combination of technical indicators, including Moving Average Convergence Divergence (MACD), Relative Strength Index (RSI), Pivot Points, and Bollinger Bands.
Key Features:
MACD Indicator: A momentum oscillator that helps identify changes in trend strength and direction.
RSI Indicator: A momentum oscillator that measures the speed and change of price movements, indicating potential overbought or oversold conditions.
Pivot Points: Key levels used by traders to identify potential support and resistance levels in the market, aiding in trend reversal identification.
Bollinger Bands: Volatility bands placed above and below a moving average, indicating potential market volatility and overbought or oversold conditions.
How to Use:
Long Signals: Look for long signals when the market price is above the 200-period moving average, MACD line crosses below the signal line, RSI is above 30, and price is above the lower Bollinger Band or at a pivot low.
Short Signals: Look for short signals when the market price is below the 200-period moving average, MACD line crosses above the signal line, RSI is below 70, and price is below the upper Bollinger Band or at a pivot high.
Exit Strategy: Long trades are closed when the next short signal occurs or when the profit reaches a fixed take profit percentage (3% above entry price). Short trades are closed when the next long signal occurs or when the profit reaches a fixed take profit percentage (3% below entry price).
Vegas SuperTrend Enhanced - Strategy [presentTrading]█ Introduction and How it is Different
The "Vegas SuperTrend Enhanced - Strategy " trading strategy represents a novel integration of two powerful technical analysis tools: the Vegas Channel and the SuperTrend indicator. This fusion creates a dynamic, adaptable strategy designed for the volatile and fast-paced cryptocurrency markets, particularly focusing on Bitcoin trading.
Unlike traditional trading strategies that rely on a static set of rules, this approach modifies the SuperTrend's sensitivity to market volatility, offering traders the ability to customize their strategy based on current market conditions. This adaptability makes it uniquely suited to navigating the often unpredictable swings in cryptocurrency valuations, providing traders with signals that are both timely and reflective of underlying market dynamics.
BTC 6h LS
█ Strategy, How it Works: Detailed Explanation
This is an innovative approach that combines the volatility-based Vegas Channel with the trend-following SuperTrend indicator to create dynamic trading signals. This section delves deeper into the mechanics and mathematical foundations of the strategy.
Detail picture to show :
🔶 Vegas Channel Calculation
The Vegas Channel serves as the foundation of this strategy, employing a simple moving average (SMA) coupled with standard deviation to define the upper and lower bounds of the trading channel. This channel adapts to price movements, offering a visual representation of potential support and resistance levels based on historical price volatility.
🔶 SuperTrend Indicator Adjustment
Central to the strategy is the SuperTrend indicator, which is adjusted according to the width of the Vegas Channel. This adjustment is achieved by modifying the SuperTrend's multiplier based on the channel's volatility, allowing the indicator to become more sensitive during periods of high volatility and less so during quieter market phases.
🔶 Trend Determination and Signal Generation
The market trend is determined by comparing the current price with the SuperTrend values. A shift from below to above the SuperTrend line signals a potential bullish trend, prompting a "buy" signal, whereas a move from above to below indicates a bearish trend, generating a "sell" signal. This methodology ensures that trades are entered in alignment with the prevailing market direction, enhancing the potential for profitability.
BTC 6h Local
█ Trade Direction
A distinctive feature of this strategy is its configurable trade direction input, allowing traders to specify whether they wish to engage in long positions, short positions, or both. This flexibility enables users to tailor the strategy according to their risk tolerance, trading style, and market outlook, providing a personalized trading experience.
█ Usage
To utilize the "Vegas SuperTrend - Enhanced" strategy effectively, traders should first adjust the input settings to align with their trading preferences and the specific characteristics of the asset being traded. Monitoring the strategy's signals within the context of overall market conditions and combining its insights with other forms of analysis can further enhance its effectiveness.
█ Default Settings
- Trade Direction: Both (allows trading in both directions)
- ATR Period for SuperTrend: 10 (determines the length of the ATR for volatility measurement)
- Vegas Window Length: 100 (sets the length of the SMA for the Vegas Channel)
- SuperTrend Multiplier Base: 5 (base multiplier for SuperTrend calculation)
- Volatility Adjustment Factor: 5.0 (adjusts SuperTrend sensitivity based on Vegas Channel width)
These default settings provide a balanced approach suitable for various market conditions but can be adjusted to meet individual trading needs and objectives.
Footprint strategyThis strategy uses imbalance volume data obtained by footprint calculation technology.
There are two signals to enter a trade:
trend - the current buy volume on the bar is greater than the current sell volume and there is at least one imbalance line.
reversal - the current bar is falling, but the general market trend is positive (growing) and the imbalance buy volume exceeds the imbalance sell volume.
When any of the conditions is triggered, two orders are placed: Take Profit and Stop loss (according to the percentage value from the inputs).
A little advice on use:
The strategy performs best on a 15 minute timeframe.
It is necessary to choose acceptable values of Take Profit and Stop loss depending on the order of symbol prices.
Inputs related to the strategy:
Stop loss - percentage size of stop loss to exit the trade.
Enable stop loss - stop loss activation.
Take Profit - percentage size of Take Profit.
Calculation timeframe - this is the timeframe from which the volume will be collected for distribution to buy and sell (if you do not have access to the seconds chart, set here 1 minute, the accuracy will be less, but it will work).
Trend timeframe - this is the timeframe from which the trend will be calculated.
Enable trend - activation of trend calculation.
Inputs related to the calculation of footprints (collection of the volume of purchases and sales):
Count show bars - Number of bars from rt bar to history to calculate.
Display all available bars - Strategy calculation on all available bars (based on the available amount of data with reduced resolution (set in Calculation timeframe)).
Ticks Per Row - Sets the price step, calculated by multiplying the entered value by syminfo.mintick.
Auto - The automatic "Ticks Per Row" calculation is based on the first available bar and applied to subsequent bars.
Max row - sets the acceptable number of rows within a bar.
Imbalance Percent - A percentage coefficient to determine the Imbalance of price levels.
Stacked levels - And minimum number of consecutive Imbalance levels required to draw extended lines.
If you have suggestions for improving the strategy and adding new conditions for entering and exiting the trade, please write).
MCOTs Intuition StrategyInitial Capital: The strategy starts with an initial capital of $50,000.
Execution: Trades are executed on every price tick to capture all potential movements.
Contract Size: The default position size is one contract per trade.
Timeframe: Although not explicitly mentioned, this strategy is intended for a one-minute timeframe.
RSI Calculation: The Relative Strength Index (RSI) is calculated over a user-defined period (default is 14 periods).
Standard Deviation: The script calculates the standard deviation of the change in RSI values to determine the threshold for entering trades.
Exhaustion Detection: Before entering a long or short position, the script checks for exhaustion in the RSI’s momentum. This is to avoid entering trades during extreme conditions where a reversal is likely.
Entry Conditions: A long position is entered when the current RSI momentum exceeds the standard deviation threshold and is less than the previous momentum multiplied by an exhaustion factor. A short position is entered under the opposite conditions.
Limit Orders for Exit: Instead of traditional stop loss and take profit orders, the strategy uses limit orders to exit positions. This means the strategy sets a desired price level to close the position and waits for the market to reach this price.
Profit Target and Stop Loss: The script allows setting a profit target and stop loss in terms of ticks, which are the smallest measurable increments in price movement for the traded asset.
blah blah whatever
OBVious MA Strategy [1000X Trader]Exploring OBV: The OBVious MA Strategy
Are you using On Balance Volume (OBV) effectively? OBV is a gift to traders. OBV often provides a leading signal at the outset of a trend, when compression in the markets produces a surge in OBV prior to increased volatility.
This strategy demonstrates one method of utilizing OBV to your advantage. I call it the "OBVious MA Strategy ” only because it is so simple in its mechanics. This is meant to be a demonstration, not a strategy to utilize in live trading, as the primary utility of the OBVious MA indicator is as a volume confirmation filter that complements other components of a strategy. That said, I felt useful to present this indicator in isolation in this strategy to demonstrate the power it holds.
Strategy Features:
• OBV is the core signal: this strategy revolves around the On Balance Volume indicator. OBV is a straightforward indicator: it registers a value by adding total volume traded on up candles, and subtracts total volume on down candles, generating a line by connecting those values. OBV was described in 1963 by Joe Granville in his book "Granville's New Key to Stock Market Profits” in which the author argues that OBV is the most vital key to success as a trader, as volume changes are a major predictor of price changes.
• Dual Moving Averages: here we use separate moving averages for entries and exits. This allows for more granular trade management; for example, one can either extend the length of the exit MA to hold positions longer, or shorten the MA for swifter exits, independently of the entry signals.
Execution: long trades are taken when the OBV line crosses above the Long Entry Moving Average of the OBV. Long exits occur when the OBV line crosses under the Long Exit MA of the OBV. Shorts enter on a cross below the Short Entry MA, and exit on a cross above the Short Exit MA.
• Directional Trading: a direction filter can be set to "long" or "short," but not “both”, given that there is no trend filter in this strategy. When used in a bi-directional strategy with a trend filter, we add “both” to the script as a third option.
Application:
While this strategy outlines entry and exit conditions based on OBV crossovers with designated moving averages, is is, as stated, best used in conjunction with a supporting cast of confirmatory indicators (feel free to drop me a note and tell me how you've used it). It can be used to confirm entries, or you might try using it as a sole exit indicator in a strategy.
Visualization:
The strategy includes conditional plotting of the OBV MAs, which plot based on the selected trading direction. This visualization aids in understanding how OBV interacts with the set moving averages.
Further Discussion:
We all know the importance of volume; this strategy demonstrates one simple yet effective method of incorporating the OBV for volume analysis. The OBV indicator can be used in many ways - for example, we can monitor OBV trend line breaks, look for divergences, or as we do here, watch for breaks of the moving average.
Despite its simplicity, I'm unaware of any previously published cases of this method. The concept of applying MAs or EMAs to volume-based indicators like OBV is not uncommon in technical analysis, so I expect that work like this has been done before. If you know of other similar indicators or strategies, please mention in the comments.
One comparable strategy that uses EMAs of the OBV is QuantNomad’s "On Balance Volume Oscillator Strategy ", which uses a pair of EMAs on a normalized-range OBV-based oscillator. In that strategy, however, entries and exits occur on one EMA crossing the other, which places trades at distinctly different times than crossings of the OBV itself. Both are valid approaches with strength in simplicity.
Hurst Future Lines of Demarcation StrategyJ. M. Hurst introduced a concept in technical analysis known as the Future Line of Demarcation (FLD), which serves as a forward-looking tool by incorporating a simple yet profound line into future projections on a financial chart. Specifically, the FLD is constructed by offsetting the price half a cycle ahead into the future on the time axis, relative to the Hurst Cycle of interest. For instance, in the context of a 40 Day Cycle, the FLD would be represented by shifting the current price data 20 days forward on the chart, offering an idea of future price movement anticipations.
The utility of FLDs extends into three critical areas of insight, which form the backbone of the FLD Trading Strategy:
A price crossing the FLD signifies the confirmation of either a peak or trough formation, indicating pivotal moments in price action.
Such crossings also help determine precise price targets for the upcoming peak or trough, aligned with the cycle of examination.
Additionally, the occurrence of a peak in the FLD itself signals a probable zone where the price might experience a trough, helping to anticipate of future price movements.
These insights by Hurst in his "Cycles Trading Course" during the 1970s, are instrumental for traders aiming to determine entry and exit points, and to forecast potential price movements within the market.
To use the FLD Trading Strategy, for example when focusing on the 40 Day Cycle, a trader should primarily concentrate on the interplay between three Hurst Cycles:
The 20 Day FLD (Signal) - Half the length of the Trade Cycle
The 40 Day FLD (Trade) - The Cycle you want to trade
The 80 Day FLD (Trend) - Twice the length of the Trade Cycle
Traders can gauge trend or consolidation by watching for two critical patterns:
Cascading patterns, characterized by several FLDs running parallel with a consistent separation, typically emerge during pronounced market trends, indicating strong directional momentum.
Consolidation patterns, on the other hand, occur when multiple FLDs intersect and navigate within the same price bandwidth, often reversing direction to traverse this range multiple times. This tangled scenario results in the formation of Pause Zones, areas where price momentum is likely to temporarily stall or where the emergence of a significant trend might be delayed.
This simple FLD indicator provides 3 FLDs with optional source input and smoothing, A-through-H FLD interaction background, adjustable “Close the Trade” triggers, and a simple strategy for backtesting it all.
The A-through-H FLD interactions are a framework designed to classify the different types of price movements as they intersect with or diverge from the Future Line of Demarcation (FLD). Each interaction (designated A through H by color) represents a specific phase or characteristic within the cycle, and understanding these can help traders anticipate future price movements and make informed decisions.
The adjustable “Close the Trade” triggers are for setting the crossover/under that determines the trade exits. The options include: Price, Signal FLD, Trade FLD, or Trend FLD. For example, a trader may want to exit trades only when price finally crosses the Trade FLD line.
Shoutouts & Credits for all the raw code, helpful information, ideas & collaboration, conversations together, introductions, indicator feedback, and genuine/selfless help:
🏆 @TerryPascoe
🏅 @Hpotter
👏 @parisboy
Fine-tune Inputs: Fourier Smoothed Volume zone oscillator WFSVZ0Use this Strategy to Fine-tune inputs for the (W&)FSVZ0 Indicator.
Strategy allows you to fine-tune the indicator for 1 TimeFrame at a time; cross Timeframe Input fine-tuning is done manually after exporting the chart data.
I suggest using "Close all" input False when fine-tuning Inputs for 1 TimeFrame. When you export data to Excel/Numbers/GSheets I suggest using "Close all" input as True, except for the lowest TimeFrame.
MEANINGFUL DESCRIPTION:
The Volume Zone oscillator breaks up volume activity into positive and negative categories. It is positive when the current closing price is greater than the prior closing price and negative when it's lower than the prior closing price. The resulting curve plots through relative percentage levels that yield a series of buy and sell signals, depending on level and indicator direction.
The Wavelet & Fourier Smoothed Volume Zone Oscillator (W&)FSVZO is a refined version of the Volume Zone Oscillator, enhanced by the implementation of the Discrete Fourier Transform . Its primary function is to streamline price data and diminish market noise, thus offering a clearer and more precise reflection of price trends.
By combining the Wavalet and Fourier aproximation with Ehler's white noise histogram, users gain a comprehensive perspective on volume-related market conditions.
HOW TO USE THE INDICATOR:
The default period is 2 but can be adjusted after backtesting. (I suggest 5 VZO length and NoiceR max length 8 as-well)
The VZO points to a positive trend when it is rising above the 0% level, and a negative trend when it is falling below the 0% level. 0% level can be adjusted in setting by adjusting VzoDifference. Oscillations rising below 0% level or falling above 0% level result in a natural trend.
HOW TO USE THE STRATEGY:
Here you fine-tune the inputs until you find a combination that works well on all Timeframes you will use when creating your Automated Trade Algorithmic Strategy. I suggest 4h, 12h, 1D, 2D, 3D, 4D, 5D, 6D, W and M.
When I ndicator/Strategy returns 0 or natural trend , Strategy Closes All it's positions.
ORIGINALITY & USFULLNESS:
Personal combination of Fourier and Wavalet aproximation of a price which results in less noise Volume Zone Oscillator.
The Wavelet Transform is a powerful mathematical tool for signal analysis, particularly effective in analyzing signals with varying frequency or non-stationary characteristics. It dissects a signal into wavelets, small waves with varying frequency and limited duration, providing a multi-resolution analysis. This approach captures both frequency and location information, making it especially useful for detecting changes or anomalies in complex signals.
The Discrete Fourier Transform (DFT) is a mathematical technique that transforms discrete data from the time domain into its corresponding representation in the frequency domain. This process involves breaking down a signal into its individual frequency components, thereby exposing the amplitude and phase characteristics inherent in each frequency element.
This indicator utilizes the concept of Ehler's Universal Oscillator and displays a histogram, offering critical insights into the prevailing levels of market noise. The Ehler's Universal Oscillator is grounded in a statistical model that captures the erratic and unpredictable nature of market movements. Through the application of this principle, the histogram aids traders in pinpointing times when market volatility is either rising or subsiding.
DETAILED DESCRIPTION:
My detailed description of the indicator and use cases which I find very valuable.
What is oscillator?
Oscillators are chart indicators that can assist a trader in determining overbought or oversold conditions in ranging (non-trending) markets.
What is volume zone oscillator?
Price Zone Oscillator measures if the most recent closing price is above or below the preceding closing price.
Volume Zone Oscillator is Volume multiplied by the 1 or -1 depending on the difference of the preceding 2 close prices and smoothed with Exponential moving Average.
What does this mean?
If the VZO is above 0 and VZO is rising. We have a bullish trend. Most likely.
If the VZO is below 0 and VZO is falling. We have a bearish trend. Most likely.
Rising means that VZO on close is higher than the previous day.
Falling means that VZO on close is lower than the previous day.
What if VZO is falling above 0 line?
It means we have a high probability of a bearish trend.
Thus the indicator returns 0 and Strategy closes all it's positions when falling above 0 (or rising bellow 0) and we combine higher and lower timeframes to gauge the trend.
In the next Image you can see that trend is negative on 4h, negative on 12h and positive on 1D. That means trend is negative.
I am sorry, the chart is a bit messy. The idea is to use the indicator over more than 1 Timeframe.
What is approximation and smoothing?
They are mathematical concepts for making a discrete set of numbers a
continuous curved line.
Fourier and Wavelet approximation of a close price are taken from aprox library.
Key Features:
You can tailor the Indicator/Strategy to your preferences with adjustable parameters such as VZO length, noise reduction settings, and smoothing length.
Volume Zone Oscillator (VZO) shows market sentiment with the VZO, enhanced with Exponential Moving Average (EMA) smoothing for clearer trend identification.
Noise Reduction leverages Euler's White noise capabilities for effective noise reduction in the VZO, providing a cleaner and more accurate representation of market dynamics.
Choose between the traditional Fast Fourier Transform (FFT) , the innovative Double Discrete Fourier Transform (DTF32) and Wavelet soothed Fourier soothed price series to suit your analytical needs.
Image of Wavelet transform with FAST settings, Double Fourier transform with FAST settings. Improved noice reduction with SLOW settings, and standard FSVZO with SLOW settings:
Fast setting are setting by default:
VZO length = 2
NoiceR max Length = 2
Slow settings are:
VZO length = 5 or 7
NoiceR max Length = 8
As you can see fast setting are more volatile. I suggest averaging fast setting on 4h 12h 1d 2d 3d 4d W and M Timeframe to get a clear view on market trend.
What if I want long only when VZO is rising and above 15 not 0?
You have set Setting VzoDifference to 15. That reduces the number of trend changes.
Example of W&FSVZO with VzoDifference 15 than 0:
VZO crossed 0 line but not 15 line and that's why Indicator returns 0 in one case an 1 in another.
What is Smooth length setting?
A way of calculating Bullish or Bearish (W&)FSVZO .
If smooth length is 2 the trend is rising if:
rising = VZO > ta.ema(VZO, 2)
Meaning that we check if VZO is higher that exponential average of the last 2 elements.
If smooth length is 1 the trend is rising if:
rising = VZO_ > VZO_
Use this Strategy to fine-tune inputs for the (W&)FSVZO Indicator.
(Strategy allows you to fine-tune the indicator for 1 TimeFrame at a time; cross Timeframe Input fine-tuning is done manually after exporting the chart data)
I suggest using " Close all " input False when fine-tuning Inputs for 1 TimeFrame . When you export data to Excel/Numbers/GSheets I suggest using " Close all " input as True , except for the lowest TimeFrame . I suggest using 100% equity as your default quantity for fine-tune purposes. I have to mention that 100% equity may lead to unrealistic backtesting results. Be avare. When backtesting for trading purposes use Contracts or USDT.
Fine-Tune Inputs: Fourier Smoothed Hybrid Volume Spread AnalysisUse this Strategy to Fine-tune inputs for the HSHVSA Indicator.
Strategy allows you to fine-tune the indicator for 1 TimeFrame at a time; cross Timeframe Input fine-tuning is done manually after exporting the chart data.
I suggest using " Close all " input False when fine-tuning Inputs for 1 TimeFrame. When you export data to Excel/Numbers/GSheets I suggest using " Close all " input as True , except for the lowest TimeFrame.
MEANINGFUL DESCRIPTION:
The Fourier Smoothed Hybrid Volume Spread Analysis (FSHVSA) Strategy/Indicator is an innovative trading tool designed to fuse volume analysis with trend detection capabilities, offering traders a comprehensive view of market dynamics.
This Strategy/Indicator stands apart by integrating the principles of the Discrete Fourier Transform (DFT) and volume spread analysis, enhanced with a layer of Fourier smoothing to distill market noise and highlight trend directions with unprecedented clarity.
This smoothing process allows traders to discern the true underlying patterns in volume and price action, stripped of the distractions of short-term fluctuations and noise.
The core functionality of the FSHVSA revolves around the innovative combination of volume change analysis, spread determination (calculated from the open and close price difference), and the strategic use of the EMA (default 10) to fine-tune the analysis of spread by incorporating volume changes.
Trend direction is validated through a moving average (MA) of the histogram, which acts analogously to the Volume MA found in traditional volume indicators. This MA serves as a pivotal reference point, enabling traders to confidently engage with the market when the histogram's movement concurs with the trend direction, particularly when it crosses the Trend MA line, signalling optimal entry points.
It returns 0 when MA of the histogram and EMA of the Price Spread are not align.
WHAT IS FSHVSA INDICATOR:
The FSHVSA plots a positive trend when a positive Volume smoothed Spread and EMA of Volume smoothed price is above 0, and a negative when negative Volume smoothed Spread and EMA of Volume smoothed price is below 0. When this conditions are not met it plots 0.
HOW TO USE THE STRATEGY:
Here you fine-tune the inputs until you find a combination that works well on all Timeframes you will use when creating your Automated Trade Algorithmic Strategy. I suggest 4h, 12h, 1D, 2D, 3D, 4D, 5D, 6D, W and M.
ORIGINALITY & USEFULNESS:
The FSHVSA Strategy is unique because it applies DFT for data smoothing, effectively filtering out the minor fluctuations and leaving traders with a clear picture of the market's true movements. The DFT's ability to break down market signals into constituent frequencies offers a granular view of market dynamics, highlighting the amplitude and phase of each frequency component. This, combined with the strategic application of Ehler's Universal Oscillator principles via a histogram, furnishes traders with a nuanced understanding of market volatility and noise levels, thereby facilitating more informed trading decisions.
DETAILED DESCRIPTION:
My detailed description of the indicator and use cases which I find very valuable.
What is the meaning of price spread?
In finance, a spread refers to the difference between two prices, rates, or yields. One of the most common types is the bid-ask spread, which refers to the gap between the bid (from buyers) and the ask (from sellers) prices of a security or asset.
We are going to use Open-Close spread.
What is Volume spread analysis?
Volume spread analysis (VSA) is a method of technical analysis that compares the volume per candle, range spread, and closing price to determine price direction.
What does this mean?
We need to have a positive Volume Price Spread and a positive Moving average of Volume price spread for a positive trend. OR via versa a negative Volume Price Spread and a negative Moving average of Volume price spread for a negative trend.
What if we have a positive Volume Price Spread and a negative Moving average of Volume Price Spread?
It results in a neutral, not trending price action.
Thus the Indicator/Strategy returns 0 and Closes all long and short positions.
In the next Image you can see that trend is negative on 4h, we just move Negative on 12h and Positive on 1D. That means trend/Strategy flipped negative .
I am sorry, the chart is a bit messy. The idea is to use the indicator/strategy over more than 1 Timeframe.
Use this Strategy to fine-tune inputs for the HSHVSA Indicator.
(Strategy allows you to fine-tune the indicator for 1 TimeFrame at a time; cross Timeframe Input fine-tuning is done manually after exporting the chart data)
I suggest using " Close all " input False when fine-tuning Inputs for 1 TimeFrame. When you export data to Excel/Numbers/GSheets I suggest using " Close all " input as True , except for the lowest TimeFrame. I suggest using 100% equity as your default quantity for fine-tune purposes. I have to mention that 100% equity may lead to unrealistic backtesting results. Be avare. When backtesting for trading purposes use Contracts or USDT.
Spot Martingale KuCoin - The Quant ScienceINTRODUCTION
Backtesting software of the Spot Martingale algorithm offered by the KuCoin exchange.
This script replicates the logic used by the KuCoin bot and is useful for analyzing strategy on any cryptocurrency historical series.
It's not intended as an automatic trading algorithm and does not offer the possibility of automatic order execution.
The trader will use this software exclusively to research the best parameters with which to work on KuCoin.
LOGIC OF EXECUTION
The execution of orders is composed as follows:
1) Start Martingale: initial order
2) Martingale-Number: orders following Start Martingale
(A) The software is designed and developed to replicate trading without taking into account technical indicators or particular market conditions. The Initial Order (Start Martingale) will be executed immediately the close of the previous Martingale when the balance of market orders is zero. It will use the capital set in the Properties section for the initial order.
(B) After the first order, the software will open new orders as the price decreases. For orders following Start Martingale, the initial capital, multiplier, and number of orders in the exponential growth context are considered. The multiplier is the factor that determines the proportional increase in capital with each new order. The number of orders, indicates how many times the multiplier is applied to increase the investment.
Example
To find out the capital used in Martingale order number 5, with a Multiple For Position Increase equal to 2 and a starting capital of $100, the formula will be as follows:
Martingale Order = ($100 * (2 * 2 * 2 * 2 * 2)) = $100 * 32 = $3.200
(C) A multiplier is used for each new order that will increase the quantity purchased.
(D) All previously open orders are closed once the take profit is reached.
USER MANUAL
The user interface consists of two main sections:
1. Settings
Percentage Drop for Position Increase (0.1-15%) : percentage distance between Martingale orders. For example, if you set 5% each new order will be opened after a 5% price decrease from the previous one.
Max Position Increases (1-15) : number of Martingale orders to be executed after Start Martingale. For example, if you set 10, up to10 orders will be opened after Start Martingale.
Multiple For Position Increase (1-2x) : capital multiplier. For example, if you set 2 each for each new order, the capital involved will be doubled, order by order.
Take Profit Percentage (0.5-1000%) : percentage take profit, calculated on the average entry price.
2. Date Range Backtesting
The Date Range Backtesting section adjusts the analysis period. The user can easily adjust the UI parameters, and automatically the software will update the data.
LIMITATIONS OF THE MODEL
Although the Martingale model is widely used in position management, even this model has limitations and is subject to real risks during particular market conditions. Knowing these conditions will help you understand which asset is best to use the strategy on.
The main risks in adopting this automatic strategy are 2:
1) The price falls below our last order.
It happens during periods of strong bear-market in which the price collapses abruptly without experiencing any pullback. In this case the algorithm will enter a drawdown phase and the strategy will become a loser. The trader will then have to consider whether to wait for a price recovery or to incur a loss by manually closing the algorithm.
2) The price increases quickly.
It happens during periods of strong bull-market in which the price rises abruptly without experiencing any pullback. In this case the algorithm will not optimize order execution, working only with Start Martingale in the vast majority of trades. Given the exponential nature of the investment, the algorithm will in this case generate a profit that is always less than that of the reference market.
The best market conditions to use this strategy are characterized by high volatility such as correction phases during a bull run and/or markets that exhibit sideways price trends (such as areas of accumulation or congestion where price will generate many false signals).
FEATURES
This script was developed by including features to optimize the user experience.
Includes a dashboard at launch that allows the user to intuitively enter backtesting parameters.
Includes graphical indicator that helps the user analyze the behavior of the strategy.
Includes a date period backtesting feature that allows the user to adjust and choose custom historical periods.
DISCLAIMER
This script was released using parameters researched solely for the BTC/USDT pair, 4H timeframe, traded on the KuCoin Exchange (2017-present). Do not consider this combination of parameters as universal and usable on all assets and timeframes.
Market Volatility Strategy (MVS)/Introduction
The Market Volatility Strategy (MVS) is based on volatility as an anomaly for making abnormal returns in the stock market. It uses the VIX, often referred to as the "fear gauge" which measures the market's expectation of 30-day volatility based on S&P 500 index options, as it's measure of volatility.
/Design
The VIX term structure refers to the relationship between the volatility index (VIX) values across different expiration dates. The term structure is important because it provides insights into market sentiment, risk expectations, and potential volatility in the future. The VIX term structure can take on three main shapes:
1. Contango: This occurs when longer-term VIX futures are priced higher than shorter-term futures. It is the most common shape for the VIX term structure.
2. Backwardation: This occurs when shorter-term VIX futures are priced higher than longer-term futures, indicating that the market expects volatility to decrease over time. Backwardation is less common and is typically seen in periods of high market stress or volatility.
3. Flat: A flat term structure happens when the VIX futures are priced similarly across different expiration dates. This indicates that the market's expectations for volatility are consistent over time.
/Trading
The strategy uses an understanding of the VIX term structure to generate buy and sell signals, as it provides valuable information about future volatility expectations and potential risk.
- Buy Signal
Contango suggests that the market expects volatility to increase over time. In a contango environment, the strategy looks for long volatility trades.
- Sell Signal
Backwardation suggests that investors are concerned about the near term and are willing to pay more for immediate protection. In such scenarios, the strategy looks for short volatility trades.
- Cash
A flat term structure can be transitional, moving from contango to backwardation or vice versa, or it may occur when the market is uncertain about future volatility. The strategy is in cash in this environment.
/Signals
The strategy has three signals:
1) Volatility
2) Volatility+
3) Volatility*
This means a maximum of three positions, one for each signal, can be opened simultaneously to maximize gains from volatility.
/Results
The backtest results are based on a starting capital of $13,700 (convenient amount for retail traders) with 5% of equity for the position size and pyramiding of 3 to allow one open position at a time for each signal. Commissions vary from broker to broker and they are calculated in different ways so a simple but very high commission of $3 per order is used in backtesting this strategy. Slippage of 3 ticks is used to ensure the results are representative of real world, market order trading. Trades are generated on the close of the candle to avoid bias. The backtest results are available to view at the bottom of this page.
Note:
Past performance in backtesting does not guarantee future results. Broker execution, market changes and trader psychology can significantly affect strategy performance in live trading.
Originality:
The MVS strategy is unique because it is based on data from the futures and options markets. This is data that is not usually accessible or understood by the retail trader hence, volatility strategies are difficult for them to design. The strategy gives retail traders access to a volatility strategy with no parameters, this greatly reduces the risk of curve fitting while increasing robustness.
/Tickers
This strategy has been backtested primarily on SPXL but it is suitable for use on the VIX ETFs.
Divergent Bar Strategy [declarative] v0.2Divergent Bar Strategy v0.2
Divergent Bar is a price action that signals potential trend reversal.
This strategy uses repeating divergent bars during a bearish local trend as signals to issue multiple averaging long orders in the direction of potentially emerging bullish trend. As the local trend reverses from bearish to bullish, position could become profitable and is closed by an opposite signal.
As an averaging strategy, this strategy can accumulate substantial order sizes, so this implementation uses a stop loss which is adjusted dynamically according to the current position size to protect deposit.
What you see on a chart:
Greenish background under the divergent bars. This designates detected divergent signals.
Alligator Fast Period and Required Bar Amplitude affect the amount of divergent bars detected.
Red green and blue alligator lines display the alligator indicator used as part of divergent bar detection. In general, you don’t need to see it, you can color the lines transparent in the Style section.
Green triangles designate placed long orders. Required Divergents for Long Cummulative Signal parameter affects those signals.
Parameters and default values:
Alligator Fast Period, default 9.
Length of the alligator fast EMA. The alligator indicator used to filter a divergent bar. A bar is considered divergent only if it is located below the alligator for bollish signal and above for a bearish. In general you can leave default value, as the period 9 corresponds to a reasonable value for an alligator, used for bars on a specific timeframe.
Required Bar Amplitude (%), default 0.4.
This is an important parameter that needs to be adjusted for different timeframes. It specifies minimum size of candle shadow used to detect divergent bars. Higher values produce more false signals, lower values tend produce only strong signals. Be careful, because it also filters out bearish signals used to close the trades, so you need a bearish signal to appear. If you filter small signals you risk ending up with a trade that does not close in profit. You need to find a balance here.
Required Divergents for Long Cummulative Signal, default 3.
Divergent bar does not necessarily signal an immidiate trend reversal. Sometimes several signals need to accumulate. This parameter specifies the count at which the orders start. If you increase this count, orders are only placed after the count is achieved, so your position has bigger chance to go in profit sooner. It does not necessarily mean the most profitable position.
Required Divergents for Short Cummulative Signal, default 1.
It is the same as for long positions, but the opposite.
These signals are used to close the trades. Higher value can mean that a take profit signal would happen at potentially higher price, but be aware that it could also lead to missign oportunity to take profit if there is not enough signals in the sequence.
Long Order Size (%), default 5.0.
Percentage of deposit used for the first order in sequence. Actual order size is comuted dynamically, it depends on Reinvest and parameter. In case Reinvest is turned on, it is computed relative to the current equity, that is initial deposit and netprofit combined.
Reinvest (only for backtesting), default - turned off.
Affects Long Order Size. If turned off, order size is computed according to percentage of total equity, that is initial deposit + net profit. In an automated strategy, you should not turn this parameter on, because this way you can’t control the position size, as it growith or reduces during the actual period of the study.
Martingale, default 1.0.
Affects dynamically computed order size. First order is calculated in percentage from deposit or equity, as specified by Long Order Size and Reinvest parameters.
Order will be scaled by the following values:
Martingale = 0.0 - only the first order would be placed.
Martingale = 1.0 - equal orders will be placed in sequence, with leads to unlimited position growth.
Martingale = 1.3 - orders will be scaled by 1.3, 1.69, 2.197 etc. That is geometric increasing sequnce, which leads to unlimited position growth.
Sequential long order size is multiplied by the martingale value.
Martingale < 1.0 - orders will be scaled by geometrically decreasing sequence, resulting in limited growth of position.
Long Stop Loss (%), default 10.0.
Dynamically adjusted stop loss, which is computed according to the current average position price, so the value potentially lost is proportional to the percentage specified.
Show Long Stop Loss Line, default is off.
Draws a graph line corresponding to the dynamic stop loss on the chart.
Bullish Line Visual Offset (% of price), default -10
For convenience, the count of sequential orders is drawn as a green line over a black EMA on the same chart, offset from an EMA. This is just a visual aid to visualize the strength of long signal as divergent bars accumulate in sequence. EMA is just used so the visual cue is always displayed somewhere close the price graph.
Big RunnerPresenting the "Big Runner" technique, dubbed "Sprinter," which is intended to help traders looking for momentum chances recognise important market swings. This approach maximises profit potential while controlling risk by using trend ribbons and moving averages to identify entry and exit locations.
Important characteristics:
Moving Averages: To determine the direction of the underlying trend, moving averages, both rapid and slow, are used. Depending on their preferred trading strategy, traders can alter the duration of these averages.
Trend Ribbon: Shows phases of bullish and bearish momentum by using a ribbon indicator to visualise the strength of the trend. Trend transitions are simple to spot for traders so they can make wise decisions.
Buy and Sell Signals: This tool generates buy and sell signals that indicate possible entry and exit opportunities based on the crossing and crossunder of moving averages.
Stop Loss/Take Profit Management: This feature enables traders to successfully apply risk management methods by giving them the ability to set stop loss and take profit levels as a percentage of the entry price.
Dynamic Position Sizing: Optimises capital allocation for every trade by dynamically calculating position size depending on leverage and portfolio proportion.
Implementation:
Long Entry: Started when a bullish trend is indicated by a price cross above the fast and slow moving averages. To control risk and lock in earnings, stop loss and take profit thresholds are established appropriately.
Short Entry: Indicates a bearish trend when the price crosses below both moving averages. The concepts of risk management are similar, with dynamic calculations used to determine take-profit and stop-loss levels.
Extra Personalisation:
Take Profit/Stop Loss Management: Provides the ability to select a take profit and stop loss
API Integration: This feature improves execution flexibility and efficiency by enabling traders to include custom parameters for automated trading.
Notice:
Trading entails risk, and performances in the past do not guarantee future outcomes. Before making any trades with this approach, careful analysis and risk management are necessary.
In summary:
By integrating risk management procedures with technical indicators, the "Big Runner" strategy provides a thorough method for identifying noteworthy market changes and achieving the best possible trading results. Traders can adjust parameters to suit their interests and style of trading, giving them the confidence to traverse volatile market situations.
Universal Algorithm [BackQuant]Universal Algorithm
It is a trading strategy designed CLEAR TREND DETECTION . This script is the culmination of extensive research and development efforts aimed at providing traders with a robust tool capable of adapting to a wide array of market conditions. This description delves into the core components, methodologies, and operational parameters of Universal Algo to offer potential users a clear understanding of its functionalities and the principles underpinning its design.
Core Methodologies and Features:
Integrated Systems: Universal Algo is built around six core systems, each contributing unique analytical perspectives to enhance trade signal reliability. These systems are designed to identify clear trend opportunities for significant gains, while also employing logic to navigate through ranging markets effectively.
Adaptive Market Logic: By incorporating volatility metrics, the algorithm dynamically adjusts to changing market conditions. This ensures that the strategy remains effective across different market regimes, aiming to reduce market noise and improve signal quality.
Selective Shorting Mechanism: While the primary focus is on capturing long positions, it includes an optional shorting feature. This can be activated by users to adapt the strategy during macro downtrends, thus providing a flexible approach to market participation.
Backtesting and Forward-Testing Rigor : The strategy has undergone rigorous testing to validate its performance and reliability. It demonstrates prudent risk management by optimizing conditions under which short positions are considered, aiming to mitigate drawdowns and preserve capital.
Operational Parameters:
Customization Options: The script offers a range of user inputs, allowing for customization of the backtesting starting date, the decision to display the strategy equity curve, among other settings. These inputs cater to diverse trading needs and preferences, offering users control over their strategy implementation.
Transparency and Logic Insight: While specific calculation details and proprietary indicators are integral to maintaining the uniqueness of Universal Algo , the strategy is grounded on well-established financial analysis techniques. These include momentum analysis, volatility assessments, and adaptive thresholding, among others, to formulate its trade signals.
Realistic Trading Conditions : Backtesting, considered realistic trading conditions, including appropriate account size, commission, slippage, and sustainable risk levels per trade. The strategy is designed and tested with a focus on achieving a balance between risk and reward, striving for robustness and reliability rather than unrealistic profitability promises.
Concluding Thoughts:
Universal Algo is offered to the TradingView community as a tool for traders seeking to enhance their market analysis and trading strategies. Its development is driven by a commitment to quality, innovation, and adaptability, aiming to provide valuable insights and decision-support in various market conditions. Potential users are encouraged to evaluate Universal Algo within the context of their overall trading approach and objectives.