Up/Down Trend MarkerA simple indicator of trend by using 3 EMAs of multiplies of 2, 5 and 10, filtered by standard positive/negative directional movements (DM) which are the base of Average Directional Index (ADX).
The "Trend Strength" option is included to set the EMA multipliers and also the variation between DM+ and DM- which interpret the trend as a weak or a strong one.
Note that the markers only point to almost the beginning of the trends and just change the direction when the opposite trend is detected.
Feel free to send me your opinions.
Trend
CDub's BolBands SetupUses a set of Bollinger Bands (user defined deviation, user defined deviation * 2) to determine possible entry set ups.
Signals are triggered when price crosses the first band (closest to the baseline MA) in the desired direction.
baseline can be your take profit 1 target
The inside band determines entry and can be used as a take profit 2 target (Opposite side of baseline)
The outside band is a suggested stop loss target (Same side of baseline) and can be used as a take profit 3 target (Opposite side of baseline)
Suggestions are welcome!
-CDub
Combo Strategy 123 Reversal & Extracting The Trend This is combo strategies for get a cumulative signal.
First strategy
This System was created from the Book "How I Tripled My Money In The
Futures Market" by Ulf Jensen, Page 183. This is reverse type of strategies.
The strategy buys at market, if close price is higher than the previous close
during 2 days and the meaning of 9-days Stochastic Slow Oscillator is lower than 50.
The strategy sells at market, if close price is lower than the previous close price
during 2 days and the meaning of 9-days Stochastic Fast Oscillator is higher than 50.
Second strategy
Extracting The Trend
The related article is copyrighted material from Stocks & Commodities Mar 2010
WARNING:
- For purpose educate only
- This script to change bars colors.
Grid Like StrategyIt is possible to use progressive position sizing in order to recover from past losses, a well-known position sizing system being the "martingale", which consists of doubling your position size after a loss, this allows you to recover any previous losses in a losing streak + winning an extra. This system has seen a lot of attention from the trading community (mostly from beginners), and many strategies have been designed around the martingale, one of them being "grid trading strategies".
While such strategies often shows promising results on paper, they are often subjects to many frictions during live trading that makes them totally unusable and dangerous to the trader. The motivations behind posting such a strategy isn't to glorify such systems, but rather to present the problems behind them, many users come to me with their ideas and glorious ways to make money, sometimes they present strategies using the martingale, and it is important to present the flaws of this methodology rather than blindly saying "you shouldn't use it".
Strategy Settings
Point determines the "grid" size and should be adjusted accordingly to the scale of the symbol you are applying the strategy to. Higher value would require larger price movements in order to trigger a trade, as such higher values will generate fewer trades.
The order size determines the number of contracts/shares to purchase.
The martingale multiplier determines the factor by which the position size is multiplied after a loss, using values higher to 2 will "squarify" your balance, while a value of 1 would use a constant position sizing.
Finally, the anti-martingale parameter determines whether the strategy uses a reverse martingale or not, if set to true then the position size is multiplied after any wins.
The Grid
Grid strategies are commons and do not present huge problems until we use certain position sizing methods such as the martingale. A martingale is extremely sensitive to any kind of friction (frictional costs, slippage...etc), the grid strategy aims to provide a stable and simple environment where a martingale might possibly behave well.
The goal of a simple grid strategy is to go long once the price crossover a certain level, a take profit is set at the level above the current one and stop loss is placed at the level below the current one, in a winning scenario the price reach the take profit, the position is closed and a new one is opened with the same setup. In a losing scenario, the price reaches the stop loss level, the position is closed and a short one is opened, the take profit is set at the level below the current one, and a stop loss is set at the level above the current one. Note that all levels are equally spaced.
It follows from this strategy that wins and losses should be constant over time, as such our balance would evolve in a linear fashion. This is a great setup for a martingale, as we are theoretically assured to recover all the looses in a losing streak.
Martingale - Exponential Decays - Risk/Reward
By using a martingale we double our position size (exposure) each time we lose a trade, if we look at our balance when using a martingale we see significant drawdowns, with our balance peaking down significantly. The martingale sequence is subject to exponential growth, as such using a martingale makes our balance exposed to exponential decays, that's really bad, we could basically lose all the initially invested capital in a short amount of time, it follows from this that the theoretical success of a martingale is determined by what is the maximum losing streak you can endure
Now consider how a martingale affects our risk-reward ratio, assuming unity position sizing our martingale sequence can be described by 2^(x-1) , using this formula we would get the amount of shares/contracts we need to purchase at the x trade of a losing streak, we would need to purchase 256 contracts in order to recover from a losing streak of size 9, this is enormous when you take into account that your wins are way smaller, the risk-reward ratio is totally unfair.
Of course, some users might think that a losing streak of size 9 is pretty unlikely, if the probability of winning and losing are both equal to 0.5, then the probability of 9 consecutive losses is equal to 0.5^9 , there are approximately 0.2% of chance of having such large losing streak, note however that under a ranging market such case scenario could happen, but we will see later that the length of a losing streak is not the only problem.
Other Problems
Having a capital large enough to tank 9any number of consecutive losses is not the only thing one should focus on, as we have to take into account market prices and trading dynamics, that's where the ugly part start.
Our first problem is frictional costs, one example being the spread, but this is a common problem for any strategy, however here a martingale is extra sensitive to it, if the strategy does not account for it then we will still double our positions costs but we might not recover all the losses of a losing streak, instead we would be recovering only a proportion of it, under such scenario you would be certain to lose over time.
Another problem are gaps, market price might open under a stop-loss without triggering it, and this is a big no-no.
Equity of the strategy on AMD, in a desired scenario the equity at the second arrow should have been at a higher position than the equity at the first arrow.
In order for the strategy to be more effective, we would need to trade a market that does not close, such as the cryptocurrency market. Finally, we might be affected by slippage, altho only extreme values might drastically affect our balance.
The Anti Martingale
The strategy lets you use an anti-martingale, which double the position size after a win instead of a loss, the goal here is not to recover from a losing strike but instead to profit from a potential winning streak.
Here we are exposing your balance to exponential gross but you might also lose a trade at the end a winning streak, you will generally want to reinitialize your position size after a few wins instead of waiting for the end of a streak.
Alternative
You can use other-kind of progressions for position sizing, such as a linear one, increasing your position size by a constant number each time you lose. More gentle progressions will recover a proportion of your losses in a losing streak.
You can also simulate the effect of a martingale without doubling your position size by doubling your target profit, if for example you have a 10$ profit-target/stop-loss and lose a trade, you can use a 20$ profit target to recover from the lost trade + gain a profit of 10$. While this approach does not introduce exponential decay in your balance, you are betting on the market reaching your take profits, considering the fact that you are doubling their size you are expecting market volatility to increase drastically over time, as such this approach would not be extremely effective for high losing streak.
Conclusion
You will see a lot of auto-trading strategies that are based on a grid approach, they might even use a martingale. While the backtests will look appealing, you should think twice before using such kind of strategy, remember that frictional costs will be a huge challenge for the strategy, and that it assumes that the trader has an important initial capital. We have also seen that the risk/reward ratio is theoretically the worst you can have on a strategy, having a low reward and a high risk. This does not mean that progressive position sizing is bad, but it should not be pushed to the extreme.
It is nice to note that the martingale is originally a betting system designed for casino games, which unlike trading are not subject to frictional costs, but even casino players don't use it, so why would you?
Thx for reading
Double Bollinger BandThe double bollinger band indicator uses a normal bollinger band with a multitude of 2 and on outer band with a multitude of 3. The indicator shows momentum by the price being stuck between the higher or lower bands. If price is in the middle then it is a neutral zone. The band's moving average is a default of 20 sma but included there are two extra simple moving averages just as extra indicators. This is my first published code and the code is messy; however, it gets the job done nice and simple. (:
Enjoy!
[RS]Standardized Trend Mapnothing excessively new here..
a map of standardized trend over multiple lengths, extra parameter for smoothing the input source(close) will remove noise.
Trendflex - Another new Ehlers indicatorSource: Stocks and Commodities V38
Hooray! Another new John Ehlers indicator!
John claims this indicator is lag-less and uses the SPY on the Daily as an example.
This indicator is a slight modification of Reflex, which I have posted here
I think it's better for Stocks and ETFs than Reflex since it factors in long trends. It tends to keep you in winning trades for a long time.
I believe this indicator can be used for entries or exits, potentially both.
Entry
1. Entering Long positions at the pivot low points (Stocks and ETFs)
2. Entering Long when the Reflex crosses above the zero lines (Stocks, ETFs, Commodities )
Exit
1. Exiting Long positions at a new pivot high point (Stocks and ETFs)
2. Exiting Long when the Reflex crosses below the zero lines (Stocks, ETFs, Commodities )
In this example, I place a Long order on the SPY every time the Reflex crosses above the zero level and exit when it crosses below or pops my stop loss, set at 1.5 * Daily ATR.
2/3 Wins
+16.05%
Let me know in the comment section if you're able to use this in a strategy.
Weekend Trader Smoothed Rate of Change
Rate of change indicator based on Nick Radge's Weekend Trend Trader Strategy, with an added extra of EMA smoothing if you want it.
This indicator simply turns green when the rate of change is above a certain level (value is set in threshold)
Threshold is defaulted to 30 as outlined in the strategy rules
Optimized Trend Tracker - Strategy VersionA brand new indicator from the developer of MOST (Moving Stop Loss) indicator Anıl Özekşi.
Optimized Trend Tracker OTT is an indicator that provides traders to find an existing trend or in another words to ser which side of the current trend we are on.
The original indicator was coded and published by Kıvanç Özbilgiç. You can access it from this link:
I transformed the indicator into a strategy and made some changes:
- You can run two different strategies. In the Settings section, you can test two different strategies, "Support Line Crossing Signals" and "Price / OTT Crossing Signals".
- Fixed the issue where BUY/SELL labels from the indicator script would hang in the air.
- I added a setting where you can hide BUY/SELL labels if you want.
- I painted the bars for BUY/SELL states, you can open and close in the settings section.
- As I do with every strategy script, I added a start and end date for the strategy test. You can specify the range you want to see working in the Settings section.
In addition, there were cases when the OTT line was reduced to zero in non-voluminous symbols; I changed this situation by making a small change in the code. I asked Kıvanç about the subject, I can update according to his answer.
Note : Strategy BUY / SELL tags and indicator BUY / SELL tags do not operate in the same bar because indicator tags are added when the next bar occurs. If you replay bars, you can observe label formations.
TÜRKÇE AÇIKLAMA
Orjinal indikatör Kıvanç Özbilgiç tarafından kodlanmış ve yayımlanmıştır. Bu linkten erişebilirsiniz:
İndikatörü strateji dönüştürdüm ve bazı değişiklikler yaptım:
- İki farklı strateji çalıştırabilirsiniz. Ayarlar kısmında Condition bölümünde "Support Line Crossing Signals" ve "Price/OTT Crossing Signals" olarak iki farklı stratejiyi test edebilirsiniz.
- İndikatör scriptinden gelen BUY/SELL etiketlerinin havada durması sorununu düzelttim.
- İsterseniz BUY/SELL etiketleri gizleyebileceğiniz bir ayar ekledim.
- BUY/SELL durumları için barları boyadım, ayarlar bölümünden açıp kapatabilirsiniz.
- Her strateji scriptinde yaptığım gibi, strateji testi için başlangıç ve bitiş tarihi ekledim. Ayarlar bölümünden çalışmasını görmek istediğiniz aralığı belirleyebilirsiniz.
- Ek olarak hacimsiz sembollerde OTT çizgisinin sıfıra indiği durumlar mevcuttu; kodda ufak bir değişiklik yaparak bu durumu değiştirdim. Kıvanç Bey'e konu ile ilgili soru sordum, cevabına göre güncelleme yapabilirim.
Not : Strateji BUY/SELL etiketleri ile indikatör BUY/SELL etiketleri aynı barda işlem yapmamaktadır çünkü indikatör etiketleri kendisinden sonraki bar oluşunca eklenmektedir. Barları replay yaptırırsanız oluşumlarını gözlemleyebilirsiniz.
Index Trend Filter - Weekend Trend TraderThis little script simply gives you a quick visual cue of where price is compared to a particular EMA of another security or underlying index.
It is based on Nick Radge's broader market filter weekend trend trader system, but can be applied to other timeframes if you want to confirm if the index is in an up trend or down trend.
• Green means the underlying index price is above the EMA
• Red means the underlying index price is below the EMA
Trending True RangeDisplay a smoothed true range during trending markets, thus filtering any measurement occurring during ranging markets. Whether the market is trending or ranging is determined by the position of the efficiency ratio relative to its Wilder moving average.
Settings
Resolution : resolution of the indicator
Length : period of the efficiency ratio and the Wilder moving averages used in the script
Usage
If you are not interested in volatility during ranging markets, this indicator might result useful to you. An interesting aspect is that it both measures volatility, but also determine whether the market is trending or ranging, with a zero value indicating a ranging market.
Indicator against Atr, with both length = 14, our indicator might be easier to interpret.
Note
Thx to my twitter followers for their suggestions regarding this indicator. I apologize if it's a bit short, the original code was longer and included more options, but forcing a script to be lengthy is a really bad idea, so I stayed with something less flashy but certainly more practical, "classic Grover" some might say.
Thx for reading!
Positive+NegativeVolume_Histogram(Picte)This indicator displays positive and negative volume separately. I also added a SMA for better assessment of the markets trend.
Leave your feedback in the comments :)
Ehlers Hurst Coefficient [CC]The Hurst Coefficient was created by John Ehlers (Cycle Analytics For Traders pgs 67-68) and this is a very useful indicator to tell you if the stock is in a uptrend or downtrend. Feel free to change the length to experiment and to adjust to your needs. Buy when the indicator line is green and sell when it is red.
Let me know if there are other indicators you would like to see me publish or if you want something custom done!
Adaptive Trend Lines (Expo)Adaptive Trend Lines (Expo) identifies the current trend direction within the selected lookback period. The idea behind the indicator is that the trend lines should self adjust to the constantly changing market. The indicator adjusts itself to the market by using tr (true range) and stdev (standard deviation) as dynamic variables.
The indicator displays positive- and negative trend channels.
HOW TO USE
1. Use the indicator to identify the trend direction.
I hope you find this indicator useful , and please comment or contact me if you like the script or have any questions/suggestions for future improvements. Thanks!
I will continually work on this indicator , so please share your experience and feedback as it will enable me to make even better improvements. Thanks to everyone that has already contacted me regarding my scripts. Your feedback is valuable for future developments!
-----------------
Disclaimer
Copyright by Zeiierman.
The information contained in my scripts/indicators/ideas 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, 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 are only for educational purposes!
[DA]Moving Average PlusThis script contains all types of MA with the ability to select the display of the MA extremum and trend color
Relative Strength Auto ComparisonRelative Strength Comparison with automatic selection of relevant index
Added support for most european and north american exchanges.
Vertical Horizontal Moving Average [AneoPsy & alexgrover] Moving average adapting to the strength of the trend, this is made possible by using the square of the vertical-horizontal filter as a smoothing factor. Alerts are included with two different types of conditions available to the user.
Settings
Length : Period of the moving average
Src : Input data for the indicator
Alerts : Types of conditions to be used in the alerts, when set to "VHMA Direction Change" alerts are triggered once the VHMA is either rising or declining, else the alerts are based on the crosses between Src and the VHMA
Usage
The VHMA can be used as a fast or slow-moving average in a moving average crossover system, or as input for other indicators.
VHMA of with length = 25 and sma with length = 200.
VHMA with length = 25 used as input for the RSI with length = 14.
Details
The vertical-horizontal filter is a measure of the strength of the trend and lay in a (0,1) range, to calculate it you just need to divide the rolling range over with the rolling sum of the absolute price changes, squaring the result allow to get lower results with higher values of length .
Squared vertical horizontal filter with length = 50, the value is low when the market is ranging and high when trending.
To set the alerts go in the alert panel, click on create alert, and select VHMA in "condition", choose between the buy or sell alert. If Src = closing price or another indicator dependant on the closing price select in options "once per bar close", if the indicator using the opening or lagged closing prices values as input select "One per bar" instead.
Thanks
Thanks to AneoPsy for adding the color change, the idea to use two kinds of conditions for the alert, and for its feedback, you can follow him
www.tradingview.com
and finally thanks to you for reading and for your support, only one last script left for the month, then we'll start July with some pretty interesting indicators, I hope you'll like them ^^/
MACD_trendtrader v2 (picte)This is an upgraded version of my MACD_trendtrader indicator.
UPGRADES:
- Histogram slope changes colors according to the direction of the slope.
- Panel that displays volatility of the asset. The volatility is measured from 0 to 100. Zero being the lowest and 100 the highest volatility. I also included different text colors for a certain volatility value (white= very low volatility, blue = low volatility, purple= high volatility, green= very high volatility)
It works well on all time-frames but i found it particularly useful on the lower time-frames for identifying pullbacks in a trending market.
It has been tested in the Forex and Traditional market.
FauxLife EFIModification to Elder's Force Index (EFI)
Ability to change calculation from standard EMA to your choice of SMA, EMA, WMA, or HMA. Very interesting results!
Adjust lookback from standard/suggested 13 candlesticks
Added a color indication to positive or negative force reading
Added background color tint for an easier read on dashboard setups
Suggested pair with my On Balance Volume with Cross to use as a filter & entry/exit setup. Enter or exit trades when the two indicators switch at the same time or within 1-2 candlesticks of each other.
Larry Williams 9.1 with Optional Filters - ValenteThis indicator is based on the Larry Willians 9.1 Strategy.
It will paint the candles WHITE when Long entries are activated and BLACK when short entries are activated.
There is an option to include an EMA or SMA filter.
Computing The Linear Regression Using The WMA And SMAPlot a linear regression channel through the last length closing prices, with the possibility to use another source as input. The line is fit by using linear combinations between the WMA and SMA thus providing both an interesting and efficient method. The results are the same as the one provided by the built-in linear regression, only the computation differ.
Settings
length : Number of inputs to be used.
src : Source input of the indicator.
mult : Multiplication factor for the RMSE, determine the distance between the upper and lower level.
Usage
In technical analysis a linear regression can provide an estimate of the underlying trend in the price, this result can be extrapolated to have an estimate of the future evolution of the trend, while the upper and lower level can be used as support and resistance levels.
The slope of the fitted line indicates both the direction and strength of the trend, with a positive slope indicating an up-trending market while a negative slope indicates a down-trending market, a steeper line indicates a stronger trend.
We can see that the trend of the S&P500 in this chart is approximately linear, the upper and lower levels were previously tested and might return accurate support and resistance points in the future.
By using a linear regression we are making the following assumptions:
The trend is linear or approximately linear.
The cycle component has an approximately constant amplitude (this allows the upper and lower level to be more effective)
The underlying trend will have the same evolution in the future
In the case where the growth of a trend is non-linear, we can use a logarithmic scale to have a linear representation of the trend.
Details
In a simple linear regression, we want to the slope and intercept parameters that minimize the sum of squared residuals between the data points and the fitted line
intercept + x*slope
Both the intercept and slope have a simple solution, you can find both in the calculations of the lsma, in fact, the last point of the lsma with period length is equal to the last point of a linear regression fitted through the same length data points. We have seen many times that the lsma is an FIR filter with a series of coefficients representing a linearly decaying function with the last coefficients having a negative value, as such we can calculate the lsma more easily by using a linear combination between a WMA and SMA: 3WMA - 2SMA , this linear combination gives us the last point of our linear regression, denoted point B .
Now we need the first point of our linear regression, by using the calculations of the lsma we get this point by using:
intercept + (x-length+1)*slope
If we get the impulse response of such lsma we get
In blue the impulse response of a standard lsma, in red the impulse response of the lsma using the previous calculation, we can see that both are the same with the exception that the red one appears as being time inverted, the first coefficients are negative values and as such we also have a linear operation involving the WMA and SMA but with inverted terms and different coefficients, therefore the first point of our linear regression, denoted point A , is given by 4SMA - 3WMA , we then only need to join these two points thanks to "line.new".
The levels are simply equal to the fitted line plus/minus the root mean squared error between the fitted line and the data points, right now we only have two points, we need to find all the points of the fitted line, as such we first need to find the slope, which can be calculated by diving the vertical distance between B and A (the rise) with the horizontal distance between B and A (the run), that is
(A - B)/(length-1)
Once done we can find each point of our line by using
B + slope*i
where i is the position of the point starting from B, i=0 give B since B + slope*0 = B , then we continue for every i , we then only need to sum the squared distance between each closing prices at position i and the point found at that same position, we divide by length-1 and take the square root of the result in order to have the RMSE.
In Summary
The following post as shown that it was possible to compute a linear regression by using a linear combination between the WMA and SMA, since both had extremely efficient computations (see link at the end of the post) we could have a calculation for the linear regression where the number of operations is independent of length .
This post took me eons to make because it's related to the lsma, and I am rarely short on words when it comes to anything related to the lsma. Thx to LucF for the feedback and everything.
HTF Candlestick Patterns [TradingView] vX by DGTCandlesticks are graphical representations of price movements for a given period of time. They are commonly formed by the opening, high, low, and closing prices of a financial instrument. They have their origins in the centuries-old Japanese rice trade and have made their way into modern day price charting.
It’s important to note that candlestick patterns aren’t necessarily a buy or sell signal by themselves. They are instead a way to look at market structure and a potential indication of an upcoming opportunity. It is always useful to look at candlestick patterns in context like any other market analysis tool and candlestick patterns are most useful when used in combination with other techniques. There are countless candlestick patterns that traders can use to identify areas of interest on a chart, where some candlestick patterns may provide insights into the balance between buyers and sellers, others may indicate a reversal, continuation, or indecision.
Reversal patterns are quite useful when used in context. Reversal patterns should form at the bottom of a downtrend or at the top of an uptrend. Otherwise, they are not a reversal patterns, but continuation patterns. Most reversal patterns require confirmation such as price move in the direction of reversal accompanied by appropriate trading volume. The reversal patterns can further be confirmed through other means of traditional technical analysis—like trend lines, momentum, oscillators, or volume indicators—to reaffirm buying or selling pressure. The patterns themselves do not guarantee that the trend will reverse. Investors should always confirm reversal by the subsequent price action before initiating a trade.
This study implements some of the most commonly used candlestick patterns in a context with directional movement indicator. On request users can adjust the strong trend threshold from dialog box, eighter can disabled correlation with directional movement indicator. To add additional sight to analysis the simple moving averages of 20, 50, 100 and 200 periods are added (configurable)
You may add additional indicators of your choice. Colored DMI, BB Cloud or Price Distance to its MAs may help
Enjoy it!
Disclaimer: The script is for informational and educational purposes only. Use of the script does not constitutes professional and/or financial advice. You alone the sole responsibility of evaluating the script output and risks associated with the use of the script. In exchange for using the script, you agree not to hold dgtrd tradingview user liable for any possible claim for damages arising from any decision you make based on use of the script
Trend Risk Indicator (TRI)The Trend Risk Indicator is a simple bands indicator made of 2 custom averages of candlesticks ranges calculated within the variable “ BandBars ” period.
Upper and lower channel bands width can be adjusted with the “ Deviation ” variable, which act as a simple factor to enlarge the spread between them.
When Close crosses over the upper band, it is a bearish signal and candlesticks are painted in Red.
When Close crosses under the lower band, it’s a bullish signal and candlesticks are painted in Green.
One of the most interesting indicators for 1 minute scalping. Recommended to use on Renko bars.
*drag to chart and pin to scale, also remove borders from candlesticks.