Extreme Entry with Mean Reversion and Trend FilterThis non-repainting indicator is an improved version of my previous work, a more versatile tool designed to provide traders with dynamic and adaptive entry signals while incorporating a mean reversion and trend filtering mechanism. By combining RSI overbought/oversold, regular divergence and confirmatory momentum oscillator such as CCI or MOM, this indicator generates more precise and timely signals for entering trades.
The indicator offers a comprehensive set of entry conditions for both Buy and Sell entries:
• For Buy entries, it checks for oversold conditions based on RSI levels, and detects bullish divergence patterns while oversold and it identifies upward crossovers in the selected entry signal source (CCI or Momentum).
• Similarly, for Sell entries, it identifies downward crossovers of the CCI or Mom, after the recent overbought conditions, and bearish divergence patterns inside the overbought RSI.
To refine the entry signals even further, the indicator utilizes a mean reversion filter. Traders can choose to display signals that occur inside or outside the upper and lower mean reversion bands:
• Range Entries are indicating potential buying opportunities near the lower band and selling opportunities near the upper band. This is based on the concept of mean reversion, which suggests that prices tend to return to the average when they reach the upper or lower bands. By focusing on these signals, traders can take advantage of price movements that have a higher probability of reversing towards the mean.
• Extreme Entries, on the other hand, represent signals that occur outside of the bands, signaling potential pullbacks during strong trends. By entering positions only at extreme highs or lows, traders can avoid getting caught in the middle of the trend. This approach helps traders capitalize more favorable trading opportunities which have a high reward-risk ratio.
Trend Filter acts as a directional bias for the entry signals. When enabled, long and short entry conditions are filtered based on the relationship between the closing price and the EMA.
Traders have the flexibility to customize, tweak the indicator filter and values in the settings according to their preferences strategies and traded assets, tailoring the signals to their specific needs. The script sets alert conditions to trigger alerts for buy, sell, or both entry signals. This indicator can be used in conjunction with price action or other technical analysis tools for confirmation and better trading decisions.
I created this indicator for my own use, and I share this for informational purposes only. It does not constitute financial advice so use at your own risk and consider your financial situation before making any trading decisions. The indicator's accuracy is not guaranteed, and past performance is not indicative of future results.
I appreciate your feedback on this indicator. As I am new to script development, I am open to comments and suggestions to improve it. If you encounter any issues while using this indicator, please let me know in the comments section. If you find it helpful, I kindly ask for your support in boosting it. Thank you for your cooperation.
Nonrepaint
Adaptive Price Channel (log scale)The field of technical analysis is consistently expanding, with numerous indicators used for market forecasting. Amongst them, a novel indicator dubbed the Adaptive Price Channel (log scale), inspired by the renowned Nadaraya-Watson Envelope (LuxAlgo) from LuxAlgo, is gaining traction for its distinctive features and versatility. Unlike its predecessor, the Adaptive Price Channel (log scale) is applicable on a logarithmic scale, thereby allowing it to be utilized on both smaller and larger timeframes.
1. Key Features
The Adaptive Price Channel (log scale) is founded on the trading view Pinescript language, version 5, with its primary aim to maximize the versatility and scalability of trading indicators. It allows traders to adapt it according to their preferred timeframe, thereby making it applicable for a wide range of trading strategies.
Its bandwidth can be adjusted through the input parameters, offering traders the flexibility to manipulate the indicator according to their strategic requirements. Furthermore, it provides an option for repainting smoothing. This option enables users to control the repainting effect in which the historical output of the indicator may change over time. When disabled, the indicator provides the endpoints of the calculations, ensuring consistency in historical values.
Moreover, the Adaptive Price Channel (log scale) allows for color customization, thereby improving visibility and user-friendliness. The colors of the indicator's upward and downward directions can be changed according to the user's preference.
2. Working Mechanism
The Adaptive Price Channel (log scale) uses the logarithm of the source, which is typically the closing price of a trading instrument. It leverages a Gaussian function that exponentially decreases the further the price moves away from the mean, accounting for both positive and negative values. The bandwidth of the Gaussian function can be adjusted to adapt to different market conditions.
Additionally, the Adaptive Price Channel (log scale) features an array of 500 lines for each bar, which helps in defining the boundaries or envelope for price movements. The calculations are executed using the Nadaraya-Watson estimator, which uses kernel regression for non-parametric analysis.
The calculated values for the upper and lower bounds of the envelope are then converted back from the logarithmic scale using the exponential function. This calculation process continues for each bar until the last bar in the data set.
To ensure optimal performance, the Adaptive Price Channel (log scale) uses dynamic repainting. If the repainting mode is enabled, it adjusts the smoothing of the indicator for the entire historical data, making the results more accurate.
3. Visualization and Alerts
The Adaptive Price Channel (log scale) offers an array of visual aids, including labels and plots. The upper and lower bounds of the envelope are plotted, and the indicator triggers labels at points where the closing price crosses these boundaries. These labels serve as alerts for potential trading opportunities.
4. Conclusion
The Adaptive Price Channel (log scale) is an innovative and adaptable trading indicator, drawing inspiration from its predecessor but introducing unique features to increase its versatility. By providing a repainting option, it ensures consistent historical values, thereby enhancing the reliability of the indicator. Furthermore, the capability to operate on a logarithmic scale broadens its usability for different timeframes. The Adaptive Price Channel (log scale) is a powerful tool for any trader, facilitating a better understanding of market dynamics, and enabling more informed decision-making.
Edri Extreme Points Buy & SellEDRI EXTREME POINTS BUY & SELL INDICATOR
This Buy and Sell (non-repainting) indicator uses signals based on the combined CCI/Momentum and RSI indicators and optional regular divergence.
The idea of the indicator is to look for a potential reversal after the price reached extreme points (overbought or oversold) and signals an entry when the price shows signs of momentum for reversal.
Optionally, it considers finding a divergence while RSI is at the extreme levels to improve the predictability of a possible reversal.
Additionally, the indicator includes a simple Mean Reversion visual on the chart to assist users in identifying extreme price levels and potential reversal opportunities. It features upper and lower bands that can be optionally plotted, showing calculated values where price bounces at those extreme levels.
The purpose of these bands is to help traders avoid getting trapped in the middle of a trend and to guide them to buy low and sell high. (It's important to note that this is purely a visual aid and does not impact the generation of trade signals.)
By utilizing the Mean Reversion bands alongside the entry conditions, traders can gain insights into potential price reversals and make more informed decisions about when to enter or exit trades.
Buy and Sell Entry conditions:
• The indicator looks at the CCI/Momentum indicator to turn positive (if buy) or negative (if sell) after the RSI was overbought or oversold in the recent past.
• It also checks if there is a 3-period regular bullish divergence in the RSI (if buy), or regular bearish divergence (if sell) and consider these in the entry condition.
• If these conditions are met, this indicator suggests that it may be a good time to enter a trade.
In summary this is how this indicator works:
• The indicator takes input settings such as the choice between using CCI or Momentum as the entry signal source, length parameters for CCI/Momentum, RSI levels for overbought and oversold conditions, RSI length, and options to plot mean reversion bands on the chart.
• It calculates the CCI and Momentum and RSI values based on user-defined length..
• It checks for regular bullish and bearish divergences (3 periods) in the RSI if the option is enabled.
• The script plots shapes on the chart to indicate the buy and sell signals based on the entry conditions.
• If the mean reversion bands option is enabled, it calculates the mean reversion, standard deviation, upper band, and lower band values.
• It also plots the upper band, mean reversion line, and lower band on the chart if the mean reversion bands option is enabled.
• This indicator includes alert conditions to generate alerts for the buy and sell signals.
• On top of that, users can opt to use only one alert for both buy and sell signals. (This can save Trading view subscribers with limited alerts.)
Important! Please do not consider everything you read here as financial advice. Additionally, do not rely solely on indicators for making your trading decisions. It is important to note that no indicator or strategy is perfect. Therefore, it is always recommended to backtest everything and practice proper risk management.
I appreciate your feedback on this indicator. As I am new to script development, I am open to comments and suggestions to improve it. If you encounter any issues while using this indicator, please let me know in the comments section. If you find it helpful, I kindly ask for your support in boosting it. Thank you for your cooperation.
Bjorgum Double Tap█ OVERVIEW
Double Tap is a pattern recognition script aimed at detecting Double Tops and Double Bottoms. Double Tap can be applied to the broker emulator to observe historical results, run as a trading bot for live trade alerts in real time with entry signals, take profit, and stop orders, or to simply detect patterns.
█ CONCEPTS
How Is A Pattern Defined?
Doubles are technical formations that are both reversal patterns and breakout patterns. These formations typically have a distinctive “M” or a “W” shape with price action breaking beyond the neckline formed by the center of the pattern. They can be recognized when a pivot fails to break when tested for a second time and the retracement that follows breaks beyond the key level opposite. This can trap entrants that were playing in the direction of the prior trend. Entries are made on the breakout with a target projected beyond the neckline equal to the height of the pattern.
Pattern Recognition
Patterns are recognized through the use of zig-zag; a method of filtering price action by connecting swing highs and lows in an alternating fashion to establish trend, support and resistance, or derive shapes from price action. The script looks for the highest or lowest point in a given number of bars and updates a list with the values as they form. If the levels are exceeded, the values are updated. If the direction changes and a new significant point is made, a new point is added to the list and the process starts again. Meanwhile, we scan the list of values looking for the distinctive shape to form as previously described.
█ STRATEGY RESULTS
Back Testing
Historical back testing is the most common method to test a strategy due in part to the general ease of gathering quick results. The underlying theory is that any strategy that worked well in the past is likely to work well in the future, and conversely, any strategy that performed poorly in the past is likely to perform poorly in the future. It is easy to poke holes in this theory, however, as for one to accept it as gospel, one would have to assume that future results will match what has come to pass. The randomness of markets may see to it otherwise, so it is important to scrutinize results. Some commonly used methods are to compare to other markets or benchmarks, perform statistical analysis on the results over many iterations and on differing datasets, walk-forward testing, out-of-sample analysis, or a variety of other techniques. There are many ways to interpret the results, so it is important to do research and gain knowledge in the field prior to taking meaningful conclusions from them.
👉 In short, it would be naive to place trust in one good backtest and expect positive results to continue. For this reason, results have been omitted from this publication.
Repainting
Repainting is simply the difference in behaviour of a strategy in real time vs the results calculated on the historical dataset. The strategy, by default, will wait for confirmed signals and is thus designed to not repaint. Waiting for bar close for entires aligns results in the real time data feed to those calculated on historical bars, which contain far less data. By doing this we align the behaviour of the strategy on the 2 data types, which brings significance to the calculated results. To override this behaviour and introduce repainting one can select "Recalculate on every tick" from the properties tab. It is important to note that by doing this alerts may not align with results seen in the strategy tester when the chart is reloaded, and thus to do so is to forgo backtesting and restricts a strategy to forward testing only.
👉 It is possible to use this script as an indicator as opposed to a full strategy by disabling "Use Strategy" in the "Inputs" tab. Basic alerts for detection will be sent when patterns are detected as opposed to complex order syntax. For alerts mid-bar enable "Recalculate on every tick" , and for confirmed signals ensure it is disabled.
█ EXIT ORDERS
Limit and Stop Orders
By default, the strategy will place a stop loss at the invalidation point of the pattern. This point is beyond the pattern high in the case of Double Tops, or beneath the pattern low in the case of Double Bottoms. The target or take profit point is an equal-legs measurement, or 100% of the pattern height in the direction of the pattern bias. Both the stop and the limit level can be adjusted from the user menu as a percentage of the pattern height.
Trailing Stops
Optional from the menu is the implementation of an ATR based trailing stop. The trailing stop is designed to begin when the target projection is reached. From there, the script looks back a user-defined number of bars for the highest or lowest point +/- the ATR value. For tighter stops the user can look back a lesser number of bars, or decrease the ATR multiple. When using either Alertatron or Trading Connector, each change in the trail value will trigger an alert to update the stop order on the exchange to reflect the new trail price. This reduces latency and slippage that can occur when relying on alerts only as real exchange orders fill faster and remain in place in the event of a disruption in communication between your strategy and the exchange, which ensures a higher level of safety.
👉 It is important to note that in the case the trailing stop is enabled, limit orders are excluded from the exit criteria. Rather, the point in time that the limit value is exceeded is the point that the trail begins. As such, this method will exit by stop loss only.
█ ALERTS
Five Built-in 3rd Party Destinations
The following are five options for delivering alerts from Double Tap to live trade execution via third party API solutions or chat bots to share your trades on social media. These destinations can be selected from the input menu and alert syntax will automatically configure in alerts appropriately to manage trades.
Custom JSON
JSON, or JavaScript Object Notation, is a readable format for structuring data. It is used primarily to transmit data between a server and a web application. In regards to this script, this may be a custom intermediary web application designed to catch alerts and interface with an exchange API. The JSON message is a trade map for an application to read equipped with where its been, where its going, targets, stops, quantity; a full diagnostic of the current state and its previous state. A web application could be configured to follow the messages sent in this format and conduct trades in sync with alerts running on the TV server.
Below is an example of a rendered JSON alert:
{
"passphrase": "1234",
"time": "2022-05-01T17:50:05Z",
"ticker": "ETHUSDTPERP",
"plot": {
"stop_price": 2600.15,
"limit_price": 3100.45
},
"strategy": {
"position_size": 0.1,
"order_action": "buy",
"market_position": "long",
"market_position_size": 0,
"prev_market_position": "flat",
"prev_market_position_size": 0
}
}
Trading Connector
Trading Connector is a third party fully autonomous Chrome extension designed to catch alert webhooks from TradingView and interface with MT4/MT5 to execute live trades from your machine. Alerts to Trading Connector are simple; just select the destination from the input drop down menu, set your ticker in the "TC Ticker" box in the "Alert Strings" section and enter your URL in the alert window when configuring your alert.
Alertatron
Alertatron is an automated algo platform for cryptocurrency trading that is designed to automate your trading strategies. Although the platform is currently restricted to crypto, it offers a versatile interface with high flexibility syntax for complex market orders and conditions. To direct alerts to Alertatron, select the platform from the 3rd party drop down, configure your API key in the ”Alertatron Key” box and add your URL in the alert message box when making alerts.
3 Commas
3 Commas is an easy and quick to use click-and-go third party crypto API solution. Alerts are simple without overly complex syntax. Messages are simply pasted into alerts and executed as alerts are triggered. There are 4 boxes at the bottom of the "Inputs" tab where the appropriate messages to be placed. These messages can be copied from 3 Commas after the bots are set up and pasted directly into the settings menu. Remember to select 3 Commas as a destination from the third party drop down and place the appropriate URL in the alert message window.
Discord
Some may wish to share their trades with their friends in a Discord chat via webhook chat bot. Messages are configured to notify of the pattern type with targets and stop values. A bot can be configured through the integration menu in a Discord chat to which you have appropriate access. Select Discord from the 3rd party drop down menu and place your chat bot URL in the alert message window when configuring alerts.
👉 For further information regarding alert setup, refer to the platform specific instructions given by the chosen third party provider.
█ IMPORTANT NOTES
Setting Alerts
For alert messages to be properly delivered on order fills it is necessary to place the following placeholder in the alert message box when creating an alert.
{{strategy.order.alert_message}}
This placeholder will auto-populate the alert message with the appropriate syntax that is designated for the 3rd party selected in the user menu.
Order Sizing and Commissions
The values that are sent in alert messages are populated from live metrics calculated by the strategy. This means that the actual values in the "Properties" tab are used and must be set by the user. The initial capital, order size, commission, etc. are all used in the calculations, so it is important to set these prior to executing live trades. Be sure to set the commission to the values used by the exchange as well.
👉 It is important to understand that the calculations on the account size take place from the beginning of the price history of the strategy. This means that if historical results have inflated or depleted the account size from the beginning of trade history until now, the values sent in alerts will reflect the calculated size based on the inputs in the "Properties" tab. To start fresh, the user must set the date in the "Inputs" tab to the current date as to remove trades from the trade history. Failure to follow this instruction can result in an unexpected order size being sent in the alert.
█ FOR PINECODERS
• With the recent introduction of matrices in Pine, the script utilizes a matrix to track pivot points with the bars they occurred on, while tracking if that pivot has been traded against to prevent duplicate detections after a trade is exited.
• Alert messages are populated with placeholders ; capability that previously was only possible in alertcondition() , but has recently been extended to `strategy.*()` functions for use in the `alert_message` argument. This allows delivery of live trade values to populate in strategy alert messages.
• New arguments have been added to strategy.exit() , which allow differentiated messages to be sent based on whether the exit occurred at the stop or the limit. The new arguments used in this script are `alert_profit` and `alert_loss` to send messages to Discord
Multi Supertrend with no-repaint HTF option strategyThis is the strategy version of the multi supertrend indicator.
The RoMDD looks good :)
Checked in ETHUSDT 1hour with auto HTF ON.
Have a look :)
Multi Supertrend with no-repaint and HTF optionThis indicator has 2 Supertrends to filter the trend.
The Default one uses the same timeframe as chart.
The additional Supertrend is non-repaint type and can run on higher timeframes.
It has an auto-higher timeframe selection option, thanks to LonesomeTheBlue, the original author.
It is accurate on current timeframe also.
Logistic Difference (ps4)This is an PS4 update to the Logistic Difference Indicator. It uses logistic function (sigmoid), which stabilizes the variance of data. The logistic function resembles the inverse Fisher transform. This version has a repaint/non-repaint switch and a scaling feature.