Bollinger Bands Enhanced StrategyOverview
The common practice of using Bollinger bands is to use it for building mean reversion or squeeze momentum strategies. In the current script Bollinger Bands Enhanced Strategy we are trying to combine the strengths of both strategies types. It utilizes Bollinger Bands indicator to buy the local dip and activates trailing profit system after reaching the user given number of Average True Ranges (ATR). Also it uses 200 period EMA to filter trades only in the direction of a trend. Strategy can execute only long trades.
Unique Features
Trailing Profit System: Strategy uses user given number of ATR to activate trailing take profit. If price has already reached the trailing profit activation level, scrip will close long trade if price closes below Bollinger Bands middle line.
Configurable Trading Periods: Users can tailor the strategy to specific market windows, adapting to different market conditions.
Major Trend Filter: Strategy utilizes 100 period EMA to take trades only in the direction of a trend.
Flexible Risk Management: Users can choose number of ATR as a stop loss (by default = 1.75) for trades. This is flexible approach because ATR is recalculated on every candle, therefore stop-loss readjusted to the current volatility.
Methodology
First of all, script checks if currently price is above the 200-period exponential moving average EMA. EMA is used to establish the current trend. Script will take long trades on if this filtering system showing us the uptrend. Then the strategy executes the long trade if candle’s low below the lower Bollinger band. To calculate the middle Bollinger line, we use the standard 20-period simple moving average (SMA), lower band is calculated by the substruction from middle line the standard deviation multiplied by user given value (by default = 2).
When long trade executed, script places stop-loss at the price level below the entry price by user defined number of ATR (by default = 1.75). This stop-loss level recalculates at every candle while trade is open according to the current candle ATR value. Also strategy set the trailing profit activation level at the price above the position average price by user given number of ATR (by default = 2.25). It is also recalculated every candle according to ATR value. When price hit this level script plotted the triangle with the label “Strong Uptrend” and start trail the price at the middle Bollinger line. It also started to be plotted as a green line.
When price close below this trailing level script closes the long trade and search for the next trade opportunity.
Risk Management
The strategy employs a combined and flexible approach to risk management:
It allows positions to ride the trend as long as the price continues to move favorably, aiming to capture significant price movements. It features a user-defined ATR stop loss parameter to mitigate risks based on individual risk tolerance. By default, this stop-loss is set to a 1.75*ATR drop from the entry point, but it can be adjusted according to the trader's preferences.
There is no fixed take profit, but strategy allows user to define user the ATR trailing profit activation parameter. By default, this stop-loss is set to a 2.25*ATR growth from the entry point, but it can be adjusted according to the trader's preferences.
Justification of Methodology
This strategy leverages Bollinger bangs indicator to open long trades in the local dips. If price reached the lower band there is a high probability of bounce. Here is an issue: during the strong downtrend price can constantly goes down without any significant correction. That’s why we decided to use 200-period EMA as a trend filter to increase the probability of opening long trades during major uptrend only.
Usually, Bollinger Bands indicator is using for mean reversion or breakout strategies. Both of them have the disadvantages. The mean reversion buys the dip, but closes on the return to some mean value. Therefore, it usually misses the major trend moves. The breakout strategies usually have the issue with too high buy price because to have the breakout confirmation price shall break some price level. Therefore, in such strategies traders need to set the large stop-loss, which decreases potential reward to risk ratio.
In this strategy we are trying to combine the best features of both types of strategies. Script utilizes ate ATR to setup the stop-loss and trailing profit activation levels. ATR takes into account the current volatility. Therefore, when we setup stop-loss with the user-given number of ATR we increase the probability to decrease the number of false stop outs. The trailing profit concept is trying to add the beat feature from breakout strategies and increase probability to stay in trade while uptrend is developing. When price hit the trailing profit activation level, script started to trail the price with middle line if Bollinger bands indicator. Only when candle closes below the middle line script closes the long trade.
Backtest Results
Operating window: Date range of backtests is 2020.10.01 - 2024.07.01. It is chosen to let the strategy to close all opened positions.
Commission and Slippage: Includes a standard Binance commission of 0.1% and accounts for possible slippage over 5 ticks.
Initial capital: 10000 USDT
Percent of capital used in every trade: 30%
Maximum Single Position Loss: -9.78%
Maximum Single Profit: +25.62%
Net Profit: +6778.11 USDT (+67.78%)
Total Trades: 111 (48.65% win rate)
Profit Factor: 2.065
Maximum Accumulated Loss: 853.56 USDT (-6.60%)
Average Profit per Trade: 61.06 USDT (+1.62%)
Average Trade Duration: 76 hours
These results are obtained with realistic parameters representing trading conditions observed at major exchanges such as Binance and with realistic trading portfolio usage parameters.
How to Use
Add the script to favorites for easy access.
Apply to the desired timeframe and chart (optimal performance observed on 4h BTC/USDT).
Configure settings using the dropdown choice list in the built-in menu.
Set up alerts to automate strategy positions through web hook with the text: {{strategy.order.alert_message}}
Disclaimer:
Educational and informational tool reflecting Skyrex commitment to informed trading. Past performance does not guarantee future results. Test strategies in a simulated environment before live implementation
Pita dan Kanal
Project Monday Strategy [AlgoAI System]Overview
Project Monday is a sophisticated trading strategy designed for active market participants. This strategy can be used alongside other forms of technical analysis, providing traders with additional tools to enhance their market insights. While it offers a flexible approach for identifying and exploiting market inefficiencies, Project Monday does not fit every market condition and requires adjustments. Its core principles include technical analysis and risk management, all aimed at making informed trading decisions and managing risk effectively.
Features
Project Monday Strategy works in any market and includes many features:
Efficient Trading Presets: Offers ready-to-use presets that allow traders to start efficient trading with one click.
Confirmation Signals: Provides signals to help traders validate trends, emphasizing informed decision-making (not to be followed blindly).
Reversal Signals: Identifies signals to alert traders to potential reversals, encouraging careful analysis (not to be followed blindly).
Adaptability: Can be adjusted to fit different market conditions, ensuring ongoing effectiveness.
Multi-Market Application: Suitable for use across various asset classes including stocks, forex, commodities, and cryptocurrencies.
Integration: Can be used alongside other technical analysis tools for enhanced decision-making.
Position Sizing: Allows traders to determine optimal trade size using backtesting and trading performance dashboard.
Backtesting: Supports historical testing to refine and validate the strategy.
Continuous Monitoring: Includes features for ongoing performance evaluation and strategy adjustments.
Unique Project Monday Strategy Features on TradingView:
Adaptive Position Sizing: Dynamically adjusts the size of each position based on market conditions and predefined risk management criteria, ensuring optimal trade sizing and risk exposure.
Preliminary Position Opening: Allows traders to enter a position in anticipation of a signal confirmation, enabling them to capture early market movements and improve entry points.
Preliminary Position Closing: Enables traders to exit a position before a signal reversal, helping to lock in profits and minimize potential losses during volatile market conditions.
Adjusting Strategy Parameters:
Price Band Inputs:
Project Monday Strategy uses a set of configurable inputs to tailor its behavior according to the trader's preferences. The following are the key inputs for the price band calculations. Signals are not generated when the price remains within these bands.
“Length of Calculation” determines how many historical data points are used in the trend calculation. A shorter “Length of Calculation” will make the Price Band more responsive to recent price changes but may also increase the noise and the likelihood of false signals. A longer “Length of Calculation” will make the Price Band smoother, with less noise, but may cause more lag in reacting to price changes.
“Offset” determines the position of the Gaussian filter, which is used to weight the data points in the trend calculation. The offset is expressed as a fraction of the “Length of Calculation”, with a value between 0 and 1. A higher “Offset” will shift the Gaussian filter closer to the more recent data points, making the Price Band more responsive to recent price changes but potentially increasing noise. A lower “Offset” will shift the Gaussian filter closer to the centre of the window, resulting in a smoother Price Band but potentially introducing more lag.
“Sigma” refers to the standard deviation used in the Gaussian distribution function. This parameter determines the smoothness of the curve and the degree to which data points close to the centre of the “Length of Calculation” are weighted more heavily than those further away. A smaller “Sigma” will result in a narrower Gaussian filter, leading to a more responsive Price Band but with a higher chance of noise and false signals. A larger “Sigma” will result in a wider Gaussian filter, creating a smoother Price Band but with more lag.
Adjust the “Source” inputs to specify which type of price data should be used for strategy calculations and signal generation.
“Width of Band” input determines the multiplier for the band width. A higher value of “Width of Band” makes the price band wider, which generates fewer signals due to the lower probability of the price moving outside the band. Conversely, a lower multiplier makes the band narrower, generating more signals but also increasing the likelihood of false signals.
Direction input:
The Project Monday strategy includes an input to specify the direction of trades, allowing traders to control whether the strategy should consider long positions, short positions, or both. The following input parameter is used for this purpose:
This input parameter allows traders to define the type of positions the strategy will take. It has three options:
Only Long: The strategy will generate signals exclusively for buying or closing short positions, focusing on potential uptrends.
Only Short: The strategy will generate signals exclusively for selling or closing long positions, focusing on potential downtrends.
Both: The strategy will generate signals for both buying (long positions) and selling (short positions), allowing for a more comprehensive trading approach that captures opportunities in both rising and falling markets.
Signals Filter:
The Project Monday strategy includes inputs to filter signals based on higher timeframes and the length of the data used for filtering. These inputs help traders refine the strategy's performance by considering broader market trends and smoothing out short-term fluctuations.
Filter Timeframe input specifies the timeframe used for filtering signals. By choosing a higher timeframe, traders can filter out noise from shorter timeframes and focus on more significant trends. The options range from intraday minutes (e.g., 1, 5, 15 minutes) to daily (1D, 2D, etc.), weekly (1W, 2W, etc.), and monthly (1M) timeframes. This allows traders to align their strategy with their preferred trading horizon and market perspective.
Filter Length input defines the number of data points used for filtering signals on the selected timeframe. A longer filter length will smooth out the data more, helping to identify sustained trends and reduce the impact of short-term fluctuations. Conversely, a shorter filter length will make the filter more responsive to recent price changes, potentially generating more signals but also increasing sensitivity to market noise.
Adaptive Position Size:
The Project Monday strategy incorporates inputs for unique feature Adaptive Position Sizing (APS), which dynamically adjusts the size of trades based on market conditions and specified parameters. This feature helps optimize risk management and trading performance.
Enable Adaptive Position Size: Users can check or uncheck this box to enable or disable the Adaptive Position Size feature. When checked, the strategy dynamically adjusts position sizes based on the defined parameters. This allows traders to scale their positions according to market volatility and other factors, enhancing risk management and potentially improving returns. When unchecked, the strategy will not adjust position sizes adaptively, and positions will remain fixed as per other settings.
“Timeframe for Adaptive Position Size “input specifies the timeframe used for calculating the position size. Options range from intraday minutes (e.g., 30, 60 minutes) to daily (1D, 3D), weekly (1W), and monthly (1M) timeframes. Selecting an appropriate timeframe helps align position sizing calculations with the trader’s overall strategy and market perspective, ensuring that position sizes are adjusted based on relevant market data.
“APS Length” input defines the number of data points used to calculate the adaptive position size. A longer APS length will result in higher position sizes. Conversely, a shorter APS length will result in smaller position sizes.
Anticipatory Trading:
Project Monday Strategy includes inputs for unique feature Anticipatory Trading, allowing traders to open and close positions preliminarily based on certain conditions. This feature aims to provide an edge by taking action before traditional signals confirm.
Enable Preliminary Position Opening: Users can check or uncheck this box to enable or disable Preliminary Position Opening. When enabled, the strategy will open positions based on preliminary conditions before the standard signals are confirmed. This can help traders capitalize on early trend movements and potentially gain a better entry point.
Enable Preliminary Position Closing: Users can check or uncheck this box to enable or disable Preliminary Position Closing. When enabled, the strategy will close positions based on preliminary conditions before the standard exit signals are confirmed. This can help traders lock in profits or limit losses by exiting positions at the early signs of trend reversals.
“Position Size in %” input specifies the position size as a percentage of the trading capital. By setting this value, traders can control the amount of capital allocated to each trade. For example, a risk value of 40% means that 40% of the available trading capital will be used for each anticipatory trade. This helps in managing risk and ensuring that the position size aligns with the trader's risk tolerance and overall strategy.
Usage:
Signal Generation
Long signal indicates a potential uptrend, suggesting either buying or closing a short position. Short signal indicates a potential downtrend, suggesting either selling or closing a long position. Signals are generated on your chart when the price moves beyond a calculated price band based on the current trend.
Signal Filtering
The strategy includes a filtering mechanism based on the current or another timeframe. Filtering works best with higher timeframes. This component calculates the trend on a higher timeframe and predicts the trend, ensuring trades on the current timeframe are only opened if they align with the higher timeframe trend. Setting the right filter timeframe is crucial for obtaining the best signals.
Position Direction
Users can choose the direction of positions to open via the settings box. Options include only long positions, only short positions, or both.
Adaptive Position Size (APS)
Users can enable the Adaptive Position Size feature to adjust position sizes based on trend strength. The strategy evaluates the strength of the current trend based on a higher timeframe. The stronger the trend, the larger the position size for opening a position.
Anticipatory Trading
Users can activate this unique feature to enhance trading decisions. The strategy assesses the likelihood of receiving a main signal. If the opportunity appears strong, it opens a partial position, as specified in the settings box. As the probability of the signal strengthens, the strategy gradually increases the position size.
Exit Strategy
The strategy exits positions based on receiving a reverse signal. Positions opened through “Anticipatory trading” are exited incrementally as each preliminary signal reverses.
By following these steps, traders can implement the strategy to navigate various market scenarios, manage risk, and adjust trading performance over time. Adjusting parameters and monitoring signals diligently are key to adapting the strategy to individual trading styles and market conditions.
You will get
By purchasing the Project Monday strategy, you not only gain access to a cutting-edge system but also receive ready-to-use presets designed to help you start trading immediately and achieve optimal results. Additionally, you benefit from comprehensive support and the option to request custom presets for your desired financial instruments through our dedicated support team, ensuring you have the tools and assistance needed for successful trading.
Risk Disclaimer
This information is not a personalized investment recommendation, and the financial instruments or transactions mentioned in it may not be appropriate for your financial situation, investment objective(s), risk tolerance, and/or expected return. AlgoAI shall not be liable for any losses incurred in the event of transactions or investments in financial instruments mentioned in this information.
IsAlgo - Manual Channel► Overview:
Manual Channel is a strategy that allows traders to manually insert channel lines and set the lines’ width. Trades are opened when the price hits one of the lines and bounces back, with the expectation that it will move towards the opposite line. This strategy offers flexibility in configuring channel lines and trading behavior.
► Description:
The Manual Channel strategy is based on the use of manually defined channel lines to guide trading decisions. Traders start by marking four key points on the chart to create the channel. The first two points share the same time but different prices, and the last two points also share the same time but different prices. This method allows traders to place the channel lines precisely based on their analysis and insights. Additionally, the strategy allows for adjusting the width of the channel lines, which acts as a buffer zone around the main lines.
Once the channel is established, the strategy continuously monitors the price movements in relation to these lines. When the price touches one of the channel lines, the strategy opens a trade with the expectation that the price will bounce back and move towards the opposite line. For example, if the price hits the lower channel line, a long trade (buy) might be opened with the anticipation that the price will rise to the upper channel line. Conversely, if the price hits the upper channel line, a short trade (sell) might be opened expecting the price to fall to the lower channel line.
The strategy offers several options for managing trades. Traders can choose to close a trade when the price reaches the opposite channel line, capturing the expected movement within the channel. Additionally, if the price breaks outside the channel, traders have the option to close trades immediately or stop further trade executions to avoid potential losses.
↑ Channel Example:
↓ Channel Example:
► Features and Settings:
⚙︎ Channel: Define the time and prices of the four main points of the channel lines, and set the lines’ width.
⚙︎ Entry Candle: Specify the minimum and maximum body size and the body-to-candle size ratio for entry candles.
⚙︎ Trading Session: Define specific trading hours during which the strategy operates, restricting trades to preferred market periods.
⚙︎ Trading Days: Specify active trading days to avoid certain days of the week.
⚙︎ Backtesting: Perform backtesting for a selected period to evaluate strategy performance. This feature can be deactivated if not needed.
⚙︎ Trades: Configure trade direction (long, short, or both), position sizing (fixed or percentage-based), maximum number of open trades, and daily trade limits.
⚙︎ Trades Exit: Set profit/loss limits, specify trade duration, or exit based on channel breaks.
⚙︎ Stop Loss: Choose from various stop-loss methods, including fixed pips, ATR-based, or highest/lowest price points within a specified number of candles. Trades can also be closed after a certain number of adverse candle movements.
⚙︎ Break Even: Adjust stop loss to break even once predefined profit levels are reached, protecting gains.
⚙︎ Trailing Stop: Implement a trailing stop to adjust the stop loss as the trade becomes profitable, securing gains and potentially capturing further upside.
⚙︎ Take Profit: Set up to three take-profit levels using methods such as fixed pips, ATR, or risk-to-reward ratios. Alternatively, specify a set number of candles moving in the trade’s direction.
⚙︎ Alerts: Comprehensive alert system to notify users of significant actions, including trade openings and closings. Supports dynamic placeholders for take-profit levels and stop-loss prices.
⚙︎ Dashboard: Visual display on the chart providing detailed information about ongoing and past trades, aiding users in monitoring strategy performance and making informed decisions.
► Backtesting Details:
Timeframe: 15-minute EURUSD chart
Initial Balance: $10,000
Order Size: 10 units
Commission: 0.05%
Slippage: 5 ticks
This strategy opens trades around a manually drawn channel, which results in a smaller number of closed trades.
ADX + CCI + MA - Uncle SamStrategy Name: ADX + CCI + MA - Uncle Sam
Overview
This strategy aims to capitalize on trending markets by combining the Average Directional Index (ADX), Commodity Channel Index (CCI), and a customizable Moving Average (MA). It's designed for traders seeking a balanced approach to both long (buy) and short (sell) opportunities. Special thanks to the creators of the ADX and CCI indicators for their invaluable contributions to technical analysis.
Strategy Concept
The core idea is to identify strong trends with the ADX, confirm potential entry points with the CCI, and use the MA to filter trades in the direction of the broader trend. This approach seeks to avoid entering positions during periods of consolidation or when the trend is weak.
Indicator Logic
ADX (Average Directional Index): The ADX measures the strength of a trend, regardless of its direction. A value above the customizable adx_threshold (default 20) signals a strong trend, making it a prime environment for this strategy.
CCI (Commodity Channel Index): The CCI is a momentum oscillator that helps identify overbought (above 100) and oversold (below -100) conditions. We use CCI crossovers to time entries in the direction of the prevailing trend.
MA (Moving Average): The MA acts as a trend filter, ensuring we only enter trades aligned with the overall market direction. You have flexibility in choosing the MA type (SMA, EMA, etc.) and its length to suit your trading style and timeframe.
Entry Conditions
Long (Buy):
ADX is above the adx_threshold.
CCI crosses above 100.
Price is above the chosen Moving Average (if MA trend filtering is enabled).
Short (Sell):
ADX is above the adx_threshold.
CCI crosses below -100.
Price is below the chosen Moving Average (if MA trend filtering is enabled).
Exit Conditions
Stop Loss (SL): Each position has a customizable stop-loss percentage to manage risk. The default setting is 1%.
Take Profit (TP): Each position has a customizable take-profit percentage to secure gains. The default setting is 5%.
MA-Based Risk Management (Optional): This feature allows for early exits if the price closes against the MA trend for a specified number of candles. The default setting is 2 candles.
Default Settings
CCI Period: 15
ADX Length: 10
ADX Threshold: 20
MA Type: HMA
MA Length: 200
MA Source: Close
Commission Fee: $0.0
A commission fee is not added, add your trading/platform commission for realistic trading costs.
Backtest Results
The strategy has been backtested on with the default settings and a starting capital of $1000, with 0.0% commission fee. It shows promising results.
Disclaimer: Backtesting is hypothetical and does not guarantee future performance.
Important Considerations:
Customization: The strategy offers extensive customization to tailor it to your preferences. Experiment with different parameters and settings to find what works best for your trading style.
Risk Management: Always use proper risk management techniques, including position sizing and stop losses, to protect your capital.
MA MACD BB BackTesterOverview:
This Pine Script™ code provides a comprehensive backtesting tool that combines Moving Average (MA), Moving Average Convergence Divergence (MACD), and Bollinger Bands (BB). It is designed to help traders analyze market trends and make informed trading decisions by testing various strategies over historical data.
Key Features:
1. Customizable Indicators:
Moving Average (MA): Smooths out price data for clearer trend direction.
MACD: Measures trend momentum through MACD Line, Signal Line, and Histogram.
Bollinger Bands (BB): Identifies overbought or oversold conditions with upper and lower bands.
2. Flexible Trading Direction: Choose between long or short positions to adapt to different market conditions.
3. Risk Management: Efficiently allocate your capital with customizable position sizes.
4. Signal Generation:
Buy Signals: Triggered by crossovers for MACD, MA, and BB.
Sell Signals: Triggered by crossunders for MACD, MA, and BB.
5. Automated Trading: Automatically enter and exit trades based on signal conditions and strategy parameters.
How It Works:
1. Indicator Selection: Select your preferred indicator (MA, MACD, BB) and trading direction (Long/Short).
2. Risk Management Configuration: Set the percentage of capital to allocate per position to manage risk effectively.
3.Signal Detection: The algorithm identifies and plots buy/sell signals directly on the chart based on the chosen indicator.
4. Trade Execution: The strategy automatically enters and exits trades based on signal conditions and configured strategy parameters.
Use Cases:
- Backtesting: Evaluate the effectiveness of trading strategies using historical data to understand potential performance.
- Strategy Development: Customize and expand the strategy to incorporate additional indicators or conditions to fit specific trading styles.
ADDONS That Affect Strategy:
1. Indicator Parameters:
Adjustments to the settings of MACD (e.g., fast length, slow length), MA (e.g., length), and BB (e.g., length, multiplier) will directly impact the detection of signals and the strategy's performance.
2. Trading Direction:
Changing the trading direction (Long/Short) will alter the entry and exit conditions based on the detected signals.
3. Risk Management Settings:
Modifying the position size percentage affects capital allocation and overall risk exposure per trade.
ADDONS That Do Not Affect Strategy:
1. Visual Customizations:
Changes to the color, shape, and style of the plotted lines and signals do not impact the core functionality of the strategy but enhance visual clarity.
2. Text and Labels:
Modifying text labels for the signals (such as renaming "Buy MACD" to "MACD Buy Signal") is purely cosmetic and does not influence the strategy’s logic or outcomes.
Notes:
- Customization: The indicator is highly customizable to fit various trading styles and market conditions.
- Risk Management: Adjust position sizes and risk parameters according to your risk tolerance and account size.
- Optimization: Regularly backtest and optimize parameters to adapt to changing market dynamics for better performance.
Getting Started:
-Add the script to your chart.
-Adjust the input parameters to suit your analysis preferences.
-Observe the marked buy and sell signals on your chart to make informed trading decisions.
IsAlgo - CandleWave Channel Strategy► Overview:
The CandleWave Channel Strategy uses an exponential moving average (EMA) combined with a custom true range function to dynamically calculate a multi-level price channel, helping traders identify potential trend reversals and price pullbacks.
► Description:
The CandleWave Channel Strategy is built around an EMA designed to identify potential reversal points in the market. The channel’s main points are calculated using this EMA, which serves as the foundation for the strategy’s dynamic price channel. The channel edges are determined using a proprietary true range function that measures the distance between the highs and lows of price movements over a specific period. By factoring in the maximum distance between highs and lows and averaging these values over the period, the strategy creates a responsive channel that adapts to current market conditions. The channel consists of five levels, each representing different degrees of trend tension.
The strategy continuously monitors the price in relation to the channel edges. When a candle closes outside one of these edges, it indicates a potential price reversal. This outside-close candle acts as a signal for a possible trend change, prompting the strategy to prepare for a trade entry. Upon detecting an outside-close candle, the strategy triggers an entry. The logic behind this is that when the price moves outside the defined channel, it is likely to revert back within the channel and move towards the opposite edge. The strategy aims to capitalize on this reversion by entering trades based on these signals.
Traders can adjust the channel’s length, levels, and minimum distance to tailor it to different market conditions. They can also define the characteristics of the entry candle, such as its size, body, and relative position to previous candles, to ensure it meets specific conditions before triggering a trade. Additionally, the strategy permits the specification of trading hours and days, enabling traders to focus on preferred market periods. Exit can be configured based on profit/loss limits, trade duration, and band reversal signals or other criteria.
How it Works:
Channel Calculation: The strategy continuously updates the channel edges using the EMA and true range function.
Signal Detection: It waits for a candle to close outside the channel edges.
Trade Entry: When an outside-close candle is detected, the strategy enters a trade expecting the price to revert to the opposite channel edge.
Customization: Users can define the characteristics of the entry candle, such as its size relative to previous candles, to ensure it meets specific conditions before triggering a trade.
↑ Long Trade Example:
The entry candle closes below the channel level, indicating a potential upward reversal. The strategy enters a long position expecting the price to move towards the upper levels.
↓ Short Trade Example:
The entry candle closes above the channel level, signaling a potential downward reversal. The strategy enters a short position anticipating the price to revert towards the lower levels.
► Features and Settings:
⚙︎ Channel: Adjust the channel’s length, levels, and minimum distance to suit different market conditions and trading styles.
⚙︎ Entry Candle: Customize entry criteria, including candle size, body, and relative position to previous candles for accurate signal generation.
⚙︎ Trading Session: Define specific trading hours during which the strategy operates, restricting trades to preferred market periods.
⚙︎ Trading Days: Specify active trading days to avoid certain days of the week.
⚙︎ Backtesting: backtesting for a selected period to evaluate strategy performance. This feature can be deactivated if not needed.
⚙︎ Trades: Configure trade direction (long, short, or both), position sizing (fixed or percentage-based), maximum number of open trades, and daily trade limits.
⚙︎ Trades Exit: Set profit/loss limits, specify trade duration, or exit based on band reversal signals.
⚙︎ Stop Loss: Choose from various stop-loss methods, including fixed pips, ATR-based, or highest/lowest price points within a specified number of candles. Trades can also be closed after a certain number of adverse candle movements.
⚙︎ Break Even: Adjust stop loss to break even once predefined profit levels are reached, protecting gains.
⚙︎ Trailing Stop: Implement a trailing stop to adjust the stop loss as the trade becomes profitable, securing gains and potentially capturing further upside.
⚙︎ Take Profit: Set up to three take-profit levels using methods such as fixed pips, ATR, or risk-to-reward ratios. Alternatively, specify a set number of candles moving in the trade’s direction.
⚙︎ Alerts: Comprehensive alert system to notify users of significant actions, including trade openings and closings. Supports dynamic placeholders for take-profit levels and stop-loss prices.
⚙︎ Dashboard: Visual display on the chart providing detailed information about ongoing and past trades, aiding users in monitoring strategy performance and making informed decisions.
► Backtesting Details:
Timeframe: 30-minute GBPJPY chart
Initial Balance: $10,000
Order Size: 500 units
Commission: 0.02%
Slippage: 5 ticks
VAWSI and Trend Persistance Reversal Strategy SL/TPThis is a completely revamped version of my "RSI and ATR Trend Reversal Strategy."
What's New?
The RSI has been replaced with an original indicator of mine, the "VAWSI," as I've elected to call it.
The standard RSI measures a change in an RMA to determine the strength of a movement.
The VAWSI performs very similarly, except it uses another original indicator of mine, the VAWMA.
VAWMA stands for "Volume (and) ATR Weight Moving Average." It takes an average of the volume and ATR and uses the ratio of each bar to weigh a moving average of the source.
It has the same formula as an RSI, but uses the VAWMA instead of an RMA.
Next we have the Trend Persistence indicator, which is an index on how long a trend has been persisting for. It is another original indicator. It takes the max deviation the source has from lowest/highest of a specified length. It then takes a cumulative measure of that amount, measures the change, then creates a strength index with that amount.
The VAWSI is a measure of an emerging trend, and the Trend Persistence indicator is a measure of how long a trend has persisted.
Finally, the 3rd main indicator, is a slight variation of an ATR. Rather than taking the max of source - low or high- source and source - source , it instead takes the max of high-low and the absolute value of source - the previous source. It then takes the absolute value of the change of this, and normalizes it with the source.
Inputs
Minimum SL/TP ensures that the Stop Loss and Take Profit still exist in untrendy markets. This is the minimum Amount that will always be applied.
VAWSI Weight is a divided by 100 multiplier for the VAWSI. So value of 200 means it is multiplied by 2. Think of it like a percentage.
Trend Persistence weight and ATR Weight are applied the same. Higher the number, the more impactful on the final calculation it is.
Combination Mult is an outright multiplier to the final calculation. So a 2.0 = * 2.0
Trend Persistence Smoothing Length is the length of the weighted moving average applied to the Trend Persistence Strength index.
Length Cycle Decimal is a replacement of length for the script.
Here we used BlackCat1402's Dynamic Length Calculation, which can be found on his page. With his permission we have implemented it into this script. Big shout out to them for not only creating, but allowing us to use it here.
The Length Cycle Decimal is used to calculate the dynamic length. Because TradingView only allows series int for their built-in library, a lot of the baseline indicators we use have to be manually recreated as functions in the following section.
The Strategy
As usual, we use Heiken Ashi values for calculations.
We begin by establishing the minimum SL/TP for use later.
Next we determine the amount of bars back since the last crossup or crossdown of our threshold line.
We then perform some normalization of our multipliers. We want a larger trend or larger VAWSI amount to narrow the threshold, so we have 1 divide them. This way, a higher reading outputs a smaller number and vice versa. We do this for both Trend Persistence, and the VAWSI.
The VAWSI we also normalize, where rather than it being a 0-100 reading of trend direction and strength, we absolute it so that as long as a trend is strong, regardless of direction, it will have a higher reading. With these normalized values, we add them together and simply subtract the ATR measurement rather than having 1 divide it.
Here you can see how the different measurements add up. A lower final number suggests imminent reversal, and a higher final number suggests an untrendy or choppy market.
ATR is in orange, the Trend Persistence is blue, the VAWSI is purple, and the final amount is green.
We take this final number and depending on the current trend direction, we multiply it by either the Highest or Lowest source since the last crossup or crossdown. We then take the highest or lowest of this calculation, and have it be our Stop Loss or Take Profit. This number cannot be higher/lower than the previous source to ensure a rapid spike doesn't immediately close your position on a still continuing trend. As well, the threshold cannot be higher/ lower than the the specified Stop Loss and Take Profit
Only after the source has fully crossed these lines do we consider it a crossup or crossdown. We confirm this with a barstate.isconfirmed to prevent repainting. Next, each time there is a crossup or crossdown we enter a long or a short respectively and plot accordingly.
I have the strategy configured to "process on order close" to ensure an accurate backtesting result. You could also set this to false and add a 1 bar delay to the "if crossup" and "if crossdown" lines under strategy so that it is calculated based on the open of the next bar.
Final Notes
The amounts have been preconfigured for performance on RIOT 5 Minute timeframe. Other timeframes are viable as well. With a few changes to the parameters, this strategy has backtested well on NVDA, AAPL, TSLA, and AMD. I recommend before altering settings to try other timeframes first.
This script does not seem to perform nearly as well in typically untrendy and choppy markets such as crypto and forex. With some setting changes, I have seen okay results with crypto, but overfitting could be the cause there.
Thank you very much, and please enjoy.
BBTrend w SuperTrend decision - Strategy [presentTrading]This strategy aims to improve upon the performance of Traidngview's newly published "BB Trend" indicator by incorporating the SuperTrend for better trade execution and risk management. Enjoy :)
█Introduction and How it is Different
The "BBTrend w SuperTrend decision - Strategy " is a trading strategy designed to identify market trends using Bollinger Bands and SuperTrend indicators. What sets this strategy apart is its use of two Bollinger Bands with different lengths to capture both short-term and long-term market trends, providing a more comprehensive view of market dynamics. Additionally, the strategy includes customizable take profit (TP) and stop loss (SL) settings, allowing traders to tailor their risk management according to their preferences.
BTCUSD 4h Long Performance
█ Strategy, How It Works: Detailed Explanation
The BBTrend strategy employs two key indicators: Bollinger Bands and SuperTrend.
🔶 Bollinger Bands Calculation:
- Short Bollinger Bands**: Calculated using a shorter period (default 20).
- Long Bollinger Bands**: Calculated using a longer period (default 50).
- Bollinger Bands use the standard deviation of price data to create upper and lower bands around a moving average.
Upper Band = Middle Band + (k * Standard Deviation)
Lower Band = Middle Band - (k * Standard Deviation)
🔶 BBTrend Indicator:
- The BBTrend indicator is derived from the absolute differences between the short and long Bollinger Bands' lower and upper values.
BBTrend = (|Short Lower - Long Lower| - |Short Upper - Long Upper|) / Short Middle * 100
🔶 SuperTrend Indicator:
- The SuperTrend indicator is calculated using the average true range (ATR) and a multiplier. It helps identify the market trend direction by plotting levels above and below the price, which act as dynamic support and resistance levels. * @EliCobra makes the SuperTrend Toolkit. He is GOAT.
SuperTrend Upper = HL2 + (Factor * ATR)
SuperTrend Lower = HL2 - (Factor * ATR)
The strategy determines market trends by checking if the close price is above or below the SuperTrend values:
- Uptrend: Close price is above the SuperTrend lower band.
- Downtrend: Close price is below the SuperTrend upper band.
Short: 10 Long: 20 std 2
Short: 20 Long: 40 std 2
Short: 20 Long: 40 std 4
█ Trade Direction
The strategy allows traders to choose their trading direction:
- Long: Enter long positions only.
- Short: Enter short positions only.
- Both: Enter both long and short positions based on market conditions.
█ Usage
To use the "BBTrend - Strategy " effectively:
1. Configure Inputs: Adjust the Bollinger Bands lengths, standard deviation multiplier, and SuperTrend settings.
2. Set TPSL Conditions: Choose the take profit and stop loss percentages to manage risk.
3. Choose Trade Direction: Decide whether to trade long, short, or both directions.
4. Apply Strategy: Apply the strategy to your chart and monitor the signals for potential trades.
█ Default Settings
The default settings are designed to provide a balance between sensitivity and stability:
- Short BB Length (20): Captures short-term market trends.
- Long BB Length (50): Captures long-term market trends.
- StdDev (2.0): Determines the width of the Bollinger Bands.
- SuperTrend Length (10): Period for calculating the ATR.
- SuperTrend Factor (12): Multiplier for the ATR to adjust the SuperTrend sensitivity.
- Take Profit (30%): Sets the level at which profits are taken.
- Stop Loss (20%): Sets the level at which losses are cut to manage risk.
Effect on Performance
- Short BB Length: A shorter length makes the strategy more responsive to recent price changes but can generate more false signals.
- Long BB Length: A longer length provides smoother trend signals but may be slower to react to price changes.
- StdDev: Higher values create wider bands, reducing the frequency of signals but increasing their reliability.
- SuperTrend Length and Factor: Shorter lengths and higher factors make the SuperTrend more sensitive, providing quicker signals but potentially more noise.
- Take Profit and Stop Loss: Adjusting these levels affects the risk-reward ratio. Higher take profit percentages can increase gains but may result in fewer closed trades, while higher stop loss percentages can decrease the likelihood of being stopped out but increase potential losses.
IsAlgo - Ultra Trend Strategy► Overview:
The Ultra Trend strategy is designed to identify trend lines based on average price movement and execute trades when the price crosses the middle line, confirmed by an entry candle. This strategy combines ATR, Moving Averages, and customizable candlestick patterns to provide a versatile and robust trading approach.
► Description:
The Ultra Trend strategy employs a multi-faceted approach to accurately gauge market trends and execute trades. It combines the Average True Range (ATR) with trendline analysis and Moving Averages, providing a comprehensive view of market conditions. The strategy uses ATR to measure market volatility and the average price movement, helping to set dynamic thresholds for trend detection and adapting to changing market conditions. The slope of the trend is calculated based on the angle of price movement, which aids in identifying the strength and direction of the trend.
Additionally, a Moving Average is used to filter trades, ensuring alignment with the broader market direction and reducing false signals, thereby enhancing trade accuracy.
Traders can configure the strategy to enter trades in the direction of the trend, against the trend, or both. This feature enhances the adaptability of the Ultra Trend strategy, making it suitable for various trading styles and market environments.
↑ Long Entry:
A long trade is executed when the entry candle crosses and closes above the trend line. This indicates a bullish market condition, signaling an opportunity to enter a buy position.
↓ Short Entry:
A short trade is executed when the entry candle crosses and closes below the trend line. This indicates a bearish market condition, signaling an opportunity to enter a sell position.
✕ Exit Conditions:
The strategy offers multiple stop-loss options to manage risk effectively. Traders can set stop-loss levels using fixed pips, ATR-based calculations, the higher/lower price of past candles, or close a trade if a candle moves against the trade direction.
Up to three take profit levels can be set using methods such as fixed pips, ATR, and risk-to-reward ratios. This allows traders to secure profits at various stages of the trade.
A trailing stop feature adjusts the stop loss as the trade moves into profit, locking in gains while allowing the trade to continue capturing potential upside. Additionally, a break-even feature moves the stop loss to the entry price once a certain profit level is reached, protecting against losses.
Trades can also be closed when a trend change is detected or when a candle closes outside a predefined channel, ensuring that positions are exited promptly in response to changing market conditions.
► Features and Settings:
⚙︎ Trend: Users can configure the trend direction, length, factor, and slope, allowing for precise control over how trends are identified and followed.
⚙︎ Moving Average: An Exponential Moving Average (EMA) can be employed to confirm the trend direction indicated by the trend lines. This provides further assurance that the trend line breakout is not a false signal. The EMA can be enabled or disabled based on user preference.
⚙︎ Entry Candle: The entry candle is the candle that breaks the trend line, signaling an entry opportunity. Users can specify the minimum and maximum size of the candle's body and the ratio of the body to the entire candle size. This ensures that only significant breakouts trigger trades.
⚙︎ Trading Session: This feature allows users to define specific trading hours during which the strategy should operate, ensuring trades are executed only during preferred market periods.
⚙︎ Trading Days: Users can specify which days the strategy should be active, offering the flexibility to avoid trading on specific days of the week.
⚙︎ Backtesting: Enables a backtesting period during which the strategy can be tested over a selected start and end date. This feature can be deactivated if not needed.
⚙︎ Trades: This includes configuring the direction of trades (long, short, or both), position sizing (fixed or percentage-based), the maximum number of open trades, and limitations on the number of trades per day or based on trend.
⚙︎ Trades Exit: The strategy offers various exit methods, such as setting profit or loss limits, specifying the duration a trade should remain open, or closing trades based on trend reversal.
⚙︎ Stop Loss: Various stop-loss methods are available, including a fixed number of pips, ATR-based, or using the highest or lowest price points within a specified number of previous candles. Additionally, trades can be closed after a specific number of candles move in the opposite direction of the trade.
⚙︎ Break Even: This feature adjusts the stop loss to a break-even point once certain conditions are met, such as reaching predefined profit levels, to protect gains.
⚙︎ Trailing Stop: The trailing stop feature adjusts the stop loss as the trade moves into profit, securing gains while potentially capturing further upside.
⚙︎ Take Profit: Up to three take-profit levels can be set using various methods, such as a fixed amount of pips, ATR, or risk-to-reward ratios based on the stop loss. Alternatively, users can specify a set number of candles moving in the direction of the trade.
⚙︎ Alerts: The strategy includes a comprehensive alert system that informs the user of all significant actions, such as trade openings and closings. It supports placeholders for dynamic values like take-profit levels and stop-loss prices.
⚙︎ Dashboard: A visual display provides detailed information about ongoing and past trades on the chart, helping users monitor the strategy's performance and make informed decisions.
► Backtesting Details:
Timeframe: 5-minute US30 chart
Initial Balance: $10,000
Order Size: 4% of equity per trade
Commission: $0.05 per contract
Slippage: 5 ticks
Stop Loss: ATR-based
IsAlgo - Reverse Band Strategy► Overview:
The Reverse Band Strategy leverages a custom band indicator combined with a candlestick pattern for trade entries. The strategy initiates trades when a candle closes outside the bands, anticipating that the price will revert inside the bands and reach the opposite side.
► Description:
The Reverse Band Strategy is built around a sophisticated custom band indicator designed to identify potential reversal points in the market. The bands are calculated using a proprietary formula that factors in the trend's slope, the highest and lowest points within the trend, the average price movement, and the number of candles that form the trend. This advanced calculation allows for a dynamic and responsive band that adjusts to market conditions.
Once the band edges are identified, the strategy continuously monitors for candles that close outside these bands. When such a candle is detected, it signals a potential reversal, triggering an entry. The expectation is that the price will revert back inside the bands and move towards the opposite band edge.
How it Works:
Band Calculation: The strategy continuously updates the band edges using the aforementioned factors.aforementioned factors.
Signal Detection: It waits for a candle to close outside the bands.
Trade Entry: When an outside-close candle is detected, the strategy enters a trade expecting the price to revert to the opposite band edge.
Customization: Users can define the characteristics of the entry candle, such as its size relative to previous candles, to ensure it meets specific conditions before triggering a trade.
↑ Long Trade Example:
The entry candle closes below the lower band, indicating a potential upward reversal. The strategy enters a long position expecting the price to move towards the upper band.
↓ Short Trade Example:
The entry candle closes above the upper band, signaling a potential downward reversal. The strategy enters a short position anticipating the price to revert towards the lower band.
► Features and Settings:
⚙︎ Band Customization: Adjust band length, smoothness, and minimum distance to fit different market conditions and trading styles.
⚙︎ Entry Candle: Customize criteria such as candle size, body, and relative position to previous candles to ensure precise entry signals.
⚙︎ Trading Session: This feature allows users to define specific trading hours during which the strategy should operate, ensuring trades are executed only during preferred market periods.
⚙︎ Trading Days: Users can specify which days the strategy should be active, offering the flexibility to avoid trading on specific days of the week.
⚙︎ Backtesting: Enables a backtesting period during which the strategy can be tested over a selected start and end date. This feature can be deactivated if not needed.
⚙︎ Trades: Configure trade direction (long, short, or both), position sizing (fixed or percentage-based), maximum number of open trades, and trade limitations per day or based on band.
⚙︎ Trades Exit: Set profit/loss limits, specify trade duration, or exit based on band reversal signals.
⚙︎ Stop Loss: Various stop-loss methods are available, including a fixed number of pips, ATR-based, or using the highest or lowest price points within a specified number of previous candles. Additionally, trades can be closed after a specific number of candles move in the opposite direction of the trade.
⚙︎ Break Even: This feature adjusts the stop loss to a break-even point once certain conditions are met, such as reaching predefined profit levels, to protect gains.
⚙︎ Trailing Stop: The trailing stop feature adjusts the stop loss as the trade moves into profit, securing gains while potentially capturing further upside.
⚙︎ Take Profit: Up to three take-profit levels can be set using various methods, such as a fixed amount of pips, ATR, or risk-to-reward ratios based on the stop loss. Alternatively, users can specify a set number of candles moving in the direction of the trade.
⚙︎ Alerts: The strategy includes a comprehensive alert system that informs the user of all significant actions, such as trade openings and closings. It supports placeholders for dynamic values like take-profit levels and stop-loss prices.
⚙︎ Dashboard: A visual display provides detailed information about ongoing and past trades on the chart, helping users monitor the strategy's performance and make informed decisions.
► Backtesting Details:
Timeframe: 30-minute GBPUSD chart
Initial Balance: $10,000
Order Size: 5000 units
Commission: 0.02%
Slippage: 5 ticks
Double Vegas SuperTrend Enhanced - Strategy [presentTrading]
█ Introduction and How It Is Different
The "Double Vegas SuperTrend Enhanced" strategy is a sophisticated trading system that combines two Vegas SuperTrend Enhanced. Very Powerful!
Let's celebrate the joy of Children's Day on June 1st! Enjoyyy!
BTCUSD LS performance
The strategy aims to pinpoint market trends with greater accuracy and generate trades that align with the overall market direction.
This approach differentiates itself by integrating volatility adjustments and leveraging the Vegas Channel's width to refine the SuperTrend calculations, resulting in a dynamic and responsive trading system.
Additionally, the strategy incorporates customizable take-profit and stop-loss levels, providing traders with a robust framework for risk management.
-> check Vegas SuperTrend Enhanced - Strategy
█ Strategy, How It Works: Detailed Explanation
🔶 Vegas Channel and SuperTrend Calculations
The strategy initiates by calculating the Vegas Channel, which is derived from a simple moving average (SMA) and the standard deviation (STD) of the closing prices over a specified window length. This channel helps in measuring market volatility and forms the basis for adjusting the SuperTrend indicator.
Vegas Channel Calculation:
- vegasMovingAverage = SMA(close, vegasWindow)
- vegasChannelStdDev = STD(close, vegasWindow)
- vegasChannelUpper = vegasMovingAverage + vegasChannelStdDev
- vegasChannelLower = vegasMovingAverage - vegasChannelStdDev
SuperTrend Multiplier Adjustment:
- channelVolatilityWidth = vegasChannelUpper - vegasChannelLower
- adjustedMultiplier = superTrendMultiplierBase + volatilityAdjustmentFactor * (channelVolatilityWidth / vegasMovingAverage)
The adjusted multiplier enhances the SuperTrend's sensitivity to market volatility, making it more adaptable to changing market conditions.
BTCUSD Local picture.
🔶 Average True Range (ATR) and SuperTrend Values
The ATR is computed over a specified period to measure market volatility. Using the ATR and the adjusted multiplier, the SuperTrend upper and lower levels are determined.
ATR Calculation:
- averageTrueRange = ATR(atrPeriod)
**SuperTrend Calculation:**
- superTrendUpper = hlc3 - (adjustedMultiplier * averageTrueRange)
- superTrendLower = hlc3 + (adjustedMultiplier * averageTrueRange)
The SuperTrend levels are continuously updated based on the previous values and the current market trend direction. The market trend is determined by comparing the closing prices with the SuperTrend levels.
Trend Direction:
- If close > superTrendLowerPrev, then marketTrend = 1 (bullish)
- If close < superTrendUpperPrev, then marketTrend = -1 (bearish)
🔶 Trade Entry and Exit Conditions
The strategy generates trade signals based on the alignment of both SuperTrends. Trades are executed only when both SuperTrends indicate the same market direction.
Entry Conditions:
- Long Position: Both SuperTrends must signal a bullish trend.
- Short Position: Both SuperTrends must signal a bearish trend.
Exit Conditions:
- Positions are exited if either SuperTrend reverses its trend direction.
- Additional conditions include holding periods and configurable take-profit and stop-loss levels.
█ Trade Direction
The strategy allows traders to specify the desired trade direction through a customizable input setting. Options include:
- Long: Only enter long positions.
- Short: Only enter short positions.
- Both: Enter both long and short positions based on the market conditions.
█ Usage
To utilize the "Double Vegas SuperTrend Enhanced" strategy, traders need to configure the input settings according to their trading preferences and market conditions. The strategy includes parameters for ATR periods, Vegas Channel window lengths, SuperTrend multipliers, volatility adjustment factors, and risk management settings such as hold days, take-profit, and stop-loss percentages.
█ Default Settings
The strategy comes with default settings that can be adjusted to fit individual trading styles:
- trade Direction: Both (allows trading in both long and short directions for maximum flexibility).
- ATR Periods: 10 for SuperTrend 1 and 5 for SuperTrend 2 (shorter ATR period results in more sensitivity to recent price movements).
- Vegas Window Lengths: 100 for SuperTrend 1 and 200 for SuperTrend 2 (longer window length results in smoother moving averages and less sensitivity to short-term volatility).
- SuperTrend Multipliers: 5 for SuperTrend 1 and 7 for SuperTrend 2 (higher multipliers lead to wider SuperTrend channels, reducing the frequency of trades).
- Volatility Adjustment Factors: 5 for SuperTrend 1 and 7 for SuperTrend 2 (higher adjustment factors increase the responsiveness to changes in market volatility).
- Hold Days: 5 (defines the minimum duration a position is held, ensuring trades are not exited prematurely).
- Take Profit: 30% (sets the target profit level to lock in gains).
- Stop Loss: 20% (sets the maximum acceptable loss level to mitigate risk).
Channels With NVI Strategy [TradeDots]The "Channels With NVI Strategy" is a trading strategy that identifies oversold market instances during a bullish trading market. Specifically, the strategy integrates two principal indicators to deliver profitable opportunities, anticipating potential uptrends.
2 MAIN COMPONENTS
1. Channel Indicators: This strategy gives users the flexibility to choose between Bollinger Band Channels or Keltner Channels. This selection can be made straight from the settings, allowing the traders to adjust the tool according to their preferences and strategies.
2. Negative Volume Indicator (NVI): An indicator that calculates today's price rate of change, but only when today's trading volume is less than the previous day's. This functionality enables users to detect potential shifts in the trading volume with time and price.
ENTRY CONDITION
First, the assets price must drop below the lower band of the channel indicator.
Second, NVI must ascend above the exponential moving average line, signifying a possible flood of 'smart money' (large institutional investors or savvy traders), indicating an imminent price rally.
EXIT CONDITION
Exit conditions can be customized based on individual trading styles and risk tolerance levels. Traders can define their ideal take profit or stop loss percentages.
Moreover, the strategy also employs an NVI-based exit policy. Specifically, if the NVI dips under the exponential moving average – suggestive of a fading trading momentum, the strategy grants an exit call.
RISK DISCLAIMER
Trading entails substantial risk, and most day traders incur losses. All content, tools, scripts, articles, and education provided by TradeDots serve purely informational and educational purposes. Past performances are not definitive predictors of future results.
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.
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.
Adaptaive MA PSAR Strategy [PivotProphet]This strategy, leverages a dynamic approach to moving averages, an adaptive Parabolic SAR (PSAR), and volume moving averages to create a versatile trading system suitable for various markets. It includes an array of customizable settings that allow traders to adapt the strategy to their preferences and market conditions.
Key Features
Dynamic Moving Averages: Choose between a standard SMA, EMA, or RMA, and explore dynamic versions for adaptive smoothing and trend detection.
Parabolic SAR: Incorporates both standard and adaptive PSAR for trend reversal signals. The adaptive PSAR settings can be fine-tuned for sensitivity and responsiveness.
Volume MA: Enhances trade confirmation with volume moving averages, offering multiple types for a comprehensive market analysis.
Filter Integration: Includes ATR for volatility filtering, ADX for trend strength, RSI for momentum, and MACD for trend confirmation, each with customizable parameters.
Settings Overview
Trend Settings: Choose your preferred MA type and length for trend analysis.
PSAR Settings: Adjust the PSAR start, increment, and maximum values for tailored trend reversal signals.
Adaptive PSAR Settings: Fine-tune the adaptive PSAR with various modes, smoothing periods, and thresholds for enhanced flexibility.
Volume & Volatility Filters: Set up volume MA type and length, and utilize the ATR filter for volatility-based decision-making.
Exit/Entry Conditions: Select from SMA100, PSAR, or Adaptive PSAR for exit conditions, and customize entry conditions with PSAR settings.
Strategy Implementation
The strategy triggers long positions when the price is above the selected MA, accompanied by a favorable PSAR signal and volume exceeding its MA. Short positions are considered under the inverse conditions. Filters such as ADX, RSI, and MACD are applied to refine entry points, while dynamic exit conditions based on the chosen setting ensure disciplined risk management.
Visualization:
SMA and PSAR plots provide a visual representation of the trend and potential reversal points.
Color-coded bars and shapes indicate trading signals and market sentiment.
Designed for versatility, this strategy aims to cater to both novice and experienced traders seeking a robust framework for their trading endeavors. Customize to your heart's content and adapt to the rhythm of the markets with the Adaptive MA PSAR Strategy.
BabyShark VWAP Strategy What the code does:
This Pine Script implements a trading strategy based on two indicators: Volume Weighted Average Price (VWAP) and On Balance Volume (OBV) Relative Strength Index (RSI). The strategy aims to identify potential buy and sell signals based on deviations from VWAP and OBV RSI crossing certain threshold levels.
How it does it:
**VWAP Calculation**: The script calculates the VWAP using either standard deviation or average deviation over a specified length. It then plots the VWAP and its upper and lower deviation bands.
**OBV RSI Calculation**: It computes the OBV and then calculates the RSI using the cumulative changes in OBV. The RSI is plotted and compared against predefined levels.
**Table Visibility and Occurrence Counting**: It allows the user to display a table showing the number of occurrences where the price is above Upper Dev 2, below Lower Dev 2, crosses above a higher RSI level, or crosses below a lower RSI level.
**Entries**: Long and short entry conditions are defined based on the position of the price relative to the VWAP deviation bands and the color of the OBV RSI. Entries are made when specific conditions are met, and there hasn't been a recent entry.
**Exit Conditions**: The script includes stop-loss and take-profit mechanisms. It exits positions based on price crossing the VWAP or a certain percentage, and it prevents further trading after a certain number of consecutive losses.
What traders can use it for:
**Trend Identification**: Traders can use the VWAP and its deviation bands to identify potential trend reversals or continuations.
**Volume Confirmation**: The inclusion of OBV RSI provides confirmation of price movements based on volume changes.
**Entry and Exit Signals**: The script generates buy and sell signals based on the specified conditions, allowing traders to enter and exit positions with defined stop-loss and take-profit levels.
**Statistical Analysis**: The visibility of occurrence counts in the table allows traders to perform statistical analysis on the frequency of price movements relative to the VWAP and OBV RSI levels.
arpit bollinger bandStrategy Overview:
This strategy utilizes Bollinger Bands based on a 20-period Exponential Moving Average (EMA) with a standard deviation multiplier of 1.5. It is designed to generate early trading signals based on the relationship between the price action and the Bollinger Bands.
Bollinger Bands Calculation:
The upper Bollinger Band is calculated as the 20-period EMA of the closing prices plus 1.5 times the standard deviation of the same period.
The lower Bollinger Band is calculated as the 20-period EMA of the closing prices minus 1.5 times the standard deviation.
Entry Criteria:
Buy Signal: A buy signal is generated when the current candle's high exceeds the high of the candle two periods ago, which had closed below the lower Bollinger Band. This condition implies an anticipation of a bullish reversal.
Sell Signal: A sell signal is generated when the current candle's low falls below the low of the candle two periods ago, which had closed above the upper Bollinger Band. This condition suggests an anticipated bearish reversal.
Stop Loss and Take Profit:
The stop loss for a buy order is set slightly below the low of the current candle, and for a sell order, it is set slightly above the high of the current candle.
The take profit level is determined based on a predefined risk-reward ratio of 1:3. This means the take profit target is set at a distance three times greater than the distance between the entry price and the stop loss.
Risk Management:
The strategy includes an input option to adjust the risk-reward ratio, allowing for flexibility in managing the trade's potential risk versus reward.
Trade Execution:
The strategy automatically plots the buy and sell signals on the chart and executes the trades according to the defined conditions. It also visually indicates the stop loss levels for each trade.
Usage Notes:
This strategy is designed for use in the TradingView platform using Pine Script version 5.
It is important to backtest and paper trade the strategy before using it in live trading to understand its performance characteristics and risk profile.
The strategy should be used as part of a comprehensive trading plan, considering market conditions, trader risk tolerance, and personal trading goals.
Turtle Trading Strategy@lihexieThe full implementation of the Turtle Trading Rules (as distinct from the various truncated versions circulating within the community) is now ready.
This trading strategy script distinguishes itself from all currently publicly available Turtle trading systems on Tradingview by comprehensively embodying the rules for entries, exits, position management, and profit and loss controls.
Market Selection:
Trade in highly liquid markets such as forex, commodity futures, and stock index futures.
Entry Strategies:
Model 1: Buy when the price breaks above the highest point of the last 20 trading days; Sell when the price drops below the lowest point of the last 20 trading days. When an entry opportunity arises, if the previous trade was profitable, skip the current breakout opportunity and refrain from entering.
Model 2: Buy when the price breaks above the highest point of the last 55 trading days; Sell when the price drops below the lowest point of the last 55 trading days.
Position Sizing:
Determine the size of each position based on the price volatility (ATR) to ensure that the risk of each trade does not exceed 2% of the account balance.
Exit Strategies:
1. Use a fixed stop-loss point to limit losses: Close long positions when the price falls below the lowest point of the last 10 trading days.
2. Trailing stop-loss: Once a position is profitable, adjust the stop-loss point to protect profits.
Pyramiding Rules:
Unit Doubling: Increase position size by one unit every time the price moves forward by n (default is 0.5) units of ATR, up to a maximum of 4 units, while also raising the stop-loss point to below the ATR value at the level of additional entries.
海龟交易法则的完整实现(区别于当前社区各种有阉割海龟交易系统代码)
本策略脚本区别于Tradingview目前公开的所有的海龟交易系统,完整的实现了海龟交易法则中入场、出场、仓位管理,止盈止损的规则。
市场选择:
选择流动性高的市场进行交易,如外汇、商品期货和股指期货等。
入市策略:
模式1:当价格突破过去20个交易日的高点时,买入;当价格跌破过去20个交易日的低点时,卖出。当出现入场机会时,如果上一笔交易是盈利的,那么跳过当前突破的机会,不进行入场。
模式2:当价格突破过去55个交易日的高点时,买入;当价格跌破过去55个交易日的低点时,卖出。
头寸规模:
根据价格波动性(ATR)来确定每个头寸的大小, 使每笔交易的风险不超过账户余额的2%。
退出策略:
1. 使用一个固定的止损点来限制损失:当多头头寸的价格跌破过去10个交易日的低点时,平仓止损。
2. 跟踪止损:一旦头寸盈利,移动止损点以保护利润。
加仓规则:
单位加倍:每当价格向前n(默认是0.5)个单位的ATR移动时,就增加一个单位的头寸大小(默认最大头寸数量是4个),同时将止损点提升至加仓点位的ATR值以下。
Bollinger and Stochastic with Trailing Stop - D.M.P.This trading strategy combines Bollinger Bands and the Stochastic indicator to identify entry opportunities in oversold and overbought conditions in the market. The aim is to capitalize on price rebounds from the extremes defined by the Bollinger Bands, with the confirmation of the Stochastic to maximize the probability of success of the operations.
Indicators Used
- Bollinger Bands Used to measure volatility and define oversold and overbought levels. When the price touches or breaks through the lower band, it indicates a possible oversold condition. Similarly, when it touches or breaks through the upper band, it indicates a possible overbought condition.
- Stochastic: A momentum oscillator that compares the closing price of an asset with its price range over a certain period. Values below 20 indicate oversold, while values above 80 indicate overbought.
Strategy Logic
- Long Entry (Buy): A purchase operation is executed when the price closes below the lower Bollinger band (indicating oversold) and the Stochastic is also in the oversold zone.
- Short Entry (Sell): A sell operation is executed when the price closes above the upper Bollinger band (indicating overbought) and the Stochastic is in the overbought zone.
BitBell - EMA PullBack RSI EXO
🔵 Introduction
Version 1.1
This is a Pine 5 trend following strategy. It has a four strategy with several alerts and signals. The design intent is to produce a commercial grade signal generator that can be adapted to any symbol in cryptocurrency and only 1H Chart. Ideally, the script is reliable enough to be the basis of an automated trading system web-hooked to a server with API access to crypto brokerages. The strategy can be run in three different modes: long, short and bidirectional.
As a trend following strategy, the behavior of the script is to buy on strength and sell on weakness. As such the trade orders maintain its directional bias according to price pressure. What you will see on the chart is long positions on the left side of the mountain and short on the right. Long and short positions are not intermingled as long as there exists a detectable trend. This is extremely beneficial feature in long running bull or bear markets. The script uses multiple setups to avoid the situation where you got in on the trend, took a small profit but couldn’t get back in because the logic is waiting for a pullback or some other intricate condition.
Deep draw-downs are a characteristic of trend following systems and this system is no different. However, this script makes use of the TradingView pyramid feature with three NPUs to find better place and even you can change drop percentage in settings for another trigger, accessible from the properties tab.
When trend market break it will stop the trade and usually it takes 2-4 percent loss but don't worry it has prefect money management and you can use it for Futures market and even Spot market.
🔵 Design
This script uses twelve indicators on two time frames. The chart (primary) interval and one higher time frame which is based on the primary. The higher time frame identifies the trend for which the primary will trade. I’ve tried to keep the higher time frame around five times greater than the primary. The original trading algorithms are a port from a much larger program on another trading platform. I’ve converted some of the statistical functions to use standard indicators available on TradingView. The setups make heavy use of the Hull Moving Average in conjunction with EMAs that form the Bill Williams Alligator as described in his book “New Trading Dimensions” Chapter 3. Lag between the Hull and the EMAs form the basis of the entry and exit points. The alligator itself is used to identify the trend main body.
The entire script is around 740 lines of Pine code which is the maximum incidental size given the TradingView limits: local scopes, run-time duration and compile time. I’ve been working on this script for over a year and have tested it on various instruments stock crypto. It performs well on higher liquidity markets that have at least a year of historical data. Though it can be configured to work on any interval between 15 minutes and 4 hour, trend trading is generally a longer term paradigm. For day trading the 10 to 15 minute interval will allow you to catch momentum breakouts. For intraweek trades 30 minutes to 1 hour should give you a trade every other a day.
Inputs to the script use cone centric measurements in effort to avoid exposing adjustments to the various internal indicators. The goal was to keep the inputs relevant to the actual trade entry and exit locations as opposed to a series of MA input values and the like. As a result the strategy exposes over 12 inputs grouped into long or short sections. Inputs are available for the usual minimum profit and stop-loss as well as trade, modes, presets, reports and lots of calibrations. The inputs are numerous, I’m aware. Unfortunately, at this time, TradingView does not offer any other method to get data in the script. The usual initialization files such as cnf, cfg, ini, json and xml files are currently unsupported.
Example configurations for various instruments along with a detailed PDF user manual is available.
it has no repaint i guaranty this, and you can have 10 days free with comment and check it by yourself
One issue that comes up when comparing the strategy with the study is that the strategy trades show on the chart one bar later than the study. This problem is due to the fact that “strategy.entry()” and “strategy_close()” do not execute on the same bar called. The study, on the other hand, has no such limitation since there are no position routines. However, alerts that are subsequently fired off when triggered in the study are dispatched from the TradingView servers one bar later from the study plot. Therefore the alert you actually receive on your cell phone matches the strategy plot but is one bar later than the study plot.
Please be aware that the data source matters. Cryptocurrency has no central tick repository so each exchange supplies TradingView its feed. Even though it is the same symbol the quality of the data and subsequently the bars that are supplied to the chart varies with the exchange. This script will absolutely produce different results on different data feeds of the same symbol. Be sure to backtest this script on the same data you intend to receive alerts for. Any example settings I share with you will always have the exchange name used to generate the test results.
🟡 Usage
It sends long and short signals with pyramid orders of up to 3, meaning that the strategy can trigger up to 3 orders in the same direction. Good risk and money management.
It's important to note that the strategy combines 2 systems working together (Long and LongX). Let’s describe the specific features of this strategy.
🔵 If Findes Supports And Ressitances And Trend Lines As Best As It Can, And You Can See:
🟢 Frist Simple Long Condition = It Look At The Trend Wait For RSI Cross 30 Number Then Ckeck Risk To Reward, check something else such as divergence:
🟢 Another Long Example:
🔴 Frist Simple Short Condition = It Look At The Trend Wait For RSI Cross 70 Number Then Ckeck Risk To Reward, check something else such as divergence:
🔴 Another Short Example:
The following steps provide a very brief set of instructions that will get you started but will most certainly not produce the best backtest. A trading system that you are willing to risk your hard earned capital will require a well crafted configuration that involves time, expertise and clearly defined goals. As previously mentioned, I have several example configs that I use for my own trading that I can share with you along with a PDF which describes each input in detail. To get hands on experience in setting up your own symbol from scratch please follow the steps below.
The input dialog box contains over 12 inputs, There are four options must to be configured: Choose Target, side, Choose Settings, Money Management,and settings that apply to both. The following steps address these four main options only.
Money Management System For Leverage 10:
Bot Finds Last Lower Low And Calculate Distance From Entry Price, Then Cross It To Initial Capitan And Cross Leverage =>
Position_Size = (((1.64) * (initial Capital)) * (leverage))
And Check Dominances Too For Getting Best Money Management Result
🔵 Settings
* Side, You Can Set Long Or Short Or Both.
* Choose Target, You Can Set One Target Or All Targets.
* Money Management, You Can ON Or OFF It, With OFF You Can USE It For SPOT Trades.
* Choose Settings, In This Field You Can Set Mathematical Optimization, Ddepends On Which Pair You USE.
* Clear With Daily PullBack?, With This Check Box You Can Clear Signals With Daily PullBack.
* Long X, You Can Set Long Leverage.
* Short X, You Can Set Short Leverage.
* Second Order X, You Can Set Pyramiding Leverage.
* Target Long, You Can Set Percent For Long Target.
* Target Short, You Can Set Percent For Short Target.
* Short Martin Percent, You Can Set Short Martingale Percent.
* Long Martin Percent, You Can Set Long Martingale Percent.
🟡 Pyraming 3
🟡 Commission Is 0.065 %
🟡 Slippage Is 10 ticks
🔴Only Use For 1 Hour Chart
🔴 CONCLUSION
We believe that success lies in the association of the user with the indicator, opposed to many traders who have the perspective that the indicator itself can make them become profitable. The reality is much more complicated than that.
The aim is to provide an indicator comprehensive, customizable, and intuitive enough that any trader can be led to understand this truth and develop an actionable perspective of technical indicators as support tools for decision making.
🔴 RISK DISCLAIMER
Trading is risky & most day traders lose money. All content, tools, scripts, articles, & education provided by BitBell are purely for informational & educational purposes only. Past performance does not guarantee future results.
CCI based support and resistance strategy
WARNING:
Commissions and slippage has not been considered! Don’t take it easy adding commissions and slippage could turns a fake-profitable strategy to a real disaster.
We consider account size as 10k and we enter 1000 for each trade.
Less than 100 trades is too small sample community and it’s not reliable, Also the performance of the past do not guarantee future performance. This result was handpicked by author and will differ by other timeframes, instruments and settings.
*PLEASE SHARE YOUR SETTINGS THAT WORK WITH THE COMMUNITY.
Introduction:
The CCI-based dynamic support and resistance is a "Bands and Channels" kind of indicator consisting an upper and lower band. This is a strategy which uses CCI-based (Made by me) indicator to execute trades.
SL and TP are calculated based on max ATR during last selected time period. You can edit strategy settings using "Ksl", "Ktp" and the other button for time period. “KSL” and “KTP” are 2.5 and 5 by default.
Bands are calculated regarding CCI previous high and low pivot. CCI length, right pivot length and left pivot length are 50.
A dynamic support and resistance has been calculated using last upper-cci minus a buffer and last lower-cci plus the buffer. The buffer is 10.
If "Trend matter?" button is on you can detect trend by color of the upper and lower line. Green is bullish and red is bearish! "Trend matter?" is on.
The "show mid?" button makes mid line visible, which is average of upper and lower lines, visible. The button is not active by default.
Reaction to the support could be a buy signal while a reaction to the resistance could interpreted as a sell signal.
How this strategy work?
Donald Lambert, a technical analyst, created the CCI, or Commodity Channel Index, which he first published in 1980. CCI is calculated regarding CCI can be used both as trend-detector or an oscillator. As an oscillator most traders believe in static predefined levels. Overbought and oversold candles which are clear in the chart could be used as sell and buy signals.
During my trading career I’ve noticed that there might be some reversal points for the CCI. I believe CCI could have to potential to reverse more from lately reversal point. Of course, just like other trading strategies we are talking about probabilities. We do not expect a win trade each time.
On price chart
Now this the question! What price should the instrument reach that CCI turns to be equal to our reversing aim for CCI? Imagine we have found last important bearish reversal of CCI in 200. Now, if we need the CCI to be 200 what price should we wait for?
How to calculate?
This is the CCI formula:
CCI = (Typical Price - SMA of TP) / (0.015 x Mean Deviation)
Where, Typical Price (TP) = (High + Low + Close)/3
For probable reversing points, high and low pivots of 50 bars have been used.
So we do have an Upper CCI and a Lower CCI. They are valid until the next pivot is available.
By relocating factors in CCI formula you can reach the “Typical Price”.
“
Typical Price = CCI (0.015 * Mean Deviation) + SMA of TP
So we could have a Support or Resistance by replacing CCI with Upper and Lower CCI.
A buy signal is valid if the trend is bullish (or “trend matter” is off) and lowest low of last 2 candles is lower than support and close is greater than both support and open.
A Sell signal is produced in opposite situation.
There are 2+1 options for trend!
Trend matter box is on by default, which means we’ll just open trades in direction of the trend. It’s available to turn it off.
Other 2 options are cross and slope. Cross calculated by comparing fast SMA and slow SMA. The slope one differentiate slow SMA to last “n” one.
Considering last day and today highest ATR as the ATR to calculating SL and TP is our unique technique.
TrailingTakeProfit exampleQuite recently I came upon a concept of Trailing Take Profit and I couldn't find a PineScript which implements it for the fastest possible execution, so here it is :)
Everybody knows Trailing StopLoss - an invisible mechanism follows the price and exits the trade once the price retreats too much from its recent most extended favourable value. Trailing TakeProfit does the similar thing, but at the opposite end - the trade gets closed if a price moves too well, in too favourable extent.
Why close the trade if it is going so good? Well, whatever goes up, must go down and vice versa. It is expected, that after fast rally a market will soon fall and after a dump it will go up. So Trailing TakeProfit's role is to secure profits.
But how does Trailing TakeProfit differ from the standard one? "Trailing" means, the exit level is moving. Its role is to be executed only after a rapid favourable move within 1-2 candles, not more. We never know when a rapid move happens, but when it does, we wanna catch those pips and quickly exit without looking back.
Visually Trailing TakeProfit levels are... bands. In this script example these are ATR multiplied bands (aka Keltner Channel), but they could also be Bollinger Bands or something else.
The code is simple just to focus on this single functionality, so you can quickly copy-paste it into your script. Entries are triggered by default SMA crosses.
P.S. I wouldn't be myself, if I didn't add alert messages compatible with the syntax of recently revamped TradingConnector - both in the code already and in the table showing them.