M.Right_ OBV / Volume Smoothed RSI & 3 RSI EMAsFirst, I'd like to thank all those coders who've inspired me to learn and code my own indicator. This is the result of tireless hours of work learning to code and tweaking until everything fits exactly what I was looking for. After using it for a while and seeing the benefits personally, I figured now might be a good time to share with everyone while we are in such great market volatility , maybe I can save you some losses.
Basically, my indicator is meant to use RSI, Volume, and Volatility to show where oversold and overbought levels are, but also good times to buy and alerts.
I've tried to make my indicators as customizable as possible with all the bells and whistles you'd expect, but to have Proprietary calculations under the hood that you probably won't find anywhere else.
This indicator is a great pair with my Top and Bottom Finder.
Features:
Works on all timeframes.
Alerts.
Background highlights.
Buy/Sell signals and arrows (with the option to remove them).
Let me know if you have any questions, and enjoy.
Cheers,
Mike
广量指标
Nifty yield curveREAL-CASE SCENARIO:-
IN10Y(10yr yield t- bill) are govt. backed bonds provide basic interest or coupon rate. If the coupon rate falls below (yield =(1/price) the coupon rates of 3 month bond IN03MY(3m yield t- bill), investors are pessimistic about future growth of the economy.
This pessimistic behavior can be seen in the graph when change in background color.
While optimistic behavior scenario when investors no longer interested in long-term bonds and dumping 10Y T-bills causing yields to raise above short term 3m T-bill .
IBD Distribution DaysThis indicator seeks to mimic the conditions for Investors Business Daily's (IBD) Distribution Days that are tracked against the major indexes.
A distribution day is when the market index is down 0.2% or greater and the current day's volume is greater than yesterday's. By default, when a distribution day occurs a red arrow above the bar will appear.
The distribution days are only relevant for up to 25 trading days. This is represented by the gray bar that is shown. Therefore the count of distribution days is valid only to the right of the gray bar.
Distribution days can also be removed if the indexes move up more than 5% from the day of the distribution day.
This indicator must have a volume indicator in order for it to calculate properly. TVC:IXIC will not work without having a data subscription to the Nasdaq Index.
You are able to change the shape, shape color, and location of the shape in the menu. You are also free to change the color of the gray bar.
I welcome your feedback and any enhancements you may suggest.
OBV Bottoms and Tops by Richie RichHello and Welcome to Trading With Richie Rich's Indicator Suite!
This Indicator is known as OBV Bottoms and Tops Finder because it has been consistent with the bottoms and tops to the extreme levels possible with the help of On Balance Volume (OBV) which can be used for scalping as well Investing.
How to Use OBV Bottoms and Tops Finder Indicator?
General Idea - Everyone in trading is familiar with On Balance Volume (OBV) and it is mainly used to calculate Divergences and catch breakouts and breakdowns. But is it possible to catch the bottom or top price of an asset with the help of On Balance Volume? Typically with the normal OBV it is not but with this one.... Yes, it is Now! We'll learn it soon enough.
- After getting access to the indicator you must apply it to your chart and Favorite it so that it becomes handy all the time.
- There are 2 line namely,
1. The Overbought Line (color coded Red) - which helps you to know when the asset has been highly overbought in short term and is due for a correction short term.
2. The Oversold Line (color coded Green) - this helps you know when the price of asset has been really highly oversold and is highly due for a bounce to its main interest
levels.
- Long / Buy Setup - Wait for the main oscillator to fall back below the oversold level ,i.e, -1 and wait for the candle close to always verify it. Once it is in the region of below -1 you should either start to DCA (Dollar Cost Averaging) in a Trade or if you believe the asset is due for a more dump in coming minutes, wait for the indicator to bottom out in the -1.2 to -1.5 region, which will be your ultimate bottom to long. Once you have entered the trade which will basically (might be) the bottom for short term - mid term you should then start focusing on your Risk Reward Ratio. For Scalpers, in my opinion it is enough to target 1-2% on each trade and then flip and rotate.
If you are with a large sized portfolio and are basically an investor rather than a Trader. You should switch the chart to 4hour chart and apply the indicator and just basically wait for the Trade God and the Extreme Top and Bottom Finder to completely bottom out. Once they both are at there lowest you might have entered the Bottom once again at start focusing on your Risk Reward Ratio. After Bottoming out on a 4hour chart, i have backtested to find out that the asset price usually rises to 10-20% a minimum that will be your Take Profits Zone!
- Short / Sell Setup - Wait for the main oscillator to rise above below the overbought level ,i.e, +1 and wait for the candle close to always verify it. Once it is in the region of above +1 you should either start to DCA (Dollar Cost Averaging) in a Trade or if you believe the asset is due for a more pump in coming minutes, wait for the indicator to Top out in the +1.2 to +1.5 region, which will be your ultimate Top to short. Once you have entered the trade which will basically (might be) the Top for short term - mid term should then start focusing on your Risk Reward Ratio. For Scalpers, in my opinion it is enough to target 1-2% on each trade and then flip and rotate.
If you are with a large sized portfolio switch to low leverage mode and switch the chart to 4hour chart and apply the indicator and just basically wait for the Trade God and the Extreme Top and Bottom Finder to completely Top out or show Bearish Divergence after topping out once. Once they both are at there highest or have started to show bearish divergences you might have entered the Top once again at start focusing on your Risk Reward Ratio. After Topping out on a 4hour chart, i have backtested to find out that the asset price usually fall up to 10-20% a minimum that will be your Take Profits Zone!
This really comes in handy when paired with my Trade God/Scalp God and the Extreme Top and Bottom Finder indicator Setup!
All the above examples are backtested and can be checked via applying the indicator on the chart!
OBV RSI TunTuneCombination of OBV and RSI.
Use as RSI like normal way. You can add another indicator as Bollinger Band for more power .
Mid to High daily % - MA & ThresholdPurpose of this script is to provide a metric for comparing crypto volatility in terms of the % gain that can be garnished if you buy the midpoint price of the day and sell the high***. I'm specifically using bots that buy non-stop. This metric makes it easy to compare crypto coins while also providing insight on what a take profit % should be if I want to be sure it closes often instead of getting stuck in a position.
Added a few moving averages of (Mid-range to High Daily %). When these lines starts to trend down, it's time to lower the take profit % or move on to the next coin.
Decided to add a threshold so I could easily mark where I think the (Mid-range to High Daily %) is for most days.
Ex. I can mark 10% threshold and can eyeball roughly ~75% of the days in the past month or so were at or above that level. Then I know I have plenty volatility for a bot taking 5% profit. Also if you have plenty of periodic poke-through that month (let's say once a week) you might argue that you can set it to 7% if you're willing to wait about that long. Either way this metric is conservative because it is only the middle of the range to the high, a less conservative version might provide the % gain if you bought the day low and sold the day high.
***Since this calculation only takes the middle of the range and the high of the day into account, red days are volatile against a buyer but to your advantage if you are a seller. BUT if you have plenty of safety buy orders this volatility in price only means your total purchase volume increases and when/if you reach a take profit level you sell more there.
Would like to upgrade and add a separate MA line for green days and a separate MA line for red days to discern if that particular coin has a bias. Also would like to include some statistics on how many candles are above or below threshold for a certain period instead of eyeballing.
SAR-adjusted extremesThis indicator shows how far (i.e. the absolute distance) of the extremes (i.e. high & low) are from the current parabolic SAR
Davood Kumothis andicator is build in base of ichimoku cloud.
Select the interval at which the kumo clouds change phase and depending on what time frame we are in, we give the time inputs to the indicator.
then, the indicator calculates the area of the cloud and set the ascending and descending targets when price break the highest or lowest candle in that time range.
So entry point is the highest and lowest candle and first and second targets are determined by the indicator.
note : i used this andicator only in crypto market not forex and it works well
world stage indexThis is an indicator that expresses the ratio of "stage1" and "stage4" of world index.
40 symbols are as follows
(JAPAN, US, EUROPE, and CANADA)
OSE:NK2251!, DJ:DJI, NASDAQ:IXIC, SP:SPX, XETR:DAX, TVC:CAC40, TVC:UKX, TSX:TSX
(ASIA)
TVC:SHCOMP, SZSE:399001, TVC:HSI, TWSE:TAIEX, BSE:SENSEX, OANDA:SG30SGD, INDEX:KSI, SET:SET
(EUROPE)
INDEX:SX5E, INDEX:FTSEMIB, SIX:SMI, BME:IBC, EURONEXT:BEL20, TVC:AEX, OMXCOP:OMXC25, XETR:0Q5X
(Pacific Ocean)
ASX:XJO, TVC:NZ50G, IDX:COMPOSITE, FTSEMYX:FBMKLCI, BMFBOVESPA:IBOV, BMV:ME, BVL:SPBLPGPT, BYMA:IMV
(Eastern Europe & Middle East)
MOEX:IMOEX, GPW:WIG20, OMXHEX:OMXH25, OMXSTO:OMXS30, DFM:DFMGI, TADAWUL:TASI, OSE:GNRI, EGX:EGX30
The criteria are as follows:
EMA5≧EMA20≧EMA40 : Stage1
EMA5≦EMA20≦EMA40 : Stage4
A.The sum of Stage1 was multiplied by 2.5 and drawn on a scale of 0 to 100, with yellow area
B.The Sum of Stage4 was multiplied by 2.5 and drawn on a scale of 0 to 100, with blue area.
C. The ratio of A/B was multiplied by 2.5 and drawn on a scale of 0 to 100, with red lines.
This idea is from Kojirou Kousi.
40 symbols of this script are partially different from Kojiro kousi's idea.
But he said the difference isn't matter.
「小次郎講師指数」に着想を得た、世界40カ国の株価指数stage状態です。
参考文献は、小次郎講師著書「世界一わかりやすい投資の勝ち方」です。
小次郎講師とは一部異なるシンボルを採用していますが、
多少の違いは余り大した問題では無いと御本人から教わった事があります。
先進国に関してはおそらくほとんど同じだと思います。
stage1の合計の%を黄色、stage4の合計の%を青色、stage1の合計/stage4の合計の%を赤で表示しています。
雰囲気で分かればいいので、正確な数字までは表示しませんでした。
個人的には現状分析以外にも、プラクティス時に世界情勢を把握するのに重宝しています。
Recent High/Low Dots by Alejandro PSimple indicator that plots a dot in the chart when a candle breaks the high of the past X candles.
This is useful to easily visualize when the market is coming out of a range and making fresh highs or lows relative to the past X candles.
It can be used in trend following systems as an additional filter for validation.
MTF - Options Strike Price - Screener & AlertsHi fellow traders ,
Pleased to share an MTF – Option Strike Price Screener.
It Screens 15 tickers for your set Strike Prices in the input column or you can also set the Stop Loss/target prices for your portfolio watch list in a single input window.
All you need to do is attach to any chart and set the periodicity of the to your desired alert() frequency requirement.
Now go to the input settings icon of the script and set your tickers, timeframe and option strike prices or if you would like to track your individual ticker stop loss or target prices!
Set the alert from the menu as usual click - Any alert() function call and bingo you are done!!
In all of 2-3 minutes you can set your Option Strike Alerts or TP’s or SL’s for 15 stocks of your portfolio..
Only a single alert() will track 15 tickers across multiple time frames..
Once your Alert is hit you may need to change the input settings and save as default and again set an alert() and delete the last alert()..
No more opening multiple charts and setting individual time consuming alerts().
Happy trading with TV..
Arms Index TRIN [DM]Hello colleagues""
Here I share today Arms Index!!!
-Avalilables settings and options:
- Switcheable Index NASDAQ and S&P
- Switcheable Alerts "crossover, crossunder, change and main ones"
-Fill Color Customizables
-Signal Color Customizables
-Signal Smooth Customizable
Enjoy!!!
Arms Index (TRIN)
The Arms Index (TRIN) is a market breadth oscillator that was developed by Richard Arms. It is also known as the Trading Index, hence the abbreviation TRIN. It relates advancing and declining stocks to their respective volume flows by dividing the Advance/Decline Ratio by the volume ratio. When it rises the market is said to be weak and vice versa. The value 1 is key and crossing it generates a signal. A value above 1 indicates declining stocks have the upperhand in the volume flow and vice versa. The indicator can be used to spot overbought and oversold situations and is best used in combination with other analysis techniques.
On Balance VolumeEnhanced the original OBV (On Balance Volume) indicator:
- Draw max lines of OBV in the last 30 candles so that we can notice the trend, as well as divergences easier.
- If you use fiat as base currency (USDT in cryptocurrency for example), we can display the OBV in fiat, so that we can compare total trading volume across a list of symbols to find healthy symbols to trade easier.
Price density [Measuring Market Noise:Take advantage]$$ Market noise can be problematic to some types of trading strategies yet beneficial to others.
By measuring noise using the 'Price Density' can enable us to improve our
trading edge and turn noise to our advantage.
Robust analysis of noise can inform us when it is best to avoid trend-following
systems (when noise is too high), and vice versa for systems based on a
mean-reverting trading premise (when market noise is low).
__________________________________________________________________________
Using Noise to our advantage
* Two techniques:
-Measure Noise and trade when suitable for the system
~ High noise = avoid trend-following
~ Low noise = avoid mean-reversion
-Match assets to strategies
~ Only trade 'noisy assets' with Mean-reversion Strategies
~ Only trade 'efficient assests' with Trend-following Strategies
## Price density:-
High values = High noise
Low values = Low noise
___________________________________________________________________________
Disclaimer!! Do your own research
Trend channel [log scale] with projection forecastTrend channel with projection forecast
This indicator is used to model data where growth or decay accelerates rapidly at first and then slows over time.
Because the channel distance is based off the largest pullback or highest peak within a trend, for effectively drawing and using this indicator it is recommended that this type of indicator is applied to mature trends .
This model is interesting for the long term series data (such as 10 or 20 years span) because can be plotted correctly on logarithmic charts .
Technical issues
*The user have to pan over the chart from the beginning to the end of the study range (such as 10 years of bars) so the pine script could generate those lines on the chart.
*If on the chart the number of bar is less than the lookback period, it won't generate any lines as well.
Disclaimer
Success in trading is all about following your trading strategy and indicators should fit into your own strategy, and not be traded purely on.
This script is for informational and educational purposes only. Use of the script does not constitute professional and / or financial advice. You are solely responsible for evaluating the outcome of the script and the risks associated with using the script. In exchange for the use of the script, you agree not to hold monpotejulien TradingView user responsible for any possible claims for damages arising out of any decisions you make based on the use of the script.
Moving Average Support and Resistance ChannelThe Moving Average Support and Resistance Channel is a channel that consists of trend lines of resistance and support of the analyzed instrument, represented as moving averages with the selected type and smoothing period on a certain timeframe, where:
- Middle Line - the middle of the channel (the moving average of the pivot point using the Floor Pivot method)
- R1 - first resistance (moving average of support + Factor*ATR)
- R2 - second resistance (R1 + Factor*ATR)
- S1 - first support (moving average of resistance-Factor*ATR)
- S2 - second support (S1-Factor*ATR)
- Factor-ATR multiplier
Despite the fact that the indicator consists of moving averages, it can work equally well both during a trend and in its absence.
Characteristics of the trend movement:
• During an uptrend, the moving averages of the indicator are directed upwards, the price is above the Middle Line level most of the time
• During a downtrend, the moving averages of the indicator are directed down, the price is below the Middle Line level most of the time
• During the flat period, the boundaries of the moving average channel narrow, the channel tends to align in a horizontal position, the price consolidates most of the time around the Middle Line level, fighting off the support and resistance levels of the indicator.
The position of asset prices outside the indicator may mean an early correction or trend reversal.
How to trade:
One of the trading methods may be that during a breakout or a pullback after a breakout of the Middle Line level, the target of further movement, depending on the direction of this movement, may be the levels R1, R2 or S1, S2. Use this situation to make a profit.
I wish you good luck in building your trading plans and remember: such indicators do not predict the future price movement on the chart, they only determine the characteristics of the price movement at the current time, taking into account historical data.
On-Balance Volume Oscillator with Divergence and PivotsThis is On-Balance Volume recalculated to be an Oscillator, a Divergence hunter was added, also Pivot Points and Alerts.
On-Balance Volume, or OBV is considered a "leading indicator" - in contrast to a "lagging indicator" just as Moving Averages it does not show a confirmation what already happened, but it shows what can happen in the future. For example: The chart is climbing while the OBV oscillator is slowly declining, gets weaker and weaker, maybe even prints bearish divergences? That means that a reversal might be occurring soon. Leading indicators are best paired with Stop and Resistance Lines, general Trendlines, Fib Retracements etc...Your chart is approaching a very important Resistance Trendline but the OBV shows a very positive signal? That means there is a high probability that the Resistance is going to be pushed though and becomes Support in the future.
What are those circles?
-These are Divergences. Red for Regular-Bearish. Orange for Hidden-Bearish. Green for Regular-Bullish. Aqua for Hidden-Bullish.
What are those triangles?
- These are Pivots. They show when the OBV oscillator might reverse, this is important to know because many times the price action follows this move.
Please keep in mind that this indicator is a tool and not a strategy, do not blindly trade signals, do your own research first! Use this indicator in conjunction with other indicators to get multiple confirmations.
1k TICK arrowsThis plots green up arrows when the TICK index goes to -1,000 or lower or red down arrows when the TICK index goes +1,000 or higher. Can be used as a short term reversal signal (not investment advice). Will unfortunately plot on all charts but should only be relevant for US equity indices, mainly S&P500/ES futures. Indicator will adapt to the charts time frame and is hard coded to only show during 9:30-16:00 EST.
Times and Gold Zonethis indicator is to see all the time sessions but you have another session that you can change the hour to only see the best volatility of the pair you want
OBV + Simple Moving AverageThird time is a charm. On Balance Volume with simple moving average. Hopefully we don't get this kicked back to us.
[UTILS] Unit Testing FrameworkTL;DR
This script doesn't provide any buy/sell signals.
This script won't make you profitable implicitly.
This script is intended for utility function testing, library testing, custom assertions.
It is free and open-source.
Introduction
About the idea: is not exclusive, programmers tend to use this method a lot and for a long time.
The point is to ensure that parts of a software, "units" (i.e modules, functions, procedures, class methods etc), work as they should, meet they design and behave as intended. That's why we use the term "Unit testing".
In PineScript we don't have a lot of entities mentioned above yet. What we have are functions. For example, a function that sums numbers should return a number, a particular sum. Or a professor wrote a function that calculates something or whatever. He and you want to be sure that the function works as expected and further code changes (refactoring) won't break its behaviour. What the professor needs to do is to write unit tests for his function/library of functions. And what you need to do is to check if the professor wrote tests or not.
No tests = No code
- Total test-driven development
Ok, it is not so serious, but very important in software development. And I created a tool for that.
I tried to follow the APIs of testing tools/libs/frameworks I worked or work with: Jasmine (Javascript), Mocha/Chai (Javascript), Jest (Javascript), RSpec (Ruby), unittest (Python), pytest (Python) and others. Got something workable but it would be much easier to implement (and it would look much better) if PineScript had a higher-order functions feature.
API
_describe(suiteName: string)
A function to declare a test suite. Each suite with tests may have 2 statuses:
✔️ Passed
❌ Failed
A suite is considered to be failed if at least one of the specs in it has failed.
_it(specName: string, actual: any, expected: any)
A function to run a test. Each test may have 3 statuses:
✔️ Passed
❌ Failed
⛔ Skipped
Some examples:
_it("is a falsey value", 1 != 2, true)
_it("is not a number", na(something), true)
_it("should sum two integers", _sum(1, 2), 1)
_it("arrays are equal", _isEqual(array.from(1, 2), array.from(1, 2)), true)
Remember that both the 'actual' and 'expected' arguments must be of the same type.
And a group of _it() functions must be preceded by a _describe() declaration (see in the code).
_test(specName: string, actual: any, expected: any)
An alias for _it . Does the same thing.
_xit(specName: string, actual: any, expected: any)
A function to skip a particular test for a while. Doesn't make any comparisons, but the test will appear in the results as skipped.
This feature is unstable and may be removed in the future releases.
_xtest(specName: string, actual: any, expected: any)
An alias for _xit . Does the same thing.
_isEqual(id_1: array, id_2: array)
A function to compare two arrays for equality. Both arrays must be of the same type.
This function doesn't take into account the order of elements in each array. So arrays like (1, 2, 3) and (3, 2, 1) will be equal.
_isStrictEqual(id_1: array, id_2: array)
A function to compare two arrays for equality. Both arrays must be of the same type.
This function is a stricter version of _isEqual because it takes into account the order of elements in each array. So arrays like (1, 2, 3) and (3, 2, 1) won't be equal.
Usage
To use this script to test your library you need to do the following steps:
1) Copy all the code you see between line #5 and #282 (Unit Testing Framework Core)
2) Place the copied code at the very beginning of your script (but below study())
3) Start to write suites and tests where your code ends. That's it.
NOTE
The current version is 0.0.1 which means that a lot of things may be changed on the way to 1.0.0 - the first stable version.
REAL MARKET RATESBased on near and long term eurodollar yield curve. Attempts to indicate, through a spread median, how major players may position themselves in the near future.