Market Cap / Revenue RatioA variation of the P/S ratio, this script takes the future estimated revenue of the current stock versus it's Market Cap. It then compares the aforementioned Market Cap:Revenue ratio against a market bellwether's corresponding ratio (MSFT by default) to determine the following:
- Light green when the ratio is extremely low (Stock is very undervalued)
- Green when the ratio is low (Stock's multiple is lower by 20-50%)
- Blue when the ratio is close to the benchmark (Stock is fairly valued to benchmark multiple)
- Red when the ratio is high (Stock's mulitple is higher by 50% or more)
- Dark red when the ratio is extremely high (Stock is very overvalued)
CONFIGURABLE
- Full Table: Show the entire calculation table
- Minimalist: Go minimal and show only the ratio and color code
- Show Benchmark Multiple: Show the multiple ratio calculated between the current stock and the benchmark stock (MSFT by default)
NOTES
- When calculating the Market Cap, TradingView sometimes under-reports the number of shares and thus skews the Market Cap too low. This seems to happen for stocks with multiple share classes like GOOGL so be mindful that the data can be wrong for these kinds of stocks. You can check on this by going into the Indicator's Settings and select Show Full Table which will show the number of shares outstanding reported by TradingView.
- For certain stocks such as foreign ADRs, there won't be a future revenue estimate so the script will automatically use the Total Revenue for the most recent Quarter in these cases
Multiple
Multi Pivot (S/R) & Previous Period (OHLC)█ Multi Pivot (Support/Resistance) & Previous Period (Open/High/Low/Close)
The previous script was deleted because of a copyrighted word.
From JayRogers description.
█ Multi Pivot Selector
Allows you to set up to 3 distinct sets of pivots, each with their own resolution settings and the ability to select how many support|resistance levels are shown.
The maximum amount of S|R levels available varies with different pivot types, the options available are:
Traditional
Fibonacci
Woodie
Classic
Copyrighted word
Camarilla
Fibonacci Extended
█ Previous Period Levels
A simple but highly customisable display of previous higher time-frame OHLC values.
Customised resolution input which excludes time frames lower than 1 hour while extending the common higher reference inputs.
This script is based on JayRogers script, I only added some features so please check out his script.
I added the timeframe in the labels, in order to make it easier to differentiate when using multiple pivot set.
As well as making it possible to change the lines color of each pivot set separately.
Labels can now be displayed on each side (right, left and both) or just disabled.
The type of pivot can be shown on the right side.
Lines extension can be disabled and lines width value can be changed.
I also added another one of his script to display OHLC levels, I made similar changes.
Converted to Pine Script v5.
Previous Period Levels - X Alerts
Pivotal - Multi Pivot Selector (which was also deleted because of the copyrighted word)
Multiple Percentile Ranks (up to 5 sources at a time)This indicator is a visual percentile rank indicator that can display 1 to 5 sources at one time.
The options:
“Sources”
Choose the number of sources you would like to display. The minimum is 1, the maximum is 5.
“Label percent position”
The label for the current percentage of where the source candle ranks.
“Label position”
This displays the source/s you’ve selected, and the chosen bottom rank % and top rank %.
“Label text size”
Displays the text size of all labels.
“Display current % labels”
Switches the labels on/off only for the current percentage rank of each source.
Source options:
ATR: Average True Range
CCI: Commodity Channel Index
COG: Centre of Gravity
Close: closing price
Close Percent: close percentage from previous close
Dollar Value: volume * (high * low * close / 3)
EOM: Ease of Movement: how much volume it takes to move the price in a certain direction
OBV: On-Balance Volume
RANGE: percentage range of the close price
RSI: Relative Strength Index
RVI: Relative Vigor Index
Time Close: if you select the 1 second timeframe it will provide the gap of time between each 1 second close
Volume: each bar’s volume
Volume (MA): volume moving average
Source # where # is the number of the source. Selects the source you’d like.
Ma Length is the number of previous candles to consider when calculating the moving average of the source. Note, the “MA Length” only applies to sources that have the “(MA)” at the end of their name.
Bottom % is the bottom percentage rank of the source you’ve selected. This is a filter to display the candle line graph in red once the percentage rank is equal to the percentage you’ve chosen or below.
Top % is the top percentage rank of the source you’ve selected. This is a filter to display the candle line graph in green once the percentage rank is equal to the percentage you’ve chosen or higher.
A simple example of how to use the indicator:
Select the dropdown menu for source 1 and select volume.
As the candles populate, it will look at previous candles and assign a percentage rank of where the candles are in relation to previous candles.
*Note, the way Tradingview works is it will populate the first candle the chart was active, and continue on. So, let’s say the 3rd candle was the highest volume day. This candle will show up as 100%. If the next day, the 4th candle has an even higher volume, it will show up as 100% also, the previous candles won’t “repaint” to other values and are instead set based on when they were confirmed. So, this indicator works best when there are a lot of previous candles to compare itself to.
To use the bottom % rank filter enter a percentage such as 5%. As it comes across a candle that is 5% or less compared to previous volume candles, then the line graph will shade in red.
The same can be said for the top % rank. So, if you want to see the line graph change to green when it comes across the top 99th percentile rank of volume bars, then set the top % rank to 1% and it will give you extremely high-volume bars in green instead of blue.
Price on chart Binance spot USDT and Bybit perpetual USDT.P.A simple indicator showing the current time candles from the SPOT market on Binance and Futures from Bybit.
Triple RSI Indicator with ToggleThis script combines three relative strength index (RSI) indicators with different periods, and allows the user to toggle between them to generate overbought and oversold signals. The indicator is named "Triple RSI Indicator with Toggle" and has the short title "TRSI-T."
The input parameters for the RSI periods are set by the user and include a short RSI with a period of 5, a main RSI with a period of 14, and a long RSI with a period of 28. The overbought and oversold levels for each RSI can also be set by the user.
The script plots the three RSI lines on the chart and calculates a bar color based on the enabled RSI values. If all three RSI values are overbought, the bar color is set to fuchsia, if all three RSI values are oversold, the bar color is set to aqua, and if neither of these conditions is met, the bar color is set to not available.
The script also includes a fast RSI and an RSI exponential moving average (EMA) with adjustable periods. The RSI fast line is plotted along with the RSI EMA line, and a cloud fill is generated between the two lines. The fill color is based on whether the fast RSI line is above or below the RSI EMA line, with a blue color used for long signals and a pink color used for short signals.
This indicator can be used as part of a trading strategy in a number of ways. Here are a few examples:
Overbought and Oversold Signals: When the bar color of the indicator is fuchsia, it indicates that all three RSIs are overbought, and when the bar color is aqua, it indicates that all three RSIs are oversold. These signals can be used to enter a trade in the opposite direction, anticipating a reversal in price.
RSI Divergence: Traders can also look for divergences between the price and the RSI values. For example, if the price is making higher highs but the RSI values are making lower highs, it could indicate that the price trend is weakening and a reversal may be imminent. Conversely, if the price is making lower lows but the RSI values are making higher lows, it could indicate that the price trend is about to reverse.
RSI Cloud Signals: The cloud fill generated between the fast RSI and RSI EMA lines can be used to generate trading signals. When the fast RSI line is above the RSI EMA line and the fill color is blue, it can be a signal to go long. When the fast RSI line is below the RSI EMA line and the fill color is pink, it can be a signal to go short.
If anybody has some interesting thoughts on how to improve it, let me know!!
How To Limit Repeating SignalsAn example of how to limit the input number of allowed signals using a function containing a condition counter with a reset.
MTF Commodity Oddity Index (CCI+)MTF Commodity Oddity Index (CCI+)
This chart overlay indicator is based upon the Commodity Channel Index (CCI) and can signal multiple triple-timeframe CCI overbought and oversold confluences directly onto your chart, intended for use as a confluence either for reversal trade entries, or potential trade exits, indicating where price may be probable to reverse.
Features include:
- Primary set of fully configurable triple-timeframe overbought and oversold signals, indicating where 3 selected timeframes are all overbought or all oversold at the same time. Enabled by default.
- Secondary set of fully configurable triple-timeframe overbought and oversold signals, indicating where 3 selected timeframes are all overbought or all oversold at the same time. Enabled by default.
- Optional drawing of background colours and/or ribbon seen at bottom of the chart image.
- The default primary MTF #1 timeframes are set to 1 minute, 5 minute and 15 minute. These are highly suitable for low timeframe scalpers trading on < 5m charts, and can often pin point price reversals.
- The default Secondary MTF #2 timeframes are set to 15 minute, 30 minute and 120 minute. These are suitable for both low timeframe scalpers and considerably higher timeframe traders.
- Independent alerts for MTF #1 and MTF #2 triple-timeframe confluences, including options for alerting MTF overbought and MTF oversold individually, as well as an option for alerting either overbought or oversold in a single combined alert.
- Also includes standard configurable CCI options, including CC length and source type.
Note: The features listed above are accurate at the time of publishing but maybe updated or added to in future.
A similar MTF CCI indicator is also available as a panel indicator here .
This indicator is based upon the original MTF Fantastic Stochastic (FS+) available here .
What is the Commodity Channel Index (CCI)?
Investopedia has described the popular oscillator as follows:
“The Commodity Channel Index (CCI) is a momentum-based oscillator used to help determine when an investment vehicle is reaching a condition of being overbought or oversold.
Developed by Donald Lambert, this technical indicator assesses price trend direction and strength, allowing traders to determine if they want to enter or exit a trade, refrain from taking a trade, or add to an existing position. In this way, the indicator can be used to provide trade signals when it acts in a certain way.”
You can read more about the CCI , its use cases and calculations here .
How do traders use overbought and oversold levels in their trading?
The oversold level, that is traditionally when the CCI is above the 100 level is typically interpreted as being 'overbought', and below the -100 level is typically considered 'oversold'. Traders will often use the CCI at an overbought level as a confluence for entry into a short position, and the CCI at an oversold level as a confluence for an entry into a long position. These levels do not mean that price will necessarily reverse at those levels in a reliable way, however. This is why this version of the CCI employs the triple timeframe overbought and oversold confluence, in an attempt to add a more confluence and reliability to this usage of the CCI . While traditionally, the overbought and oversold levels are below -100 for oversold, and above 100 for overbought, the default threshold settings of this indicator have been increased to provide fewer, stronger signals, especially suited to the low timeframes and highly volatile assets.
In Chart Currency TickersQuick View of Multiple Currencies & Gold Price on Chart
In Chart Currency Tickers will help quick view of Multiple Currencies (Up/Down points & Percentage), you can change symbols on settings as per your requirement
മെയിൻ കറൻസികളും സ്വർണവിലയും റിയൽ ടൈം മോണിറ്റർ ചെയ്യുന്നതിനും മാർക്കറ്റ് സെന്റിമെൻറ് അറിയുന്നതിനും അതിനനുസരിച്ച് ട്രേഡിങ്ങ് ഡിസിഷൻ എടുക്കുന്നതിനും നിങ്ങളെ സഹായിക്കുന്നു
Happy Trading to All..!!!
Asif Kerim Naduvilaparambil
Three Linear Regression ChannelsPlot three linear regression channels using alexgrover 's Computing The Linear Regression Using The WMA And SMA indicator for the linear regression calculations.
Settings
Length : Number of inputs to be used
Source : Source input of the indicator
Midline Colour : The colour of the midline
Channel One, Two, and Three Multiplicative Factor : Multiplication factor for the RMSE, determine the distance between the upper and lower level
Channel One, Two, and Three Colour : The channel's lines colour
Usage
For usage details, please refer to alexgrover 's Computing The Linear Regression Using The WMA And SMA indicator.
Mehrdad Banakar - Multiple RMA channelsThis indicator demonstrates 6 different steps RMA moving channels. The channels upper and lower lines show the computing RMA of candles high and candles low, respectively. You can fine the best inputs based on your strategies in different stocks and improve your win rate. Please note that, it is better to use it in higher time frames.
Multiple Non-Anchored VWAPA lot of VWAP scripts are anchored and only allow single VWAP additions. This script allows up to 5 simultaneous VWAPs, for example monthly, quarterly, yearly, 3 years, etc. Can also be used on smaller timeframes. The non-anchored part of the script allows it to be constantly rolling, with no resets.
I do not endorse this script, it was created at my request :)
Mulitiple time frame Slow Stochastic JamilaThis is a very useful Multiple time frame Slow Stochastic for traders who which to entry and exit when the slow stochastic of the different time frame are all in sync.
How to use this indicator. Only entry long when the day, 3day, weekly, monthly stochastic are going up. Exit when the day or 3day stochastic reaches 80% level.
R:R Trading System FrameworkFirst off, huge thanks to @fikira! He was able to adapt what I built to work much more efficiently, allowing for more strategies to be used simultaneously. Simply put, I could not have gotten to this point without you. Thanks for what you do for the TV community. Second, I am fairly new to pinescript writing, so I welcome criticism, thoughtful input and improvement suggestions. I would love to grow this concept into something even better, if possible. So please let me know if you have any ideas for improvement. However I do juggle a lot of different things outside of TV, so implementations may be delayed.
I have decided, at this time, not to add alerts. First, because I feel most people looking to adapt this framework can add their own pretty easily. Also, given how customized the framework is currently, while also attempting to account for all the possible ways in which people may want alerts to function after they customize it, it seems best to leave them out as it doesn't exactly fit the idea of a framework.
For best viewing, I recommend hovering over the script's name > ... > Visual order > Bring to front. Also I found hollow candles with mono-toned colors (like pictured) are more visually appealing for me personally. I HIGHLY RECOMMEND USING WITH BAR REPLAY TO BETTER UNDERSTAND THE FRAMEWORK'S FUNCTIONALITY.
▶️ WHAT THIS FRAMEWORK IS
- A huge collection of concepts and capabilities for those trying to better understand, learn, or teach pinescript.
- A system designed to showcase Risk:Reward concepts more holistically by providing all of the most popular components of retail trading to include backtesting, trade visual plotting, position tracking, market condition shifts, and useful info while positioned to help highlight changes in your risk:reward based decision-making processes.
- A system that can showcase individual strategies regardless of trade direction, allowing you to develop hedging strategies without having multiple indicators that do not correlate with each other.
- Designed around the idea that you trade less numbers of assets but manage your positions and risk based on multiple concurrently running strategies to manage your risk exposure and reward potential.
- An attempt to combine all the things you need to execute with an active trading management style.
- A framework that uses backtested results (in this case the number of averaged bars it takes to hit key levels) in real-time to inform your risk:reward decision-making while in-trade (in this case in your Trade Tracking Table using dynamic color to show how you might be early, on-time, or late compared to the average amount of backtested time it normally takes to hit that specific key level).
▶️ WHAT THIS FRAMEWORK IS NOT
- A complete trading product. DO NOT USE as-is. It is a FRAMEWORK for you to generate ideas of your own and fairly easily implement your own triggering conditions in the appropriate sections of the script.
▶️ USE CASES
- If you decide you like the Stop, Target, Trailing Stop, and Risk:Reward components as-is, then just understanding how to plug in your Entry and Bullish / Bearish conditions (Triangles) and adjust the input texts to match your custom naming will be all you need to make it your own!
- If you want to adapt certain components, then this system gives you a great starting point to adapt your different concepts and ideas from.
▶️ SYSTEM COMPONENTS
- Each of the system's components are described via tooltips both in the input menu and in the tables' cells.
- Each label on the chart displays the corresponding price at those triggered conditions on hover with tooltips.
- The Trailing Stop only becomes active once it is above the Entry Price for that trade, and brightens to show it is active. The STOP line (right of price) moves once it takes over for the Entry Stop representing the level of the Trailing Stop at that time for that trade.
- The Lines / Labels to the right of price will brighten once price is above for Longs or below for Shorts. The Trade Tracking Table cells will add ☑️ once price is above for Longs or below for Shorts.
- The brighter boxes on the chart show the trades that occurred based on your criteria and are color coded for all components of each trade type to ensure your references are consistent. (Defaults are TV built-in strategies)
- The lighter boxes on the chart show the highest and lowest price levels reached during those trades, to highlight areas where improvements can be made or additional considerations can be accounted for by either adjusting Entry triggers or Bullish / Bearish triggers.
- Default Green and Red Triangles (Bullish / Bearish) default to having the same triggering condition as the Entry it corresponds to. This is to highlight either a pyramiding concept, early exit, or you can change to account for other things occurring during your trades which could help you with Stop and Target management/considerations.
TradingView and many of its community members have done a lot for me, so this is my attempt to give back.
Multi EMA with labels (Any timeframe)This script lets you add up to 8 EMAs (Exponential Moving Averages) that can be set to any timeframe and length. The difference between this and other EMA indicators is that it has a simple label attached to each EMA showing which timeframe it belongs to and what length it is, so you can get that information at a glance while trading without having to remember the specific settings for each EMA.
I was personally looking for something like this because I like clarity on my chart and these labels really help. The existing EMA indicators I found with labels don't support multiple timesframes or if they do, they don't include the timeframe itself in the label, so that's why I created this simple script and shared it in case somebody else is looking for the same. Enjoy.
multiple orders - strategy - educationalHi,
Here is a 'template', using array's, for multiple orders and different SL/TP levels per trade (This is an example with max 5 open trades)
The 'switch' makes sure that the first available position will be used,
for example, when 'L1' is closed in the past, and a buy condition is triggered, position 'L1' will be filled,
should it be that 'L1', 'L2', 'L3' are already filled, then position 'L4' will be filled, ...
An extra table is added with data of the trades
Be aware, the 'Buy and Hold' resembles the profit when 100% of the available equity has been bought at the time of the very first trade and sold now. On the other hand, the positions work with a % of equity, 20% per trade (5 x 20 = 100%)
You can see that every trade exits on its own terms, without interference of other trades
Important, this technique only works if in the strategy() function:
- close_entries_rule -> set at 'ANY'
- pyramiding is set at max amount of trades or higher (in this case 5 or higher)
Cheers!
Multiple Ticker TraderThis indicator can be used as an alternative to the built in Strategy Tester for those who want to (back) test a strategy on multiple tickers simultaneously and see it's performance.
Just change the buy and sell conditions in the code to fit your needs.
The strategy I've used here is scaling into up to 10 tickers a maximum of 5 times per ticker every time they retrace (another) 10% from their all time high.
You can set the maximum number of total trades and disable scale ins by setting them to an impossible number (such as, 99% away from the all time high).
Credit to QuantNomad for the monthly/yearly returns table bottom left.
The bottom right table shows the current number of shares the algo is long and also the total all-time returns from each individual ticker, and other data.
The blue line is the number of positions the script is currently long. Each scale into the same ticker represents one position.
The yellow line is the closed P&L.
The green/red line is the live P&L.
I've used leverage for the example image just to showcase the liquidation display.
These particular buy/sell conditions cannot close positions at a loss, so be careful if you're wild enough to use this setup live without understanding the script yourself. I haven't used it live myself yet and you should assume there are serious bugs before thinking about using it live, though I'm using a similar thing on cryptos and it's going fine.
You can edit the leverage, maximum trades and back test range in the settings. The number following the ticker on each label represents which scale in was bought/sold.
Enjoy :) let me know if you find any good results
ArrayMultipleDimensionPrototypeLibrary "ArrayMultipleDimensionPrototype"
A prototype library for Multiple Dimensional array methods
index_md_to_1d()
new_float(dimensions, initial_size) Creates a variable size multiple dimension array.
Parameters:
dimensions : int array, dimensions of array.
initial_size : float, default=na, initial value of the array.
Returns: float array
dimensions(id, value) set value of a element in a multiple dimensions array.
Parameters:
id : float array, multiple dimensions array.
value : float, new value.
Returns: float.
get(id) get value of a multiple dimensions array.
Parameters:
id : float array, multiple dimensions array.
Returns: float.
set(id) set value of a element in a multiple dimensions array.
Parameters:
id : float array, multiple dimensions array.
Returns: float.
Gann Angle Table Calculator PlotterThis indicator was build upon based on Gann Angle and Gann Multiplier as refered of The Tunnel Thru The Air Or Looking Back From 1940, written by WD Gann .
Credits to FaizHebat for calculation.
Indicator features :
1. Font size from tiny to huge.
2. Table position.
3. Color for cell table and plot can be input or reversed.
4. Plot can be show or hide and also price can be track.
5. Able show currency and decimal price.
6. Gann table and Calculation table can show or hide.
7. Each Gann point can be hide including plot and calculation.
8. For desktop display only, not for mobile.
Pros :
1. Can be used as single or more indicator. (Chart show 2 same indicator with different setup)
Cons :
1. Price must be input before selecting any Gann Point.
FAQ
1. Credits
WD Gann , The Tunnel Thru The Air Or Looking Back From 1940
FaizHebat
2. Code Usage
Free to use for personal usage.
Positive direction with Currency and Decimal
Positive direction with Currency and Decimal
Multiple Double EMAEase to use double EMA indicators with multiple values instead of using slow moving averages
Ultimate RSIsThis RSI script includes everything you could want on an RSI. There are multiple timeframes which will give context to market movement, as well as a highlight feature to make it easier to visualize overbought and oversold stocks.
Tip: Uncheck the 4 plots with no color in them to remove the extra headers on the indicator.
Multiple Timeframe RSI with 2 MA by GodtrixHi guys, how ya doing!
I know sometimes you'll need multiple timeframe RSI to study your chart, so do I, therefore I'll share my multi RSI tool for you.
There are total 3 RSI for you to use, you can turn each ON or OFF
I've added more colored value lines for your better view
Also provided a choice for smooth line or step line where there's no gap for higher timeframe RSI on a smaller timeframe chart
MA (SMA) is provided for smoother, less noise lines
Indicator Tips:
Bullish - When it is above 50, this is where you might want to decide whether to close your short order or new short order at top
Bearish - When it is below 50, this is where you might want to decide whether to close your long order or new long order at low
RSI & MACDThis indicator presents standart RSI and MACD indicators in a single indicator. The appearances of these indicators have been modified a little bit and squeezed into one window. To overcome the scale problem the MACD values has expanded with 1000 and divided by the current price to use both indicators in the same scale. Original values could be determined from there. Original Tradingview codes have been used to get full control of graphs.
Bu indikatör RSI ve MACD gösterfgelerini tek bir indikatörde sunuyor. İndikatörlerin görünüşleri bir miktar modifiye edilip iki indikatörğn tek bir pencereden takip edilmesine olanak sağlanmıştır. İki indikatördeki farklı ölçek kullanımından ortaya çıkan ölçek sorunu MACD değerlerinin 1000 ile genişletilip, ürünün güncel fiyatına bölünmesiyle giderilmiştir. Her iki indikatiör için de orjinal Tradingview kodları kullanılmıştır.
Moving Average ExponentialThis indicator is based on the embedded Tradingview EMA script. The difference is having the capability of showing four different EMA in one single indicator. Due to being baseed on the oroiginal EMA script, user can modify the source and length of each EMA as s/he wish.
Bu indikatör gömülü Tradingview EMA scripti üzerinden oluşturulmuştur. Diğer indikatörlerden farklı olarak dört EMA değerini tek bir indikatörde gösterir ve kullanıcının her bir EMA değeri için uzunluk ve zaman değerlerini modifiye etmesi mümkündür.