Ultimate Balance StrategyThe Ultimate Balance Oscillator Strategy harnesses the power of the Ultimate Balance Oscillator to deliver a comprehensive and disciplined approach to trading. By combining the insights of the Rate of Change (ROC), Relative Strength Index (RSI), Commodity Channel Index (CCI), Williams Percent Range, and Average Directional Index (ADX) from TradingView, this strategy offers traders a systematic way to navigate the markets with precision.
The core principle of this strategy lies in its ability to identify optimal entry and exit points based on the movement of the Ultimate Balance Oscillator. When the oscillator line crosses below the 0.75 level, a buy signal is generated, indicating a potential opportunity for a bullish trend reversal. Conversely, when the oscillator line crosses above the 0.25 level, it triggers an exit signal, suggesting a possible end to a bullish trend.
Key Features:
1. Objective Market Analysis: The Ultimate Balance Oscillator Strategy provides a disciplined and objective approach to market analysis. By relying on the quantified insights of multiple indicators, it helps traders cut through market noise and focus on key signals, improving decision-making and reducing emotional biases.
2. Enhanced Timing and Precision: This strategy's entry and exit signals are based on the specific thresholds of the Ultimate Balance Oscillator. By waiting for confirmation through the crossing of these levels, traders can potentially enter trades at opportune moments and exit with greater precision, maximizing profit potential and minimizing risk exposure.
3. Customizability and Adaptability: The strategy offers flexibility, allowing traders to customize the parameters to fit their preferred trading style and timeframes. Whether you're a short-term trader or a long-term investor, the Ultimate Balance Oscillator Strategy can be adjusted to suit your specific needs, making it adaptable to various market conditions.
4. Real-time Alerts: Stay informed and never miss a potential trade opportunity with the strategy's built-in alert system. Set personalized alerts for buy and exit signals to receive timely notifications, ensuring you're always aware of the latest developments in the market.
5. Backtesting and Optimization: Before applying the strategy to live trading, it's recommended to conduct thorough backtesting and optimization. By testing the strategy's performance over historical data and fine-tuning the parameters, you can gain insights into its strengths and weaknesses, enabling you to make informed adjustments and increase its effectiveness.
Trading involves risk. Use the Ultimate Balance Oscillator Strategy at your own discretion. Past performance is not indicative of future results.
Indikatoren und Strategien
DCA EMA Simple Bot [Starbots]
This is a simple idea of DCA trading on EMA crosses. Strategy is not repainting.
The difference between this and any other strategy is, that this script allows you to preset DCA buy triggers at desired levels and customize each DCA order size independently. Alerts are working, this strategy is easily used for automatic trading.
I mainly trade on Cryptohopper, Pionex, 3commas. This was created for community, alerts are working and non-repainting. Should work on any other as well.
Trading Condition:
It's buying when Fast EMA crosses up Slow EMA. Set your paramters.
It's selling if EMA's crosses back, signaling a sell. Optional.
DCA:
You can enter DCA on 20 custom levels or layers. It buys DCA when price hits the plotted blue line on the chart that's set by input % triggers. (buy 1st DCA at 2% drop, buy 2nd DCA at 5% drop,...)
Set your Inital Capital and Pyramiding in Properties tab, Initial Order Size and DCA Order Size (lot1,lot2,lot3,..), Order Type are changed in strategy inputs.
-By default you can see that we buy when EMA's cross up and signal a buy for 10% of equity, if market is dropping you will then place a first DCA order ( 20% equity) at 2% drop (lower) from initial order. If market keeps dropping you have more DCA levels where you can buy and average down your holding position. For selling you can use Take profit and Stop Loss targets that averages down multiple open positions, it will sell it once it reaches your desirable Take Profit and close a deal. You can also close your trade if EMA signals a sell.
Pyramiding - number of orders you can open at a time
Your first buy order is pyramiding 1. To allow it to buy 1 DCA or merge one time, set pyramding to 2.
Want to DCA 10 times? Set pyramiding at 11. (+1 always)
More features:
- Profit Calendar
- Show Balance label before every new trade
- DCA table - visualize how much of your investment is used in trades. If a background of the table is green you are okay, if the background color is red - you are using more money for orders than you actually have.
Buy Orders << Strategy Equity/Capital
- Show / Hide DCA lines - if your chart processing is getting slow you should hide some DCA levels to speed it up
- Backtesting Range - for testing the strategy in different time windows
- Alerts
When all trades are closed on your chart, winning rate of the strategy is 100% actually.
Win rate is shown differently as it's actually closing and opening every trade individually by default in TradingView system. We merge positions together and average it down into one big position to later sell for a profit (DCA).
You use this Trading Algorithm at your own risk. Do not trade before testing or invest something you cannot afford to lose on markets.
DZ Strategy ICTThe script presented is a trading strategy called "Breaker Block Strategy with Price Channel". This strategy uses multiple time frames (1 minute, 5 minutes, 15 minutes, 1 hour, and 4 hours) to detect support and resistance areas on the chart.
The strategy uses parameters such as length, deviations, multiplier, Fibonacci level, move lag and volume threshold for each time frame. These parameters are adjustable by the user.
The script then calculates support and resistance levels using the simple moving average (SMA) and standard deviation (STDEV) of closing prices for each time frame.
It also detects "Breaker Blocks" based on price movement from support and resistance levels, as well as trade volume. A Breaker Block occurs when there is a significant breakout of a support or resistance level with high volume.
Buy and sell signals are generated based on the presence of a Breaker Block and price movement from support and resistance levels. When a buy signal is generated, a buy order is placed, and when a sell signal is generated, a sell order is placed.
The script also plots price channels for each time frame, representing resistance and support levels.
Profit limit levels are set for each time range, indicating that the price levels assigned to positions should be closed with a profit. Stop-loss levels are also set to limit losses in the event of canceled price movements.
In summary, this trading strategy uses a combination of Breaker Block detection, support and resistance levels, price channels and profit limit levels to generate buy and sell signals and manage positions on different time ranges.
Williams %R Strategy
The Williams %R Strategy is a trading approach that is based on the Williams Percent Range indicator, available on the TradingView platform.
This strategy aims to identify potential overbought and oversold conditions in the market, providing clear buy and sell signals for entry and exit.
The strategy utilizes the Williams %R indicator, which measures the momentum of the market by comparing the current close price with the highest high and lowest low over a specified period. When the Williams %R crosses above the oversold level, a buy signal is generated, indicating a potential upward price movement. Conversely, when the indicator crosses below the overbought level, a sell signal is generated, suggesting a possible downward price movement.
Position management is straightforward with this strategy. Upon receiving a buy signal, a long position is initiated, and the position is closed when a sell signal is generated. This strategy allows traders to capture potential price reversals and take advantage of short-term market movements.
To manage risk, it is recommended to adjust the position size based on the available capital. In this strategy, the position size is set to 10% of the initial capital, ensuring proper risk allocation and capital preservation.
It is important to note that the Williams %R Strategy should be used in conjunction with other technical analysis tools and risk management techniques. Backtesting and paper trading can help evaluate the strategy's performance and fine-tune the parameters before deploying it with real funds.
Remember, trading involves risks, and past performance is not indicative of future results. It is always advised to do thorough research, seek professional advice, and carefully consider your financial goals and risk tolerance before making any investment decisions.
9:22 5 MIN 15 MIN BANKNIFTY9:22 5 MIN 15 MIN BANKNIFTY Strategy with Additional Filters
The 9:22 5 MIN 15 MIN BANKNIFTY Strategy with Additional Filters is a trend-following strategy designed for trading the BANKNIFTY instrument on a 5-minute chart. It aims to capture potential price movements by generating buy and sell signals based on moving average crossovers, breakout confirmations, and additional filters.
Key Features:
Fast MA Length: 9
Slow MA Length: 22
ATR Length: 14
ATR Filter: 0.5
Trailing Stop Percentage: 1.5%
Pullback Threshold: 0.5
Minimum Candle Body Percentage: 0.5
Use Breakout Confirmation: Enabled
Additional Filters:
Volume Threshold: Set a minimum volume requirement for trades.
Trend Filter: Optionally enable a trend filter based on a higher timeframe moving average.
Momentum Filter: Optionally enable a momentum filter using the RSI indicator.
Support/Resistance Filter: Optionally enable a filter based on predefined support and resistance levels.
Buy and Sell Signals:
Buy Signal: A buy signal is generated when the fast moving average crosses above the slow moving average, with additional confirmation from breakout and volume criteria, along with optional trend, momentum, and support/resistance filters.
Sell Signal: A sell signal is generated when the fast moving average crosses below the slow moving average, with similar confirmation and filtering criteria as the buy signal.
Exit Strategy:
The strategy employs a trailing stop-loss mechanism based on a percentage of the average entry price. The stop-loss is dynamically adjusted to protect profits while allowing for potential upside.
Please note that this strategy should be thoroughly backtested and evaluated in different market conditions before applying it to live trading. It is also recommended to adjust the parameters and filters according to individual preferences and risk tolerance.
Feel free to customise and adapt the description as needed to suit your preferences and the specific details of your strategy.
HK Percentile Interpolation One
This script is designed to execute a trading strategy based on Heikin Ashi candlesticks, moving averages, and percentile levels.
Please note that you should keep your original chart in normal candlestick mode and not switch it to Heikin Ashi mode. The script itself calculates Heikin Ashi values from regular candlesticks. If your chart is already in Heikin Ashi mode, the script would be calculating Heikin Ashi values based on Heikin Ashi values, which would produce incorrect results.
The strategy begins trading from a start date that you can specify by modifying the `startDate` parameter. The format of the date is "YYYY MM DD". So, for example, to start the strategy from January 1, 2022, you would set `startDate = timestamp("2022 01 01")`.
The script uses Heikin Ashi candlesticks, which are plotted in the chart. This approach can be useful for spotting trends and reversals more easily than with regular candlestick charts. This is particularly useful when backtesting in TradingView's "Rewind" mode, as you can see how the Heikin Ashi candles behaved at each step of the strategy.
Buy and sell signals are generated based on two factors:
1. The crossing over or under of the Heikin Ashi close price and the 75th percentile price level.
2. The Heikin Ashi close price being above certain moving averages.
You have the flexibility to adjust several parameters in the script, including:
1. The stop loss and trailing stop percentages (`stopLossPercentage` and `trailStopPercentage`). These parameters allow the strategy to exit trades if the price moves against you by a certain percentage.
2. The lookback period (`lookback`) used to calculate percentile levels. This determines the range of past bars used in the percentile calculation.
3. The lengths of the two moving averages (`yellowLine_length` and `purplLine_length`). These determine how sensitive the moving averages are to recent price changes.
4. The minimum holding period (`holdPeriod`). This sets the minimum number of bars that a trade must be kept open before it can be closed.
Please adjust these parameters according to your trading preferences and risk tolerance. Happy trading!
Moving Average Crossover Strategymoving average crossover startegy 10*30
it indicates when to buy or sell
BB and KC StrategyThis script is designed as a TradingView strategy that uses Bollinger Bands (BB) and Keltner Channels (KC) as the primary indicators for generating trade signals. It aims to catch potential market trends by comparing the movements of these two popular volatility measures.
Key aspects of this strategy:
1. **Bollinger Bands and Keltner Channels:** Both are volatility-based indicators. The Bollinger Bands consist of a middle band (simple moving average) and two outer bands calculated based on standard deviation, which adjusts itself to market conditions. Keltner Channels are a set of bands placed above and below an exponential moving average of the price. The distance between the bands is calculated based on the Average True Range (ATR), a measure of price volatility.
2. **Entry Signals:** The strategy enters a long position when the upper KC line crosses above the upper BB line and the volume is above its moving average. Conversely, it enters a short position when the lower KC line crosses below the lower BB line and the volume is above its moving average.
3. **Exit Signals:** The strategy exits a position under two conditions. First, if the trade has been open for a certain number of bars defined by the user (default 20 bars). Second, a stop loss and trailing stop are in place to limit potential losses and lock in profits as the price moves favorably. The stop loss is set at a percentage of the entry price (default 1.5% for long and -1.5% for short), and the trailing stop is also a percentage of the entry price (default 2%).
4. **Trade Quantity:** The script allows specifying the investment amount for each trade, set to a default of 1000 currency units.
Remember, this is a strategy script, which means it is used for backtesting and not for real-time signals or live trading. It is also recommended that it is used as a tool to aid your trading, not as a standalone system. As with any strategy, it should be tested over different market conditions and used in conjunction with other aspects of technical and fundamental analysis to ensure robustness and effectiveness.
Premium Smart Exit HMA [ByteBoost]The Premium Smart Exit HMA strategy is designed for fast-paced trend detection and is well-suited for small trades in highly volatile markets. It utilizes the Hull Moving Average (HMA) as a signal to execute trades and offers customizable inputs for price calculation, period settings, and stop loss/take profit levels. The strategy aims to reduce lag associated with traditional moving averages, allowing it to catch trends quickly.
Development Notes
This Strategy was developed with the PineScript language, version 5. The aim of the strategy is to provide a trading system that catches fast trend reversals and uses a modified version of the Hull Moving Average. The HMA adeptly adapts to swift variations in price movements while offering better smoothing and utilizes a user selected moving averages, mitigating the smoothing effect and is controlled with a custom weight design.
Features
Customizable trading periods.
Customizable stop loss and take profit levels.
Adjustable date range for backtesting.
Allows setting of initial capital, commission type and value.
Provides visual aids for better understanding of the market trends.
Customize the visuals of the strategy.
Strategy Description
The Smart Exit HMA strategy offers the flexibility to use various types of moving averages, allowing customization of inputs for price calculation, period settings, and stop loss/take profit levels. The strategy relies on the Hull Moving Average (HMA) as a signal to execute trades. However, you have control over the signal frequency by selecting your preferred period value, which determines the number of candles used in the average calculation. This allows you to adapt the strategy to market tendencies and increase its effectiveness during clear trends.
The Smart Exit HMA strategy is designed to minimize lag associated with traditional moving averages, enabling it to respond more quickly to recent price movements based on your chosen period. It's worth noting that the strategy plots two lines on the graph: the average line and the square root line. Buy and sell signals are generated when both lines intersect, indicating favorable trading opportunities.
Inputs/Settings
Capital - If using any leverage multiply the amount of money to invest by the leverage, else input the amount to be invested in every trade.
Start date - The date from which the strategy should begin its analysis. Leave unchanged to start from the earliest available date based on your account's plan.
End date - The date until which the strategy should conduct its analysis. Leave unchanged to continue until the current date.
Period - The lookback period for the moving average calculation, a longer period will translate into fewer trades that last longer.
Stop loss - Allows the use of a stop loss for all trades.
Take profit - Activates the use of a take profit for all trades.
Stop loss value - The distance from the entry price at which the strategy should exit to prevent further losses.
Take profit value - The distance from the entry price at which the strategy should exit to secure profits.
Take profit % - The percentage of the capital to take as profit.
Stop loss % - The percentage of the capital to set as the maximum loss.
Candles exit - The minimum number of candles before the strategy is allowed to close a trade.
Candles change - The minimum number of candles before the strategy is allowed to change the current trend.
Moving average type - Determines the preprocessing method applied prior to utilizing the HMA.
Custom weight - Enables the utilization of a personalized weighting system for the HMA. If chosen, ensure that the sum of all weights equals 1.
Open weight - Determines the weight assigned to the candle's open value.
Close weight - Specifies the weight assigned to the candle's close value.
High weight - Sets the weight attributed to the candle's high value.
Low weight - Determines the weight assigned to the candle's low value.
Highlighter - Light coloring between the trend and average price of each bar.
Signal labels - View the labels indicating a new long or short position.
Exit labels - Displays the labels indicating exit points.
Color long - Sets the color scheme for a new long position.
Color short - Sets the color scheme for a new short position.
Color exit - Decides the color scheme for the exit tag and cross shown.
Indicator Visuals
The strategy plots the two trendlines on the chart and changes its color based on its direction. It also plots shapes on the chart to denote potential buy (Long) and sell (Short) points where the signals of short and long will appear, as well as crosses for the exit points.
Strategy Alerts
The strategy does not include built-in alerts. However, alerts can be added using the TradingView interface based on the strategy's buy, sell and exit conditions. This way you will be able to receive notifications on your computer or phone when a new signal goes out.
Details
Repainting: It is important to mention that the strategy can mark an uptrend signal during a candle and disappear at the end of it, so please just put long or short when the buy/sell conditions are followed and marked by the strategy at the end of each candle.
Conclusion
The Premium Smart Exit HMA is a versatile strategy that combines the benefits of the Hull Moving Average with adjustable parameters to suit individual trading styles. It offers a combination of speed and smoothness, which can be beneficial in volatile markets.
Disclaimer
This strategy is provided as-is, with no guarantee of profits or responsibility for losses. Trading involves risk, and you should only trade with money you can afford to lose. Always conduct your own research and consider your financial situation before engaging in trading.
Basic PRISM Algorithm [ByteBoost]The Basic ByteBoost PRISM strategy is designed to operate in various market conditions by leveraging the concept of brownian motion theory, which refers to the unpredictable movement of particles suspended in a fluid. This characteristic of random motion can be effectively utilized for analyzing time series data, such as market candles. Based on this notion, we are making the following assumptions regarding the market.
The stock price exhibits characteristics of Brownian motion.
The stock price is distributed in a log-normal pattern.
Volatility remains constant over time.
Options can only be exercised upon expiration.
Risk-free interest does not fluctuate over time.
There are no random or arbitrary opportunities present in the market.
Development Notes
This Strategy was developed with the PineScript language, version 5. This indicator, and most of the descriptions below, were derived largely from the TradingView reference manual. Feedback and suggestions for improvement are more than welcome, as well as recommended input settings and best practices to assist and guide new users effectively.
Features
The ByteBoost PRISM indicator is capable of analyzing multiple aspects of market behavior simultaneously such as:
Detection of potential trend reversals.
Assessment of trend strength and market sentiment.
Identification of stop loss levels.
Discovery of potential entry and exit points.
Ensuring compatibility and effectiveness with other indicators.
Visualization of strategy using historical data.
Strategy Description
PRISM is an all in one strategy that allows the visualization of entry and exit points as well as the historical performance for every set of parameters. PRISM is a slow paced indicator recommended for the 1h timeframe, because it operates on the belief that markets move in a Brownian motion, for which it leaves enough space and time for the market to decide a trend and catch it at the right time as well as finding appropriate exits given the trend.
PRISM can exist in either an uptrend or downtrend state, but it does not necessarily imply that it reflects the true trend being observed. Instead, it emphasizes capturing significant movements and capitalizing on them by utilizing oscillator levels and exit points calculated based on oversold or overbought values, along with the volatility associated with these movements.
Usage
To use this strategy it is first needed to select a correct set of inputs that correspond to the market you are using, the extra, win difference and oscillator length are dependent on the current market and the average price it manages, so these inputs need to be modified for every pair of assets used.
The long and short tags signify the opportune moment to initiate a new position in the market, whether it's a long or short position, respectively. The exit tags indicate when these positions should be closed. If no exits occur before a new long or short position emerges, it is essential to conclude the existing position and commence a new one in the opposite direction.
Regarding exits, up to two exits can be executed for each movement. The user has the flexibility to determine how these exits are utilized. In the input section, a specific percentage of equity can be selected to be sold during the first exit. If set to 100%, only a single exit will be presented. Otherwise, the remaining equity will be sold during the second exit or at the next trend reversal depending on which action occurs first.
In case the user requires additional exits beyond the initial two, the alternative exits option can be activated in the inputs. This will provide access to supplementary exits, although they may be less advisable compared to the primary exits.
Inputs / Settings
Capital - If using any leverage multiply the amount of money to invest by the leverage, else input the amount to be invested in every trade.
Start date - The date from which the strategy should begin its analysis. Leave unchanged to start from the earliest available date based on your account's plan.
End date - The date until which the strategy should conduct its analysis. Leave unchanged to continue until the current date.
Extra - The minimum gain required in the market to trigger an exit opportunity. It can be a negative number to allow exits at a loss, potentially minimizing losses.
First exit % - If an exit is decided to be partial, it is very likely that there will be a second exit, this parameter determines the percentage of equity to be sold at the first exit. Note that a second exit may not always be applicable.
Win difference - The minimum difference between the entry point and the first exit to determine whether it should be a full exit or a partial exit, as the exit price approaches the entry price, the probability of a trend reversal increases, a full exit is beneficial.
Oscillator - Enables or disables the main oscillator, which helps determine entry points. Not all assets may benefit from this parameter.
Oscillator length - Specifies the number of candles considered for the entry points oscillator.
Highlighter - Applies a light color between the trend and average price of each bar.
Labels - Displays all the labels on the chart indicating trends, positions and exits.
Candle color - Color codes the inside of the candles with the current signal.
Oscillator points - Adds visual dots to indicate when the oscillator has changed its trend.
Color uptrend - Determines the color scheme for identifying uptrend movements.
Color downtrend - Determines the color scheme for identifying downtrend movements.
Color long - Sets the color scheme for a new long position.
Color short - Sets the color scheme for a new short position.
Color exit - Decides the color scheme for the exit tag and cross shown.
Indicator Visuals
The strategy plots the direction of the trend on the chart and changes its color based on this. It also plots shapes on the chart to denote potential buy (Long) and sell (Short) points, where the signals of short and long will appear as well as exit points which can be found as three different,
Exit 1 - A partial exit which sells the previously selected percentage of equity.
Exit 2 - A second exit that can only happen after an Exit 1 has happened, and sell the remaining amount of equity.
Exit Full - A full exit is executed when the price at the exit point is lower than the entry price plus the win difference value. This condition indicates that it is more advantageous to take a single exit rather than waiting for a second exit.
Strategy Alerts
The strategy does not include built-in alerts. However, alerts can be added using the TradingView interface based on the strategy's buy and sell conditions. This way you will be able to receive notifications on your computer or phone when a new signal goes out.
Details
Repainting: It is important to mention that the strategy can mark false long or short signals, as the oscillator is allowed to repaint on the same candle. So users must make sure the candle has closed on buy/sell conditions.
Excessive capital issue: If you configure the strategy with a big amount of capital (+$1,000,000 for example) it is possible that it will completely stop calculating exit signals, as they will be too big for TradingView’s engine to process.
Conclusion
The ByteBoost PRISM strategy empowers traders by providing comprehensive market analysis, clear entry and exit signals, and the ability to visualize strategy performance using historical data. It is a superior algorithm that maximizes profit potential and minimizes risks, making it the preferred choice for traders seeking a competitive edge in the financial markets.
Disclaimer
This strategy is provided as-is, with no guarantee of profits or responsibility for losses. Trading involves risk, and you should only trade with money you can afford to lose. Always conduct your own research and consider your financial situation before engaging in trading.
Equity Curve Trading with EMAWhat Is Equity Curve Trading?
In equity curve trading, traders apply a moving average to the curve. The idea is when the equity curve drops below the moving average, the strategy is put on hold. This is done to stop losses when either the hopes of the plan working start dimming or when the trader knows he cannot afford more losses on a strategy. The trader can resume trading this particular strategy when the equity curve is above the moving average.
Equity Curve Trading puts an investor at the ease of knowing that his investment is covered even when he is not actively tracking his strategy. When the equity curve dips below a level investor is comfortable with, it can be paused until such time that the equity curve is back above the determined moving average.
Example:
Equity Curve Trading Example
Trading Strategy
I choosed the SuperTrend strategy for BTCUSDT on 4 hour time frame. That shows nice equity curve with default settings. Let's find out and check can we improve the equity curve with this modern money management trade method?
Some shift is exist in original equity curve relatively to filtered equity curve, because of array usage, but it is not affected on calculations.
Conclusion
I tested a different time frames, settings and equity curves shapes, but it not gives advantages in equity curve. You can look at the table on the top right corner of the strategy with equity curve and you will see some statistic information for the original strategy and for the modified equity curve trade strategy. In most cases we have lower Win Rate and lower Net Profit after turning on Equity curve trading method. In some cases this can be help if you have the equity curve looks like at the picture above, but this equity curve is really bad for choosing this strategy to trade. I found that EMA works better than SMA, and RMA works better then EMA applied to Equity Curve. You can test your strategy with this trade method if you want, I make the source code opened for it. Please share your results, I hope it will helps.
Conclusion 2
Equity Curve Trading definitely has its proponents in the industry, some of them quite vocal. But, the overall efficacy of the approach is certainly not crystal clear. In fact, what is clear is that it is relatively easy to take a good strategy, and significantly degrade its performance by employing equity curve trading. While the overall objective of equity curve trading is unquestionable – cease trading poor performing strategies - it is probable that there are better ways of accomplishing that goal. From this study, the conclusion is equity curve trading with simple indicators has more downside than upside.
Master Supertrend Strategy [Trendoscope]Here is the strategy version of the indicator - Master Supertrend
Options and variations are same throughout.
🎲 Variations
Following variations are provided in the form of settings.
🎯 Range Type
Instead of ATR, different types of ranges can be used for stop calculation. Here is the complete list used in the script.
Plus/Minus Range* - Calculates plus range and minus range for each candle and uses them for different sides of stop calculation
Ladder ATR - Based on the existing concept of Ladder ATR defined in Supertrend-Ladder-ATR
True Range - True range derived from standard function ta.tr
Standard Deviation - Standard deviation of close prices
🎯 Applied Calculation
In standard ATR, rma of TR is used for calculations. But, the application calculation provides option to users to use different mechanisms. It can be a type of moving average or few other types of calculations.
Available values are
sma
ema
hma
rma
wma
high
median
🎯 Other options
Few other options provided are
Use Close Price - If selected stops are calculated based on the close price instead of high/low prices
Wait for Close If selected, change of supertrend direction is calculated based on close price instead of high/low prices
Diminishing Stop Distance - When selected, stop distance for the trend direction can only reduce and cannot increase. This option is useful for keeping the tight stops on strong trends.
🎯 Plus Minus Range*
One of the range type used is Plus/Minus Range. What it means and how are these ranges calculated? Let's have a look.
Plus Range is an upward movement of a candle from its last price or open price whichever is lower.
Minus Range is a downward movement of a candle from its last price or open price whichever is higher.
This divides True Range into two separate range for positive and negative side.
Note : Effectiveness on daily charts are quire visible. However, if you want to use it for lower timeframes, please play around with settings before settling on suitable configuration.
Premium PRISM Algorithm [ByteBoost]The ByteBoost PRISM strategy is designed to operate in various market conditions by leveraging the concept of brownian motion theory, which refers to the unpredictable movement of particles suspended in a fluid. This characteristic of random motion can be effectively utilized for analyzing time series data, such as market candles. Based on this notion, we are making the following assumptions regarding the market.
The stock price exhibits characteristics of Brownian motion.
The stock price is distributed in a log-normal pattern.
Volatility remains constant over time.
Options can only be exercised upon expiration.
Risk-free interest does not fluctuate over time.
There are no random or arbitrary opportunities present in the market.
Development Notes
This Strategy was developed with the PineScript language, version 5. This indicator, and most of the descriptions below, were derived largely from the TradingView reference manual. Feedback and suggestions for improvement are more than welcome, as well as recommended input settings and best practices to assist and guide new users effectively.
Features
The ByteBoost PRISM indicator is capable of analyzing multiple aspects of market behavior simultaneously such as:
Detection of potential trend reversals.
Assessment of trend strength and market sentiment.
Identification of stop loss levels.
Discovery of potential entry and exit points.
Ensuring compatibility and effectiveness with other indicators.
Visualization of strategy using historical data.
Customization options available.
Strategy Description
PRISM is an all in one strategy that allows the visualization of entry and exit points as well as the historical performance for every set of parameters. PRISM is a slow paced indicator recommended for the 1h timeframe, because it operates on the belief that markets move in a Brownian motion, for which it leaves enough space and time for the market to decide a trend and catch it at the right time as well as finding appropriate exits given the trend.
PRISM can exist in either an uptrend or downtrend state, but it does not necessarily imply that it reflects the true trend being observed. Instead, it emphasizes capturing significant movements and capitalizing on them by utilizing oscillator levels and exit points calculated based on oversold or overbought values, along with the volatility associated with these movements.
Usage
To use this strategy it is first needed to select a correct set of inputs that correspond to the market you are using, the extra, win difference and oscillator length are dependent on the current market and the average price it manages, so these inputs need to be modified for every pair of assets used.
The long and short tags signify the opportune moment to initiate a new position in the market, whether it's a long or short position, respectively. The exit tags indicate when these positions should be closed. If no exits occur before a new long or short position emerges, it is essential to conclude the existing position and commence a new one in the opposite direction.
Regarding exits, up to two exits can be executed for each movement. The user has the flexibility to determine how these exits are utilized. In the input section, a specific percentage of equity can be selected to be sold during the first exit. If set to 100%, only a single exit will be presented. Otherwise, the remaining equity will be sold during the second exit or at the next trend reversal depending on which action occurs first.
In case the user requires additional exits beyond the initial two, the alternative exits option can be activated in the inputs. This will provide access to supplementary exits, although they may be less advisable compared to the primary exits.
Inputs / Settings
Capital - If using any leverage multiply the amount of money to invest by the leverage, else input the amount to be invested in every trade.
Start date - The date from which the strategy should begin its analysis. Leave unchanged to start from the earliest available date based on your account's plan.
End date - The date until which the strategy should conduct its analysis. Leave unchanged to continue until the current date.
Extra - The minimum gain required in the market to trigger an exit opportunity. It can be a negative number to allow exits at a loss, potentially minimizing losses.
First exit % - If an exit is decided to be partial, it is very likely that there will be a second exit, this parameter determines the percentage of equity to be sold at the first exit. Note that a second exit may not always be applicable.
Win difference - The minimum difference between the entry point and the first exit to determine whether it should be a full exit or a partial exit, as the exit price approaches the entry price, the probability of a trend reversal increases, a full exit is beneficial.
Limit length - Specifies the number of candles to consider for the overbought and oversold market calculation.
Low limit - Sets the minimum value of the limit to decide a short exit.
High limit - Sets the maximum value of the limit to decide a long exit.
Band length - Determines the number of candles to consider for the volatility analysis.
Band height - Sets the multiplication factor of the band to set the maximum and minimum height.
Increment - Determines the rate at which trend reversals occur. A higher value brings the line closer to the current price faster.
Candles exit - Specifies the minimum number of candles required to pass for an exit to become available after initiating a new position.
Oscillator - Enables or disables the main oscillator, which helps determine entry points. Not all assets may benefit from this parameter.
Oscillator length - Specifies the number of candles considered for the entry points oscillator.
Highlighter - Applies a light color between the trend and average price of each bar.
Trend Labels - Displays labels indicating an uptrend or downtrend.
Signal Labels - View the labels indicating a new long or short position.
Exit Labels - Displays the labels indicating exit points.
Candle color - Color codes the inside of the candles with the current signal.
Cloud - Visualize the average price cloud to determine trend direction.
Oscillator points - Adds visual dots to indicate when the oscillator has changed its trend.
Oscillator line - Displays the values of the oscillator to indicate upcoming trend changes.
Alternative exits - Shows additional exits to the ones we recommend, useful if the user missed an exit or needs to have more than two.
Color uptrend - Determines the color scheme for identifying uptrend movements.
Color downtrend - Determines the color scheme for identifying downtrend movements.
Color long - Sets the color scheme for a new long position.
Color short - Sets the color scheme for a new short position.
Color exit - Decides the color scheme for the exit tag and cross shown.
Color alternative exit - Changes the color scheme for the alternative exit cross.
Color oscillator line - Determines the color scheme used for the oscillator line.
Indicator Visuals
The strategy plots the direction of the trend on the chart and changes its color based on this. It also plots shapes on the chart to denote potential buy (Long) and sell (Short) points, where the signals of short and long will appear as well as exit points which can be found as three different,
Exit 1 - A partial exit which sells the previously selected percentage of equity.
Exit 2 - A second exit that can only happen after an Exit 1 has happened, and sell the remaining amount of equity.
Exit Full - A full exit is executed when the price at the exit point is lower than the entry price plus the win difference value. This condition indicates that it is more advantageous to take a single exit rather than waiting for a second exit.
Strategy Alerts
The strategy does not include built-in alerts. However, alerts can be added using the TradingView interface based on the strategy's buy and sell conditions. This way you will be able to receive notifications on your computer or phone when a new signal goes out.
Details
Repainting: It is important to mention that the strategy can mark false long or short signals, as the oscillator is allowed to repaint on the same candle. So users must make sure the candle has closed on buy/sell conditions.
Excessive capital issue: If you configure the strategy with a big amount of capital (+$1,000,000 for example) it is possible that it will completely stop calculating exit signals, as they will be too big for TradingView’s engine to process.
Conclusion
The ByteBoost PRISM strategy empowers traders by providing comprehensive market analysis, clear entry and exit signals, and the ability to visualize strategy performance using historical data. It is a superior algorithm that maximizes profit potential and minimizes risks, making it the preferred choice for traders seeking a competitive edge in the financial markets.
Disclaimer
This strategy is provided as-is, with no guarantee of profits or responsibility for losses. Trading involves risk, and you should only trade with money you can afford to lose. Always conduct your own research and consider your financial situation before engaging in trading.
Entropy, Liquidity, and Momentum - ELMoELMo is a momentum trading strategy based on two concepts: entropy and liquidity
The core concept behind the strategy is twofold: trade based on reversals in momentum based on the strength of a trend, and trade when market liquidity is beneficial to the position.
Entries and exits are determined by first calculating Shannon entropy for the time series and applying various moving averages. Separately, the Hui-Heubel Liquidity Ratio (lhh) is calculated and applied as a filter. Finally, additional conditionals such as RSI are applied to reduce false entries.
Entropy is defined as the amount of 'randomness' in a system and in this application can be thought of as a measure of the strength or weakness of a trend. The main moving averages and visible components in ELMo represent the normalized entropy score of the 'close' value (0 is series minimum, 1 is maximum). lhh will measure illiquid/fragile markets with low values and liquid/resilient markets with a high value. In general, the strategy will prefer to enter long when liquidity is high and short when liquidity is low, based off of cross events in the displayed entropy moving averages. I have published lhh as a separate indicator but it is not required for this strategy to function.
Several settings can be configured inside the strategy, including long/short bias, lookback window, MA band lengths, RSI boundaries, and more, but I have tried to choose sensible defaults that work for a large variety of situations and equities. My preferred time scales are 1m 1h 4h 1d 1w 1mo but others may work fine. Trailing stops are implemented using configurable ATR values. Additional settings are available to limit entry times (default is set to US options market open/close), and backtesting start date.
The long strategy is generally more accurate than short. Since Pinescript does not have a way to manage long/short exposure in a hedged fashion, I prefer to run two separate instances of ELMo in long-only and short-only modes for signaling. I prefer to trade this strategy with a long bias using the short signals as indications of windows of weakness where hedging could be prudent.
Monthly Strategy Performance TableWhat Is This?
This script code adds a Monthly Strategy Performance Table to your Pine Script strategy scripts so you can see a month-by-month and year-by-year breakdown of your P&L as a percentage of your account balance.
The table is based on realized equity rather than open equity, so it only updates the metrics when a trade is closed.
That's why some numbers will not match the Strategy Tester metrics (such as max drawdown), as the Strategy Tester bases metrics like max drawdown on open trade equity and not realized equity (closed trades).
The script is still a work-in-progress, so make sure to read the disclaimer below. But I think it's ready to release the code for others to play around with.
How To Use It
The script code includes one of my strategies as an example strategy. You need to replace my strategy code with your own. To do that just copy the source code below into a blank script, delete lines 11 -> 60 and paste your strategy code in there instead of mine. The script should work with most systems, but make sure to read the disclaimer below.
It works best with a significant amount of historical data, so it may not work very effectively on intraday timeframes as there is a severe limitation of available bars on TradingView. I recommend using it on 4HR timeframes and above, as anything less will produce very little usable data. Having a premium TradingView plan will also help boost the number of available bars.
You can hover your mouse over a table cell to get more information in the form of tooltips (such as the Long and Short win rate if you hover over your total return cell).
Credit
The code in this script is based on open-source code originally written by QuantNomad, I've made significant changes and additions to the original script but all credit for the idea and especially the display table code goes to them - I just built on top of it:
Why Did I Make This?
None of this is trading or investment advice, just my personal opinion based on my experience as a trader and systems developer these past 6+ years:
The TradingView Strategy Tester is severely limited in some important ways. And unless you use complex Excel formulas on exported test data, you can't see a granular perspective of your system's historical performance.
There is much more to creating profitable and tradeable systems than developing a strategy with a good win rate and a good return with a reasonable drawdown.
Some additional questions we need to ask ourselves are:
What did the system's worst drawdown look like?
How long did it last?
How often do drawdowns occur, and how quickly are they typically recovered?
How often do we have a break-even or losing month or year?
What is our expected compounded annual growth rate, and how does that growth rate compare to our max drawdown?
And many more questions that are too long to list and take a lifetime of trading experience to answer.
Without answering these kinds of questions, we run the risk of developing systems that look good on paper, but when it comes to live trading, we are uncomfortable or incapable of enduring the system's granular characteristics.
This Monthly Performance Table script code is intended to help bridge some of that gap with the Strategy Tester's limited default performance data.
Disclaimer
I've done my best to ensure the numbers this code outputs are accurate, and according to my testing with my personal strategy scripts it appears to work fine. But there is always a good chance I've missed something, or that this code will not work with your particular system.
The majority of my TradingView systems are extremely simple single-target systems that operate on a closed-candle basis to minimize many of the data reliability issues with the Strategy Tester, so I was unable to do much testing with multiple targets and pyramiding etc.
I've included a Debug option in the script that will display important data and information on a label each time a trade is closed. I recommend using the Debug option to confirm that the numbers you see in the table are accurate and match what your strategy is actually doing.
Always do your own due diligence, verify all claims as best you can, and never take anyone's word for anything.
Take care, and best of luck with your trading :)
Kind regards,
Matt.
PS. If you're interested in learning how this script works, I have a free hour-long video lesson breaking down the source code - just check out the links below this script or in my profile.
Premium Volatility Breakout Strategy [wbburgin]This the premium version of my Volatility Breakout strategy, which improves significantly on the original strategy (publicly available on my profile). Improvements are below. A note about any of my premium scripts: I will continue updating and improving the original (public) versions.
This strategy is not built for any specific asset or timeframe, and has been backtested on crypto, equities, and forex from 1min - 1day. However, I recommend using it on more volatile assets because it is a breakout strategy.
********** My Background
I am an investor, trader, and entrepreneur with 10 years of cryptocurrency and equity trading experience and founder of two fintech startups. I am a graduate of a prestigious university in the United States and carry broad and inclusive interests in mathematical finance, computer science, machine learning / artificial intelligence, as well as other fields.
**********
Improvements over the original Volatility Breakout strategy include:
Faster Trend Detection → The Premium Volatility Breakout strategy will catch trends faster by using adaptive volatility-weighted bands instead of standard-width volatility-weighted bands. This can improve win size and has performed well in my backtesting.
ADX Filter → False breakouts dampen the overall results of the original script, as well as the % profitable,so an ADX filter has been programmed into the script (toggle on/off in settings). This filter will only enter long and short trades when the ADX is above a certain threshold. This is by default toggled off because in most instances it will not be necessary, but in certain environments may be useful.
MA Configuration → Different types of moving averages and weights are now configurable in the settings. These can change the responsiveness of the strategy.
External Trend Filter → I use this strategy as a filter for some of my low-timeframe algorithms. I have added an external trend filter (a plot only displayed in the data window) that will return “1” when the trend is long and “-1” when the trend is short (displayed on-chart with red and green trend curves).
Customizable Alert Messages In-Strategy → In the settings, there will be text boxes where you can create your own alerts. All you will need to do is create an alert in the alert panel on TradingView and leave the message box blank - if you fill out the alert boxes in the settings, these will automatically populate into your alerts. There are in total four different customizable alerts messages: Entry and Exit alerts for both Long and Short sides. If you disable stop loss and/or take profit, these alerts will also be disabled. Similarly, if you disable shorts, all short alerts will be disabled.
About stop losses: This strategy does not come with a stop loss because the moving average acts as a stop loss / trade exit for both long and short entries.
**********
Display
You can turn off highlighting or barcolor in the settings. Additionally, future updates may include a color scheme for users using a light-themed window.
**********
Configuring Alerts
In TradingView desktop, go to the ‘Alerts’ tab on the right panel. Click the “+” button to create a new alert. Select this strategy for the condition and one of the two options that includes alert() function calls. Name the alert what you wish and clear the default message, because your text in the settings will replace this message.
Now that the alert is configured, you can go to the settings of the strategy and fill in your chosen text for the specific alert condition. You will need to check “Long and Short” in the “Trade Direction” setting in order for any Short Alerts to become active.
**********
Disclaimer
Copyright by wbburgin.
The information contained in my Scripts/Indicators/Algorithms does not constitute financial advice or a solicitation to buy or sell any securities of any type. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
Cyatophilum SmartStrategy MakerThis indicator allows you to use any other indicator from the TradingView library and create complex entry and exit conditions with ease thanks to several external inputs. Add risk management to your strategy and backtest it before creating alerts!
Key Features:
1 — Entry Conditions: Traders can define their entry conditions using up to three sources. They can choose from several options such as "Cross," "Crossover," "Crossunder," "Above," "Below," or "Equal" for comparing the selected sources.
2 — Entry Gates: Users can set logical gates (e.g., "AND," "OR," "XOR," "NAND," "XNOR") to combine multiple entry conditions.
3 — Exit Conditions: Similar to entry conditions, traders can define exit conditions based on two sources and select from various comparison options.
4 — Stop Loss: The indicator allows users to enable or disable a stop-loss feature. The stop-loss value is calculated based on a percentage of the base order price.
5 — Take Profit: Traders can set multiple take-profit levels by specifying the number of take profits, a base percentage, and a step value. Take profits can be defined as a percentage from the total volume or the base order.
6 — Safety Orders (DCA): The indicator supports the use of safety orders (Dollar Cost Averaging) to help manage risks. Users can set the number of safety orders, price deviation, step scale, and volume scale.
7 — Backtest Settings: Traders can define the start and end periods for backtesting their strategy. This feature allows them to analyze the performance of their strategy within specific timeframes.
8 — Alerts: The indicator provides the option to create alerts for entry, exit, stop loss, take profit, and safety orders. Users can customize the alert messages using placeholders for dynamic values like price, symbol, and order size.
Hobbiecode - RSI + Close previous dayThis is a simple strategy that is working well on SPY but also well performing on Mini Futures SP500. The strategy is composed by the followin rules:
1. If RSI(2) is less than 15, then enter at the close.
2. Exit on close if today’s close is higher than yesterday’s high.
If you backtest it on Mini Futures SP500 you will be able to track data from 1993. It is important to select D1 as timeframe.
Please share any comment or idea below.
Have a good trading,
Ramón.
Hobbiecode - Five Day Low RSI StrategyThis is a simple strategy that is working well on SPY but also well performing on Mini Futures SP500. The strategy is composed by the followin rules:
1. If today’s close is below yesterday’s five-day low, go long at the close.
2. Sell at the close when the two-day RSI closes above 50.
3. There is a time stop of five days if the sell criterium is not triggered.
If you backtest it on Mini Futures SP500 you will be able to track data from 1993. It is important to select D1 as timeframe.
Please share any comment or idea below.
Have a good trading,
Ramón.
Hobbiecode - SP500 IBS + HigherThis is a simple strategy that is working well on SPY but also well performing on Mini Futures SP500. The strategy is composed by the followin rules:
1. Today is Monday.
2. The close must be lower than the close on Friday.
3. The IBS must be below 0.5.
4. If 1-3 are true, then enter at the close.
5. Sell 5 trading days later (at the close).
If you backtest it on Mini Futures SP500 you will be able to track data from 1993. It is important to select D1 as timeframe.
Please share any comment or idea below.
Have a good trading,
Ramón.
VWAP Trendfollow Strategy [wbburgin]This is an experimental strategy that enters long when the instrument crosses over the upper standard deviation band of a VWAP and enters short when the instrument crosses below the bottom standard deviation band of the VWAP. I have added a trend filter as well, which stops entries that are opposite to the current trend of the VWAP. The trend filter will reduce total false breakouts, thus improving the % profitable while maintaining the overall returns of the strategy. Because this is a trend-following breakout strategy, the % profitable will typically be low but the average % return will be higher. As a rule, be sure to look at the average winning trade % compared to the average losing trade %, and compare that to the % profitable to judge the effectiveness of a strategy. Factor in fees and slippage as well.
This strategy appears to work better with the lower timeframes, and I was impressed with its results. It also appears to work on a wide range of asset classes. There isn't a stop loss or take profit built-in (other than the reversal signals, which close the current trade), so I would encourage you to expand on the strategy based on your own trading parameters.
You can toggle off the bar colors and the trend filter if you so desire.
Future updates to this script (or ideas of improving on it) might include a take profit level set at one standard deviation past the current level and a stop loss level set at one standard deviation closer to the vwap from the current level - or applying a multiple to the two based off of your reward/risk ratio.
About the strategy results below: this is with commissions of 0.5 % per trade.
Range BreakerStrategy Description: Range Breaker
The Range Breaker strategy is a breakout trading strategy that aims to capture profits when the price of a financial instrument moves out of a defined range. The strategy identifies swing highs and swing lows over a specified lookback period and enters long or short positions when the price breaks above the swing high or below the swing low, respectively. It also employs stop targets based on a percentage to manage risk and protect profits.
Beginner's Guide:
Understand the concepts:
a. Swing High: A swing high is a local peak in price where the price is higher than the surrounding prices.
b. Swing Low: A swing low is a local trough in price where the price is lower than the surrounding prices.
c. Lookback Period: The number of bars or periods the strategy analyzes to determine swing highs and swing lows.
d. Stop Target: A predetermined price level at which the strategy will exit the position to manage risk and protect profits.
Configure the strategy:
a. Set the initial capital, order size, commission, and pyramiding as needed for your specific trading account.
b. Choose the desired lookback period to identify the swing highs and lows.
c. Set the stop target multiplier and stop target percentage as desired to manage risk and protect profits.
Backtest the strategy:
a. Set the backtest start date to analyze the strategy's historical performance.
b. Observe the backtesting results to evaluate the strategy's effectiveness and adjust the parameters if necessary.
Implement the strategy:
a. Apply the strategy to your preferred financial instrument on the TradingView platform.
b. Monitor the strategy's performance and adjust the parameters as needed to optimize its effectiveness.
Risk management:
a. Always use a stop target to protect your trading capital and manage risk.
b. Don't risk more than a small percentage of your trading capital on a single trade.
c. Be prepared to adjust the strategy or stop trading it if the market conditions change significantly.
Adjusting the Lookback Period and Timeframes for Optimal Strategy Performance
The Range Breaker strategy uses a lookback period to identify swing highs and lows, which serve as the basis for determining entry and exit points for long and short positions. By adjusting the lookback period and analyzing different timeframes, you can potentially find the best strategy configuration for each specific asset.
Adjusting the lookback period:
The lookback period is a critical parameter that affects the sensitivity of the strategy to price movements. A shorter lookback period will make the strategy more sensitive to smaller price fluctuations, resulting in more frequent trading signals. On the other hand, a longer lookback period will make the strategy less sensitive, generating fewer signals but potentially capturing larger price movements.
To optimize the lookback period for a specific asset, you can test different lookback values and compare their performance in terms of risk-adjusted returns, win rate, and other relevant metrics. Keep in mind that using an overly short lookback period may lead to overtrading and increased transaction costs, while an overly long lookback period may cause the strategy to miss profitable trading opportunities.
Analyzing different timeframes:
Timeframes refer to the duration of each bar or candlestick on the chart. Shorter timeframes (e.g., 5-minute, 15-minute, or 30-minute) focus on intraday price movements, while longer timeframes (e.g., daily, weekly, or monthly) capture longer-term trends. The choice of timeframe affects the number of trading signals generated by the strategy and the length of time each position is held.
To find the best strategy for each asset, you can test the Range Breaker strategy on different timeframes and analyze its performance. Keep in mind that shorter timeframes may require more active monitoring and management due to the increased frequency of trading signals. Longer timeframes, on the other hand, may require more patience as positions are held for extended periods.
Finding the best strategy for each asset:
Every asset has unique price characteristics that may affect the performance of a trading strategy. To find the best strategy for each asset, you should:
a. Test various lookback periods and timeframes, observing the strategy's performance in terms of profitability, risk-adjusted returns, and win rate.
b. Consider the asset's historical price behavior, such as its volatility, liquidity, and trend-following or mean-reverting tendencies.
c. Evaluate the strategy's performance during different market conditions, such as bullish, bearish, or sideways markets, to ensure its robustness.
d. Keep in mind that each asset may require a unique set of strategy parameters for optimal performance, and there may be no one-size-fits-all solution.
By experimenting with different lookback periods and timeframes, you can fine-tune the Range Breaker strategy for each specific asset, potentially improving its overall performance and adaptability to changing market conditions. Always practice proper risk management and be prepared to make adjustments as needed.
Remember that trading strategies carry inherent risk, and past performance is not indicative of future results. Always practice proper risk management and consider your own risk tolerance before trading with real money.
Wyckoff Range StrategyThe Wyckoff Range Strategy is a trading strategy that aims to identify potential accumulation and distribution phases in the market using the principles of Wyckoff analysis. It also incorporates the detection of spring and upthrust patterns.
Here's a step-by-step explanation of how to use this strategy:
Understanding Accumulation and Distribution Phases:
Accumulation Phase: This is a period where smart money (large institutional traders) accumulates a particular asset at lower prices. It is characterized by a sideways or consolidating price action.
Distribution Phase: This is a period where smart money distributes or sells a particular asset at higher prices. It is also characterized by a sideways or consolidating price action.
Input Variables:
crossOverLength: This variable determines the length of the moving average crossover used to identify accumulation and distribution phases. You can adjust this value based on the market you are trading and the time frame you are analyzing.
stopPercentage: This variable determines the percentage used to calculate the stop loss level. It helps you define a predefined level at which you would exit a trade if the price moves against your position.
Strategy Conditions:
Enter Long: The strategy looks for a crossover of the close price above the SMA of the close price with a length of crossOverLength and a crossover of the low price above the SMA of the low price with a length of 20. This combination suggests the start of an accumulation phase and a potential buying opportunity.
Exit Long: The strategy looks for a crossunder of the close price below the SMA of the close price with a length of crossOverLength or a crossunder of the high price below the SMA of the high price with a length of 20. This combination suggests the end of an accumulation phase and a potential exit signal for long positions.
Enter Short: The strategy looks for a crossunder of the close price below the SMA of the close price with a length of crossOverLength and a crossunder of the high price below the SMA of the high price with a length of 20. This combination suggests the start of a distribution phase and a potential selling opportunity.
Exit Short: The strategy looks for a crossover of the close price above the SMA of the close price with a length of crossOverLength or a crossover of the low price above the SMA of the low price with a length of 20. This combination suggests the end of a distribution phase and a potential exit signal for short positions.
Stop Loss:
The strategy sets a stop loss level for both long and short positions. The stop loss level is calculated based on the stopPercentage variable, which represents the percentage of the current close price. If the price reaches the stop loss level, the strategy will automatically exit the position.
Plotting Wyckoff Schematics:
The strategy plots different shapes on the chart to indicate the identified phases and patterns. Green and red labels indicate the accumulation and distribution phases, respectively. Blue triangles indicate spring patterns, and orange triangles indicate upthrust patterns.
To use this strategy, you can follow these steps:
Jim Forte — Anatomy of a Trading Range
robertbrain.com/Bull...+a+Trading+Range.pdf