Breakout Probability (Expo)█ Overview
Breakout Probability is a valuable indicator that calculates the probability of a new high or low and displays it as a level with its percentage. The probability of a new high and low is backtested, and the results are shown in a table— a simple way to understand the next candle's likelihood of a new high or low. In addition, the indicator displays an additional four levels above and under the candle with the probability of hitting these levels.
The indicator helps traders to understand the likelihood of the next candle's direction, which can be used to set your trading bias.
█ Calculations
The algorithm calculates all the green and red candles separately depending on whether the previous candle was red or green and assigns scores if one or more lines were reached. The algorithm then calculates how many candles reached those levels in history and displays it as a percentage value on each line.
█ Example
In this example, the previous candlestick was green; we can see that a new high has been hit 72.82% of the time and the low only 28.29%. In this case, a new high was made.
█ Settings
Percentage Step
The space between the levels can be adjusted with a percentage step. 1% means that each level is located 1% above/under the previous one.
Disable 0.00% values
If a level got a 0% likelihood of being hit, the level is not displayed as default. Enable the option if you want to see all levels regardless of their values.
Number of Lines
Set the number of levels you want to display.
Show Statistic Panel
Enable this option if you want to display the backtest statistics for that a new high or low is made. (Only if the first levels have been reached or not)
█ Any Alert function call
An alert is sent on candle open, and you can select what should be included in the alert. You can enable the following options:
Ticker ID
Bias
Probability percentage
The first level high and low price
█ How to use
This indicator is a perfect tool for anyone that wants to understand the probability of a breakout and the likelihood that set levels are hit.
The indicator can be used for setting a stop loss based on where the price is most likely not to reach.
The indicator can help traders to set their bias based on probability. For example, look at the daily or a higher timeframe to get your trading bias, then go to a lower timeframe and look for setups in that direction.
-----------------
Disclaimer
The information contained in my Scripts/Indicators/Ideas/Algos/Systems does not constitute financial advice or a solicitation to buy or sell any securities of any type. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
My Scripts/Indicators/Ideas/Algos/Systems are only for educational purposes!
Strategy
Trend trader + STC [CHFIF] - CV This script is my first strategy script coupling the Trend trader (indicator developed by Andrew Abraham in the Trading the Trend article of TASC September 1998.) and Schaff Trend Cycle . The STC indicator is widely used to identify trends and their directions. It is sometimes used by traders to predict trend reversals as well. Based on the movement of the Schaff Trend Cycle , buy or sell signals are generated, which are then used by traders to initiate either long or short positions.
Around I built a user interface to help you in creating a customized strategy to your need.
My idea behind doing this was to make customizable parameters and back testing easier than manually with a lot of flexibility and options. More possibility we have, more solutions we find right? So I started this script few weeks ago to be my first script (second in reality, but first to be published.)
Strategy it self is made out of 2 simple step:
1→ STC gives a Buy/Sell signal.
2→Price is closing above the TT (Buy) or below (Sell) and the signal is the same as given by the STC .
To complete your strategy in order to reach the best result, I added few options:
→ Money management: Define the type of risk you want to take (entry risk will always risk the same percentage of your portfolio disregarding the size of the SL, Fix amount of money, fix amount of the capital (portfolio). NOTE: Margin is not coded yet, target is to show liquidation price. Please keep an eye on the releases to know when it is released.
→ Stop loss and Take profit management: Define the type of target you want to use (ATR, fixed percentage, pivots points) and even customise different take profit level or activate the trailing. Each type of target is customizable via the menu
→ Moving average: You can also complete the strategy using different moving average. To draw it tick the box on the left, to use it in the calculation of the result, tick the box "Price>MA" in front of the needed EMA . You can select different type of MA ( SMA , EMA , DEMA , TEMA , RMA, HMA , WMA , VWAP , VWMA , etc...)
→ RSI: 4 possible approach to use the RSI to complement the strategy:
• OB/OS => short position will be taken only if RSI goes under the lower limit. Long if the RSI goes above the limit. Ticking confirmation will wait to cross back the limit to validate the condition
• Rev OB/OS => Short will be taken if RSI is below lower limit and stays below. Long will be taken if RSI is above upper limit and stays above.
• MA dominance => RSI has to be above MA for long, below for short. Confirmation box ticked requires 2 bars with the RSI on a side to validate signal.
• MA Dominance + limit => It is a combination of the requirement of the provious option and also Rev. OB/OS
→ Volume confirmation => This will consider the volume MA for entry confirmation. The volume will have to be above the MA define by the value entered in the field.
→ Waddah Attar explosion indicator can also be used as a filter for entries in this way:
• Explosion line > dead zone to validate entries
• Trend > dead zone to validate entry
• Both > dead zone is a compound of both rules above to get entry confirmation
→ ADX can also be used as a filter. I added 2 Threshold in order to have a minimum level of acceptance for valid entry but also a maximum level.
When your strategy is setup, you can setup alerts and I would recommend to setup the date range before doing the alerts. Why? Simply because the script do not cover pyramiding and will give a signal only if a trade is not ongoing.
In setting up the sessions at which you would want to trade, no signal within those range can be missed. You can setup 2 sessions, the days and also the global range of backtesting.
Strategy BackTest Display Statistics - TraderHalaiThis script was born out of my quest to be able to display strategy back test statistics on charts to allow for easier backtesting on devices that do not natively support backtest engine (such as mobile phones, when I am backtesting from away from my computer). There are already a few good ones on TradingView, but most / many are too complicated for my needs.
Found an excellent display backtest engine by 'The Art of Trading'. This script is a snippet of his hard work, with some very minor tweaks and changes. Much respect to the original author.
Full credit to the original author of this script. It can be found here: www.tradingview.com
I decided to modify the script by simplifying it down and make it easier to integrate into existing strategies, using simple copy and paste, by relying on existing tradingview strategy backtester inputs. I have also added 3 additional performance metrics:
- Max Run Up
- Average Win per trade
- Average Loss per trade
As this is a work in progress, I will look to add in more performance metrics in future, as I further develop this script.
Feel free to use this display panel in your scripts and strategies.
Thanks and enjoy :)
Smoothed Heikin Ashi Trend on Chart - TraderHalai BACKTESTSmoothed Heikin Ashi Trend on chart - Backtest
This is a backtest of the Smoothed Heikin Ashi Trend indicator, which computes the reverse candle close price required to flip a Heikin Ashi trend from red to green and vice versa. The original indicator can be found in the scripts section of my profile.
This particular back test uses this indicator with a Trend following paradigm with a percentage-based stop loss.
Note, that backtesting performance is not always indicative of future performance, but it does provide some basis for further development and walk-forward / live testing.
Testing was performed on Bitcoin , as this is a primary target market for me to use this kind of strategy.
Sample Backtesting results as of 10th June 2022:
Backtesting parameters:
Position size: 10% of equity
Long stop: 1% below entry
Short stop: 1% above entry
Repainting: Off
Smoothing: SMA
Period: 10
8 Hour:
Number of Trades: 1046
Gross Return: 249.27 %
CAGR Return: 14.04 %
Max Drawdown: 7.9 %
Win percentage: 28.01 %
Profit Factor (Expectancy): 2.019
Average Loss: 0.33 %
Average Win: 1.69 %
Average Time for Loss: 1 day
Average Time for Win: 5.33 days
1 Day:
Number of Trades: 429
Gross Return: 458.4 %
CAGR Return: 15.76 %
Max Drawdown: 6.37 %
Profit Factor (Expectancy): 2.804
Average Loss: 0.8 %
Average Win: 7.2 %
Average Time for Loss: 3 days
Average Time for Win: 16 days
5 Day:
Number of Trades: 69
Gross Return: 1614.9 %
CAGR Return: 26.7 %
Max Drawdown: 5.7 %
Profit Factor (Expectancy): 10.451
Average Loss: 3.64 %
Average Win: 81.17 %
Average Time for Loss: 15 days
Average Time for Win: 85 days
Analysis:
The strategy is typical amongst trend following strategies with a less regular win rate, but where profits are more significant than losses. Most of the losses are in sideways, low volatility markets. This strategy performs better on higher timeframes, where it shows a positive expectancy of the strategy.
The average win was positively impacted by Bitcoin’s earlier smaller market cap, as the percentage wins earlier were higher.
Overall the strategy shows potential for further development and may be suitable for walk-forward testing and out of sample analysis to be considered for a demo trading account.
Note in an actual trading setup, you may wish to use this with volatility filters, combined with support resistance zones for a better setup.
As always, this post/indicator/strategy is not financial advice, and please do your due diligence before trading this live.
Original indicator links:
On chart version -
Oscillator version -
Update - 27/06/2022
Unfortunately, It appears that the original script had been taken down due to auto-moderation because of concerns with no slippage / commission. I have since adjusted the backtest, and re-uploaded to include the following to address these concerns, and show that I am genuinely trying to give back to the community and not mislead anyone:
1) Include commission of 0.1% - to match Binance's maker fees prior to moving to a fee-less model.
2) Include slippage of 10 ticks (This is a realistic slippage figure from searching online for most crypto exchanges)
3) Adjust account balance to 10,000 - since most of us are not millionaires.
The rest of the backtesting parameters are comparable to previous results:
Backtesting parameters:
Initial capital: 10000 dollars
Position size: 10% of equity
Long stop: 2% below entry
Short stop: 2% above entry
Repainting: Off
Smoothing: SMA
Period: 10
Slippage: 10 ticks
Commission: 0.1%
This script still remains to shows viability / profitablity on higher term timeframes (with slightly higher drawdown), and I have included the backtest report below to document my findings:
8 Hour:
Number of Trades: 1082
Gross Return: 233.02%
CAGR Return: 14.04 %
Max Drawdown: 7.9 %
Win percentage: 25.6%
Profit Factor (Expectancy): 1.627
Average Loss: 0.46 %
Average Win: 2.18 %
Average Time for Loss: 1.33 day
Average Time for Win: 7.33 days
Once again, please do your own research and due dillegence before trading this live. This post is for education and information purposes only, and should not be taken as financial advice.
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
Ultimate Hyper Scalper Strategy [PrismBot] [Lite]💎 Prism Core Initial Release
ver 3.4.r379
This strategy is built on on a modified and reworked older version of the Waddah Attar Explosion strategy. It contains several confluence indicators such as Triple EMAs, volume, consolidation, ADX, and Bull Bear Power.
The Waddah Attar Indicator strategy is based on the following conditions:
LONG
trend is up
explosion line is greater than the dead zone line or a set threshold
SHORT
trend is down
explosion line is greater than the dead zone line or a set threshold
While this is a very simple strategy on the surface, the WAE indicator is great for finding strong trending markets and as it can be considered high frequency, can be paired with other confluence such as the ADX indicator to find high volatility movements.
This strategy also contains a myriad of custom order features, such as controlling the type of position sizes you open with Risk %, volatility, ATR based stops, and much more.
If you have any questions about this strategy or its features, you can ask in the comments below, or DM me here on Tradingview.
The Ultimate Backtest - Fontiramisu█ OVERVIEW
The Ultimate Backtest allows you to create an infinite number of trading strategies and backtest them easily and quickly.
You can leverage the trading setup you created with the tradingview's real-time alert system.
The tool is constantly being improved to accommodate more in-house indicators in order to imagine more trading strategies.
█ HOW IT WORKS.
The tool is divided into 3 main parts:
1. The indicators:
These are the indicators that you will be able to set up to create your setups.
Example: rsi, exponential moving average, home made resistance/support indicator etc.
We are working to add more and more in-house indicators to multiply the trading strategies.
2. The entry/exit strategy:
The entry/exit trades management is a central point of the strategy.
Here we propose several ways to take profits and in-house optimizations to enter a position.
3. The setup: the combination of indicators
Here it is up to you to create your own recipe.
You combine the different indicators set up above to make a real strategy.
Example: RSI Divergence + Location on a support.
Let's look at this in more detail.
Below is a description of all sections
█ 1. THE INDICATORS
TREND: MA (moving average) -->
Set up a moving average from multiple methods (sma, ema, smma...) of the type and length you want.
> A long is taken if the price is above the MA.
> A short is taken if the price comes below the MA.
You can set up a smoothing MA from the existing moving average and use it in the same way.
ENVELOPE: SUPER TREND -->
The supertrend is a trend following indicator. It clearly describes the distinction between downtrends and uptrends with a red or green direction. It is calculated according to the ATR and a factor.
> A long is taken when the direction is green and the price touches the supertrend support line.
> A short is taken when the direction is red and the price touches the supertrend resistance line.
ENVELOPE: BOLLINGER BAND -->
Bollinger bands are used to evaluate the volatility and probable evolution of prices, here we exploit the envelope
> A long is taken if the price crosses the lower band.
> A short is taken if the price crosses the upper band.
CLOUD: ICHIMOKU -->
The Ichimoku cloud aims to identify the direction and reversal points of dominant market trends. It displays support and resistance levels.
> A long is taken when the price enters the green ichimoku cloud.
> A short is taken when the price enters the red ichimoku cloud.
MOMENTUM: MACD ZERO LAG / MACD / RSI -->
RSI (Relative Strength Index) reflects the relative strength of upward movements, compared to downward movements.
MACD (Moving Average Convergence Divergence) is a momentum indicator that follows the trend and shows the correlation between two moving averages of the asset price.
MACD ZERO LAG is calculated in the same way except that the exponential moving averages that make up the calculation do not lag.
> A long is taken on a potential bullish divergence.
> A short is taken on a potential bearish divergence.
For now, with these indicators, we only take a trade based on divergences but we will add overbuy/oversell etc.
MOMENTUM: MA SLOPE -->
This house indicator allows you to use the slope of a moving average as a measure of momentum.
Define the length of the moving average whose slope we will take.
We then take a fast ma of the slope then a slow ma (You define the lengths with the parameters)
The tool foresees a subtraction between the slow and fast ma to have another interpretation of the slope.
This indicator is available and can be viewed freely on my tradingview profile.
> A long is taken when there is a potential bullish divergence on the fast/slow MA or the difference.
> A short is taken when there is a potential bear divergence on the fast/slow MA or the difference.
RESISTANCE: R/S FONTIRAMISU -->
An in-house indicator that shows resistances and supports according to the chosen parameters.
Indicator available and can be viewed freely on my tradingview profile.
> A long is taken when the price arrives on a support.
> A short is taken when the price arrives on a resistance.
-----
MOMENTUM DIVERGENCE -->
Section used to set the divergence detection.
The first field allows you to select which momentum you want to calculate the divergence on.
PIVOT DETECTION -->
Used to calculate top and dip on the chart, it is used with divergences/resistances/enter-exit optimizations....
Default parameters are: Deviation: 2.5, Depth: 10.
█ 2. STRATEGY FOR ENTERING/EXITING TRADES.
STRATEGY: TP/SL -->
Enter/Exit Trade Mode" field: The first field allows you to choose between two modes:
1. TP/SL Mode:
This mode allows you to take entries with take profits that you define afterwards with the TP1 and TP2 parameters .
> The stop loss is calculated automatically by taking the last dip if it is a long and the last top if it is a short.
> You can add a "Stop Loss % Offset" which will increase the size of the stop loss by the % value you set.
> If you activate TP2, the profit taking is split between TP1 and TP2, you can select the percentage of profit taking split between TP1 and TP2 via the "Percent Exit Profit TP1" field.
> The "TPX Multiplier" fields allow you to define the desired Risk Reward, if = 1 then RR = 1/1.
> A Trailing stop option is available, if active then the profit take will be split between TP1 and Trailing stop.
For the moment you can choose between the two MA's set up above to serve as trailing stop:
> In long, if the price goes below the MA then you take the profit (or the loss)
> In short, if the price goes above the MA then you take the profit (or the loss)
2. ONLY BUY/SELL:
Here the take profits are not taken into account, we only have an alternation between the long and the shorts.
The trailing stop applies to this mode and can be interesting depending on the use.
STRATEGY: SETUP OPTIMIZER (FP) -->
Here we have 3 home made optimization tools to take more relevant trades.
1. FAVORABLE ENTRY FROM PIVOT.
Here the tool will favor entries with interesting locations depending on dips and tops before.
A red cross with "FP" will appear on the chart each time a trade does not meet this condition.
2.STOP LOSS MAX (SL).
Will only take trades where the stop loss is maximum at X%.
A red cross with "%SL" will appear on the chart each time a trade does not meet this condition.
3. MOVE ALREADY TRADED.
Will not take several trades in the same move.
This can avoid cascading losing trades on some setups.
A red cross with "MT" will appear on the chart each time a trade does not meet this condition.
█ 3. THE SETUP: THE COMBINATION OF INDICATORS
Here, let your creativity speak.
You are free to assemble the indicators in the following way:
The conditions defined inside a group (group1/group2/group3) are combined to each other via an OR operator .
Example, if "cond01 = Momentum DIv" and "cond02 = Res/Sup Location", then trades will be triggered if one of the two conditions is met.
The conditions defined between several groups are multiplied via the AND operator .
Example, if "cond01 = Momentum DIv" and "cond12 = Res/Sup Location", then trades are taken if both conditions are met at the same time.
ALL CONDITIONS:
> NONE
No conditions selected.
> Momentum Div
Triggers when a potential divergence occurs on the selected momentum (in the divergence section).
> Momentum Div UT Sup
Triggers when a potential divergence occurs on the selected momentum (in the divergence section) in the upper timeframe.
The upper timeframe of the momentum is calculated directly in the code by multiplying the set parameters by 4 (fastlenght/slowlenght...).
> Multi MA
It is set in the "Trend: MA" section and is triggered by the conditions mentioned in the "INDICATORS" section.
> Smooting MA
Is set in the "Trend: MA" section and is triggered by the conditions mentioned in the "INDICATORS" section.
> Super Trend Env
Is set in the "ENVELOPE: SUPER TREND" section and is triggered by the conditions mentioned in the "INDICATORS" section.
> BB Env
It is set in the "ENVELOPE: BOLLINGER BAND" section and is triggered by the conditions mentioned in the "INDICATORS" section.
> Ichimoku Cloud
Is set in the "CLOUD: ICHIMOKU" section and is triggered by the conditions mentioned in the "INDICATORS" section.
> Res/Sup Location
Is set in the "RESISTANCE: R/S" section and is triggered by the conditions mentioned in the "INDICATORS" section.
Self-Optimizing RSI Strategy [Kioseff Trading]Hello!
Introducing the Self-Optimizing RSI Strategy.
The indicator tests up to 800 RSI strategies simultaneously, looping through arrays, and auto plots the best performing parameter set.
The image above shows the result of 800 RSI strategies concurrently.
The table oriented bottom right shows the performance and risk metrics of the best performing RSI system tested across the bar set. Additionally, the conditions for entry and exit are displayed; for the image - a long entry system predicated on RSI crossunders and exit system predicated on a 1% TP and 2% SL are shown.
The indicator calculates numerous risk and performance metrics.
Calculated metrics include:
RSI Parameters
RSI Cross Entry Level
Total Trades
Win Rate
Avg. Gain for Winning Trades
Max Pain
PnL (Cumulative Performance)
Profit Factor
Avg. Loss for Losing Trades
Ratio Avg. Win / Avg. Loss
Avg. Bars in Trade
Max Drawdown
Current Drawdown
Open Position PnL
"Dynamic" indicates the performance of self-optimizing RSI system was tested.
The image above shows the performance of the greatest-performing RSI system - a fixed set of parameters - when adhering to a 1% TP and 2% fixed SL.
Trailing Stops and Profit-Taking Limit orders can be set/simulated.
The image above shows a dynamic entry level - plotted as a purple, non-transparent line.
The entry level "self-optimizes" to mimic the best performing RSI system at current time.
The image above exemplifies the functionality for all horizontal lines plotted on the chart.
The average RSI level achieved subsequent a profitable trade is shown.
The average RSI level achieved subsequent a losing trade is shown.
The entry level for RSI crossunders/crossovers is shown.
The image above show the Self-Optimizing RSI indicator recording entries & exits; gains & losses, for each executed trade.
You can "verify" trades manually.
Blue boxes reflect an entered position.
Green boxes reflect a closed, profitable trade.
Red boxes reflect a close, losing trade.
The percentage gain for a profitable trade is appended to green boxes; the percentage loss for a losing trade is appended to red boxes.
The Self-Optimizing RSI indicator plots off the chart; however, percentage gains/losses are measured against price, not RSI.
Boxes correlate to the interval a trade was entered/exited on.
The indicator hosts various methods to filter the outcome for testing.
For instance, you can:
Use trailing stops or fixed stop losses
Test RSI crossunders and crossovers
Configure the RSI settings that are tested (i.e. RSI 2 - 9, RSI 14 - 20, RSI 50 - 57)
Test short-based RSI Systems and long-based RSI systems
Simulate limit orders (Exit intrabar at fixed stop losses or trailing stop losses; exit intrabar at profit targets)
Require all tested RSIs to trend above or below their respective average (i.e. all RSIs must trend above/below their 50-interval EMA values. SMAs can also be used)
Use external indicators and require a user-defined value be exceeded, measured below, or that price exceed or measure below an indicator. The Self-Optimizing RSI indicator incorporates a few built-in technical indicators - ADX, %k, MFI, CMFI, and RSI. Consequently, you can require these indicators to measure above/below a specified level prior to entry. Additionally, you can supplement an extrinsic indicator (anything custom coded with plot values) to the entry logic for the Self-Optimizing RSI indicator. I'll show an example shortly.
Adjust the time window that's tested.
Adjust PT and SL percentages.
Override plot an RSI system to procure thorough statistics.
Require a symbol to measure above/Below or equal to a particular price level to “validate” a Long/Short entry signal. You can retrieve any data hosted by TradingView and require it measure above/below a user-defined level prior to entry. For instance, you can select "$VIX", and require the ticker to measure less than $30 prior to long/short entry. If "$VIX" measures greater than $30 prior to a long/short signal the position will not open. Alternatively, you can require a symbol to measure above a user-defined price prior to entry. If the retrieved ticker doesn't measure above the user-defined level prior to entry a trade will not open.
Use trailing stops or fixed stop losses
The image above shows results for 800 short-based RSI systems - using a trailing stop loss.
Test RSI crossunders and crossovers
The image shows results for 800 long-based RSI systems. Positions are entered subsequent to RSI crossovers.
You can select which RSI strategies are tested - you aren't not limited to testing RSI 2 - RSI 9 (:
Simulate limit orders (Exit intrabar at fixed stop losses or trailing stop losses; exit intrabar at profit targets)
The image above shows performance test results when exiting during the interval subsequent to the profit target being exceeded.
The image above shows performance test results when exiting during the interval subsequent to the stop loss being exceeded.
Require all tested RSIs to trend above or below their respective average (i.e. all RSIs must trend above/below their 50-interval EMA values. SMAs can also be used)
The image above shows an RSI EMA in addition to prerequisite condition. For each RSI strategy tested, the RSI used for the strategy must measure above an EMA of its values prior to entry. You can require RSI to measure below an EMA of its values prior to entry, use an SMA, and change the length of the MA used.
Use external indicators and require a user-defined value be exceeded, measured below, or that price exceed or measure below an indicator. The Self-Optimizing RSI indicator incorporates a few built-in technical indicators - ADX, %k, MFI, CMFI, and RSI. Consequently, you can require these indicators to measure above/below a specified level prior to entry. Additionally, you can supplement an extrinsic indicator (anything custom coded with plot values) to the entry logic for the Self-Optimizing RSI indicator. I'll show an example shortly.
The image above shows me requiring the ADX indicator to measure above "20" prior to long entry. Any of the built-indicators can be used with similar conditions; you can implement a custom-coded indicator for trade logic.
Additionally, you can supplement an extrinsic indicator (anything custom coded with plot values) to the entry logic for the Self-Optimizing RSI indicator.
The image above shows me retrieving the value for Volume Profile Point of Control - a TradingView coded indicator.
Consequently, I can require price to measure above/below the session's Poc prior to RSI long/short entry.
You can use this feature with any custom coded indicator providing historical plot values - something you or a favored author have coded.
]Adjust PT and SL percentages
The image above shows adjusted TP & SL percentages - optimize and reward/risk ratio you'd like (:
Override plot an RSI system to procure thorough statistics.
The image above shows manually plotted RSI parameters and a corresponding stat sheet.
Require a symbol to measure above/Below or equal to a particular price level to “validate” a Long/Short entry signal. You can retrieve any data hosted by TradingView and require it measure above/below a user-defined level prior to entry. For instance, you can select "$VIX", and require the ticker to measure less than $30 prior to long/short entry. If "$VIX" measures greater than $30 prior to a long/short signal the position will not open. Alternatively, you can require a symbol to measure above a user-defined price prior to entry. If the retrieved ticker doesn't measure above the user-defined level prior to entry a trade will not open.
The image above shows me requiring the ticker "$VIX" to measure below $30 prior to long/short entry. If %VIS measures greater than $30 when a long/short signal triggers a position will not be opened. Further refine your trading system with this feature - exploit correlations.
Adjust the time window that's tested.
The image above shows configurable start and end dates for the optimization period.
You won't be able to test 800 RSI strategies concomitantly on a 20,000 bar data set.
Consequently, for large data sets (intrasession data) you will have to narrow the optimization window to test a larger number of combinations.
You can test 80 (loads on all data sets), 144 (loads on all data sets), 264 (loads on ~15,000 bar data sets), 312 (loads on ~11,500 bar data sets) and 800 (loads on ~4950 bar data sets)combinations simultaneously. You can test 800 RSI strategies simultaneously on intrasession data; however, you'll likely have to narrow the tested time window.
I recently published a bar count script titled "Bar Count for Backtesting", you can access the script here:
The above script is useful for quickly calculating the number of bars in a time window, or the date for a bar that is "x" number of bars back. Therefore, implementing these scripts cooperatively should improve date selection efficiency (not arbitrarily selecting test start & end dates that fail to load).
I included a tool tip describing the near-maximum bars in a data set that the higher numbers of simultaneous RSI strategies can be tested on.
More to come; enjoy!
(P.S. The script uses private libraries and, consequently, is unable to be published open source)
An optimization script is best implemented to discover what won't work, not what will work. The best performing "optimized" parameters are not a guaranteed profitable investment system. While we may see an exceptionally positive performance for a set of parameters, it's impossible to know how much of that performance is the beneficiary of market noise in the absence of additional testing. Most market moves are noise - irreplicable sequences that offer no predictive utility - and most "good" backtests overwhelmingly benefit from these irreplicable sequences. An investor unfamiliar with this concept may be lead to believe they have found a valid correlation between an indicator sequence and subsequent price movement, despite the correlation being illusory.
Consequently, it should be assumed that the best performing parameters strongly benefitted from market noise and will not work in a live market - until further rigorous statistical tests are performed on an investment system built around the best performing parameters. This includes out-of-sample, in-sample, and forward testing in addition to testing negatively correlated, positively correlated and zero-correlation assets; testing additional assets should be treated as prerequisite to live implementation.
Of course, all trading strategies, even one's that methodically exploit a valid correlation/replicable sequence, will benefit from market noise - it's impossible to avoid. However, a "legit" trading strategy has a chance to work on future price data, while an overoptimized strategy will fail miserably on new price data!
An overoptimized strategy is virtually guaranteed to have a better backtest performance than a valid strategy. The overoptimized strategy will fail in a live market while the valid strategy has a chance of working. So, should you notice the best performing RSI parameters, be sure to build a comprehensive trading system around the parameters and perform additional tests. This is the only way to know if the optimized parameters will truly work in a live market!
Unfortunately, they often will not!
This publication does not constitute investment advice.
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
Moon Phases Strategy with CCI EXTRIME TPHELLO TO ALL ASTROLGY TRADING LOVERS
***im not a native english speaker and im not going to google translte it so soory for mastakes ****
this is an amzing script of moon cycle strategy
for long -
price need to be above MA
it will buy in full moon and will sell at new moon
i added an extrime CCI TP that if cci is over bought above 200 line it will close position- it cant be edited out so enjoy it.
for short-
price need to be below MA
it will short when new moon and buy back when fullmoon
i added an extrime CCI tp that if cci is oversold under -200 line it will close position - it cant be edited out so enjoy it.
just edit the new moon Reference date by your UTC TIME!!! ׂ( GOOGLE 'NEW MOON DATE')
לכל אוהבי האסטרולוגיה ומסחר בכוכבים
סקריפט פשוט מעולה!
ללונג- האסטרטגיה קונה כאשר המחיר מעל הממוצע ויש ירח מלא-היא מוכרת כאשר יש ירח חדש או כאשרס.ס.י חוצה את קו ה200
בשורט היא עושה ההפך ומוכרת כאשר יש ירח חדש והמחיר מתחת לממוצע-היא סוגרת את הפוזציה כאשר יש ירח מלא או כאשר ס.ס.י חוצה מטה את רמת המינוס 200
אנא ערכו את התאריך רפרנס לירח לפי אזור הזמן שלכם חפשו בגוגל ''תאריך ירח חדש'.
BACKTEST RETURNS SOOOOOO GOOOOD !
הבאק טסטים חוזרים מושלמים
trade with the stars and rip markets
Swing Failure Reversal StrategyThis strategy is using Swing Failure Patterns as a reversion indicator.
The strategy automatically adapts itself to the timeframe of the current chart.
Swing Failure Pattern occurs when the price trend fails to set new highs in uptrend or meet new lows in a downtrend. This pattern helps traders decide when to enter and exit the market. Usually, traders enter in the downtrend i.e. lower price highs and lower price lows, and exit in the uptrend situation i.e. higher price highs and higher price lows. Thus, traders go against the current trend. This helps the traders take advantage of early trend reversal indicators.
Types of Failure Swing :
Failure Swing Top: This occurs when the stock price goes higher whereas the RSI fails to make a higher high and falls below the recent fail point. The Fail Point is where the RSI line is below the recent swing low. This Failure Swing indicates a short position.
Failure Swing Bottom: This occurs when the stock price gets lower whereas RSI fails to make a lower low and rises over the recent fail point. Fail point is the point where the RSI line is above the recent swing high. This Failure Swing indicates a long position.
MPF EMA Cross Strategy (8~13~21) by Market Pip FactoryThis script is for a complete strategy to win maximum profit on trades whilst keeping losses at a minimum, using sound risk management at no greater than 1.5%
The 3x EMA Strategy uses the following parameters for trade activation and closure.
1/ Daily Time Frame for trend confirmation
2/ 4 Hourly Time Frame for trend confirmation
3/ 1 Hourly Time Frame for trend confirmation AND trade execution
4/ 3x EMAs (Exponential Moving Averages)
* EMA#1 = 8 EMA (Red Color)
* EMA#2 = 13 EMA (Blue Color)
* EMA#3 = 21 EMA (Orange Color)
5/ Fanning of all 3x EMAs and CrossOver/CrossUnder for Trend Confirmation
6/ Price Action touching an 8 EMA for trade activation
7/ Price Action touching a 21 EMA for trade cancellation BEFORE activation
* For LONG trades: 8 EMA would be ABOVE 21 EMA
* For SHORT trades: 8 EMA would be BELOW 21 EMA
* For trade Cancellation, price action would touch the 21 EMA before trade is activated
* For trade Entry, price action would touch 8 EMA
Once trigger parameter is identified, entry is found by:
a) Price action touches 8 EMA (Candle must Close for confirmed Trade preparation)
b) Trade preparation can be cancelled before trade is activated if price action touches 21 EMA
c) Trailing Stop Loss can be used (optional) by counting back 5 candles from current candle
CLOSURE of a Trade is identified by:
e) 8 EMA crossing the 21 EMA, then close trade, no matter LONG or SHORT
f) Trail Stop Loss
IMPORTANT:
g) No more than ONE activated trade per EMA crossover
h) No more than ONE active trade per pair
NOTE: This strategy is to be used in conjunction with Cipher Twister (my other indicator) to reduce trades on
sideways price action and market trends for super high win ratio.
NOTE: Enabling of LONGs and SHORTs Via Cipher Twister is done by using the previous
green or red dot made. Additionally, when the trend changes, so do the dot's validity based
on being above or below the 0 centerline.
----------------------------
Strategy and Bot Logic
----------------------------
.....::: FOR SHORT TRADES ONLY :::.....
The Robot must use the following logic to enable and activate the SHORT trades:
Parameters:
$(crossunder)=8EMA,21EMA=Bearish $(crossover)=8EMA,21EMA=Bullish $entry=SELL STOP ORDER (Short)
$EMA#1 = 8 EMA (Red Color) $EMA#2 = 13 EMA (Blue Color) $EMA#3 = 21 EMA (Orange Color)
Strategy Logic:
1/ Check Daily Time Frame for trend confirmation if:
(look back up to 50 candles - find last cross of EMAs)
$(chart)=daily and trend=$(crossunder) then goto 2/ *Means: crossunder = ema21 > ema8
$(chart)=daily and trend=$(crossover) then stop (No trades) *Means: crossover = ema8 > ema21
NOTE: This function is switchable. 0=off and 1=on(active). Default = 1 (on)
2/ Check 4 Hourly Time Frame for trend confirmation if:
(look back up to 50 candles - find last cross of EMAs)
$(chart)=4H and trend=$(crossunder) then goto 3/ *Means: crossunder = ema21 > ema8
$(chart)=4H and trend=$(crossover) then stop (No trades) *Means: crossover = ema8 > ema21
NOTE: This function is switchable. 0=off and 1=on(active). Default = 1 (on)
3/ 1 Hourly Time Frame for trend confirmation AND trade execution if:
(look back up to 50 candles - find last cross of EMAs)
$(chart)=1H and trend=$(crossunder) then goto 4/ *Means: crossunder = ema21 > ema8
$(chart)=1H and trend=$(crossover) then stop (No trades) *Means: crossover = ema8 > ema21
4/ Trade preparation:
* if Next (subsequent) candle touches 8EMA, then set STOP LOSS and ENTRY
* $stoploss=3 pips ABOVE current candle HIGH
* $entry=3 pips BELOW current candle LOW
5/ Trade waiting (ONLY BEFORE entry is hit and trade activated):
* if price action touches 21 EMA then cancel trade and goto 1/
Note: Once trade is active this function does not apply !
6/ Trade Activation:
* if price activates/hits ENTRY price, then bot activates trade SHORTs market
7/ Optional Trailing stop:
* if active, then trailing stop 3 pips ABOVE previous HIGH of previous 5th candle
or * Move Stop Loss to Break Even after $X number of pips
NOTE: This means count back and apply accordingly to the 5th previous candle from current candle.
NOTE: This function is switchable. 0=off and 1=on(active). Default = 0 (off)
8/ Trade Close ~ Take Profit:
* Only TP when
$(chart)=1H and trend=$(crossover) then close trade ~ Or obviously if Stop Loss is hit if 7/ is activated.
----------END FOR SHORT TRADES LOGIC----------
.....::: FOR LONG TRADES ONLY :::.....
The Robot must use the following logic to enable and activate the LONG trades:
Parameters:
$(crossunder)=8EMA,21EMA=Bearish $(crossover)=8EMA,21EMA=Bullish $entry=BUY STOP ORDER (Long)
$EMA#1 = 8 EMA (Red Color) $EMA#2 = 13 EMA (Blue Color) $EMA#3 = 21 EMA (Orange Color)
Strategy Logic:
1/ Check Daily Time Frame for trend confirmation if:
(look back up to 50 candles - find last cross of EMAs)
$(chart)=daily and trend=$(crossover) then goto 2/ *Means: crossover = ema8 > ema21
$(chart)=daily and trend=$(crossunder) then stop (No trades) *Means: crossunder = ema21 > ema8
NOTE: This function is switchable. 0=off and 1=on(active). Default = 1 (on)
2/ Check 4 Hourly Time Frame for trend confirmation if:
(look back up to 50 candles - find last cross of EMAs)
$(chart)=4H and trend=$(crossover) then goto 3/ *Means: crossover = ema8 > ema21
$(chart)=4H and trend=$(crossunder) then stop (No trades) *Means: crossunder = ema21 > ema8
NOTE: This function is switchable. 0=off and 1=on(active). Default = 1 (on)
3/ 1 Hourly Time Frame for trend confirmation AND trade execution if:
(look back up to 50 candles - find last cross of EMAs)
$(chart)=1H and trend=$(crossover) then goto 4/ *Means: crossover = ema8 > ema21
$(chart)=1H and trend=$(crossunder) then stop (No trades) *Means: crossunder = ema21 > ema8
4/ Trade preparation:
* if Next (subsequent) candle touches 8EMA, then set STOP LOSS and ENTRY
* $stoploss=3 pips BELOW current candle LOW
* $entry=3 pips ABOVE current candle HIGH
5/ Trade waiting (ONLY BEFORE entry is hit and trade activated):
* if price action touches 21 EMA then cancel trade and goto 1/
Note: Once trade is active this function does not apply !
6/ Trade Activation:
* if price activates/hits ENTRY price, then bot activates trade LONGs market
7/ Optional Trailing stop:
* if active, then trailing stop 3 pips BELOW previous LOW of previous 5th candle
or * Move Stop Loss to Break Even after $X number of pips
NOTE: This means count back and apply accordingly to the 5th previous candle from current candle.
NOTE: This function is switchable. 0=off and 1=on(active). Default = 0 (off)
8/ Trade Close ~ Take Profit:
* Only TP when
$(chart)=1H and trend=$(crossunder) then close trade ~ Or obviously if Stop Loss is hit if 7/ is activated.
----------END FOR LONG TRADES LOGIC----------
IMPORTANT:
* If an existing trade is already open for that same pair, & price action touches 8EMA, do NOT open a new trade..
* bot must continuously check if a trade is currently open on the pair that triggers
* New trades are to be only opened if there is no active trade opened on current pair.
* Only 1 trade per pair rule !
* 5 simultaneous open trades (not same pairs) default = 5 but value can be changed accordingly.
* Maximum risk management must not exceed 1.5% on lot size
*** Some features are not yet available autoated, they will be added in due course in subsequent version updates ***
Crypto_Troll_Turtle_StrategyTurtle Strategy for high marketcap cryptocurrencies
I'm glad to launch my strategy which is based on
moving averages / bollinger bands / RSI and volume
It's basically made for scalping with an interesting return over the last two years and a perspectively low drawdown
if you're interested in the strategy and you want to use it for futures trading you can contact me for a money & risk management rules that you can use and prevent you from a huge loss !! it's for free don't worry xD you can find my contact in the author's instructions' label
The optimal timeframe to use is 1H
I'll be trying to launch telegram signals for this strategy as soon as possible for the following pairs: BTCUSDT ETHUSDT BNBUSDT timeframe: 1H
I'm open to all reviews ! thanks !
5-8-13 EMAs Strategy (Andrew's Trading Channel)============
ENGLISH
============
- Description:
This strategy was designed by "Andrew's Trading Channel" (credits to him for the base strategy).
A lot of improvements have been added to the strategy, more conditions, trailing stop, custom stop loss and take profit, everything explained below.
- CONDITIONS FOR ENTERING A LONG:
EMA 5 crossovers EMA 8.
- EXIT LONG:
EMA 8 crossovers EMA 8 and closing price goes below EMA 13.
- CONDITIONS FOR ENTERING SHORT:
EMA 8 crossovers EMA 5.
- EXIT SHORT:
EMA 5 crossovers EMA 8 and closing price goes above EMA 13.
- Visual:
All EMAs are visible (5, 8 and 13 periods) with different and customizable colors/width.
Position start price, take profit, stop loss and trailing stop (if present) are shown automatically.
Background color shows green when LONG conditions are met (and of course, position is opened on the next candle), same for SHORT but red.
- Usage and recommendations:
As this is a coded strategy, you don't even have to check for indicators, just open and close trades as the strategy shows.
There're various customizable settings like optional take profit/stop loss, trailing stop (both based on ATR or any of the EMAs), open only LONGs/SHORTs or both, date range...
Take profit and stop loss ATR default values have been tested for scalping on 5 min charts, however feel free to check strategy results and increase the winning rate/profit for your favorite asset.
- Customization:
As usual I like to make as many aspects of my indicators/strategies customizable, indicators, colors etc., feel free to ask if you feel that something that should be configurable is missing or if you have any ideas to optimize the strategy.
============
ESPAÑOL
============
- Descripción:
Esta estrategia fue diseñada por "Andrew's Trading Channel" (créditos a él por la estrategia base).
Se han añadido muchas mejoras a la estrategia, más condiciones, trailing stop, stop loss y take profit personalizados, todo explicado a continuación.
- CONDICIONES PARA ENTRAR EN LONG:
Cruce de EMA 5 con EMA 8 ascendente.
- SALIR DE LONG:
Cruce de EMA 8 con EMA 5 ascendente y el precio de cierre se sitúa por debajo de la EMA 13.
- CONDICIONES PARA ENTRAR EN SHORT:
Cruce de EMA 8 con EMA 5 ascendente.
- SALIR DE SHORT:
Cruce de EMA 5 con EMA 8 ascendente y el precio de cierre se sitúa por encima de la EMA 13.
- Visual:
Todas las EMAs son visibles (5, 8 y 13 períodos) con colores/anchos y personalizables.
El precio de inicio de la posición, el take profit, el stop loss y el trailing stop (si están presentes) se muestran automáticamente.
El color de fondo es verde cuando se cumplen las condiciones de LONG (y por supuesto, la posición se abre en la siguiente vela), lo mismo para SHORT pero en rojo.
- Uso y recomendaciones:
Como esta es una estrategia programada, ni siquiera tienes que comprobar los indicadores, sólo abrir y cerrar las operaciones como te muestra la estrategia.
Hay varios ajustes personalizables como el take profit/stop loss opcional, el trailing stop (ambos basados en el ATR o en cualquiera de las EMAs), abrir sólo LONGs/SHORTs o ambos, rango de fechas...
Los valores por defecto del take profit y el stop loss ATR han sido probados para scalping en gráficos de 5 minutos, sin embargo, siéntase libre de comprobar los resultados de la estrategia y aumentar la tasa de ganancia / beneficio para su activo favorito.
- Personalización:
Como siempre me gusta hacer personalizables todos los aspectos de mis indicadores/estrategias, indicadores, colores, etc., siéntase libre de preguntar si cree que falta algo que debería ser configurable o si tiene alguna idea para optimizar la estrategia.
Buy and hold strategyA simple buy and hold strategy. A short or a long position can be chosen. The start date will determine the date where your position will start and end date is the date it will end. This works well as a baseline to your other existing strategies since buy and hold is just the simplest strategy available.
No-lose trading targets (Based on MFI) By Mustafa ÖZVERThis code shows expected reaction target prices after sudden moving based on MFI . Red area means the price is on overbought area, green area means the price is on oversold area. If you see red area under price, you can make short option to next to the horizontal beginning price of red area. If you see green area over price, you can make long option to next to the horizontal beginning price of green area.
When this code works
- The green area starts where mfi value is on oversold
- The red area starts where mfi value is on overbought
Of course, this code may be failed, do not forget the target may never come. But hopefully price will cross over the target.
And you (as developers) can develop this code by using anything instead of mfi to get up-down target prices.
But only this values can not guarantee good results for trading. BE CAREFUL
Sonic R & RSI only BTCUSD D1 strategySonic R & RSI only BTCUSD D1 strategy
for t.me/beincypto_vn
for those who want to create their own strategy
Use the explanations in the strategy to copy and edit a strategy for yourself
buy when on the chart is buyEMA or buyRSI
close buy order when on chart is closeEMA or closeRSI
please use coinbase exchange time frame D1
Top & Bottom Strategy by The Accumulation ZoneHey Guy's welcome back to another Strategy based on a popular Indicator!
Indicators used in this Strategy:
-> Top and Bottom by ceyhun (Basic Settings)
-> Volatility Oscillator by verifid (Basic Settings)
Long Entry Criteria:
1. New Buy Signal from the Top & Bottom Indicator
2. Bullish Spike to the upside on the Volatility Oscillator ( above the BB Bands)
3. Enter Long (SL based on ATR, RR 1.5)
Short Entry Criteria:
1. New Sell Signal from the Top & Bottom Indicator
2. Bearish Spike to the downside on the Volatility Oscillator ( below the BB Bands)
3. Enter Short (SL based on ATR, RR 1.5)
Optional Filters:
- Session Filter
- Date Filter
- EMA Filter
IMPORTANT use this only for testing purpose. Don't Risk any Money. For educational Purpose Only!
Breakout Finder Strategy by The Accumulation ZoneThe Breakout Strategy:
Indicators used:
Least Squared Moving Average by Tradingview
Smoothed Moving Average by Tradingview
MACD Support Resistance by venkatachari_n
About this Strategy:
This strategy is based on spotting a particular activity pattern involving the above listed indicators:
A fast moving average that will track closely with price while still smoothing out some price chop
A slower least squared moving average to help gauge short-term momentum
MACD Support and Resistance to help identify longer-term trends and potentially serve to also guide directional bias
If all entry conditions are met, the strategy enters a position. As well as sending an alert message for the Entry, TP/SL Signals
Long Condition:
Price close above MACD S/R Line
SMMA crossed MACD S/R Line to the upside
LSMA crossed MACD S/R Line to the upside
Short Condition:
Price close below MACD S/R Line
SMMA crossed MACD S/R Line to the downside
LSMA crossed MACD S/R Line to the downside
Strategy Settings
SL based on ATR Bands (0.9 ATR Multiplier recommended*)
TP based on RR (1.5 RR recommended*)
Optional EMA Filter (If set to 0 -> disabled)
Session Filter
Custom Strategy Backtesting Dashboard (Risk = 5%*)
*Recommended for a Daily BTC/USDT Chart
Gap Reversion StrategyToday I am releasing to the community an original short-term, high-probability gap trading strategy, backed by a 20 year backtest. This strategy capitalizes on the mean reverting behavior of equity ETFs, which is largely driven by fear in the market. The strategy buys into that fear at a level that has historically mean reverted within ~5 days. Larry Connors has published useful research and variations of strategies based on this behavior that I would recommend any quantitative trader read.
What it does:
This strategy, for 1 day charts on equity ETFs, looks for an overnight gap down when the RSI is also in/near an oversold position. Then, it places a limit order further below the opening of the gapped-down day. It then exits the position based on a higher RSI level. The limit buy order is cancelled if the price doesn't reach your limit price that day. So, the larger you make the gap and limit %, the less signals you will have.
Features:
Inputs to allow the adjustment of the limit order %, the gap %, and the RSI entry/exit levels.
An option to have the limit order be based on a % of ATR instead of a % of asset price.
An optional filter that can turn-off trades when the VIX is unusually high.
A built in stop.
Built in alerts.
Disclaimer: This is not financial advice. Open-source scripts I publish in the community are largely meant to spark ideas that can be used as building blocks for part of a more robust trade management strategy. If you would like to implement a version of any script, I would recommend making significant additions/modifications to the strategy & risk management functions. If you don’t know how to program in Pine, then hire a Pine-coder. We can help!
Market Makers MoveV1,V2, & V3: New indicator release!! In this fantastic new indicator, you can do the following:
- Specify a particular EMA crossing combination (between a fast and a slow ema line)
- Specify the timeframe (can be independent or based on current chart timeframe, by default)
- Select one of four possible potential profiles (ETFs Only, Crypto, and more!) OR input manually any of 40 possible tickers AND
- Assess whether entry for calls or puts is appropriate based on price action on realtime view between 2 tickers, one which will be the highest (strongest) trend up and the other going the lowest (weakest) trend possible, all at the same time!
This indicator is by no means financial advice!! So by all means, use according to proper assessment and risk management! There are various tooltips instilled to each field and table of the indicator, all to better guide you for better end results!
Cheers! and good luck in you!!
SuperIchi StrategyTRADE CONDITIONS
Long entry:
Tenkan-Sen is above Kijun-Sen (blue line above red line)
Price closes above both Tenkan-Sen and Kijun-Sen (price closes above both blue and red lines)
Tenkan-Sen and Kijun-Sen is above Senkou Span (both blue and red lines are above cloud)
Senkou Span is green (cloud is green)
Price pulled back and closed below both Tenkan-Sen and Kijun-Sen within last X (configurable in settings) candles (price pulled back below blue and red lines)
Short entry:
Tenkan-Sen is below Kijun-Sen (blue line below red line)
Price closes below both Tenkan-Sen and Kijun-Sen (price closes below both blue and red lines)
Tenkan-Sen and Kijun-Sen is below Senkou Span (both blue and red lines are below cloud)
Senkou Span is red (cloud is red)
Price pulled back and closed above both Tenkan-Sen and Kijun-Sen within last X (configurable in settings) candles (price pulled back above blue and red lines)
Risk management:
Each trade risks 2% of account (configurable in settings)
SL size determined by swing low/high of previous X candles (configurable in settings) or using the ATR override (configurable in settings) where the max of swing high/low or ATR value will be used to calculate SL
TP is calculated by Risk:Reward ratio (configurable in settings)
TIPS
Timeframe: I have found best results running on anything 5M and above
CREDITS
SuperIchi by LuxAlgo