STD-Filtered, Gaussian-Kernel-Weighted Moving Average BT [Loxx]STD-Filtered, Gaussian-Kernel-Weighted Moving Average BT is the backtest for the following indicator
Included:
This backtest uses a special implementation of ATR and ATR smoothing called "True Range Double" which is a range calculation that accounts for volatility skew.
You can set the backtest to 1-2 take profits with stop-loss
Signals can't exit on the same candle as the entry, this is coded in a way for 1-candle delay post entry
This should be coupled with the INDICATOR version linked above for the alerts and signals. Strategies won't paint the signal "L" or "S" until the entry actually happens, but indicators allow this, which is repainting on current candle, but this is an FYI if you want to get serious with Pinescript algorithmic botting
You can restrict the backtest by dates
It is advised that you understand what Heikin-Ashi candles do to strategies, the default settings for this backtest is NON Heikin-Ashi candles but you have the ability to change that in the source selection
This is a mathematically heavy, heavy-lifting strategy. Make sure you do your own research so you understand what is happening here.
STD-Filtered, Gaussian-Kernel-Weighted Moving Average is a moving average that weights price by using a Gaussian kernel function to calculate data points. This indicator also allows for filtering both source input price and output signal using a standard deviation filter.
Purpose
This purpose of this indicator is to take the concept of Kernel estimation and apply it in a way where instead of predicting past values, the weighted function predicts the current bar value at each bar to create a moving average that is suitable for trading. Normally this method is used to create an array of past estimators to model past data but this method is not useful for trading as the past values will repaint. This moving average does NOT repaint, however you much allow signals to close on the current bar before taking the signal. You can compare this to Nadaraya-Watson Estimator wherein they use Nadaraya-Watson estimator method with normalized kernel weighted function to model price.
What are Kernel Functions?
A kernel function is used as a weighing function to develop non-parametric regression model is discussed. In the beginning of the article, a brief discussion about properties of kernel functions and steps to build kernels around data points are presented.
Kernel Function
In non-parametric statistics, a kernel is a weighting function which satisfies the following properties.
A kernel function must be symmetrical. Mathematically this property can be expressed as K (-u) = K (+u). The symmetric property of kernel function enables its maximum value (max(K(u)) to lie in the middle of the curve.
The area under the curve of the function must be equal to one. Mathematically, this property is expressed as: integral −∞ + ∞ ∫ K(u)d(u) = 1
Value of kernel function can not be negative i.e. K(u) ≥ 0 for all −∞ < u < ∞.
Kernel Estimation
In this article, Gaussian kernel function is used to calculate kernels for the data points. The equation for Gaussian kernel is:
K(u) = (1 / sqrt(2pi)) * e^(-0.5 *(j / bw )^2)
Where xi is the observed data point. j is the value where kernel function is computed and bw is called the bandwidth. Bandwidth in kernel regression is called the smoothing parameter because it controls variance and bias in the output.
Tìm kiếm tập lệnh với "bot"
MACD ULTRA with ALERTS - by OVARIDE WORK IN PROGRESS!
Coded by OVARIDE (littlegreenfish)
Made to be used with Dark Theme. Made to be used with Heikin Ashi bars (You can enable Real Price from chart settings). Test and use at your own risk. Not recommended for NEW/ INEXPERIENCED TRADERS using this for short-timeframe scalping. Bot integration is possible for high timeframes using the built-in alerts as a trigger via webhooks
Features
This is a reworked MACD code with added buffs for traders wanting more information from this basic indicator.
What this indicator does -
1. Plots a traditional MACD indicator with full input control from within the settings. All colors and values are editable , as you would expect from the standalone indicator.
2. Adds shape to the chart when MACD crosses over Signal line, while both MACD and Signal lines are below the ZERO line.
3. Adds shape to the chart when MACD crosses over ZERO line.
4. Highlights trend direction. Purple = Up Trend Likely , Yellow = Up Trend may end (use caution) , Red = Strong Down Trend Begins.
5. Ability to set alerts for -
a) When MACD crosses Signal Line.
b) When MACD crosses Zero line.
c) When an Up Trend is likely to begin.
d) When an Up Trend is slowing and may end.
e) When a Strong Down Trend begins.
Considerations -
1. Traders may use this indicator in conjunction with an existing strategy to confirm entries and exits. Traders may also use this indicator as a standalone indicator to assist with entries and exits.
2. Possible Long entries -
a) When MACD crosses Signal line while blow the Zero Line
b) When MACD crosses Zero
c) When Up Trend is Likely to begin and the background is highlighted in purple.
3. Possible stop-loss / exits (Omitted MACD crossing below Signal line and MACD crossing below Zero line)
a) When Up Trend Is slowing and the background is highlighted Yellow
b) When a Strong Down trend begins and the background is highlighted in Red. All open long position trades should be ended here.
4. The trend algorithm is hard-coded. Changing the MACD and Signal values from within the settings WILL NOT change the result of when and how the trend directions are highlighted.
5. Trend highlights are ONLY A GUIDE . You can still take entry positions in non-highlighted, yellow or red regions if your overall technical analysis tells you to.
UPDATE NOTES (IF ANY) WILL BE PUBLISHED BELOW
Dollar cost averaging trading system (DCA)As investors, we often face the dilemma of willing high stock prices when we sell, but not when we buy. There are times when this dilemma causes investors to wait for a dip in prices, thereby potentially missing out on a continual rise. This is how investors get lured away from the markets and become tangled in the slippery slope of market timing, which is not advisable to a long-term investment strategy.
Skyrex developed a complex trading system based on dollar-cost averaging in Quick Fingers Luc's interpretation. It is a combinations of strategies which allows to systematically accumulate assets by investing scaled amounts of money at defined market cycle global support levels. Dollar-cost averaging can reduce the overall impact of price volatility and lower the average cost per asset thus even during market slumps only a small bounce is required to reach take profit.
The strategy script monitors a chart price action and identifies bases as they form. When bases are reached the script provides entry actions. During price action development an asset value can go lower and in this way the script will perform safety entries at each subsequent accumulation levels. When weighted average entry price reaches target profit the script will perform a take profit action.
Bases are identified as pivot lows in a fractal pattern and validated by an adjustable decrease/rise percentage to ensure significancy of identified bases. To qualify a pivot low, the indicator will perform the following validation:
Validate the price rate of change on drops and bounces is above a given threshold amount.
Validate the volume at the low pivot point is above the volume moving average (using a given length).
Validate the volume amount is a given factor of magnitude above is above the volume moving average.
Validate the potential new base is not too close to the previous range by using a given price percent difference threshold amount.
A fractal pattern is a recurring pattern on a price chart that can predict reversals among larger, more chaotic price movements.
These basic fractals are composed of five or more bars. The rules for identifying fractals are as follows:
A bearish turning point occurs when there is a pattern with the highest high in the middle and two lower highs on each side.
A bullish turning point occurs when there is a pattern with the lowest low in the middle and two higher lows on each side.
Basic dollar-cost averaging approach is enhances by implementation of adjustable accumulation levels in order to provide opportunity of setting them at defined global support levels and Martingale volume coefficient to increase averaging effect. According to Quick Fingers Luc's principles trading principles we added volume validation of a base because it allows to confirm that the market is resistant to further price decrease.
The strategy supports traditional and cryptocurrency spot, futures, options and marginal trading exchanges. It works accurately with BTC, USD, USDT, ETH and BNB quote currencies. Best to use with 1H timeframe charts and limit orders. The strategy can be and should be configured for each particular asset according to its global support and resistance levels and price action cycles. You can modify levels and risk management settings to receive better performance
Advantages of this script:
Strategy has high net profit of 255% at backtests
Backtests show high accuracy around 75%
Low Drawdowns of around 14% at backtests
Strategy is sustainable to market slumps and can be used for long-term trading
The strategy provides a large number of entries which is good for diversification
Can be applied to any market and quote currency
Easy to configure user interface settings
How to use?
1. Apply strategy to a trading pair your are interested in using 1H timeframe chart
2. Configure the strategy: change layer values, order size multiple and take profit/stop loss values according to current market cycle stage
3. Set up a TradingView alert to trigger when strategy conditions are met
4. Strategy will send alerts when to enter and when to exit positions which can be applied to your portfolio using external trading platforms
5. Update settings once market conditions are changed using backtests on a monthly period
DB KCBB%D WavesDB KCBB%D Waves
What does the indicator do?
The indicator plots the percent difference between the low and high prices against a combined Kelpler Channel Bollinger Bands for the current timeframe. The low percent difference and the high percent difference each have their own waves plotted. A mirror mode default allows both waves to be visualized in a mirrored plot that clearly shows when outer bands are present and when they swap. Each percent difference band is displayed with a 1 bar lookback to visualize local tops/bottoms.
The overall trend is displayed using two sets of green/red colors on the percent difference waves so that each wave is recognizable, but the overall price trend is visible. A fast 3 SMA is taken of each percent difference wave to obtain the overall trend and then averaged together. The trend is then calculated based on direction from the previous bar period.
How should this indicator be used?
By default, the indicator will display in a mirror mode which will display both the low and high percent change waves mirrored to allow for the most pattern recognition possible. You will notice the percent difference waves swap from inner to outer, showing the overall market direction for that timeframe. When each percent difference wave interacts with the zero line, it indicates either buys or sells opportunities depending on which band is on the inside. When the inner wave crosses zero, special attention should be paid to the outer wave to know if it's a significant move. Likewise, when the outer wave peaks, it can indicate buy or sell opportunities depending on which wave is on the outside.
A zero line and other lines are displayed from the highest of the high percent difference wave over a long period of time. The lines can measure movement and possible oversold/overbought locations or large volatility. You can also use the lines for crossing points for either wave as alerts to know when to buy or sell zones are happening.
When individual percent difference waves are designed to be reviewed without mirroring, the mirror checkbox can be unchecked in the settings. Doing so will display both the high and low percent difference waves separately. Using this display, you can more cleanly review how each wave interacts with various line levels.
For those who desire to only have half of the mirror or one set of waves inverted against each other, check the "mirrored" and the "mirrored flipped" checkboxes in the settings. Doing so will display the top half of the mirror indicator, which is the low percent difference wave with the high percent difference wave inverted.
The indicator will also change the background color of its own pane to indicate possible buy/sell periods (work in progress).
Does the indicator include any alerts?
Yes, they are a work in progress but starting out with this release, we have:
NOTE: This is an initial release version of this indicator. Please do not use these alerts with bots yet, as they will repaint in real-time.
NOTE: A later release may happen that will delay firing the events until 1/2 of the current bar time has passed.
NOTE: As with any indicator watch your upper timeframe waves first before zooming into lower.
DB KCBB%D Buy Zone Alert
DB KCBB%D MEDIUM Buy Alert
DB KCBB%D STRONG Buy Alert
DB KCBB%D Sell Alert
DB KCBB%D STRONG Sell Alert
DB KCBB%D Trend Up Alert
DB KCBB%D Trend Down Alert
Use at your own risk and do your own diligence.
Enjoy!
Optimal Confidence Scalper [OCS]Introduction
OCS : Optimal Confidence Scalpers, Utilise the computational approach towards finding confidence estimating in signal generating process, It helps u enter and exit the financial markets quickly, It buy and sell many times in a day with the objective of making consistent profits from incremental movements in the traded security's price. As we all know Lag is very undesirable because a trading system. Late trades can many times be worse than no trades at all, Main aim of the System is to find optimal Entry and Exit points for a successful trade
Mathematics behind the indicator
The indicator use two fundamentals pillars :
Estimation of a Confidence Interval
In frequentist statistics, a confidence interval (CI) is a range of estimates for an unknown parameter. A confidence interval is computed at a designated confidence level; the 95% confidence level is most common, but other levels, such as 90% or 99%, are sometimes used.
Desired properties are Validity, Optimality and Invariance
Polynomial Filters
The polynomial filters are based on the orthogonal polynomials of Legendre and Laguerre. Orthogonal polynomials are widely used in applied mathematics, physics and engineering, and the Legendre and Laguerre polynomials are only two of infinitely many sets, each of which has its own weight function.
They can be characterized in three equivalent ways:
1. They are the optimal lowpass filters that minimize the NRR, subject to additional constraints than the DC unity-gain condition
2. They are the optimal filters that minimize the NRR whose frequency response H(ω) satisfies certain flatness constraints at DC
3. They are the filters that optimally fit, in a least-squares sense, a set of data points to polynomials of different degrees.
The System uses Predictive Differentiation Filters, as subset to Polynomial Filters
Components of the System
Buy Signal and Sell Signals
=====================
=====================------ HOW TO USE IT
=====================
ENTRY and EXITS
Momentum Bands
Confidence Levels
Indicator Properties
Provision For Alerts
1. Buy Signal Alert
2. Sell Signal Alert
3. Exit Alert if in Buy Trade
4. Exit Alert if in Sell Trade
Some Examples
What TimeFrames To Use
U can use any Timeframe, The indicator is Adaptive in Nature,
I personally use timeframes such as : 1m, 5m 10m, 15m, ..... 1D, 1W
How to Access
U will need to privately message me.
use comment box for constructive comments
Thanks
VXD Cloud Edition for Python-Binance-bots.VXD Cloud Edition for Python-Binance-bots.
to overcome sideways market conditions this cloud configured for low timeframe.
every TA is same as VXD Cloud Edition but custom alert message for bots.
Risk:Reward Calculation
Risk of Ruin Setting can now selected between Fixed $ or %
if Buy your Stoploss will be Swing low
if Sell your Stoploss will be Swing high and can be setting at Pivot Setting
then Auto Position Sizing and TP line will be calculated form there and will show in Orange color line (Draw Position Box is available)
Tailing SL when price greater than RR=1
Alert Setting
{{strategy.order.alert_message}}
Python-Bot
github.com
There are 2 mode : one-way mode and hedge mode is different script in my Github profile.
read README.MD and there's video tutorial in thai language.
Pls study app.py and it's script before deploy for your own safty and your own risk, I'm NOT responsible for your loss.
Stock Tech Bot One ViewTechnical indicators are not limited. Hence, here is another indicator with the combination of OBV, RSI, and MACD along with support, and resistance that follows the price while honoring the moving average of 200, 90 & 50.
The default lookback period of this indicator is 21 though it is changeable as per the user's desire.
The highest high and lowest low for the last 21 days lookback period proven to be the perfect Support & Resistance as the price of particular stock values are decided by market psychology. The support and resistance lines are very important to understand the market psychology which is very well proven with price action patterns and the lines are drawn based on,
Lower Extreme = 0.1 (Changeable)
Maximum Range = 21 days highest high - 21 days lowest low.
Support Line = 21 days lowest low + (Maximum Range * Lower Extreme)
Resistance Line = 21 days highest high - (Maximum Range * Lower Extreme)
RSI - Relative strength indicator is very famous to find the market momentum within the range of 0 - 100. Though the lookback period is changeable, the 14 days lookback period is the perfect match as the momentum of market movement for the last 3 weeks will always assist to identify the market regime. Here the momentum is just to highlight the indication (green up arrow under the candle for long and red down arrow above the candle for short) of market movement though it is not very important to consider if the price of the stock respect the support & resistance lines along with volume indicator (* = violet color).
OBV - Momentum:
The on-balance volume is always going indicator on any kind of tickers, which helps to identify the buying interest. Now, applying momentum on OBV with the positive movement for at least two consecutive days gives perfect confirmation for entry. A combination of the price along with this momentum(OBV) in the chart will help us to know the whipsaw in the price.
The Symbol "*" on top of each bar shows the market interest in that particular stock. If your ticker is fundamentally strong then you can see this "*" even when the market falls.
MACD:
One of the favorites and simple indicators widely used, where the thump of the rule is not to change the length even if it is allowed. It's OK to believe blindly in certain indicator and consider it while trading. That's why the indicator changes the bar color by following the MACD histogram.
Volume:
It may be the OBV works based on the open price and close price along with volume movement, it is wise to have the volume that is plotted along with price movement that should help you to decide whether the market is greedy or fearful.
The symbol "-" on top of each bar tells you a lot and don't ignore it.
Moving Average:
Moving average is a very good trend indicator as everyone considers seeing along with the price in the chart which is not omitted while we gauge the price movement alone with volume in this indicator. The 200, 90 & 50 MA's are everyone's favorite, and the same is plotted on the chart.
As explained above, the combination of all four indicators with price movement will give us very good confidence to take entry.
Candlestick Pattern:
You should admire the techniques of the candlestick pattern as you navigate the chart from right to left. Though there are a lot of patterns that exist, it is easy to enable and disable to view the signal as the label.
Further, last but not least, the exit always depends on individual conviction and how often the individual watch the price movement, if your conviction is strong then follow the down arrow red indication. If not, then exit with a trailing stop that indicates the bar with orange color.
Happy investing
Note: It is just a combination of multiple indicators and patterns to get one holistic view. So, the credit goes to all wise developers who publically published.
Mean Reverse Grid Algorithm - The Quant ScienceMean Reverse Grid Algorithm - The Quant Science™ is a dynamic grid algorithm that follows the trend and run a mean reverting strategy on average percentage yield variation.
DESCRIPTION
Trades on different price levels of the grid, following the trend. The grid consists of 10 levels, 5 higher and 5 lower. The grids together create a channel, this channel represents the total percentage change where the algorithm works. The channel also represents the average change yields of the asset, identified during analysis with the "Yield Trend Indicator".
The algorithm can be set long or short.
1. Long algorithm: opens long positions with 20% of the capital every time the price crossunder a lower grid, for a maximum total of 5 simultaneous trades. Trades are closed each time the price crossover a higher grid.
2. Short algorithm: opens short positions with 20% of the capital every time the price crossover a higher grid, for a maximum total of 5 simultaneous trades. Trades are closed each time the price crossunder a lower grid.
USER INTERFACE SETTING
The user configures the percentage value of each grid from the user interface.
AUTO TRADING COMPLIANT
With the user interface, the trader can easily set up this algorithm for automatic trading. Automating it is very simple, activate the alert functions and enter the links generated by your broker.
BACKTESTING INCLUDED
With the user interface, the trader can adjust the backtesting period of the strategy before putting it live. You can analyze large periods such as years or months or focus on short-term periods.
NO LIMIT TIMEFRAME
This algorithm can be used on all timeframes and is ideal for lower timeframes.
GENERAL FEATURES
Multi-strategy: the algorithm can apply either the long strategy or the short strategy.
Built-in alerts: the algorithm contains alerts that can be customized from the user interface.
Integrated grid: the grid indicator is included.
Backtesting included: automatic backtesting of the strategy is generated based on the values set.
Auto-trading compliant: functions for auto trading are included.
ABOUT BACKTESTING
Backtesting refers to the period 1 August 2022 - today, ticker: ETH/USDT, timeframe 1H.
Initial capital: $1000.00
Commission per trade: 0.03%
DCA Average Arbitrage - The Quant ScienceDCA Average Arbitrage - The Quant Science™ is a quantitative algorithm based on a DCA model that uses averaging to create a statistical arbitrage system.
DESCRIPTION
The algorithm can be set long or short.
1. Long algorithm: opens long positions with 100% of the capital every time the price deviates negatively for a certain percentage distance from the average.
2. Short algorithm: opens short positions with 100% of capital every time the price deviates positively for a certain percentage distance from the average.
The closing of positions depends on the parameters activated by the user. The user can set the closing on the reverse condition and/or add functions such as stop loss, take profit and closing after a certain bar period.
USER INTERFACE SETTING
The user chooses the long or short direction and sets the parameters for average as length, source and percent distance.
AUTO TRADING COMPLIANT
With the user interface, the trader can easily set up this algorithm for automatic trading. Automating it is very simple, activate the alert functions and enter the links generated by your broker.
BACKTESTING INCLUDED
With the user interface, the trader can adjust the backtesting period of the strategy before putting it live. You can analyze large periods such as years or months or focus on short-term periods.
NO LIMIT TIMEFRAME
This algorithm can be used on all timeframes and is ideal for lower timeframes.
GENERAL FEATURES
Multi-strategy: the algorithm can apply either the long strategy or the short strategy.
Built-in alerts: the algorithm contains alerts that can be customized from the user interface.
Integrated indicator: the quantity indicator is included.
Backtesting included: automatic backtesting of the strategy is generated based on the values set.
Auto-trading compliant: functions for auto trading are included.
ABOUT THE BACKTEST
Backtesting refers to the period 1 January 2022 - today, ticker: ICP/USDT, timeframe 5 minutes.
Initial capital: $1000.00
Commission per trade: 0.03%
Statistical Correlation Algorithm - The Quant ScienceStatistical Correlation Algorithm - The Quant Science™ is a quantitative trading algorithm.
ALGORITHM DESCRIPTION
This algorithm analyses the correlation ratios between two assets. The main asset (on the chart), and the secondary asset (set by the user). Then apply the long or short trading strategy.
The algorithm divides trading work into three parts:
1. Correlation analysis
2. Long or short entry
3. Closing trades
Inside the strategy: the algorithm analyses the percentage change yields from a previous session, of the secondary asset. If the variation meets the set condition then it will open a long or short position, on the primary asset. The open position is closed after 'x' number of sessions. Stop loss and take profit can be added to the trade exit parameters.
Logic: analyses the correlation between two assets and looks for a statistical advantage within the correlation.
INDICATOR DESCRIPTION
The algorithm includes a quantitative indicator. This indicator is used for correlation analysis and offers a quick reading of the quantitative data. The blue area shows the correlation ratio values. The yellow histograms show the percentage change in the yields of the main asset. Purple histograms show the percentage change in secondary asset yields.
GENERAL FEATURES
Multi time-frame: the user can set any time-frame for the secondary asset.
Multi asset: the user analyses the conditions on a second asset.
Multi-strategy: the algorithm can apply either the long strategy or the short strategy.
Built-in alerts: the algorithm contains alerts that can be customized from the user interface.
Integrated indicator: the quantity indicator is included.
Backtesting included: automatic backtesting of the strategy is generated based on the values set.
Auto-trading compliant: functions for auto trading are included.
USER INTERFACE SETTINGS
Through the intuitive user interface, you can manage all the parameters of this algorithm without any programming experience. The user interface is extremely descriptive and contains all the information needed to understand the logic of the algorithm and to configure it correctly.
1. Date range: through this function you can adjust the analysis and working period of the algorithm.
2. Asset: through this function you can adjust the secondary asset and its time-frame. You can enter any type of asset, even indices and economic indicators.
3. Asset details: this function is used to adjust the percentage change to be analyzed on the secondary asset. The analysis and input conditions are also chosen.
4. Active long or short strategy: this function is used to set the type of strategy to be used, long or short.
5. Setting algo trading alert: with this function, users can manage alerts for their web-hook.
6. Exit&Money management: with this function the user can adjust the exit periods of each trade and activate or deactivate any stop losses and take profits.
7. Data Value Analysis: this function is used to adjust the parameters for the quantity indicator.
othman mekouar script version 4its a mix of ema, atr and ut bot alerts, its provide entries with the buy and sell signals
for me as a scalper the best time frame is the 1 min time frame
i took calls when the signal (buy) is above the 200 ema (the yellow line)
i took puts when the signal (sell) is bellow the 200 ema (the yellow line)
the taking profit or stop loss is the ATR line
i look also a lot at the trend lines, a signal with a break above or below the trend line confirms me a A+ setup
the think that i like the most about this strategy is your risk reward, usually i lose maybe 5 to 15% on a trade but i can win sometimes more than 100% in one trade)
There is also a lot of ways to adapt the indicator to the time frame you trade, as a scalper use the 1 min time frame, if you are a swing trader, you can use the 15min time frame or the 1h time frame, if you are a long term trader, you can use the 4h or daily time frame
feel free to contact me if you need any help
lets make money
Unicorn X-AlgoUnicorn X-Algo is a multifunctional trading indicator. It is designed to help traders make real-time decisions using quantitative models.
Its core is a trend trading strategy based on our enhanced Trailing Stop-Loss algorithm. This strategy provides the user with position entry and exit signals. It is customizable and has a built-in instant backtesting feature.
For those who have difficulty with finding the good settings the indicator has the Automatic Mode. In this mode, there is no need for the user to adjust any settings. The indicator calculates optimized trading signals automatically.
In addition, the indicator provides a number of useful tools that aim to provide additional confirmation to the trading signals. They include: support and resistance levels forecast, price range prediction and institutional activity detection.
The script can send real-time alerts to the user’s Email and to the cell phone via notifications in the TradingView app.
The indicator can be used for various types of trend and swing trading, including positional trading, day trading and scalping.
Unicorn X-Algo allows users to:
forecast direction of trends with BUY and SELL signals;
determine the right time to close a position;
detect institutional activity in the market;
forecast key support and resistance levels;
predict the future price range for any market;
customize any settings and do a backtest with one click;
see historical trades on the chart;
use the fully Automatic Mode where the algorithm optimizes all its settings itself.
When using this script, keep in mind that past results do not necessarily reflect future results and that many factors influence trading results.
FEATURES
Trading signals
The feature calculates trend or swing entry and exit signals. The underlying strategy does not use fixed Take-Profit levels. It trails the price with a Trailing Stop-Loss to get as many pips as possible from price movements.
The feature is based on our custom Volatility Stop algorithm. It uses linear regressions instead of averaging. As our practice shows, this helps to reduce signal lag while keeping the number of false signals low.
Trading signals are customizable with Sensitivity and Trade Length parameters which determine the trading signals frequency and width of the Trailing-Stop levels, respectively.
Automatic Mode
The Trading Signals function has an automatic mode. When it is turned on, you do not need to adjust the trading signals settings. The algorithm tries to calculate the best settings automatically using an optimization algorithm.
In this mode, Buy and Sell signals are displayed as green and red triangles respectively. There are two types of exit signals displayed as circles and crosses. A circle signal means that a price reversal is expected and you can partially close the position. A cross signal means that a trading signal in the opposite direction is expected soon and you can partially or completely close your position.
Support and Resistance Levels
Support/Resistance levels forecasting model. The forecasted levels are non-repainting. Once calculated for a specified period in the future (day, week, month, etc.), they don't change during this period.
The feature allows the trader to plan trades and use the forecasted levels as entry levels and targets for opening and closing positions. Both intraday and higher timeframes are supported.
The forecasting model analyses the distribution of the price time series to find clusters in the data. These clusters are then used to make the key price levels forecast.
Big Money Activity detection
The Big Money Activity tool identifies areas on the price chart associated with instructional traders' activity in the market.
Institutional activity in a trending market can be a leading signal for upcoming reversal. Institutions could be fixing their profit, causing the price to move against the current trend.
Institutional activity in a sideways market can be due to positions accumulation and signal a new trend formation.
The algorithm uses tick volume, volume, and volatility data to forecast activity of institutional investors. The method develops the idea described in the Daigler & Wiley (2015) and Shalen (1993) works. It says that when institutional traders actively open or close their positions in the market, a divergence between volume and volatility time-series arises. It can be due to their use of position-splitting algorithms that reduce the impact of their positions on the market.
Trading Range Forecast
Trading Range Forecast feature predicts the price range of an asset for a selected period of time in the future, called Forecast Horizon. It can be the next day or 12-hour trading session. This function works if your chart timeframe is intraday (i.e. the timeframe below "D"). It shows the upper and lower bounds between which the price is going to stay in the upcoming Forecast Horizon period.
Instant Backtesting
After changing any settings, you can immediately see the performance of the strategy on the Instant Backtesting panel. Two metrics are displayed there - the percentage of profitable trades and the total return. This information, as well as the historical trades shown on the chart, will help you quickly and easily evaluate any settings you make.
SETTINGS
TRADING SIGNALS
Trade Length - defines the length of the trades the algorithm tries to make. Recommended values are from 1.0 to 6.0.
Sensitivity - controls the sensitivity of the trading signals algorithm. The sensitivity determines the density of trading signals and how close the trailing-stop levels follow the price. The higher the value of this parameter is, the less sensitive the algorithm is. High values of the Sensitivity parameters (100-500) can help to withstand large price swings to stay in longer price moves. Lower values (10-100) work well for short- and medium-term trades.
TRADING TOOLS
Big Money Activity - turns on and off the identification of the areas associated with institutional traders activity.
SUPPORТ AND RESISTANCЕ LEVELS
Show Support And Resistance Levels - turns on and off support and resistance levels calculation.
TRADING RANGE FORECAST
Show Trading Range Forecast - turns on/off trading range forecasting
Forecast Horizon - sets the period for which the trading range forecast is made
Forecasting Method - allows to choose a forecasting algorithm for the trading range forecast.
BACKTESTING
Use Starting Date - turns on/off the starting date for the strategy and backtests. When off, all available historical data is used.
Starting Date - sets the starting date for the strategy and backtests.
Show Instant Backtesting Dashboard - turns on/off a dashboard that shows the current strategy performance: the percentage of profitable trades and total return.
Leverage - sets the leverage that the strategy uses.
Unicorn QuantDeeply customizable trading algorithm with instant backtesting. It emulates real trading and displays all the actions it takes on the chart. For example, it shows when to enter or partially close a position, move Stop-Loss to breakeven, etc. The user can replicate these actions in their trading terminal in real time. The algorithm uses up to three Take-Profit levels, and a Stop-Loss level that can move in a trade to protect the floating profit.
The script can send real-time alerts to the user’s Email and to the cell phone via notifications in the TradingView app.
The indicator is designed to be used on all timeframes, including lower ones for intraday trading and scalping.
HOW TO USE
Set the Stop-Loss and up to three Take-Profit levels. Choose the rules for moving the Stop-Loss level in a trade. Adjust the sensitivity of the trading signals. And check the backtest result in the Instant Backtesting dashboard. If the performance of the strategy satisfies you, proceed with the forward testing or live trading.
When using this script, please, keep in mind that past results do not necessarily reflect future results and there are many factors that influence trading results.
FEATURES
Trading Signals
The feature calculates Buy and Sell signals for trend or swing trading. The user can change the Sensitivity parameter to control the frequency of the signals. This allows them to be adjusted for different markets and timeframes.
Position Manager
To make the Position Manager setup as easy as possible, the algorithm calculates Stop-Loss and Take-Profit levels in Average True Range (ATR) units. They are self-adjusting for any market and timeframe, since they account for its average volatility .
You don't have to worry about what market you are trading - Forex, Stocks, Crypto, etc. With the self-adjusting Stop-Loss and Take-Profit, you can find settings that work for one market and use the same numerical values as a starting point for a completely different market.
Instant Backtesting
After changing any settings, you can immediately see the performance of the strategy on the Instant Backtesting panel. Two metrics are displayed there - the percentage of profitable trades and the total return. This information, as well as the historical trades shown on the chart, will help you quickly and easily evaluate the settings.
SETTINGS
TRADING SIGNALS
Sensitivity - controls the sensitivity of the trading signals algorithm. It determines the frequency of the trading signals. The higher the value of this parameter, the less trading signals you get and the longer trends the algorithm tries to catch. The lower the sensitivity value, the more signals you receive. This can be useful if you want to profit from small price movements.
POSITION MANAGER
SL - sets the Stop-Loss level measured in ATR units.
TP1, TP2, TP3 - set the Take-Profit levels measured in the ATR units.
Close % at TP1, Close % at TP2, Close % at TP3 - set portions of the open position (as a percentage of the initial order size) to close at each of the TP levels.
At TP1 move SL to, At TP2 move SL to - set the rules for moving the Stop-Loss level in an open trade to protect the floating profit.
Show Open Position Dashboard - turns on/off a dashboard that shows the current Stop-Loss and Take-Profit levels for the open position.
BACKTESTING
Use Starting Date - turns on/off the starting date for the strategy and backtests. When off, all available historical data is used.
Starting Date - sets the starting date for the strategy and backtests.
Show Instant Backtesting Dashboard - turns on/off a dashboard that shows the current strategy performance: the percentage of profitable trades and total return.
Leverage - sets the leverage that the strategy uses.
Pyramiding Order Volume CalculatorThis is a script to calculate the order volume for the current symbol given your current portfolio value and how many orders you want to place. This is useful when using a strategy that places pyramiding orders and your bot won't automatically divide up your portfolio.
NLX Trading Bot Framework (+Trend Score & QQE)- Demo of my NLX Modular Trading Framework -
It includes all the common indicators and creates a positive or negative score, which can be used with my Modular Trading Framework and linked to an entry/exit indicator to filter out buy/sell signals if the trend is not favorable.
Combination of:
SuperTrend
VWAP Bands
Relative Strength Index ( RSI )
Commodity Channel Index ( CCI )
William Percent Range (WPR)
Directional Movement Index (DMI)
Elder Force Index ( EFI )
Momentum
Demarker
Parabolic SAR
- Getting Started -
1. Add this Trend Index to your Chart
2. Add one of my Indicator Modules to your Chart, such as the QQE++ Indicator
3. In the QQE Indicator Settings combine it with the Trend Index (and choose L1 Type)
4. Optional: Add the Noise Filter, and in the Noise Filter Settings you select the QQE Indicator as combination (and choose L2 for Type)
5. Add the Backtest Module to your Chart
6. Select the Noise Filter in the Backtest Settings
- Access -
Only as part of the NLX Framework - see my signature below for more info.
STD-Filterd, R-squared Adaptive T3 w/ Dynamic Zones BT [Loxx]STD-Filterd, R-squared Adaptive T3 w/ Dynamic Zones BT is the backtest strategy for "STD-Filterd, R-squared Adaptive T3 w/ Dynamic Zones " seen below:
Included:
This backtest uses a special implementation of ATR and ATR smoothing called "True Range Double" which is a range calculation that accounts for volatility skew.
You can set the backtest to 1-2 take profits with stop-loss
Signals can't exit on the same candle as the entry, this is coded in a way for 1-candle delay post entry
This should be coupled with the INDICATOR version linked above for the alerts and signals. Strategies won't paint the signal "L" or "S" until the entry actually happens, but indicators allow this, which is repainting on current candle, but this is an FYI if you want to get serious with Pinescript algorithmic botting
You can restrict the backtest by dates
It is advised that you understand what Heikin-Ashi candles do to strategies, the default settings for this backtest is NON Heikin-Ashi candles but you have the ability to change that in the source selection
This is a mathematically heavy, heavy-lifting strategy with multi-layered adaptivity. Make sure you do your own research so you understand what is happening here. This can be used as its own trading system without any other oscillators, moving average baselines, or volatility/momentum confirmation indicators.
What is the T3 moving average?
Better Moving Averages Tim Tillson
November 1, 1998
Tim Tillson is a software project manager at Hewlett-Packard, with degrees in Mathematics and Computer Science. He has privately traded options and equities for 15 years.
Introduction
"Digital filtering includes the process of smoothing, predicting, differentiating, integrating, separation of signals, and removal of noise from a signal. Thus many people who do such things are actually using digital filters without realizing that they are; being unacquainted with the theory, they neither understand what they have done nor the possibilities of what they might have done."
This quote from R. W. Hamming applies to the vast majority of indicators in technical analysis . Moving averages, be they simple, weighted, or exponential, are lowpass filters; low frequency components in the signal pass through with little attenuation, while high frequencies are severely reduced.
"Oscillator" type indicators (such as MACD , Momentum, Relative Strength Index ) are another type of digital filter called a differentiator.
Tushar Chande has observed that many popular oscillators are highly correlated, which is sensible because they are trying to measure the rate of change of the underlying time series, i.e., are trying to be the first and second derivatives we all learned about in Calculus.
We use moving averages (lowpass filters) in technical analysis to remove the random noise from a time series, to discern the underlying trend or to determine prices at which we will take action. A perfect moving average would have two attributes:
It would be smooth, not sensitive to random noise in the underlying time series. Another way of saying this is that its derivative would not spuriously alternate between positive and negative values.
It would not lag behind the time series it is computed from. Lag, of course, produces late buy or sell signals that kill profits.
The only way one can compute a perfect moving average is to have knowledge of the future, and if we had that, we would buy one lottery ticket a week rather than trade!
Having said this, we can still improve on the conventional simple, weighted, or exponential moving averages. Here's how:
Two Interesting Moving Averages
We will examine two benchmark moving averages based on Linear Regression analysis.
In both cases, a Linear Regression line of length n is fitted to price data.
I call the first moving average ILRS, which stands for Integral of Linear Regression Slope. One simply integrates the slope of a linear regression line as it is successively fitted in a moving window of length n across the data, with the constant of integration being a simple moving average of the first n points. Put another way, the derivative of ILRS is the linear regression slope. Note that ILRS is not the same as a SMA ( simple moving average ) of length n, which is actually the midpoint of the linear regression line as it moves across the data.
We can measure the lag of moving averages with respect to a linear trend by computing how they behave when the input is a line with unit slope. Both SMA (n) and ILRS(n) have lag of n/2, but ILRS is much smoother than SMA .
Our second benchmark moving average is well known, called EPMA or End Point Moving Average. It is the endpoint of the linear regression line of length n as it is fitted across the data. EPMA hugs the data more closely than a simple or exponential moving average of the same length. The price we pay for this is that it is much noisier (less smooth) than ILRS, and it also has the annoying property that it overshoots the data when linear trends are present.
However, EPMA has a lag of 0 with respect to linear input! This makes sense because a linear regression line will fit linear input perfectly, and the endpoint of the LR line will be on the input line.
These two moving averages frame the tradeoffs that we are facing. On one extreme we have ILRS, which is very smooth and has considerable phase lag. EPMA has 0 phase lag, but is too noisy and overshoots. We would like to construct a better moving average which is as smooth as ILRS, but runs closer to where EPMA lies, without the overshoot.
A easy way to attempt this is to split the difference, i.e. use (ILRS(n)+EPMA(n))/2. This will give us a moving average (call it IE /2) which runs in between the two, has phase lag of n/4 but still inherits considerable noise from EPMA. IE /2 is inspirational, however. Can we build something that is comparable, but smoother? Figure 1 shows ILRS, EPMA, and IE /2.
Filter Techniques
Any thoughtful student of filter theory (or resolute experimenter) will have noticed that you can improve the smoothness of a filter by running it through itself multiple times, at the cost of increasing phase lag.
There is a complementary technique (called twicing by J.W. Tukey) which can be used to improve phase lag. If L stands for the operation of running data through a low pass filter, then twicing can be described by:
L' = L(time series) + L(time series - L(time series))
That is, we add a moving average of the difference between the input and the moving average to the moving average. This is algebraically equivalent to:
2L-L(L)
This is the Double Exponential Moving Average or DEMA , popularized by Patrick Mulloy in TASAC (January/February 1994).
In our taxonomy, DEMA has some phase lag (although it exponentially approaches 0) and is somewhat noisy, comparable to IE /2 indicator.
We will use these two techniques to construct our better moving average, after we explore the first one a little more closely.
Fixing Overshoot
An n-day EMA has smoothing constant alpha=2/(n+1) and a lag of (n-1)/2.
Thus EMA (3) has lag 1, and EMA (11) has lag 5. Figure 2 shows that, if I am willing to incur 5 days of lag, I get a smoother moving average if I run EMA (3) through itself 5 times than if I just take EMA (11) once.
This suggests that if EPMA and DEMA have 0 or low lag, why not run fast versions (eg DEMA (3)) through themselves many times to achieve a smooth result? The problem is that multiple runs though these filters increase their tendency to overshoot the data, giving an unusable result. This is because the amplitude response of DEMA and EPMA is greater than 1 at certain frequencies, giving a gain of much greater than 1 at these frequencies when run though themselves multiple times. Figure 3 shows DEMA (7) and EPMA(7) run through themselves 3 times. DEMA^3 has serious overshoot, and EPMA^3 is terrible.
The solution to the overshoot problem is to recall what we are doing with twicing:
DEMA (n) = EMA (n) + EMA (time series - EMA (n))
The second term is adding, in effect, a smooth version of the derivative to the EMA to achieve DEMA . The derivative term determines how hot the moving average's response to linear trends will be. We need to simply turn down the volume to achieve our basic building block:
EMA (n) + EMA (time series - EMA (n))*.7;
This is algebraically the same as:
EMA (n)*1.7-EMA( EMA (n))*.7;
I have chosen .7 as my volume factor, but the general formula (which I call "Generalized Dema") is:
GD (n,v) = EMA (n)*(1+v)-EMA( EMA (n))*v,
Where v ranges between 0 and 1. When v=0, GD is just an EMA , and when v=1, GD is DEMA . In between, GD is a cooler DEMA . By using a value for v less than 1 (I like .7), we cure the multiple DEMA overshoot problem, at the cost of accepting some additional phase delay. Now we can run GD through itself multiple times to define a new, smoother moving average T3 that does not overshoot the data:
T3(n) = GD ( GD ( GD (n)))
In filter theory parlance, T3 is a six-pole non-linear Kalman filter. Kalman filters are ones which use the error (in this case (time series - EMA (n)) to correct themselves. In Technical Analysis , these are called Adaptive Moving Averages; they track the time series more aggressively when it is making large moves.
What is R-squared Adaptive?
One tool available in forecasting the trendiness of the breakout is the coefficient of determination ( R-squared ), a statistical measurement.
The R-squared indicates linear strength between the security's price (the Y - axis) and time (the X - axis). The R-squared is the percentage of squared error that the linear regression can eliminate if it were used as the predictor instead of the mean value. If the R-squared were 0.99, then the linear regression would eliminate 99% of the error for prediction versus predicting closing prices using a simple moving average .
R-squared is used here to derive a T3 factor used to modify price before passing price through a six-pole non-linear Kalman filter.
What are Dynamic Zones?
As explained in "Stocks & Commodities V15:7 (306-310): Dynamic Zones by Leo Zamansky, Ph .D., and David Stendahl"
Most indicators use a fixed zone for buy and sell signals. Here’ s a concept based on zones that are responsive to past levels of the indicator.
One approach to active investing employs the use of oscillators to exploit tradable market trends. This investing style follows a very simple form of logic: Enter the market only when an oscillator has moved far above or below traditional trading lev- els. However, these oscillator- driven systems lack the ability to evolve with the market because they use fixed buy and sell zones. Traders typically use one set of buy and sell zones for a bull market and substantially different zones for a bear market. And therein lies the problem.
Once traders begin introducing their market opinions into trading equations, by changing the zones, they negate the system’s mechanical nature. The objective is to have a system automatically define its own buy and sell zones and thereby profitably trade in any market — bull or bear. Dynamic zones offer a solution to the problem of fixed buy and sell zones for any oscillator-driven system.
An indicator’s extreme levels can be quantified using statistical methods. These extreme levels are calculated for a certain period and serve as the buy and sell zones for a trading system. The repetition of this statistical process for every value of the indicator creates values that become the dynamic zones. The zones are calculated in such a way that the probability of the indicator value rising above, or falling below, the dynamic zones is equal to a given probability input set by the trader.
To better understand dynamic zones, let's first describe them mathematically and then explain their use. The dynamic zones definition:
Find V such that:
For dynamic zone buy: P{X <= V}=P1
For dynamic zone sell: P{X >= V}=P2
where P1 and P2 are the probabilities set by the trader, X is the value of the indicator for the selected period and V represents the value of the dynamic zone.
The probability input P1 and P2 can be adjusted by the trader to encompass as much or as little data as the trader would like. The smaller the probability, the fewer data values above and below the dynamic zones. This translates into a wider range between the buy and sell zones. If a 10% probability is used for P1 and P2, only those data values that make up the top 10% and bottom 10% for an indicator are used in the construction of the zones. Of the values, 80% will fall between the two extreme levels. Because dynamic zone levels are penetrated so infrequently, when this happens, traders know that the market has truly moved into overbought or oversold territory.
Calculating the Dynamic Zones
The algorithm for the dynamic zones is a series of steps. First, decide the value of the lookback period t. Next, decide the value of the probability Pbuy for buy zone and value of the probability Psell for the sell zone.
For i=1, to the last lookback period, build the distribution f(x) of the price during the lookback period i. Then find the value Vi1 such that the probability of the price less than or equal to Vi1 during the lookback period i is equal to Pbuy. Find the value Vi2 such that the probability of the price greater or equal to Vi2 during the lookback period i is equal to Psell. The sequence of Vi1 for all periods gives the buy zone. The sequence of Vi2 for all periods gives the sell zone.
In the algorithm description, we have: Build the distribution f(x) of the price during the lookback period i. The distribution here is empirical namely, how many times a given value of x appeared during the lookback period. The problem is to find such x that the probability of a price being greater or equal to x will be equal to a probability selected by the user. Probability is the area under the distribution curve. The task is to find such value of x that the area under the distribution curve to the right of x will be equal to the probability selected by the user. That x is the dynamic zone.
Included:
Bar coloring
Signals
Alerts
Loxx's Expanded Source Types
Inverse MACD + DMI Scalping with Volatility Stop (By Coinrule)This script is focused on shorting during downtrends and utilises two strength based indicators to provide confluence that the start of a short-term downtrend has occurred - catching the opportunity as soon as possible.
This script can work well on coins you are planning to hodl for long-term and works especially well whilst using an automated bot that can execute your trades for you. It allows you to hedge your investment by allocating a % of your coins to trade with, whilst not risking your entire holding. This mitigates unrealised losses from hodling as it provides additional cash from the profits made. You can then choose to hodl this cash, or use it to reinvest when the market reaches attractive buying levels.
Alternatively, you can use this when trading contracts on futures markets where there is no need to already own the underlying asset prior to shorting it.
ENTRY
The trading system uses the Momentum Average Convergence Divergence (MACD) indicator and the Directional Movement Index (DMI) indicator to confirm when the best time is for selling. Combining these two indicators prevents trading during uptrends and reduces the likelihood of getting stuck in a market with low volatility.
The MACD is a trend following momentum indicator and provides identification of short-term trend direction. In this variation it utilises the 12-period as the fast and 26-period as the slow length EMAs, with signal smoothing set at 9.
The DMI indicates what way price is trending and compares prior lows and highs with two lines drawn between each - the positive directional movement line (+DI) and the negative directional movement line (-DI). The trend can be interpreted by comparing the two lines and what line is greater. When the negative DMI is greater than the positive DMI, there are more chances that the asset is trading in a sustained downtrend, and vice versa.
The system will enter trades when two conditions are met:
1) The MACD histogram turns bearish.
2) When the negative DMI is greater than the positive DMI.
EXIT
The strategy comes with a fixed take profit combined with a volatility stop, which acts as a trailing stop to adapt to the trend's strength. Depending on your long-term confidence in the asset, you can edit the fixed take profit to be more conservative or aggressive.
The position is closed when:
Take-Profit Exit: +8% price decrease from entry price.
OR
Stop-Loss Exit: Price crosses above the volatility stop.
In general, this approach suits medium to long term strategies. The backtesting for this strategy begins on 1 April 2022 to 18 July 2022 in order to demonstrate its results in a bear market. Back testing it further from the beginning of 2022 onwards further also produces good returns.
Pairs that produce very strong results include SOLUSDT on the 45m timeframe, MATICUSDT on the 2h timeframe, and AVAUSDT on the 1h timeframe. Generally, the back testing suggests that it works best on the 45m/1h timeframe across most pairs.
A trading fee of 0.1% is also taken into account and is aligned to the base fee applied on Binance.
[XBotUniverse] TREND 1.0 XBotUniverse is an automated crypto trading platform that allows you to start trading and investing in cryptocurrencies seamlessly, by implementing a fully automated trading bot using TradingView
The TREND Strategy version is a signal indicator following the direction of the trend with a fully technical method, without fundamentals, without the need for manual trading. Uses eleven Technical Indicators to measure trend strength. There are six breakouts and crosses to confirm open positions.
Runs well when the market is moving uptrend or downtrend. This strategy uses good risk management, where every open position takes a take profit of around 1.6% and a stop loss of around 1.3%, this is possible, because this strategy applies a "Smart Quantity", where the amount or quantity will adjust so that the profit and loss according to the calculation risk management, this will prevent your funds from being eroded
When the market is running very sideways, the strategy reduces the risk of loss by reducing open positions, by measuring the strength of the trend and measuring the shallowness of the average candle bar mixed with the "Smart Quantity" technique.
This strategy is applied to the Binance Futures Exchange, uses API Management, and can only be applied to the ETHUSDTPERP pair, so if it is used on another pair, the strategy will not work.
The main point of this platform is to reduce risk in trading digital instruments, by maintaining transactions with good risk management, namely preventing trading in a brutal way that will erode funds in an immeasurable way. Another important thing is that there is no risk of fundraising which results in funds or deposits being unable to be taken, such as in the case of forex trading robots where the biggest risk is with the broker, where our funds may not necessarily return due to non-transparent and poorly regulated mechanisms.
No business in this world can measure with certainty when the return on investment or can generate consistent profits, so also take care of the risk from our side as users, please analyze this strategy by paying attention to the strategy tester to measure NetProfit, Percent Profitable and Maximum Drawdown, from trading history that has occurred the previous month, because the results are relatively the same as what happened in real trading. Also remember that past profits do not guarantee future profits
Every business has risks, so use cold money so that we are comfortable when trading, don't use debt / borrow money, pawn money, kitchen money or hot money.
If you are interested in using this strategy for automated and real-time trading, please contact the owner of this strategy or the founders who can provide education on how to use it.
ATR alerts & backtestingThe Basics
Alert will trigger if the current (real time) price surpasses the high of the ATR of the previous bar. (can also be set for the Low of the ATR). Each time the follow up candle surpasses the high of the previous ATR, the background will be coloured orange. This makes back testing easier on the eye. This can be turned off.
- Colours can be changed.
- Can also set a color and alert when the current price surpasses the Low of the ATR of the previous bar.
- ATR distance can be changed.
- Can be used on different chart types.
- Can be used as entry or exits in combination with bots.
- Can display only ATR top or bottom or both.
Example
An alert will trigger if the price of the current bar surpasses the red dot (ATR) of the previous bar.
Alerts can be created on all timeframes, if this is within your Tradingview plan.
Final Words
Disclaimer: Please use it with care and at own risk. The owner of this indicator is not liable for any financial losses.
Past performance is no guarantee of future returns.
3ngine Global BoilerplateABOUT THE BOILERPLATE
This strategy is designed to bring consistency to your strategies. It includes a macro EMA filter for filtering out countertrend trades,
an ADX filter to help filter out chop, a session filter to filter out trades outside of desired timeframe, alert messages setup for automation,
laddering in/out of trades (up to 6 rungs), trailing take profit , and beautiful visuals for each entry. There are comments throughout the
strategy that provide further instructions on how to use the boilerplate strategy. This strategy uses `threengine_global_automation_library`
throughout and must be included at the top of the strategy using `import as bot`. This allows you to use dot notation
to access functions in the library - EX: `bot.orderCurrentlyExists(orderID)`.
HOW TO USE THIS STRATEGY
1. Add your inputs
There is a section dedicated for adding your own inputs near the top of the strategy, just above the boilerplate inputs
2. Add your calculations
If your strategy requires calculations, place them in the `Strategy Specific Calculations` section
3. Add your entry criteria
Add your criteria to strategySpecificLongConditions (this gets combined with boilerplate conditions in longConditionsMet)
Add your criteria to strategySpecificShortConditions (this gets combined with boilerplate conditions in shortConditionsMet)
Set your desired entry price (calculated on every bar unless stored as a static variable) to longEntryPrice and shortEntryPrice. ( This will be the FIRST ladder if using laddering capabilities. If you pick 1 for "Ladder In Rungs" this will be the only entry. )
4. Plot anything you want to overlay on the chart in addition to the boilerplate plots and labels. Included in boilerplate:
Average entry price
Stop loss
Trailing stop
Profit target
Ladder rungs
Joker Trailing TP BotTrailing Take Profit is used by the traders to increase their gains when the prices moves in a favorable direction. Let’s have a look at what is Trailing Take Profit and how it works.
What Is a Trailing Take Profit?
Trailing Take Profit is a term largely used in crypto, whereas you may encounter the term Trailing Stop in traditional trading describing almost the same thing, So what’s the difference between Trailing Take Profit and Trailing Stop? Trailing Stop is a type of Stop Loss automatically moving in the same direction as the asset’s price. Trailing Take Profit is nothing else than Trailing Stop activated after initial Take Profit is reached.
The main difference between these two is that Trailing Take Profit takes the profit in any case (altough it might be later annihilated by Trailing Stop). Thus, Trailing Take Profit reduces the risks that might’ve occurred using Trailing Stop alone. Trailing Take Profit is bound to the maximum of Take Profit price instead of just a price increase/decrease.
As you might notice, the terms Trailing Take Profit and Stop Loss are quite similar. To avoid confusion, in this article we will be talking about Trailing Take Profit as defined above.
Trailing Take Profit only moves in one direction. It is designed to lock in profit and limit losses. The trailing profit only moves up (in case of a long strategy) once the price has surpassed previous high and a new high has been established. If the trailing take profit moves up, it cannot move back down, thus securing the profit and preventing losses.
Trailing Take Profit allows the trade to remain open and continue to profit as long as the price is moving in the investor’s favor. If the price changes direction and the change surpasses the previously set percentage the order will be closed.
How Does it Work?
For example if you buy BTC at the price of 10000, if you set a Take Profit at 11000 and a Trailing Take Profit at 5% :
If the price goes up to 10500, nothing happens because the Take Profit at 11000 has not been reached.
Then if the BTC price goes up top 11000, a Stop Order at 10450 will be set.
Then if the BTC price goes down to 10500, the Stop Order stays at 104500.
Then if the BTC price goes up to 12000, the Stop Order moves to 11400.
Then if the BTC price goes down to 11000, the Stop Order at 11400 is executed.
You see that without Trailing Take Profit, the buy order would have been sold at 11000. Thus, a trader would miss an earning opportunity at 11400.
Date and Time ConfirmationCustom Date and Time Confirmation.
You can set which days you don't want the bot to trade, specific times of day, and custom date ranges.
A walkthrough lesson can be found here: