Candlestick Reversal SystemHello Traders,
In the book "Secrets of a Pivot Boss: Revealing Proven Methods for Profiting in the Market" by Franklin Ochoa, Four different types of reversal systems were introduced and candlestick patterns are used to find reversals. I will not write a lot about the book, you should get/read it for yourself. There are many great ideas in the book, Candlesetick Reversal System, Following Trend, Time Price Opportunity, Advanced Camarilla Concepts and much more.
Reversal systems mentioned in the book are :
- Wick Reversal System
- Exteme Reversal System
- Outside Reversal System
- Doji Reversal System
I tried to add these four reversal systems to the script. If you need detailed info you better read the book ;)
Enjoy!
Trendfollowing
Automatic Fibonacci Pivot Point S/R LevelsThis is a great tool to find confluences between Fibonacci Pivot point on various time frames.
Fib Pivots used
23.6%
38.2%
50%
61.8%
76.4%
100%
127.2%
141.4%
161.8%
200%
If price is between two levels on the update the lines shift
Yearly Pivots shown on 1m - Daily timeframes
PIvots recalculate on every day
Monthly pivots show on 1m - 60m timeframes
Pivots recalculate every hour
Weekly pivots show on 1m - 15m timeframes
Pivots recalculate every 30m
There is a lot of code but it got the job done.
It would easy to interchange if you prefer different types of pivots
It would be easy to add an on/off if you dont want so many levels on your smaller time frames
If anyone can streamline it please do
Pivot TrendHello Traders,
Another original idea is here with you. Actualy I can say that it's a breakout strategy that uses multiple Pivot Point's averages.
How it works?
- it finds the Pivot Points, you can set the length as you want
- it gets averages of Pivot Highs and Pivot Lows, you can set the number of Pivot Points to be included
- it compares the current closing price with averages of Pivot Highs and Pivot Lows
- if both are positive or negative then trend changes
You have two options:
- Pivot Point Period => is the length that is used to find Pivot Points. means it checks left/right bars if it's Pivot Point (4 by default)
- Number of PP to check => is the number of Pivot Points that the script finds and calculates the averages (3 by default)
An Example with the settings Pivot Point Period = 5 and Number of PP to check = 2
Play with settings as you wish. Comments are welcome, together we can improve it ;)
Enjoy!
Trend Analysis IndicatorThe Trend Analysis Indicator was created by Adam White (Stocks & Commodities V. 10:8 (358-360)) and this is not to be confused with the Trend Analysis Index which was also created by Adam White. The stock is trending when it is above the signal and loses steam when it falls below the signal. Generally you should buy when it is above it's signal and sell when it goes below the signal.
Let me know if you would like me to write more scripts!
Stochastic based on Closing Prices - Identify and Rank TrendsStochClose is a trend indicator that can be used on its own to measure trend strength, in a scan to rank a group of securities according to trend strength or as part of a trend following strategy. Moreover, it acts as a volatility-adjusted trend indicator that puts securities on an equal footing.
StochClose measures the location of the current close relative to the close-only high-low range over a given period of time. In contrast to the traditional Stochastic Oscillator, this indicator only uses closing prices. Traditional Stochastic uses intraday highs and lows to calculate the range. The focus on closing prices reduces signal noise caused by intraday highs and lows, and filters out errant or irrationally exuberant price spikes.
Here are some examples when the high or low was out of proportion and suspect. Perhaps most famously, there were errant spike lows in dozens of ETFs in August 2015 (XLK, IJR, ITB). There were other spikes in VMBS (October 2014), IJR (October 2008) and KRE (May 2011). Elsewhere, there were suspicious spikes in IEI (April 2020), CHD (March 2020), CCRN (March 2020) and FNB (March 2020)
The preferred setting to identify medium and long-term uptrends is 125 days with 5 days smoothing. 125 days covers around six months. Thus, StochClose(125,5) is a 5-day SMA of the 125-day Stochastic based on closing prices. Smoothing with the 5-day SMA introduces a little lag, but reduces whipsaws and signal noise.
StochClose fluctuates between 0 and 100 with 50 as the midpoint. Values above 80 indicate that the current price is near the high end of the 125-day range, while values below 20 indicate that price is near the low end of the range. For signals, a move above 60 puts the indicator firmly in the top half of the range and points to an uptrend. A move below 40 puts the indicator firmly in the bottom half of the range and points to a downtrend.
StochClose values can also be ranked to separate the leaders from the laggards. In contrast to Rate-of-Change and Percentage Above/Below a Moving Average, StochClose acts as a volatility-adjusted indicator that can identify trend strength or weakness. The Consumer Staples SPDR is unlikely to win in a Rate-of-Change contest with the Technology SPDR. However, it is just as easy for the Consumer Staples SPDR to get in the top of its range as it is for the Technology SPDR. StochClose puts securities on an equal footing.
StochClose measures trend direction and trend strength with one number. The indicator value tells us immediately if the security is trending higher or lower. Furthermore, we can compare this value against the values for other securities. Securities with higher StochClose values are stronger than those with lower values.
Trend Direction Force IndexThis is my own version of the famous Trend Direction Force Index and I modified the original to make my version react quickly to any trend. I have color coded the indicator to make it extremely easy to read so if it is green then buy and red then sell.
This was a custom request so if you would like more then just send me a message!
Donchian Trend RibbonHello Traders,
I think you all know Donchian Channels. so I am not going to write about it.
With this indicator I tried to create Donchian Trend Ribbon by using Donchian Channels.
How it works ?
- it calculates main trend direction by using the length that is user-defined. so you can change it as you wish
- then it calculates trend direction for each 9 lower lengths. if you set the length = 20 then the lengths are 19, 18,...11
- and it checks if the trend directions that came from lower lengths is same or not with main trend direction.
- it changes the trend color of the ribbon.
-
Warning: Entry points may also represents trend reversal. So you should use stoploss line if you decide to take buy/sell positions.
P.S. I didn't backtest it, it's non-repainting, it should be used educational purposes only.
Published by user request. You may want to see following one:
Enjoy!
Donchian TrendHello All,
I think all of you knows Donchian Channels . so I am not going to write about it.
With this indicator I tried to create Trend Lines by using Donchian Channel upper/lower bands. I tried add possible entry levels as well.
How it works ?
- it calculates main trend direction by using the length that is user-defined. so you can change it as you wish
- then it calculates trend direction for 9 lower lengths. if you set the length = 20 then the lengths are 19, 18,...11
- and it checks if the trend directions that came from lower lengths is same or not with main trend direction.
- it changes the trendline color. lighter trend line means stonger trend, darker trend lines means entry points or possible trend reversal.
- it puts entry points by using trend directions that were created by using lower lengths. it gets entry points if high/low touches main trend line as well.
Warning: Arrows are entry points but it may also represents trend reversal. So you should use stoploss line if you decide to take buy/sell positions.
P.S. I didn't backtest it, it's non-repainting, it should be used educational purposes only . I believe it can be improved, so I am open for new ideas to improve it ;)
Enjoy!
Trend Exhaustion IndicatorThe Trend Exhaustion Indicator is a custom indicator of mine that is loosely based on the Trend Exhaustion Index created by Clifford L. Creel Ph.D. (Stocks & Commodities V. 9:1 (9-11))
This indicator will let you know the trend reversal points and when it falls below the signal line then the trend is ending vice versa. Buy when the indicator crosses above the signal line and sell when it falls below the signal line.
Let me know if you would like to see me write any other scripts!
Uber Trend IndicatorThis is my first custom indicator that I created as a medium to long term trend indicator. Buy if it is above 0 and sell if it is below 0.
Since this is my first unique indicator, I would love to hear your feedback! Please let me know if you would like to see any other scripts!
Demand OscillatorThe Demand Oscillator was created by James Sibbet (Stocks & Commodities June, 1986) and I changed his formula quite a bit to what you see on here. If it rises above the signal then buy or if not then sell. This is my custom version of his formula so let me know what you think.
Let me know if you would like to see me write any other scripts!
Pivot Point SupertrendHello All,
There are many types of SuperTrend around. Recently I thought about a Supertrend based on Pivot Points then I wrote "Pivot Point SuperTrend" script. It looks it has better performance on keeping you in the trend more.
The idea is behind this script is finding pivot point, calculating average of them and like in supertrend creating higher/lower bands by ATR. As you can see in the algorithm the script gives weigth to past pivot points, this is done for smoothing it a bit.
As I wrote above it may keep you in the trend more, lets see an example:
As an option the script can show main center line and I realized that when you are in a position, this line can be used as early exit points. (maybe half of the position size)
While using Pivot Points, I added support resistance lines by using Pivot Point, as an option the script can show S/R lines:
And also it can show Pivot Points:
When you changed Pivot Point Period you can see its reaction, in following example PP period is 4 (default value is 2). Smaller PP periods more sensitive trendlines.
Alerts added for Buy/Sell entries and Trend Reversals. (when you set alerts use the option " Once Per Bar Close ")
ENJOY!
MA-EMA Crossover LTJust a simple strategy based on dynamic zones by Allenster. Still a work in progress.
ScalpyScalpy is made up of a 2 main parts.
- The cloud comprising of a 10 period SMA and a 30 period SMA.
- When the cloud is green you should be looking for long entries.
- When the cloud is red you should be looking for short entries.
- Price is most bullish above a green cloud and most bearish below a red cloud.
- Being within the cloud indicates indecision.
The blue and white lines on the indicator show the relationship between price and momentum.
They can be used to spot reversals in two ways:
- The first is a divergence between price (blue line) and RSI (white line)
- If the price makes a lower low but the RSI makes a higher low this shows the trend is weakening and may be reversing soon (as can be seen by the two yellow lines on the chart).
The second is a simple crossover:
- When the white line crosses the blue line to the upside this signals a long entry.
- When the white line crosses the blue line to the downside this signals a short entry.
Trend Following MAs 3DHello All,
This is Moving Averages Trend Following 3D indicator. The idea is based on direction of MAs and relation between 20 moving averages (5 to 100 period).
Option to show different type of MAs: EMA, SMA, RMA, WMA, VWMA.
As I haved tested it looks succesful at calculating trend direction and trend strength.
For a better look I tried to make it 3D, it looks good I think, waiting comments ;)
Some screenshots:
By using RMA type:
When it gets tiny it means there is no trend:
An example for down trend:
ENJOY!
Trend Lines for RSI, CCI, Momentum, OBVHello Traders!
After publishing Trend Lines for RSI yesterday, I realized that Trend Lines for more indicators needed by the traders. so I decided to make it for four different indicators: RSI, CCI, OBV, Momentum
In the indicator options you can choose the indicator from pull-down menu.
How it works?
- On each bar it finds last 10 higher and lower Pivot Points (PP) for the indicator.
- from first bar to 10. Pivot Point it searchs if a trend line is possible
- for each PP it starts searching from the last PP .
- it checks if drawing a trend line possible or not and also it's broken or not
- if it's broken then optionally it shows broken trend lines as dotted (or you can option not to see broken lines)
- if it finds a continues trend line then it stops searhing more and draw trend line, this is done by checking angles (I did this to make the script faster, otherwise you may get error because of it needs time more than .2sec)
- the script makes this process for each PP
- then shows the trend lines
P.S. it may need 3-10 seconds when you added the script to the chart at first (because of calculations)
Trend lines for CCI:
Trend Lines for OBV
Trend Lines for Momentum:
You may want to watch how Trend Lines script works (that was made for RSI)
s3.tradingview.com
If you still didn't see Trend Lines v2 then visit:
All Comments are welcome..
Enjoy!
MWDX AverageThis is a variation of an exponential moving average which follows the price pretty smoothly. Feel free to change the factor to adjust how closely it follows the price. I set the default to 0.2
Let me know if you want me to write code for any other indicators!
Trend FollowerHello Traders!
While analysing the charts, one of the biggest problem is to see if there is trend or not, or is it in a congestion zone/area? While thinking about it, I found the idea to analyse moving averages in channel and their momentum according to channel width.
How it calculates and works?
On each bar it creates a channel by highest/lowest point of a MA. highest point is upper point and lowest point is lower point of the MA channel,
It gets highest and lowest point of last 300 bars, (say Price Channel )
If the width of MA channel is greater than certain rate of price channel then it decides there is trend
After it decided there is trend, it calculates the rate between channel and MA. Bigger result means stronger trend.
According to rate of MA channel and the price channel , bar color becomes lighter/darker. so when you look at the bar color you can see the trend strength.
Short explanation on the chart:
Also by changing channel or size other options (such MA length etc) you can see congestion zones/areas:
Another one, about trend direction and its strength:
Options:
You can choose following MA types as source: EMA, SMA , RMA, WMA , VWMA
"Period to Check Trend" is the period to create MA channel. Bigger period cause more sensitivity.
MA Period is the Length of the MA that will be checked
"Trend Channel Rate %" is rate of price channel . Price channel created by using highest/lowest of last 300 bars. I did this to make the script works on all time frames correctly.
"Use Linear Regression" is used to get rid of noise. it may cause 1-2 bars latency. (I use it)
The idea was created by LonesomeTheBlue.
Enjoy!
Trend Lines v2Hello Everyone. After working on new and better trend lines script for couple of weeks, finally I am proud to publish Trend Lines v2.
How it works?
- On each bar it finds last 10 higher and lower Pivot Points (PP).
- from first bar to 10. PP it search if a trend line is possible
- for each it starts searching from the last PP.
- it check if drawing a trend line possible or not and also it's broken or not
- if it's broken then optionally it shows broken trend lines as dotted
- if it finds a continues trend line and stop searhing more and draw trend line (I did this to make the script faster, otherwise you may get error because of it needs time more than .2sec)
- the script makes this process for each PP
optionally trend lines may be Solid or Dashed
optionally you may get rid of broken trend lines if you think it's crowded
and sometimes you may not see any trend line on the chart. this means you need to adjust the period for Pivot Points accordingly
also I made a video. if you watch this video you can see how the script works.
Important! after you add this tool to the chart you may need zoom-in and zoom-out to see all lines!
I thought a lot to make it free or not then I decided make it free and open source. you should know there is a lot of effort for this script, so if you think this is usefull please consider a donation ;)
Enjoy!
Pascal's 4h Compression BreakoutThis indicator aims to identify areas of price compression, by looking for two consecutive "inside candles" on the 4h chart.
An inside candle is simply when the current candle's high is lower than the previous candle's high, and the current candle's low is higher than the previous candle's low.
Once price compression is identified, the indicator draws a range based on the highest high and the lowest low of the two inside candles.
1) A break above the range is bullish.
2) A break below the range is bearish.
The script ALSO paints candles in blue that are likely to become strong horizontal S/R levels. This is, again, based on a candle pattern.
Please note:
1) This indicator is only meant to be used on BITMEX:XBTUSD (on the 4h or 1h chart).
2) You will have to apply some discretion to profitably trade with this indicator. Use SFPs and horizontal S/R levels to judge if a breakout is worth trading.
Finally, use the indicator at your own risk. I am not responsible for any losses you may incur.
My objective with this indicator g is to hopefully give you something that you can build upon, and NOT a script to blindly copy trade.
The concept of market compression is powerful. There are countless ways in which you can build a system around it.
This is just the tip of the iceberg.
Cheers.
Trend Following BarWhile analysing a chart, one of the biggest problem is to see if there is trend or not. While thinking about it, I found the idea to analyse moving averages in channel and their momentum according to channel width.
How it Works?
On each bar it creates a channel by highest/lowest point of a MA. highest point is upper line and lowest point is lower line of the MA channel,
It gets highest and lowest point of last 300 bars, (say Price Channel)
If the width of MA channel is greater than certain rate of price channel then it decides there is trend
After it decided there is trend, it calculates the rate between channel and MA. Bigger result means stronger trend.
According to rate of MA channel and the price channel, bar color becomes lighter/darker. so when you look at the bar color you can see the trend strength.
Some details about my idea:
Options:
You can choose following MA types as source: EMA, SMA, RMA, WMA, VWMA
"Period to Check Trend" is the period to create MA channel. Bigger period cause more sensitivity.
"Trend Channel Rate %" is rate of price channel. Price channel created by using highest/lowest of last 300 bars. I did this to make the script works on all time frames correctly.
"Use Linear Regression" is used to get rid of noise. it may cause 1-2 bars latency.
All comments are welcome!.
Enjoy!
Trend Following BreakoutEasy Trend Following Strategy using Highs and Lows breakout of the last X candles to enter and exit trades.
You can easily change the ENTRY and EXIT value in order to find the best settings.
This strategy seems to be working well for $BTC and $ETH on the 4H and 1D.
I didn't play with it too much as I am testing script to trade on the 15 minutes chart with margin. This script can't do this successfully but I hope it can be helpful for what you want to achieve.
Trend LinesHello Everyone! This is my new trend lines script (after beta version that was published almost one year ago)
The idea is to find Pivot Highs (PH) and Pivot Lows(PL) first.
Then, If current PH is smaller then previous PH (means no new higher high and possible downtrend) then draw trend line using them. and also it checks previous trend line (if exits) and if current angle is smaller then don't extend previous one.
Same idea when using Pivot Lows, If current PL is higher then previous PL (means no new lower low and possible uptrend) then draw trend line using them. and also it checks previous trend line (if exits) and if current angle is smaller then don't extend previous one.
Optionally style of old trend lines drawn as dashed.
Hope you enjoy it!