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.
Médias Móveis
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
MAPM-V1Greetings dear traders!
I would like to introduce you the script for testing the strategy by crossing two signal EMAs based on the MACD indicator.
In the strategy itself:
The entry is made as a percentage of the deposit by EMA crossings.
There are additional purchases, they are set from the entry price for a given percentage in the opposite direction of the transaction.
The distance in percentage from the entry price, on which the additional purchase is exposed, is set in the StepAddPurchases parameter.
The Martingale parameter increases the initially purchased amount of the base traded cryptocurrency in each additional purchase.
The essence of the strategy is to trade a large number of pairs in order to diversify risks and obtain a stable income.
It is desirable to enter each trading pair with a small percentage of the deposit.
The optimization result shows the trading result for the period of 5000 bars (the platform does not give more history) on 10% of the deposit for the first transaction, the addition will also take place on initially bought amount of base traded cryptocurrency, multiplied by the martingale parameter, raised by the number of addition.
The strategy will still be updated, so see you soon!
3C Crossover with TTP & TSLThis is not a set and forget strategy. It needs constant tweaking to maintain a high winrate. Also what works on one pair can be horrible on another.
This strategy works best on the 1 min or 5 min TF but also works well on the 15 min. Haven't done any testing in higher TF's as im only interested in scalping.
If enabled you can retrive data for the filters on any TF.
The strategy do not repaint.
You do not need a 3c subscription to run this strategy as the bot turns on and off the bot itself.
Instructions for the 3commas connector:
1. First, you need to prepare 3commas Long/Short bots that will only listen to custom TV signals.
2. Inputs for the 3commas bot can be found at the end of the user inputs.
3. Once you have entered the required details into the inputs, turn on 3commas comments. They should appear on the chart (looks messy).
4. Now you can add the alert where you should paste the 3commas Webhook URL: 3commas.io
5. For the alert message text insert the placeholder {{strategy.order.comment}} and delete the rest. 6. Once the alert is saved, you can turn off those 3commas comments to have a clearer chart.
7. With a new alert, the bot and trade should launch.
Long or Short trades are determined with a crossing of the fast MA over the slow MA for Long and the opposite for Short. By checking Close position on MA cross the deal will close on a crossover/under of the 2 MA's
You can select from various different MA's and of course lenghts. You can add both EMA filter on any lenght aswell as ATR to determine to go long or short.
Using the MA gap can help you to not enter trades in a low volatile ranging market.
The RSI filter, sets the maximum RSI threshold for a long position and the minimum for a short. By default and what i recomend is that you enter Longs when RSI is above 50 and shorts when RSI are below 50.
-You can set confirmation of the trade direction with RSI , i.e. for Long the RSI must rise a specified number of bars back, vice versa for Short.
Enabling the pullback filter is great to avoid Longing tops and Shorting bottoms.
Stop loss can be set be either a fixed percentage or by using ATR
Take profit can be set by using percentage, ATR or RiskReward ratio(RR). if you use ATR as a stoploss i recomend using RR as the TP.
Yu can choose to trail the TP with either Percentage or ATR
Whats ahead. I really want to incorporate RSI divergencies, but haven't figured out how yet. Any other ideas would be greatly appreciated.
Have a look at my other strategies. They are similar to this but works abit differently.
3C MACD & RSI Scalper no repaintThis is not a set and forget strategy. It needs constant tweaking to maintain a high winrate. Also what works on one pair can be horrible on another.
This strategy works best on the 1 min or 5 min TF but also works well on the 15 min. Haven't done any testing in higher TF's as im only interested in scalping.
If enabled you can retrive data on the MACD and RSI from any timeframe.
The strategy do not repaint.
You can filter on sessions as well as days. Often trading during say only the EU times and not trading during weekends yields better results. This is because weekeds and eg. the Asia Sessions are alot less volatile.
You do not need a 3c subscription to run this strategy as the bot turns on and off the bot itself.
Instructions for the 3commas connector:
1. First, you need to prepare 3commas Long/Short bots that will only listen to custom TV signals.
2. Inputs for the 3commas bot can be found at the end of the user inputs.
3. Once you have entered the required details into the inputs, turn on 3commas comments. They should appear on the chart (looks messy).
4. Now you can add the alert where you should paste the 3commas Webhook URL: 3commas.io
5. For the alert message text insert the placeholder {{strategy.order.comment}} and delete the rest. 6. Once the alert is saved, you can turn off those 3commas comments to have a clearer chart.
7. With a new alert, the bot and trade should launch.
Long or Short trades are determined with a crossing of the fast MA over the slow MA for Long and the opposite for Short. Trades should only happen close to the crossovers.
You can select from various different MA's and of course lenghts. I often find that using HEMA as the fast MA and DEMA as the slow give more trades while also maintaining a high winrate.
Then for Long we use the MACD indicator where we look for high peaks in negative values for Long and vice versa for Shorts. These should be significantly higher than other peaks (or if you will lower peaks for a Long).
The key is to detect high peaks on the histogram, which we will try to achieve by checking if the last 2 values were higher than X bars back. If you want to make it even more specific, then you can turn on the additional checkbox which compares the current value to the average value of X bars back, and if it is greater than, say, 72% the value of the average then it's ok to enter the trade.
The RSI filter, sets the maximum RSI threshold for a long position and the minimum for a short. By default and what i recomend is that you enter Longs when RSI is above 50 and shorts when RSI are below 50.
-You can set confirmation of the trade direction with RSI, i.e. for Long the RSI must rise a specified number of bars back, vice versa for Short.
Enabling the pullback filter is great to avoid Longing tops and Shorting bottoms.
Whats ahead. I really want to incorporate RSI divergencies, but haven't figured out how yet. Any other ideas would be greatly appreciated.
Have a look at my other strategies. They are similar to this but works abit differently.
The 3 strike line and the engulfing candles are not something that has an impact on the script yet, and might never be. But i do like to turn them on for a visual to see if the trade the strategy opened is a good one.
Daily_Mid Term_Consulting BOLTDaily Mid Term Consulting BOLT es una estrategia a mediano y largo plazo creada para detectar los cambios tendenciales en zonas de tiempo diarias. se basa en el análisis de los cambios porcentuales que sufre el precio contra las distintas medias móviles simples definidas en la estrategia. el uso de osciladores como el MACD , RSI y EFI apoyan la decisión de entrada a la estrategia.
actualmente esta en construcción la colocación de stop losses para aumentar la eectividad de la misma.
sachin5986using EMA 3 and 21 moving average and showing buy and sell signal to on chart with selected time frame
Rajiv Patel Strategy with ATR RSI CCI MACD EMA IchimokuRajiv Patel Strategy with alerts helps to identify entry and exit levels based on following Indicators.
1. ATR Trailing Stoploss
2. RSI
3. CCI
4. MACD
5. EMA
6. SMA
7. Ichimoku
This Strategy is fully customizable as per your trading style. Below are some examples of how once can use the Strategy.
Options Based on Each Indicator Individually.
1. ATR Trailing Stoploss – When price is above ATR Trailing Stoploss line its in buy zone and when below its in sell zone. The setting of ATR Trailing Stoploss are customizable like ATR Periods and ATR Multiplier. Suggest increasing ATR Multiplier with lower timeframe. Aggressive buyers can decrease ATR Period in higher timeframe as per trade plan.
2. RSI – RSI above EMA Length is buy zone and below is sell zone. Conservative buyers can increase the RSI & EMA Length period while aggressive and reduce. Higher the timeframe gives better results.
3. CCI – Similar to RSI the buy zone is when CCI crosses above EMA Length. Again CCI & EMA Length can be customised as per trade plan. Higher timeframe is advised.
4. MACD – MACD parameters default settings are based on trying to get early entry. One can change to 26, 13 and 9 in lower timeframe. When MACD crosses above Signal line its buy zone and when below its sell zone.
5. EMA – 5 EMA lines and 2 SMA lines can be plotted. The settings of both EMA lines and SMA lines can be adjusted based on timeframe and trade plan.
6. EMA – EMA line 1 and 2 can be used as buy when EMA1 crosses above EMA2 and sell when below. The length of EMA1 & 2 is adjustable. Suggest modifying based on timeframe and trade plan.
7. SMA – SMA1 can also be used as solo indicator. If price is below SMA1 then its no buy area and if above, then in buy area. SMA2 can be used to identify if trend is upward or downward based on user settings.
8. Ichimoku – It predicts price movements bit like moving averages. Offers a unique perspective of support and resistance levels.
Conversion Line (Tenkan Sen)
- Measures Short Term Trend
- Signals an area of minor support and resistance
Base Line (Kijun Sen)
- Measures Medium term trend
- Used as Trailing Stop Level
Lagging Span (Chikou Span)
- Used for confirmation of signals
- Can also serve as Support and Resistance Level
Kumo Cloud
- Formed of two lines: Senkou Span A (Green Line) and Senkou Span B (Red Line)
- Dynamic Support and Resistance
HOW TO READ ICHIMOKU INDICATOR
Conversion Line (Tenkan Sen)
- If Price is above the Conversion Line = Short term upward movement
- If Price is below the Conversion Line = Short term downward movement
- Increasing Conversion Line = Short term uptrend
- Decreasing Conversion Line = Short term downtrend
Base Line (Kijun Sen)
- If Price is above the baseline = Medium term uptrend
- If the Market price is below the baseline = Medium term downtrend
- Increasing Base Line = Medium term uptrend
- Decreasing Base Line = Medium term downtrend
Lagging Span
- The Evolution of the current price action in relation to previous price action
- If the Lagging span is above the current price = Bullish Bias
- If the Lagging span is below the current price = Bearish Bias
- Lagging span near the current price = Trading range
Kumo Cloud
- Dynamic Support and Resistance based upon price action.
- The longer the price stays below/above the Kumo cloud, stronger the trend
- When the cloud is wide, the expected support or resistance is strong
- When the cloud is thin, the expected support or resistance is weak
- Never trade when price is inside Kumo Cloud
HOW TO TRADE WITH ICHIMOKU CLOUD
1. Baseline and conversion Line crossover (Lagging Span as a Filter)
crossover (conversion line, baseline) = Buy
crossunder (conversion line, baseline) = Sell
FILTER
Crossover (conversion line, baseline) and lagging span is Bullish (i.e above the price) = Buy
Crossunder (conversion line, baseline) and lagging span is Bearish (i.e below the price) = Sell
2. Baseline - Conversion line crossover (Kumo cloud Filter)
Crossover (conversion line, baseline) above the Kumo Cloud = Strong Buy
Crossover (conversion line, baseline) below the Kumo cloud = Weak Buy
Crossunder (conversion line, baseline) below the Kumo Cloud = Strong Sell
Crossunder (conversion line, baseline) above the Kumo Cloud = Weak Sell
3. Kumo Cloud Breakout
When the price enters the Kumo Cloud, and breaks its Upper wall upward = Bullish Signal
When the price enters the Kumo Cloud, and breaks its Lower wall downward = Bearish Signal
4. Kumo Cloud Crossover
When Span A crosses the Span B from below to the upside and prices are positioned above the Kumo Cloud = Strong Buy Signal
When Span A crosses the Span B from upside to the bottom and the prices are positioned below the Kumo Cloud = Strong Sell
When Span A crosses Span B from bottom to the upside and prices are positioned below the Kumo Cloud = Weak Buy Signal
When Span A crosses Span B from the upside to the bottom and the prices are positioned above the Kumo Cloud = Weak Sell Signal
Options Based on Combining Multiple Indicators.
One can select and combine multiple conditions based on above understanding of individual indicator to create a strong Long Entry, Short Entry, Long Exit and Short Exit. This Strategy also provides Alert signal for all entry and exit based on the combinations of conditions selected.
Since this is a strategy one can use STRATEGY TESTER to understand how the strategy has performed over the selected time span. This however does not guarantee similar results in present or future trades.
Please enter commission or total charges charged by your broker in “Properties” Tab of the strategy. Modify all parameters of “Properties” Tab as needed. Note, this can affect the performance results of the strategy.
Need to be very careful in selecting conditions as it becomes very complex with many options available.
Note:
Triangles at the top and bottom indicates the zone. Can be turned on / off using condition “Show Conditions Visually”.
1. Red triangle at top pointing down with ‘S’ indicates in Long Exit zone.
2. Red triangle at top pointing down with ‘EnS’ indicates in Enter Short zone.
3. Green triangle at bottom pointing up with ‘B’ indicates in Long Entry zone.
4. Green triangle at bottom pointing up with ‘ExS’ indicates in Exit Short zone.
5. When the is no triangle either at top or bottom means there is no zone.
Send me your suggestions, will try to incorporate the same in next revision.
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.
Arnaud Legoux Moving Average Cross (ALMA)This strategy uses two different Arnaud Legoux Moving Average Lengths, one fast and one slow, to determine crosses for entries. The Arnaud Legoux Moving Average is an improvement to traditional MA's because it reduces lag and smooths the signal line. I have added a volume filter to improve the accuracy of the signals. This script is optimized to be used with crypto, but could be adjusted to use on different instruments. Alert functionality is included. The backtesting results displayed use 10% of the initial account equity, adjust as necessary.
Combo 2/20 EMA & Bull PowerThis is combo strategies for get a cumulative signal.
First strategy
This indicator plots 2/20 exponential moving average. For the Mov
Avg X 2/20 Indicator, the EMA bar will be painted when the Alert criteria is met.
Second strategy
Bull Power Indicator
To get more information please see "Bull And Bear Balance Indicator"
by Vadim Gimelfarb.
WARNING:
- For purpose educate only
- This script to change bars colors.
J2S Backtest: 123-Stormer StrategyThis backtest presents the 123-Stormer strategy created by trader Alexandre Wolwacz "Stormer". The strategy is advocates and shared by the trader through his YouTube channel without restrictions.
Note :
This is not an investment recommendation. The purpose of this study is only to share knowledge with the community on tradingview.
What is the purpose of the strategy?
The strategy is to buy the 123-Stormer pattern at the bottom of an uptrend and sell the 123-Stormer pattern at the top of a downtrend, aiming for a short stop for a long profit target.
To which timeframe of a chart is it applicable to?
Recommended for weekly and daily charts, as the signals are more reliable, being that strategy a good option for swing and position trading.
What about risk management and success rate?
The profit target is established by the author as being twice the risk assumed. Also according to the author, the strategy is mathematically positive, reaching around 65% of success rate in tradings.
How are the trends identified in this strategy?
Two averages are plotted to indicate the trend, a fast EMA average with an 8-week close and a slow EMA average with an 80-week close.
Uptrend happens whenever the fast EMA is above the slow EMA and prices are above the fast EMA. In this case, we should start looking for a LONG entry based on the signal of the 123-Stromer pattern to buying.
On the other hand, downtrend happens when the fast EMA is below the slow EMA and prices are below the fast EMA. In this case, we should start looking for a SHORT entry based on the signal of the 123-Stromer pattern to selling.
How to identify the 123-Stormer pattern for a LONG entry?
This pattern consists of three candles. The first candle has a higher low than the second candle's low, and the third candle has a higher low than the second candle's low. In this pattern, we will buy as soon as a trade occurs above the third candle's high, placing a stop as soon as a trade occurs below the second candle's low, with profit target twice the risk assumed. In another words, the amplitude of the prices of the three candles from the third candle’s high upwards. (you can use fibonacci extension to determine your stops and profit targets).
Importantly, the low of the three candles must be above the fast EMA average and in an uptrend.
How to identify the 123-Stormer pattern for a SHORT entry?
This pattern consists of three candles. The first candle has a lower high than the second candle's high, and the third candle has a lower high than the second candle's high. In this pattern, we will sell as soon as a trade occurs below the third candle's low, placing a stop as soon as a trade occurs above the second candle's high, with profit target twice the risk assumed. In other words, the amplitude of prices of the three candles from the third candle’s low down (you can use fibonacci extension to determine your stops and profit targets).
Importantly, the high of the three candles must be below the fast average and in a downtrend.
Tips and tricks
According to the author, the best signal for both LONG or SHORT entry is when the third candle is a inside bar of second candle.
Backtest features
Backtest parameters are fully customizable. The user chooses to validate only LONG or SHORT entries, or both. It is also possible to determine the specific time period for running the backtests, as well as setting a threshold in candels for entry by the 123-Stormer pattern.
Furthermore, for validation purposes, you can choose to activate the best signal of the pattern recommended by the author of the strategy, as well as change the values of the EMA averages or even deactivate them.
Final message
Feel free to provide me with any improvement suggestions for the backtest script. Bear in mind, feel free to use the ideas in my script in your studies.
EMA SCALPEUR + RSi - SHORTthis indicator is about 4 EMAs, you can choose a cross under 2 EMA's for the entry end 2 others EMAs for the exit.
Plus I add a RSI function to be sure it doesn't take a short if RSI is under 40.
It's still in development
EMA SCALPEUR SHORTI'm trying to find the best EMA's for scalpingm you are able to choose 2 differents EMAs for your enter and 2 differents EMAs for you exit.
It's putting entry and exit on the graph
EMA SCALPEUR LONG V2THIS IS A TRY TO FIND THE BEST EMAS FOR SCALPING
YOU HAVE 4 EMAS, YOU CAN CHOOSE 2 FOR THE ENTER
This a try to find the best EMAs for scalping
you have 4 EMAs, 2 to find the best enter possible and 2 others to find the best way out possible
ComiCo - Joel on Crypto - MACD ScalpingThis is a modified (hopefully improved) version of the "Joel on Crypto - MACD Scalping" indicator. It got turned into a strategy, and added some extra filters, like number of trades after EMA cross, minimal EMA distance (EMA 50's distance from the EMA 200). It is just an experiment to see how good this scalping strategy can get.
Play around with it and let me know if you found good settings, or just have a comment on it.
I could get fairly good results on BTCUSDT 5m with these settings (all others left on default values):
Ticks Avg. Multiplier = 1.4
Max trades after EMA cross = 16
Limit Price Difference = 0
Take Profit = 0.0065
Stop Loss = 0.0085
Min EMA difference = 110
Pyramiding = 3
EHMA Range Index Basket StrategyThis script is a modified version of my EHMA Range Strategy.
EHMA Range Strategy
In addition to the EHMA, this script works with a range around the EHMA (which can be modified), in an attempt to be robust against fake signals. Many times a bar will close below a moving average, only to reverse again the next bar, which eats away at your profits. Especially on shorter timeframes, but also on choppy longer timeframes this can make a strategy unattractive to use.
With the range around the EHMA, the strategy only enters a long/exit-short position if a bar crosses above the upper range. Vice versa, it only enters a short/exit-long position if a bar crosses below the lower range. This avoids positions if bars behave choppy within the EHMA range & only enters a position if the market is confident in it's direction. Having said that, fakeouts are still possible, but a lot less frequent. Having backtested this strategy vs the regular EHMA strategy (and having experimented with various settings), this version seems to be a lot more robust & profitable!
EHMA Range Index Basket Strategy
The EHMA Range Index Basket Strategy aims to make the EHMA Range Strategy even more robust, by taking nearly 40 of the most traded crypto trading pairs and applying the EHMA Range Strategy to them. For each pair it assigns a 0 (Sell signal) or 1 (Buy signal) and adds them up. If the number of Buy signals outweigh the number of Sell signals, the index strategy triggers its Buy signal (and vice versa). The results are even more profitable & robust than with the EHMA Range Strategy on its own. Next to that, it performs a lot better on most crypto pairs, due to it's robustness. Because of that, this strategy is a lot less prone to overfitting and will likely produce better results during live trading conditions!
Disclaimer
Please remember that past performance may not be indicative of future results.
Due to various factors, including changing market conditions, the strategy may no longer perform as good as in historical backtesting.
This post and the script don’t provide any financial advice.
Swing Trading SPX CorrelationThis is a long timeframe script designed to benefit from the correlation with the Percentage of stocks Above 200 moving average from SPX
At the same time with this percentage we are creating a weighted moving average to smooth its accuracy.
The rules are simple :
If the moving average is increasing its a long signal/short exit
If the moving average is decreased its a short signal/long exit.
Curently the strategy has been adapted for long only entries.
If you have any questions let me know !
Linear Regression MA - Strategyusing the linear regression and linear regression MA to enter long and short positions.
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
Bot MasterSqueeze 1.1 (crypt)Countertrend strategy for correction to the average value. The strategy is designed primarily for crypto.
The principle of operation is that with a rapid price change, the strategy tends to take a reverse position to return to the average value, which statistically often happens. It is enough for you to determine the percentage of the offset about the average price and the size of the averaging position as a percentage of the deposit.
With the settings, you determine how to determine the average opening price. It can be MA at the price of opening, closing, etc., and DCMA. Soon I will add a few more options for determining the average opening price
You can also choose the average price at which the transaction will try to close.
Now there are 3 methods:
- closing when returning to the average price
- closing on the first correction candle
- opening on an abnormally large candle in the direction of correction and closing on the first one is opposite
Search for the settings by the selection method for each pair separately. It is better to trade using signals via a bot.
The strategy shows itself best on volatile coins paired with the dollar for 1 hour or more.
Soon I will add new options for opening and closing deals, as well as determining the average price.
ATTENTION: the strategy involves averaging, so be careful with levers and overestimating the percentage of the transaction from the deposit. It is best to allocate no more than 25 percent to the risk of the transaction.
Short Swing Bearish MACD Cross (By Coinrule)This strategy is oriented towards shorting during downside moves, whilst ensuring the asset is trading in a higher timeframe downtrend, and exiting after further downside.
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
This script utilises the MACD indicator accompanied by the Exponential Moving Average (EMA) 450 to enter trades. The MACD is a trend following momentum indicator and provides identification of short-term trend direction. In this variation it utilises the 11-period as the fast and 26-period as the slow length EMAs, with signal smoothing set at 9.
The EMA 450 is used as additional confirmation to prevent the script from shorting when price is above this long-term moving average. Once price is above the EMA 450 the script will not open any shorts - preventing the rule from attempting to short uptrends. Due to this, this strategy is ideal for setting and forgetting.
The script will enter trades based on two conditions:
1) When the MACD signals a bearish cross. This occurs when the EMA 11 crosses below the EMA 26 within the MACD signalling the start of a potential downtrend.
2) Price has closed below the EMA 450. Price closing below this long-term EMA signals that the asset is in a sustained downtrend. Price breaking above this could indicate a bullish strength in which shorting would not be profitable.
EXIT
This script utilises a set take-profit and stop-loss from the entry of the trade. The take profit is set at 8% and the stop loss of 4%, providing a risk reward ratio of 2. This indicates the script will be profitable if it has a win ratio greater than 33%.
Take-Profit Exit: -8% price decrease from entry price.
OR
Stop-Loss Exit: +4% price increase from entry price.
Based on backtesting results across a selection of assets, the 45-minute and 1-hour timeframes are the best for this strategy.
The strategy assumes each order is using 30% of the available coins to make the results more realistic and to simulate you only ran this strategy on 30% of your holdings. A trading fee of 0.1% is also taken into account and is aligned to the base fee applied on Binance.
The backtesting data was recorded from December 1st 2021, just as the market was beginning its downtrend. We therefore recommend analysing the market conditions prior to utilising this strategy as it operates best on weak coins during downtrends and bearish conditions, however the EMA 450 condition should mitigate entries during bullish market conditions.