HTF Highs Lows [JV]█ OVERVIEW
This script presents a label with an overview of higher timeframe highs and lows. This can be useful information as we all know that price likes to revisit previous highs and lows area, specially on the higher timeframe.
█ CONCEPTS
This information can be relevant and valuable for various reasons:
Finding horizontal Support and Resistance
Get a better view on Market Structure
Provide some information about Order Flow
TrendLines
...
█ FEATURES
Plots
This script provides the option to show information about 3 timeframes
Each timeframe can be separately shown or hidden
The Y position of the info label can be user defined, based on high or low of the chosen timeframe
The X offset of the info label can be adjusted to the user's liking and the chart resolution
The label color and text color can be user defined
The info label's size can be user defined
█ NOTES
Caveat
The timeframes must be chosen in order of size. Meaning that the highest timeframe should be on top. This is title as such on the info label, but I want to mention it again as it's something to pay attention to.
Repainting
The question that pops up all the time is: Does it repaint ?
I will quote PineCoders on this:
We're pretty sure Wilder was not asked very often if RSI repainted. Why? Because it wasn't in fashion—and largely unnecessary—to ask that sort of question in the 80's. Many traders back then used daily charts only, and indicator values were calculated at the day's close, so everybody knew what they were getting. Additionally, indicator values were calculated by generally reputable outfits or traders themselves, so data was pretty reliable. Today, almost anybody can write a simple indicator, and the programming languages used to write them are complex enough for some coders lacking the caution, know-how or ethics of the best professional coders, to get in over their heads and produce code that does not work the way they think it does.
Briefly: yes, it repaints and no it does not matter.
Simple because we are working with highs and lows on a higher timeframe. So if we get a new high or low within a certain time frame, we want this new high or low to be displayed and, for me, it's not relevant if this information appears when it happens or when the candle closes.
Questions & Suggestions
Questions, suggestions or even a word of thanks are always welcomed in the comments section. I usually answer within the same day.
█ THANKS
A word of thanks to, and I hope I am allowed to use hyperlinks here, LonesomeTheBlue for being an inspiration on coding style and his work on arrays in Pine Script and to lmatl for his support, words of advice and letting me borrow his brain now and then.
在腳本中搜尋"trendline"
DR by Caco MaiaCreated by Brazilian trader Caco Maia,this indicator signals an entry when the price breaks through both a slow and fast average while the TRIX and Stochastic are going in the same direction.
Must be used in conjunction with the market context,e.g. Trendlines,Fibonacci Retracements/Extensions or other indicators.
Filter 1 : The Fast Average must be going up/down.
Filter 2 : There`s a limit to the Slow Average inclination,only allowing entries if the Slow Average is "flat" or in the same direction of the signal.
Filter 3 : Uses both Filters.
Fibonacci Trendlines 20, 50, 100, 200 (SMA)Dört tane simple moving average bir arada. 20, 50, 100, 200 (SMA) hareketli ortalamaları içerir
Aggregate CandlesThis script creates candles based on an aggregated Index price from various exchange tickers. A lot of exchanges have specific flash crash wicks, missing data, erraticness compared to other exchanges particularly in their first few months, this is an attempt to clean up the price history, be it for TA ( trendlines , S/R etc.) or use in algos or other indicators, without reliance on one exchange. It uses the new Array functionality to generate median and averages, and is entirely original work. This particular version is a generic version of the BTC version. Please read the header before use, and if you do wish to use the code, please ask permission first.
Aggregate BTC CandlesThis script creates candles based on an aggregated Index price from various BTC exchange tickers. Since the early years in particular have a lot of exchange specific flash crash wicks, missing data, erraticness compared to other exchanges particularly in their first few months, this is an attempt to clean up the price history, be it for TA (trendlines, S/R etc.) or use in algos or other indicators, without reliance on one exchange. It uses the new Array functionality to generate median and averages, and is entirely original work.
[blackcat] L2 Ehlers Cyber CycleLevel: 2
Background
John F. Ehlers introuced Cyber Cycle Indicator in his "Cybernetic Analysis for Stocks and Futures" chapter 4 on 2004.
Function
Trading the Cyber Cycle Indicator is straightforward. Buy when the at this point. Sell when the Cycle line crosses under the Trigger line. You are at the bottom of the cycle at this point. Sell when the Cycle line crosses under the Trigger line. You are at the top of the cycle in this case. To be sure, there are crossings at other than the cyclic turning points. Many of these can be eliminated by discretionary traders using their experience or others of their favorite tools. One of the more interesting aspects of the Cyber Cycle is that it was developed simultaneously with the Instantaneous Trendline. They are opposite sides of the same coin because the total frequency content of the market being analyzed is in one indicator or the other. This is important because the conventional methods of using moving averages and oscillators can be dispensed with.
Key Signal
Cycle ---> Cyber Cycle fast line
Cycle (2) ---> Cyber Cycle slow line
Pros and Cons
100% John F. Ehlers definition translation of original work, even variable names are the same. This help readers who would like to use pine to read his book. If you had read his works, then you will be quite familiar with my code style.
Remarks
The 24th script for Blackcat1402 John F. Ehlers Week publication.
Readme
In real life, I am a prolific inventor. I have successfully applied for more than 60 international and regional patents in the past 12 years. But in the past two years or so, I have tried to transfer my creativity to the development of trading strategies. Tradingview is the ideal platform for me. I am selecting and contributing some of the hundreds of scripts to publish in Tradingview community. Welcome everyone to interact with me to discuss these interesting pine scripts.
The scripts posted are categorized into 5 levels according to my efforts or manhours put into these works.
Level 1 : interesting script snippets or distinctive improvement from classic indicators or strategy. Level 1 scripts can usually appear in more complex indicators as a function module or element.
Level 2 : composite indicator/strategy. By selecting or combining several independent or dependent functions or sub indicators in proper way, the composite script exhibits a resonance phenomenon which can filter out noise or fake trading signal to enhance trading confidence level.
Level 3 : comprehensive indicator/strategy. They are simple trading systems based on my strategies. They are commonly containing several or all of entry signal, close signal, stop loss, take profit, re-entry, risk management, and position sizing techniques. Even some interesting fundamental and mass psychological aspects are incorporated.
Level 4 : script snippets or functions that do not disclose source code. Interesting element that can reveal market laws and work as raw material for indicators and strategies. If you find Level 1~2 scripts are helpful, Level 4 is a private version that took me far more efforts to develop.
Level 5 : indicator/strategy that do not disclose source code. private version of Level 3 script with my accumulated script processing skills or a large number of custom functions. I had a private function library built in past two years. Level 5 scripts use many of them to achieve private trading strategy.
Responsive Linear Regression ChannelsThis is a linear trend indicator that can:
- automagically adjust to different chart resolutions
- snap to day/session boundaries on intraday
- totally not do the above and use ye olde good fixed lookback window
- show the regression trend and its RMSE channels
- disregard the trend and just show the period average and standard deviation lines (often acting as support and resistance)
The main idea was to allow you to quickly view linear trends for different time periods without having to calculate the required amount of bars.
By default, you will be able to quickly switch between 1-3 months, 6 months, 1 year, 2 years and 5 years of data, as well as various daily lookback periods.
Please adjust resolution settings to your liking.
Caveats:
- More data means more noise and slower calculations.
- HLC3 source is recommended, especially at resolutions above hourly.
- Trend will be slightly different if you use extended hours.
- If you use extended hours and don't have a data subscription, trend will be SUBSTANTIALLY different, especially at smaller resolutions like 1m.
- You might want to use 3.5 days per week for crypto (it's 7 days by default).
Known problems:
- If you can't see the trendlines, scroll to the left or zoom out - the origin could be outside of your viewport.
- Futures' sessions start on the previous day. We currently snap only to day boundaries, not session breaks.
- UVXY and the like that have extremely high price datapoints. The calculations will be wrong on some resolutions.
- Replay can freeze circa bar_index 244 — disable smart lookback and keep your window under 240 bars if you encounter this.
ACKNOWLEDGEMENTS:
Many thanks to alexgrover for his extremely efficient functions (used with permission)
Ehlers 3 Pole Butterworth Filter V2 [CC]The 3 Pole Butterworth Filter was created by John Ehlers (Cybernetic Analysis For Stocks And Futures pgs 196-197) and this indicator is a moving average that also works well as a trendline. Buy when the indicator line turns green and sell when it turns red.
Let me know if you would like me to publish other indicators or if you want something custom done!
Noro's Trendlines IndicatorTo create the script I used the LonesomeTheBlue code. Thank him for his code.
The indicator shows trend lines. Up to three support lines (red) and up to three resistance lines (lime). There can be up to 6 lines at a time. However, most often there will be from 0 to 1 line. Trend lines may be extended to the right. For this purpose there is a checkbox in the setting. This is the way you may adjust line thickness.
For example, how to use
The indicator shows you the support line (red) and the resistance line (lime). If the line is crossed, the price may move a lot towards the breakout.
In a few days.
sDEFI Synthetix ExchangeTradingView allows combining/summing up to a maximum of only 10 tickers in its search field. Their support staff suggested I could combine up to 40 by using Pine Script, so here it is, for a specific 'basket' of crypto tokens.
This study displays the combination of price history for Synthetix Exchange’s sDEFI index.
Tokens included in the index are COMP, MKR, KNC, SNX, ZRX, REP, LEND, REN, LRC, BNT, BAL and UMA. You will see the prices only go back as far as July 31st 2020, which is when the most recent of the compilation (UMA) started its trading history on TradingView. (The study can only display prices for days that *all* the tickers were trading.)
The price history will display as a study, below an existing chart. You will need to resize the windows, to see this study at a larger size. (Grab the window border and move it up, once you have added this study to a chart)
Unfortunately you will not be able to interact with it like a normal chart, i.e. drawing trendlines, adding moving averages, notes or annotations, etc.
May I suggest you send a support request to TradingView, asking for them to allow us to enter more than 10 (perhaps up to 40) tickers with + symbol between them, in the search field, which gives a ‘proper’ chart to analyse?
Please note that when publishing this script, I was required to choose a category from a list that does not contain a relevant category. Given that I had to choose something from the list to proceed, I used 'Support and Resistance', since chartists can see S and R levels by looking at this study.
I trust this study is useful for you sDEFI traders.
Two Fractals TrendlinesThis study draws a trend line for the last two Bill Williams up-fractals and down-fractals.
Trend line break signals and alerts can optionally be added.
[KY]McClellan Summation Index RSIThis script contains McClellan Summation Index(MSI) and McClellan Oscillator(MO)
(1) What is McClellan Summation Index(MSI)
McClellan Summation Index(MSI) is a breadth indicator derived the McClellan Oscillator(MO),
which is a breadth indicator based on Net Advances (advancing issues less declining issues).
The Summation Index is simply a running total of the McClellan Oscillator values.
To identify the market direction, I prefer to use the relative strength(RSI) of MSI rather than MSI itself
because MSI is a summation so it's difficult to compare with previous market patterns. So I use RSI applied MSI.
Reference: Stockcharts.com has a nice set of detailed explanation about MSI.
school.stockcharts.com
(2) How to use this script
- Add this script to your chart.
- You can choose one of two options ("MSI RSI" or "MO").
- You can also choose the market from three options ("Nasdaq", "NYSE", "Nasdaq+NYSE")
(3) "MSI RSI" or "MO"
a) "MSI RSI"
For swing trade(sevelal weeks), MSI RSI is much better to identify the broad market direction.
I backtested last several years of S&P500. The result was not symmetrical between MT bear/bull market.
For bull side, when MSI RSI curls up from the bottom(e.g. RSI 30 level), 90% of times out of them the market rallied.
For bear side, when MSI RSI rolles over to downside from the top(e.g. RSI 70 level), only 60% of times out of them the market declined.
So the market tends to hit negatively diverrgent high from advancing/declining issues perspective. Be careful to use MSI oscilator.
b) "MO"
For short term trade(intraday, 2-3 days of holding), MO is better because MSI is a summation so lags several days. MO is quick.
MO is sometimes very noisy, so you need to draw trendlines or horizontal levels to compare with the previous cases.
For beginners, I recommend to use "MSI RSI".
Fractal Series History SummaryThis script presents a summarized view of a series by drawing lines between series samples taken at power-of-two intervals from the current value.
The intent is to provide a visualization of trendlines at multiple scales, without having to untangle those that my overlap each other.
It doesn't overlay a price-chart as written; it could, but IMHO that would be redundant. It's intended to augment oscillators and other kinds of indicators that don't necessarily scale with a price chart.
The script does not attempt to provide buy or sell triggers, but rather, to provide a visualization tool and a line-drawing tech-demo.
Fibonacci EMA TrendlinesSimple EMAs based on the Fibs plus the 200 EMA - Default inputs are 8,13, 21, 55, 200. Inspired by Philakones EMAs.
Ehlers Decycler [CC]The Decycler was created by John Ehlers (Cycle Analytics For Traders pgs 40-41) and this is a moving average that has an extremely low lag even though it uses a fairly high length to calculate everything. This can also work well as a trendline. Buy when the indicator line is green and sell when it is red.
Let me know if there are other scripts you would like to see me publish or if you want something custom done!
VLM SpikeFeeling tired and just took a week break away from the busy and tough life. 🎊
Nothing special to mention today, just post a script I coded long time ago when I studied volume.
People always underestimate the importance of volume while drawing tons of trendlines on their charts .
A volume spike is a key to trading because it can tell us three messages, including the top, the bottom and the breakout.
Using Bollinger Band as a proxy, we can always spot two scenarios.
One ,when volume is declining below 1/2 SD of its average, price tends to move in one direction. But unusual volume above 1/2 SD of its average can reverse the original trend.
Hope u find it helpful and don't forget to follow my little account!!😄
BTC Fibonacci DMA350 TrendlinesAdapted from Tim Graham's Code.
See Original Inspiring Article from Phillip Swift at: @positivecrypto
When looking into BITSTAMP:BTCUSD 1D data in spreadsheet. Historically, BTC Highs Hit (Simple Daily Moving Average 350 Days) DMA350 in reverse Fibonacci Sequence Order
2013 Hit DMA350*8 before All Time High (ATH)
2017 Hit DMA350*5 before ATH
I expect 2021 to hit DMA350*3 ATH. When BTC hits DMA350*3 ATH, I suggest selling!
Relative StrengthThis indicator is called Relative Strength and is no way related to RSI ( Relative strength indicator).
It is simply a ratio of asset A to asset B plotted. Usually it is used to look for strength vs a particular index. Since it is a ratio, all the trendlines work on it. The default index is NIFTY. You can change it any index/script you want to compare:
1. Script vs Index
2. Index vs Index
Automatic TrendlinesIntroduction
For a full free tutorial explaining this code in more detail, visit the backtest-rookies (.com) website.
This indicator will plot two trend lines at any given time. A resistance trend line and a support trend line. The resistance trend is shown with red circles and is created by joining swing highs together. The second is a support trend which is created by joining swing lows.
Since we need swings to make the trend, the trend line code contains code for the swing detection. You can play around with the swing detection to alter how frequently new trend lines are detected. Relying on swings also means that there will be some delay in trend detection depending on how you configure the swing detection. The higher you set rightbars, the more lag you will have before a trend is detected. However, at the same time the quality of the pivots found will increase. So it is a trade-off you need to come to terms with and decide what the best settings are for you.
Lines
A single trend line is made up of several components.
Pivot Points: Marked as blue or orange circles. There will be two pivots per trend.
Orange/Purple Lines: Connecting all pivot points. You will see these lines change direction slightly each time a new pivot is detected (new circles appear).
Green/Red Circle lines: Showing the trend line from the earliest moment a new trend is detected.
Blue Dashed lines: Joining the purple and green/red circle lines so the full trend line can be seen.
Note: The blue dashed lines use pine-scripts drawing functions. As such, there is a limit to how many of these can be placed on a chart. When the limit is reached, the oldest line will be removed so the newest can be drawn. This means that if you detect enough trends and scroll back in time, the blue dashed lines will disappear at some point!
Trend Lines+++scripts taken from
Nothing here is mine , just put it as I like the combination of those script together when I analyse data
so it make life easy to draw line automode
I suggest 4 hours or daily chart with MACD and RSI
Thanks to autors in scripts
Zero Lag - ZigZag - JDThis is a alternative version of the well known "ZigZag indicator" but it uses turning points of the Jurik ma
instead of the traditional "pivot points" that are by definition lagging by a large lookback period, the (almost-) Zero Lag ZigZag lags by about 2 bars on average (depending on the candles forming)
The ZigZag pattern can be used to draw trendlines and S/R lines
It can also be used for "wave counting" in a way that reduces interpretation.
If you find other uses, please leave your ideas in the comments!
Shoutout to Everget for the awesome Jurik code!!
JD.
#NotTradingAdvice #DYOR
[New series!] [Consistent Losing Strategies] 34 EMA Scalping//---------------------------INTRO------------------------------
Hi All!
Let me introduce myself as a semi-successful forex trader & lover of automation.
I've taken to algo trading and have been hunting down strategies (that usually use indicators) to automate, backtest, and hopefully implement in MT4.
Unfortunately, most strategies are complete bulls*** and the select cases that are shown to "prove" success are limited.
These strategy sources often do not provide useful analytics either.
I want to change that approach to trading! We can really benefit each other and the community by being methodical about backtesting
as well as evaluating our results with some kind of scoring heuristic.
As for what that standardized process looks like..well I'm still working on it.
I'm pretty much on Tv for multiple hours of the day, screening strategies via Pinescript and I'd like to start sharing my progress!
This is a new series I'd like to start on consistently losing strategies. I'll make all the code public, so if you think I've made a blunder
or approached a problem the wrong way, then drop me a DM or paste your fix into the comments.
//---------------------------STRAT------------------------------
34 EMA Scalping strategy (ref. forextradingstrategies4u )
How you're supposed to trade it:
BUY:
1. Market is in an down trend as shown by the 34 EMA
2. Price breaks above a downwards trend line
3. Price breaks above the 34 EMA
4. Look for a very bullish candlestick or chart pattern
SELL:
1. Look for the 34 EMA to show we are in an uptrend
2. Price breaks below an upwards sloping trend line
3. Price breaks below 34 EMA
4. Look for a bearish candlestick or a chart pattern
//---------------------------CONC------------------------------
Q: Why does it fail?
A: I believe this strategy relies too much on subjective input (aka, trendlines).
Q: Why does it fail as an algo?
A: The 34 EMA is no more predictive than any other EMA, although it does a good job at filtering out noise.
Q: Should I try it out?
A: No, it's trash. This is the proof that it is trash.
RSI with Visual Buy/Sell Setup | Corrective/Impulsive IndicatorRSI with Visual Buy/Sell Setup | 40-60 Support/Resistance | Corrective/Impulsive Indicator v2.15
|| RSI - The Complete Guide PDF ||
Modified Zones with Colors for easy recognition of Price Action.
Resistance @ downtrend = 60
Support @ uptrend = 40
Over 70 = Strong Bullish Impulse
Under 30 = Strong Bearish Impulse
Uptrend : 40-80
Downtrend: 60-20
--------------------
Higher Highs in price, Lower Highs in RSI = Bearish Divergence
Lower Lows in price, Higher Lows in RSI = Bullish Divergence
--------------------
Trendlines from Higher/Lower Peaks, breakout + retest for buy/sell setups.
###################
There are multiple ways for using RSI, not only divergences, but it confirms the trend, possible bounce for continuation and signals for possible trend reversal.
There's more advanced use of RSI inside the book RSI: The Complete Guide
Go with the force, and follow the trend.
"The Force is more your friend than the trend"