Future Risk CalculatorCreated out of revenge against the difficulty of controlling psychology, greed, and risk management. Designed for cryptocurrency futures trading by following the risk management principles from Kevin Sailly. Very welcome if there are suggestions and input to improve the quality of this "indicator". Please use wisely.
How to use:
1. Open indicator settings.
2. Fill out all the forms. (Note: I make Max Loss Risk only has 5 options. Because, you know, to control the greed. You can choose by considering your risk profiles and market condition)
3. All of the information and calculation will appear on the label (right side of the bar chart) and top-right box.
4. You can adjust the three prices (target, entry, and stop) by clicking any part of the indicator. There will be three dots in the middle of the chart window (align with three prices). Click that dots and drag them up/down to customize according to your wishes. The price order must be correct, for LONG direction the price order from the top is target-entry-stop. Vice versa for SHORT direction. There will be "SETUP ERROR" text in the top-right box if the price order is not correct.
"Never, ever argue with your trading system." (by Michael Covel)
Regards,
Ircham
在腳本中搜尋"top"
Magnifying Glass (LTF Candles) by SiddWolf█ OVERVIEW
This indicator displays The Lower TimeFrame Candles in current chart, Like Zooming in on the Candle to see it's Lower TimeFrame Structure. It plots intrabar OHLC data inside a Label along with the volume structure of LTF candle in an eloquent format.
█ QUICK GUIDE
Just apply it to the chart, Hover the mouse on the Label and ta-da you have a Lower Timeframe OHLC candles on your screen. Move the indicator to the top and shrink it all the way up, because all the useful data is inside the label.
Inside the label: The OHLC ltf candles are pretty straightforward. Volume strength of ltf candles is shown at bottom and Volume Profile on the left. Read the Details below for more information.
In the settings, you will find the option to change the UI and can play around with Lower TimeFrame Settings.
█ DETAILS
First of all, I would like to thank the @TradingView team for providing the function to get access to the lower timeframe data. It is because of them that this magical indicator came into existence.
Magnifying Glass indicator displays a Candle's Lower TimeFrame data in Higher timeframe chart. It displays the LTF candles inside a label. It also shows the Volume structure of the lower timeframe candles. Range percentage shown at the bottom is the percentage change between high and low of the current timeframe candle. LTF candle's timeframe is also shown at the bottom on the label.
This indicator is gonna be most useful to the price action traders, which is like every profitable trader.
How this indicator works:
I didn't find any better way to display ltf candles other than labels. Labels are not build for such a complex behaviour, it's a workaround to display this important information.
It gets the lower timeframe information of the candle and uses emojis to display information. The area that is shown, is the range of the current timeframe candle. Range is a difference between high and low of the candle. Range percentage is also shown at the bottom in the label.
I've divided the range area into 20 parts because there are limitation to display data in the labels. Then the code checks out, in what area does the ltf candle body or wick lies, then displays the information using emojis.
The code uses matrix elements for each block and relies heavily on string manipulation. But what I've found most difficult, is managing to fit everything correctly and beautifully so that the view doesn't break.
Volume Structure:
Strength of the Lower TimeFrame Candles is shown at the bottom inside the label. The Higher Volume is shown with the dark shade color and Lower Volume is shown with the light shade. The volume of candles are also ranked, with 1 being the highest volume, so you can see which candle have the maximum to minimum volume. This is pretty important to make a price action analysis of the lower timeframe candles.
Inside the label on the left side you will see the volume profile. As the volume on the bottom shows the strength of each ltf candles, Volume profile on the left shows strength in a particular zone. The Darker the color, the higher the volume in the zone. The Highest volume on the left represents Point of Control (Volume Profile POC) of the candle.
Lower TimeFrame Settings:
There is a limitation for the lowest timeframe you can show for a chart, because there is only so much data you can fit inside a label. A label can show upto 20 blocks of emojis (candle blocks) per row. Magnifying Glass utilizes this behaviour of labels. 16 blocks are used to display ltf candles, 1 for volume profile and two for Open and Close Highlighter.
So for any chart timeframe, ltf candles can be 16th part of htf candle. So 4 hours chart can show as low as 15 minutes of ltf data. I didn't provide the open settings for changing the lower timeframe, as it would give errors in a lot of ways. You can change the timeframe for each chart time from the settings provided.
Limitations:
Like I mentioned earlier, this indicator is a workaround to display ltf candles inside a label. This indicator does not work well on smaller screens. So if you are not able to see the label, zoom out on your browser a bit. Move the indicator to either top or bottom of all indicators and shrink it's space because all details are inside the label.
█ How I use MAGNIFYING GLASS:
This indicator provides you an edge, on top of your existing trading strategy. How you use Magnifying Glass is entirely dependent on your strategy.
I use this indicator to get a broad picture, before getting into a trade. For example I see a Doji or Engulfing or any other famous candlestick pattern on important levels, I hover the mouse on Magnifying Glass, to look for the price action the ltf candles have been through, to make that pattern. I also use it with my "Wick Pressure" indicator, to check price action at wick zones. Whenever I see price touching important supply and demand zones, I check last few candles to read chart like a beautiful price action story.
Also volume is pretty important too. This is what makes Magnifying Glass even better than actual lower timeframe candles. The increasing volume along with up/down trend price shows upward/downward momentum. The sudden burst (peak) in the volume suggests volume climax.
Volume profile on the left can be interpreted as the strength/weakness zones inside a candle. The low volume in a price zone suggests weakness and High volume suggests strength. The Highest volume on the left act as POC for that candle.
Before making any trade, I read the structure of last three or four candles to get the complete price action picture.
█ Conclusion
Magnifying Glass is a well crafted indicator that can be used to track lower timeframe price action. This indicator gives you an edge with the Multi Timeframe Analysis, which I believe is the most important aspect of profitable trading.
~ @SiddWolf
[blackcat] L3 Xerxes ChannelsLevel 3
Background
The stock price channel theory is a widely used and mature theory in western securities analysis. In the 1970s, American Xerxes first established this theory.
Function
In fact, it is contained by the short-term small channel and runs up and down in the long-term large channel. The basic trading strategy is that when the short-term small channel approaches the long-term large channel, it indicates a recent reversal of the trend. The trend reverses downwards as the upper edge approaches, capturing short-term selling points. The trend reverses upward as the lower edge approaches, capturing short-term buying points. Studying this method can successfully escape from the top and catch the bottom in every wave of the market and seek the maximum profit.
The long-term major channel reflects the long-term trend state of the stock, the trend has a certain inertia, and the extension time is long, reflecting the large cycle of the stock, which can grasp the overall trend of the stock, and is suitable for medium and long-term investment;
The short-term small channel reflects the short-term trend status of the stock, accommodates the ups and downs of the stock, effectively filters out the frequent vibrations in the stock trend, but retains the up and down fluctuations of the stock price in the large channel, reflecting the small cycle of the stock, suitable for medium short-term speculation;
The long-term large channel is upward, that is, the general trend is upward. At this time, when the short-term small channel touches or is close to the bottom of the long-term large channel, it indicates that the stock price is oversold and there is a possibility of a rebound. The short-term small channel has touched the top of the long-term large channel, indicating that the stock price has been overbought, and there will be a correction or consolidation in the form, and there is a trend of approaching the long-term large channel. It is more effective if the K-line trend and the short-term small channel trend also match well;
The long-term big channel goes up, and the short-term small channel touches the top of the long-term big channel. At this time, the stock is in the stage of strong elongation. It can be appropriate to wait and see. When it turns flat in the short-term or turns its head down, it is a good delivery point, but it will penetrate If the area is a risk area, you should pay close attention to the reversal signal and ship at any time;
The long-term large channel is downward, that is, the general trend is downward. At this time, the short-term small channel or the stock price peaks and the selling pressure increases, and there is a downward trend again. The bottoming pattern means that the buying pressure is increasing, and there is a requirement for slow decline adjustment or stop decline, and the price movement will tend to be close to the upper edge of the long-term large channel. Callbacks should be treated with caution, and buy only after confirming the reversal signal;
The long-term large channel is down, while the short-term small channel penetrates the bottom line of the long-term large channel downward. At this time, it is mostly a slump process, and there is a rebound requirement, but the decline process will continue. It is not appropriate to open a position immediately. There is an upward trend, and when the short-term small channel turns back up and crosses back, it is a better opportunity to open a position at a low level;
When the long-term large channel is flat horizontally for a long time, it is to consolidate the market, and the price fluctuates up and down along the channel. At this time, it is the stage of adjustment, opening and washing, indicating the emergence of the next round of market. Short-term speculators can sell on highs and buy on lows. If the short-term small channel strongly crosses the long-term large channel, and the long-term large channel turns upward, it indicates that a strong upward trend has begun. If the short-term small channel penetrates down the long-term large channel, and the long-term large channel turns downward, it indicates that the decline will continue.
In a large balanced market, buy when the stock price hits the lower rail of the large channel at the bottom of the swing, and sell when the stock price hits the upper rail of the large channel at the peak of the swing.
Remarks
Feedbacks are appreciated.
(JS) Checklist SignalsWhat if I told you that you could use over 10 indicators at once without having a single one of them on you chart? Enter the Checklist Signals. This is probably the most complex yet simple indicator I've ever done.
What you get is 6 rows (if you want them all) of labels that hover at the top of your screen with a ton of extremely useful information. I will go down the list of options in the indicator settings and explain how it all works.
So the label placement is based on ATR. You choose your X Axis and Y Axis starting point then adjust the lookback period. Default lookback is 600 bars. What that means is, the indicator finds the highest high in the last 600 bars, then begins to place the labels above that zone based on the ATR of the chart. Different timeframes require very different combinations so it's all customizable. Sometimes if labels overlap you need to adjust the X Axis starting point, or the spread on either axis.
The next set of options allows you to decide what you'd prefer to be set on or off. Let's start with ATR and VWAP. I have added bands for both of these. When price is below the mean (which is the 21 ema by default), then the labels show you the next 5 standard deviations of ATR going down. When under one of these levels the label turns red. The opposite is true when above the mean and in those instances the labels will be green. It is the same with the VWAP, though instead of using the mean we use the daily VWAP as the starting point. If you choose to have levels switched on then you can see the actual values of each standard deviation level. Down lower in the options you can change the resolution and source used for VWAP.
The next option is "Trending". This creates a moving average using the length of the Trending Lookback Period (default is 5) and then tells you using arrows in the label which direction the trend of the indicator is going.
The next area let's you specify the information you receive in the Squeeze labels. By default all options are one - and this tells you if there's a Squeeze, what type of Squeeze there is, and how many bars the Squeeze has been building up or since it fired. These labels are color coded to correspond with the Squeeze type as well.
Then we get to another one of my indicators, the Ballista. One of the main signals is the "Inverted Squeeze" where the short term momentum inverts against the long term momentum. Here I have the distance between the two oscillators in the first label, and then the second label tells you if there's an Inverted Squeeze signal, if there's potential entry, confirmed entry, or how many bars its been since the last entry signal.
The next feature is off by default, but it will add arrows to your chart based on a simple lower highs and higher lows signals. Turning arrows on will place them right on your chart above or below each bar.
The rest of it is customizable settings of all the other indicators that are shown. Now looking at the labels themselves, starting in the top left corner:
First Row-
ADX + DMI: These labels show the ADX, DI+, & DI- values in each label. Whenever the DI+ or DI- is above the other then their respective label will light up. Also, when the ADX is above 20 (confirming the trend) it lights up in the same color as well.
Squeeze: I described how this worked above, the labels tell you if there's a Squeeze, how long there's been one, and how long since it fired, all while also changing to color of the associated Squeeze type.
Second Row -
Stacked EMAs: The top label looks at the EMA values using the numbers of the Fibonacci sequence. It looks at the EMA 8, 21, 34, 55, 89, & 233 and tells you if they're all stacked in the same direction (Stacked Bear meaning they're all crossed down in order, Stacked Bull meaning they're all crossed up in order). If the EMAs are all stacked but 1 or 2 it will say Stacked -1 or Stacked -2. When they're all over the place it will say they aren't stacked at all.
BB%: This tells you the value of the Bollinger Band %. If this is negative then you know that price is currently below the lower Bollinger Band, and if it is above 100% it is above the upper Bollinger Band.
RSI: This tells you the value of the RSI and the label changes colors based on the value.
Stoch: This tells you the Stochastic value and changes colors based on the value, same as the RSI.
Third Row -
The Mean: This tells you the numerical value of whatever you have the mean set as (21 ema by default). The label changes colors based on price being above or below the mean.
One ATR: This was something I added for those looking to plan their trades out. This tells you the value of one ATR so you can have a better idea of how to plan your trades based on this distance.
VIX: This tells you the current value of the VIX, and color changes based on being green or red on the day.
Ballista: I explained this above, it tells you the distance between the two oscillators and changes colors based on the trend being above or below 0. When there's an Inverted Squeeze this label is gray.
Inverted Squeeze: This label tells you if there's an inverted squeeze as well as if it is showing an entry or how many bars since the last entry signal. This label turns fuchsia on a bear signal and lime on a bull signal.
Fourth Row -
ATR Bands: As I explained above, this plots each standard deviation using ATR and changes colors based on price's relationship to each one.
Fifth Row -
VWAP: The three labels here show the daily, weekly, and monthly VWAP values, and color changes based on price's relationship to each one.
Sixth Row -
VWAP Bands: These are the standard deviation levels of the VWAP resolution of your choosing (as explained above), and just as the others, colors change based on price's relationship to each one.
I thought this was a really cool indicator that could be used for people like me who like knowing the right information, but HATE having their charts clustered with a ton of stuff. Hope you all like it, enjoy!
ENVELOPE RSI - Buy Sell SignalsThis indicator is mainly based on Overbought and Oversold . Indicator for short-term trading. This way you can get small but acceptable signals.
The main basis of the indicator is as follows:
To buy, the indicator is waiting for the instrument to be oversold from the RSI point of view. Then, if the chart crosses the bottom line of the Envelope indicator from the bottom to the top, a buy signal is issued.
For sell, the indicator waits for the instrument to be overbought from the RSI perspective. Then, if the chart crosses the top line of the Envelope indicator from top to bottom, a sell signal is issued.
The general basis is the consonance of the price and the RSI indicator .
The best settings I came up with myself:
Time frame: 15 minutes
Overbought: 80
Oversell: 25
RSI Length: 8
It can be done on different instruments. But always set your profit and loss limits.
(Profit to loss ratio in this indicator can be 1: 1.)
Disclaimer : This information and trading indicators and tools provided neither is, nor should be construed, as an offer, or a solicitation of an offer, to buy or sell securities. You shall be fully responsible for any investment decision you make, and such decisions will be based solely on your evaluation of your financial circumstances, investment objectives, risk tolerance, and liquidity needs.
I am not liable for any profit, financial improvement, losses or damages, monetary or other that may result from the application of information contained within this indicator. Individual traders must use their own due diligence in analyzing featured trading indicators, other trading tools, webinars and other educational materials to determine if they represent suitable and useable features and capabilities for the individual trader.
MTF Stochastic ScannerThis Stochastic scanner can be use to identify overbought and oversold of 10 symbols over multiple timeframes
it will give you a quick overview which pair is more overbough or more oversold and also signals tops and bottoms in the AVG row
light red/green cell = weak bearish (Stoch = 30-20) / bullish (Stoch = 70-80)
medium red/green cell = bearish (Stoch = 20-10) / bullish (Stoch = 80-90)
dark red/green cell = strong bearish (Stoch <= 10) / bullish (Stoch >= 90)
gray cell = neutral (Stoch = 30-70)
Usage
If AVG (average of all 4 timeframes) falls below 20, the cell will get green, indicating a good time to enter long (buy)
If AVG (average of all 4 timeframes) rises above 80, the cell will get red, indicating a good time to enter short (sell)
Use the "MTF Stochastic Scanner" in combination with the " MTF RSI Scanner "
to find tops (RSI MTF avg >=70 AND Stochastic MTF avg >= 80)
or bottoms (RSI MTF avg <= 30 AND Stochastic MTF avg <= 20)
Here is how the two MTF scanners looked on Nov 08 2021 (ATH) »
and here how the MTF scanners looked on June 21 2022
use TradingViews Replay function to check how it would have worked in the past and when not.
As always… there NOT a single indicator that can show to the top & bottom 100% every single time. So use with caution, with other indicators and/or deeper understanding of technicals analysis ☝️☝️☝️
Settings
You can change the timeframes, symbols, Stochastic settings, overbought/oversold levels and colors to your liking
Drag the table onto the price chart, if you want to use it as an overlay.
NOTE:
Because of the 4x10 security requests, it can take up to 1 minute for changed settings to take effect! Please be patient 🙃
If you have any idea on how to optimise the code, please feel free to share 🙏
*** Inspired by "Binance CHOP Dashboard" from @Cazimiro and "RSI MTF Table" from @mobester16 ***
MTF RSI ScannerThis RSI scanner can be use to identify the relative strength of 10 symbols over multiple timeframes
it will give you a quick overview which pair is more bearish or more bullish and also signals tops and bottoms in the AVG row
light red/green cell = weak bearish (RSI = 45-35) / bullish (RSI = 55-65)
medium red/green cell = bearish (RSI = 35-25) / bullish (RSI = 65-75)
dark red/green cell = strong bearish (RSI <= 25) / bullish (RSI >= 75)
gray cell = neutral (RSI= 45-55)
Usage
If AVG (average of all 4 timeframes) falls below 30, the cell will get green, indicating a good time to enter long (buy)
If AVG (average of all 4 timeframes) rises above 70, the cell will get red, indicating a good time to enter short (sell)
Use the "MTF RSI Scanner" in combination with the "MTF Stochastic Scanner"
to find tops (RSI MTF avg >=70 AND Stochastic MTF avg >= 80)
or bottoms (RSI MTF avg <= 30 AND Stochastic MTF avg <= 20)
Here is how the two MTF scanners looked on Nov 08 2021 (ATH) »
and here how the MTF scanners looked on June 21 2022
use TradingViews Replay function to check how it would have worked in the past and when not.
As always… there NOT a single indicator that can show to the top & bottom 100% every single time. So use with caution, with other indicators and/or deeper understanding of technicals analysis ☝️☝️☝️
Settings
You can change the timeframes, symbols, RSI settings, overbought/oversold levels and colors to your liking
Drag the table onto the price chart, if you want to use it as an overlay.
NOTE:
Because of the 4x10 security requests, it can take up to 1 minute for changed settings to take effect! Please be patient 🙃
If you have any idea on how to optimise the code, please feel free to share 🙏
*** Inspired by "Binance CHOP Dashboard" from @Cazimiro and "RSI MTF Table" from @mobester16 ***
jma + dwma macdThis MACD system was originally conceptualized by Jurik Research and made public to the world on their website .
The indicator consists of the faster Jurik Moving Average ( JMA ) and the slower Double Weighted Moving Average (DWMA). A long signal (green dot at the bottom) is shown when the JMA line crosses above the DWMA line (indicating a possible reversal in trend). A short signal (red dot at the top) is shown when the JMA line crosses below the DWMA line. Take profit signals (tan dot at the top/bottom) are shown when the JMA line reverses directions. Alerts for signals are included in this indicator.
The default settings are not optimized for any timeframe.
For an overlay version of this script, please see the following:
Credit to @everget for the re-creation of the Jurik Moving Average in pinescript.
Market Sector Scanner/Screener With MOM + RSI + MFI + DMI + MACDMARKET SECTOR SCANNER/SCREENER MOM + RSI + MFI + DMI + MACD FOR STOCKS CRYPTO & FOREX
This script scans 9 markets constantly and returns the values of 5 different popular indicators.
This indicator helps you see when one of your favorite stocks is bullish or bearish when you are not watching that chart so you can always catch the big moves as they happen.
***HOW TO USE***
A great way to use this market screener is to set up separate chart layouts for each sector you like to trade. Such as the top 9 stocks in the S & P 500, top 9 stocks in the XLF etf, etc. Make sure to set up separate chart layouts in Tradingview so you don’t have to change the symbols constantly. This will give you a good idea in real time if that entire sector is bullish, bearish or mixed. When the entire grid goes red or green, those are very strong signs of market direction across that entire sector, so trades in the corresponding direction are quite safe.
This can be done for crypto as well, using the top 9 cryptocurrencies by market cap. Watch the grid and wait for the entire lot to turn green or red and then take a position in that direction.
You can also use this with a variety of your favorite tickers so you can see when specific markets are looking strong in either direction, instead of constantly changing charts or missing good opportunities because you weren’t watching that specific chart.
This grid can also be used to determine how long to hold a position as well. If the entire grid is still green or red, according to your trade direction, you can usually expect price to continue in that direction until you see some conflicting colors start to pop up on the grid. As it starts to give mixed signals, you can expect the market to be indecisive or reverse which is a good time to get out.
If you have your scanner setup to show similar markets in one sector, be careful taking trades when the grid is very mixed in color. This shows signs of indecision and will likely have choppy price action until the market decides a direction so make sure to use caution when the grid is mixed. It is best to wait for the entire grid to turn green or red and then take position.
***COLOR MEANINGS***
When each indicator value is in bullish territory, the background of that value will turn green.
When each indicator value is in bearish territory, the background of that value will turn red.
When each indicator value is in neutral territory, the background of that value will turn blue.
When all 5 indicators for a ticker are bullish, the ticker background will turn green.
When all 5 indicators for a ticker are bearish, the ticker background will turn red.
When there is a mixture of bullish and bearish values, the ticker background will turn blue.
***CUSTOMIZATION***
You can customize which tickers are in your scanner including stocks, crypto, futures and forex, the source of the indicators, the length of the indicator settings and the smoothing parameters.
***INDICATORS USED***
The indicators used for each ticker are as follows:
Momentum(MOM) - Default length is 14. Bullish is above zero, bearish is below zero.
Relative Strength Index(RSI) - Default length is 14. Bullish is above 50, bearish is below 50.
Money Flow Index(MFI) - Default length is 14. Bullish is above 50, bearish is below 50.
Directional Movement Index(DMI) - Default length is 14 and smoothing is 14. Calculated by subtracting di minus from di plus. If the value is positive, it is bullish. If the value is negative, it is bearish.
Moving Average Convergence & Divergence(MACD) - Default settings are 12, 26, 9. If the short line is greater than the long line, then it is bullish. If the short line is less than the long line, it is bearish.
***MARKETS***
This market scanner can be used as a signal on all markets, including stocks, crypto, futures and forex.
***TIMEFRAMES***
This scanner can be used on all timeframes and pulls data from other tickers using the same timeframe as what your current chart is set to.
***TIPS***
Try using numerous indicators of ours on your chart so you can instantly see the bullish or bearish trend of multiple indicators in real time without having to analyze the data. Some of our favorites are Trend Friend Scalp & Swing Signals, Auto Fibonacci, Directional Movement Index, Volume Profile With Buy/Sell Pressure, Auto Support And Resistance and Money Flow Index in combination with this Scanner. They all have real time Bullish and Bearish labels as well so you can immediately understand each indicator's trend.
Library CommonLibrary "LibraryCommon"
A collection of custom tools & utility functions commonly used with my scripts
@description TODO: add library description here
getDecimals() Calculates how many decimals are on the quote price of the current market
Returns: The current decimal places on the market quote price
truncate(float, float) Truncates (cuts) excess decimal places
Parameters:
float : number The number to truncate
float : decimalPlaces (default=2) The number of decimal places to truncate to
Returns: The given number truncated to the given decimalPlaces
toWhole(float) Converts pips into whole numbers
Parameters:
float : number The pip number to convert into a whole number
Returns: The converted number
toPips(float) Converts whole numbers back into pips
Parameters:
float : number The whole number to convert into pips
Returns: The converted number
getPctChange(float, float, int) Gets the percentage change between 2 float values over a given lookback period
Parameters:
float : value1 The first value to reference
float : value2 The second value to reference
int : lookback The lookback period to analyze
av_getPositionSize(float, float, float, float) Calculates OANDA forex position size for AutoView based on the given parameters
Parameters:
float : balance The account balance to use
float : risk The risk percentage amount (as a whole number - eg. 1 = 1% risk)
float : stopPoints The stop loss distance in POINTS (not pips)
float : conversionRate The conversion rate of our account balance currency
Returns: The calculated position size (in units - only compatible with OANDA)
bullFib(priceLow, priceHigh, fibRatio) Calculates a bullish fibonacci value
Parameters:
priceLow : The lowest price point
priceHigh : The highest price point
fibRatio : The fibonacci % ratio to calculate
Returns: The fibonacci value of the given ratio between the two price points
bearFib(priceLow, priceHigh, fibRatio) Calculates a bearish fibonacci value
Parameters:
priceLow : The lowest price point
priceHigh : The highest price point
fibRatio : The fibonacci % ratio to calculate
Returns: The fibonacci value of the given ratio between the two price points
getMA(int, string) Gets a Moving Average based on type (MUST BE CALLED ON EVERY CALCULATION)
Parameters:
int : length The MA period
string : maType The type of MA
Returns: A moving average with the given parameters
getEAP(float) Performs EAP stop loss size calculation (eg. ATR >= 20.0 and ATR < 30, returns 20)
Parameters:
float : atr The given ATR to base the EAP SL calculation on
Returns: The EAP SL converted ATR size
getEAP2(float) Performs secondary EAP stop loss size calculation (eg. ATR < 40, add 5 pips, ATR between 40-50, add 10 pips etc)
Parameters:
float : atr The given ATR to base the EAP SL calculation on
Returns: The EAP SL converted ATR size
barsAboveMA(int, float) Counts how many candles are above the MA
Parameters:
int : lookback The lookback period to look back over
float : ma The moving average to check
Returns: The bar count of how many recent bars are above the MA
barsBelowMA(int, float) Counts how many candles are below the MA
Parameters:
int : lookback The lookback period to look back over
float : ma The moving average to reference
Returns: The bar count of how many recent bars are below the EMA
barsCrossedMA(int, float) Counts how many times the EMA was crossed recently
Parameters:
int : lookback The lookback period to look back over
float : ma The moving average to reference
Returns: The bar count of how many times price recently crossed the EMA
getPullbackBarCount(int, int) Counts how many green & red bars have printed recently (ie. pullback count)
Parameters:
int : lookback The lookback period to look back over
int : direction The color of the bar to count (1 = Green, -1 = Red)
Returns: The bar count of how many candles have retraced over the given lookback & direction
getBodySize() Gets the current candle's body size (in POINTS, divide by 10 to get pips)
Returns: The current candle's body size in POINTS
getTopWickSize() Gets the current candle's top wick size (in POINTS, divide by 10 to get pips)
Returns: The current candle's top wick size in POINTS
getBottomWickSize() Gets the current candle's bottom wick size (in POINTS, divide by 10 to get pips)
Returns: The current candle's bottom wick size in POINTS
getBodyPercent() Gets the current candle's body size as a percentage of its entire size including its wicks
Returns: The current candle's body size percentage
isHammer(float, bool) Checks if the current bar is a hammer candle based on the given parameters
Parameters:
float : fib (default=0.382) The fib to base candle body on
bool : colorMatch (default=false) Does the candle need to be green? (true/false)
Returns: A boolean - true if the current bar matches the requirements of a hammer candle
isStar(float, bool) Checks if the current bar is a shooting star candle based on the given parameters
Parameters:
float : fib (default=0.382) The fib to base candle body on
bool : colorMatch (default=false) Does the candle need to be red? (true/false)
Returns: A boolean - true if the current bar matches the requirements of a shooting star candle
isDoji(float, bool) Checks if the current bar is a doji candle based on the given parameters
Parameters:
float : wickSize (default=2) The maximum top wick size compared to the bottom (and vice versa)
bool : bodySize (default=0.05) The maximum body size as a percentage compared to the entire candle size
Returns: A boolean - true if the current bar matches the requirements of a doji candle
isBullishEC(float, float, bool) Checks if the current bar is a bullish engulfing candle
Parameters:
float : allowance (default=0) How many POINTS to allow the open to be off by (useful for markets with micro gaps)
float : rejectionWickSize (default=disabled) The maximum rejection wick size compared to the body as a percentage
bool : engulfWick (default=false) Does the engulfing candle require the wick to be engulfed as well?
Returns: A boolean - true if the current bar matches the requirements of a bullish engulfing candle
isBearishEC(float, float, bool) Checks if the current bar is a bearish engulfing candle
Parameters:
float : allowance (default=0) How many POINTS to allow the open to be off by (useful for markets with micro gaps)
float : rejectionWickSize (default=disabled) The maximum rejection wick size compared to the body as a percentage
bool : engulfWick (default=false) Does the engulfing candle require the wick to be engulfed as well?
Returns: A boolean - true if the current bar matches the requirements of a bearish engulfing candle
isInsideBar() Detects inside bars
Returns: Returns true if the current bar is an inside bar
isOutsideBar() Detects outside bars
Returns: Returns true if the current bar is an outside bar
barInSession(string, bool) Determines if the current price bar falls inside the specified session
Parameters:
string : sess The session to check
bool : useFilter (default=true) Whether or not to actually use this filter
Returns: A boolean - true if the current bar falls within the given time session
barOutSession(string, bool) Determines if the current price bar falls outside the specified session
Parameters:
string : sess The session to check
bool : useFilter (default=true) Whether or not to actually use this filter
Returns: A boolean - true if the current bar falls outside the given time session
dateFilter(int, int) Determines if this bar's time falls within date filter range
Parameters:
int : startTime The UNIX date timestamp to begin searching from
int : endTime the UNIX date timestamp to stop searching from
Returns: A boolean - true if the current bar falls within the given dates
dayFilter(bool, bool, bool, bool, bool, bool, bool) Checks if the current bar's day is in the list of given days to analyze
Parameters:
bool : monday Should the script analyze this day? (true/false)
bool : tuesday Should the script analyze this day? (true/false)
bool : wednesday Should the script analyze this day? (true/false)
bool : thursday Should the script analyze this day? (true/false)
bool : friday Should the script analyze this day? (true/false)
bool : saturday Should the script analyze this day? (true/false)
bool : sunday Should the script analyze this day? (true/false)
Returns: A boolean - true if the current bar's day is one of the given days
atrFilter()
fillCell()
Money Flow Index With Bullish & Bearish SignalsMONEY FLOW INDEX WITH BULLISH AND BEARISH SIGNALS
Money Flow Index shows whether money is coming into the market or going out of the market. This can be used to gauge market sentiment and whether people are buying or selling at the current price.
***HOW TO USE***
If the MFI line is green, it is above the 50 line and in a bullish trend.
If the MFI line is red, it is below the 50 line and in a bearish trend.
If the background color is green, Money Flow is in a bullish trend, holding above the 50 line.
If the background color is red, Money Flow is in a bearish trend, holding below the 50 line.
If the MFI is above the 75 level it indicates a possible top or overbought conditions.
If the MFI is below the 25 level it indicates a possible bottom or oversold conditions.
***BULLISH/BEARISH LABELS***
There is also a label on the right side that tells you whether the overall trend is bullish or bearish, if there is a possible bottom or top and if the current money flow index is going up or down. This table updates in real time and changes colors so you can get an easy, quick interpretation of the current money flow without having to look at the data so you can make faster decisions on whether to enter or exit a trade. The flashing from red to green or the opposite also grabs your attention so you know immediately if there is a change in trend. The table changes colors in sync with the MFI line and it's trends and bottom/top areas. Green means money is coming in. Red means money is going out. Blue means a neutral amount of money flow.
***MARKETS***
This indicator can be used as a signal on all markets, including stocks, crypto, futures and forex.
***TIMEFRAMES***
This Money Flow Index indicator can be used on all timeframes.
***TIPS***
Try using numerous indicators of ours on your chart so you can instantly see the bullish or bearish trend of multiple indicators in real time without having to analyze the data. Some of our favorites are our Auto Fibonacci, DMI, Momentum, Auto Support And Resistance and Volume Profile in combination with this Money Flow Index. They all have real time Bullish and Bearish labels as well so you can immediately understand each indicator's trend.
Measure Volume, Momentum, Trend, VolatilityThis script displays the following indicators in one pane to quickly determine several important factors regarding price action. It allows the user to quickly see all of most important factors surrounding price action in one pane with one quick glance. This should be incredibly helpful and allow things like double divergence and trend confirmation to be spotted much more quickly. I personally use the data in this indicator to replace four separate indicators and it has brought my win rate and profit factor significantly higher. I hadn't seen any place where all of the best J. Welles Wilder indicators such as RSI, Parabolic SAR, and DMI/ADX were brought into one easy to use interface. This is my attempt at fixing that gap. For a much deeper understanding of how to use these indicators, I recommend reading New Concepts in Technical Trading Systems written by J. Welles Wilder.
Momentum via RSI (Relative Strength Index)
Volume via MFI (Money Flow Index)
Volatility via DMI/ADX (Direction Movement Index/Average Directional Index)
Trend via Parabolic SAR (Parabolic Stop and Reverse)
It is worth noting that DMI/ADX and Parabolic SAR can both help determine trend strength and volatility.
The Volatility mechanism is measured by DMI and ADX and displayed at the top of the pane using circles. The top, tiny circles reflect if show if positive DI or negative DI has a higher value. The small circles directly underneath indicate whether or not the ADX is above 20 (configurable, some may choose to increase this to 25 or even 30).
The Momentum mechanism is shown as standard RSI with the default being a white line and default period of 14, which is all configurable.
The Volume mechanism is shown as standard MFI with the default being a fuchsia line and default period of 14, which is also configurable.
The momentum and volume oscillators should be used in conjunction to help spot whether the trend is strong or weak using divergences and the middle, overbought, and oversold levels. These levels are also configurable.
The Trend mechanism is measured by Parabolic SAR and displayed at the bottom of the pane using diamonds. The default is red diamonds when in a bear trend, green when in an uptrend which is configurable. When price is above the Parabolic SAR, it is considered to be an uptrend. When price is below the Parabolic SAR, it is considered to be a downtrend. The way price is measured is also configurable (i.e. open, close, ohlc4, hlc3, etc.). When price crossed above or below the Parabolic SAR, the diamonds will change colors.
All the indicators displayed should be used in a well rounded strategy. For instance, I only trade when ADX is above 20 and rarely trade against the trend shown via PSAR. When trend shifts and divergences helped indicate a trend shift would occur using the RSI and MFI, it can be a great spot to take an entry. RSI/MFI can also confirm the trend is strong when they are not showing divergences and inline with price action. All of this data should be used in conjunction with good fundamental data and technical levels. Divergences with RSI and MFI on double tops or bottoms can also be incredibly powerful. There is no right or wrong way to use all the data displayed in this indicator, however using all four pillars of trading (Momentum, Volume, Trend, Volatility) will help ensure only the best trades are taken.
MACRO BTC HEALTH 1WThis indicator is used as MACRO tool to view the outlook of BTC on the 1W time frame to illustrate (BLX chart works best)
BTC's price action and where it's at, it helps provide an indication of the crypto market's current health as BTC health is an overall indicator in the crypto market as a whole.
This indicator uses historic data to fit between 4 bands fitted to MA, top(red) when BTC is overheated, 2 bands in middle(yellow) when BTC in fair value, and bottom band(blue) when BTC is oversold
I combined MA that fit BTC 1W chart precisely to show when BTC looks overheated vs over sold using historic data.
When BTC is in the top bands historically overheated.
When BTC is in the middle it is fighting at fair value with the 2 yellow lines in the middle, bullish when above yellow lines, as they act as support, and in downtrend when price is below yellow lines and can act as resistance.
Historically the 200W MA is where BTC finds support at an oversold level at the bottom blue line.
When two yellow lines in middle cross downwards historically results in a downtrend to the bottom oversold line (blue). and when two yellow lines cross up and BTC holds them as support bullish trend continues until it is overheated passed the red band.
This indicator is not meant for day trading but is meant to illustrate a MACRO view of BTC current situation from a zoomed-out view, and to help illustrate to investors where things are at so they leave emotions out of the market and can make decisions based on BTC current levels using Historic data. Pro tip use bottom line(blue, oversold) as an opportunity to buy in and top line red(overheated) to scale out of positions, LONG TERM CRYPTO IS BULLISH BUT GREAT TO GET AN OUTLOOK OF THE CURRENT STATE OF BTC, WHILE ALSO USING MACRO ECONOMIC SENTIMENT IRL, FUNDAMENTAL ECONOMIC DECISIONS, ECONOMIC CONDITIONS/ENVIRONMENT, ECONOMIC HEALTH ,FED DECISIONS, INTEREST RATE ENVIRONMENT AND OF COURSE LOOKING AT CRYPTO ADOPTION.
Hope this indicator helps leave emotions out of the market by providing a good guide of BTC sentiment, and its current health to make decisions accordingly. NFA but good to envision the MACRO BTC HEALTH at the 1W timeframe.
Exponentially Deviating Moving Average (MZ EDMA)Exponentially Deviating Moving Average (MZ EDMA) is derived from Exponential Moving Average to predict better exit in top reversal case.
EDMA Philosophy
EDMA is calculated in following steps:
In first step, Exponentially expanding moving line is calculated with same code as of EMA but with different smoothness (1 instead of 2).
In 2nd step, Exponentially contracting moving line is calculated using 1st calculated line as source input and also using same code as of EMA but with different smoothness (1 instead of 2).
In 3rd step, Hull Moving Average with 3/2 of EDMA length is calculated using final line as source input. This final HMA will be equal to Exponentially Deviating Moving Average.
EDMA Advantages
EDMA's main advantage is that in case of top price reversal it deviates from conventional EMA of 2*Length. This benefits in using EDMA for EMA cross with quick signals avoiding unnecessary crossovers. EDMA's deviation in case of top reversal can be seen as below:
EDMA presents better smoothened curve which acts as better Support and resistance. EDMA coparison with conventional EMA of 2*length of EDMA is as follows.
Additional Features
EMA Band: EMA band is shown on chart to better visualize EMA cross with EDMA.
Dynamic Coloring: Chikou Filter library is used for derivation of dynamic coloring of EDMA and its band.
Alerts: Alerts are provided of all trade signals. Weak buy/sell would trigger if EMA of 2*EDMA_length crosses EDMA. Strong buy/sell would trigger if EMA of same length as of EDMA crosses EDMA.
Trade Confirmation with Chikou Filter: Trend filteration from Chikou filter library is used as an option to enhance trades signals accuracy.
Defaults
Currently default EDMA and EMA1 length is set to 20 period which I've found better for higher timeframes but this can be adjusted according to user's timeframe. I would soon add Multi Timeframe option in script too. Chikou filter's period is set to 25.
Stock Value - How Much Stock Should Worth?Stock Value
© danny_peanuts
There are many method of measuring value of stock. However I'm proposing most basic stock valuation based on Book Value, Earnings, Dividends and Money Supply:
SV = (BVPS + EPS + DPS) * (M2/M0)
BVPS = Book Value Per Share (Asset - Liability)
EPS = Earnings Per Share
DPS = Dividends Per Share
M2 = M2 Money Supply (Money Market)
M0 = M0 Money Supply (Base Money)
Fundamental value of a stock should be determine by it's BV which means total asset of a company if were liquidated today and use some of it's asset to pay of the debt. So technically BVPS is the intrinsic value of a stock. However the company is generating an earning which is profit and loss that should be added on top of the fundamental value of company, so thus EPS should be added on top of Book Value Per Share. Aside from earnings, the stock that you purchase give you dividends as your return so DPS also can be included on top of that. So all in all BVPS, EPS and DPS are the primary valuation of the stock. However most of the stock are traded way higher than their fundamental valuation. The main reason of this is the market dynamics which is driven by central banks printing of base money supply M0. The banking credit system then lend out this money to money markets as loan so that peoples can invest and by the company stock. This money supply extension of credit is known as money market M2 which drive the stock inflated price. The ratio between M2 and M0 are the money multiplier effect that drives the stock price higher than it's valuation. So the Stock Value should be the total number of BVPS + EPS + DPS times the M2 money multiplier as shown by this indicator.
If the stock are traded above their SV value, that means it's an overpriced bubble
If the stock are traded below their SV value, that means it's an underpriced burst
[blackcat] L2 Reversal Labels StrategyLevel: 2
Background
There is a Chinese proverb that says: "The great way leads to simplicity". This indicator is the representative of this meaning. Through the processing of the most common MACD indicator data, it is possible to quickly determine the market price: whether the current price is at a historical high or low, whether a reversal will happen soon, etc. at a glance.
Function
This is the strategy version of the same indicator which performs screening and filtering through the fast and slow line data corresponding to the output of the standard MACD indicator, so as to realize the function of judging the top and bottom of the trend.
Inputs
N/A
Key Signal
Near Top --> Top is reached and reversal may happen soon. (red labels)
Near Bottom --> Bottom is reached and reversal may happen soon. (green labels)
Remarks
The backtest result is picked up and optimized for BTCUSD '2D' time frame, it does not work constantly well for any time frame. You need to combine other indicators for other trading pair and time frame.
You can add alerts for this version.
This is a Level 2 free and open source indicator.
Feedbacks are appreciated.
Abz BTC InvestorInvestor indicator:
This indicator is intended to be used on a chart showing Bitcoin's historical price action. By viewing years of Bitcoin's history, it's possible to better see Bitcoin's current price within a long term context of the price rage.
Purpose and possible usage:
I built the indicator to make it easier for me and for friends and family to make better informed decisions about our Bitcoin investments. The indicator shows the historic range of the asset and indicates where Bitcoin is oversold (below the bottom line) and overbought (above the top purple line):
- Above the top purple line, I'll look to take some profits or consider hedging to protect my long term position's growth
- Below the bottom purple line, I'll look to dollar cost average into a long term position
I think the idea for this came from idea listening to the YouTuber Birb talking about how well Bitcoin tracked between the 200 day moving average (bottom navy moving average) and 5x that value (top moving average).
Hope you find it useful.
Best wishes,
Abzorba
CHOPORSI
CHOPORSI is a multiindicator.
This indicator help You to recognize potential in or out singal.
Base singals are from Choppines, RSI, AND DMI indicators.
It is a combination of 3 separate indicators like choppines RSI and DMI.
Then our new indicator see like bellow on next image.
Yellow line is sum of CHOP index and RSI , in this case we can say its a CHOPORSI Index.
Green line is DMI- line , this show us strength of sell position on the market.
We schould use other signals, like LSMA 50/100 to improve trend changing. Like on next picture.
Now how this indicator works?
Yellow line is the sum oF Chop and RSI value - 50.
Max and minimum value of CHOP and RSI are the same from 0 to 100.
We have sum of them.
Our minimum signal is 0+0-50=-50
maximum signal is 100+100-50= 150
Most times if both of tem are on top level ( then we have 150) the trend is chanhing from bullish to bearish.
The same way if the RSI ist on 0 and chop is over 50 ( then we have index 0 ) wee changing the tren from bearish to bullish.
Off course it not every time. We see other signals, to take our risk self not sugested by some art of indicators.
But if we are abowe topline, witch is set to 85 we can sey, we have have oversold signal.
Underline 30 isour potentialy buy signal.
Midrange 50 is mostly trand changin line.
This valu of top, mid bottom line you can change on the setting.
Every Coin have another level of this lines, and need to be checked individual to the coin.
Standard, settings are set fo timeframe : 12 min. 24 min, 1H and 4 H >
Blue crosses signalize possibilities trend changing.
This picture shou us how this indicator works.
Buy long signal : If yellow line is mostly at the bottom and green mostly on the top.
Sell long signal l. Yellow -top , green -bottom.
The Green line is from Directional Movement Index and is - DI line. Its show us selling trend. even higher position then mor sell of .
Standard value of CHOPPINES is 14 , works fin on 1H and abowe also wit the value of 28
Standard value for RSI AND -DI unchanging 14.
I tjink this is a simplu helpfull indycator.
WARNING!!! IF YOU AT THIS POINT CANT UNDERSUD THIS INDICATOR, PLEASE DONT USE THEM .
Signal, schould be confirmed with other indicators like MA, EMA even better with LSMA .
Please try it an make only paper trading, to undertand how its realy works.
Thank You!
Goethe B - Mutiple Leading Indicator PackageGoethe B is an Indicator Package that contains multiple leading and lagging indicators.
The background is that shows the local trend is calculated by either two Moving Averages or by a Kumo Cloud. By default the Kumo Cloud calculation is used.
What is the main oscillator?
- The main oscillator is TSV, or time segmented volume. It is one of the more interesting leading indicators.
What is the top bar?
-The top bar shows a trend confirmation based on the wolfpack ID indicator.
What are those circles on the second top bar?
-Those are Divergences of an internally calculated PVT oscillator. Red for Regular-Bearish, Green for Regular-Bullish.
What are those circles on the main oscillator?
-These are Divergences. Red for Regular-Bearish. Orange for Hidden-Bearish. Green for Regular-Bullish. Aqua for Hidden-Bullish.
What are those circles on the second lower bar?
-Those are Divergences of an internally calculated CCI indicator. Red for Regular-Bearish, Green for Regular-Bullish.
What is the lower bar?
-The lower bar shows a trend confirmation based on the Acceleration Oscillator, in best case it showes how far in the trend the current price action is.
What are those orange or aqua squares?
- These are TSI (true strength indicator) entry signals . They are calculated by the TSI entry signal, the TSI oscillator threshold.
Most settings of the indicator package can be modified to your liking and based on your chosen strategy might have to be modified. 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.
Logger Library For Pinescript (Logging and Debugging)Library "LoggerLib"
This is a logging library for Pinescript. It is aimed to help developers testing and debugging scripts with a simple to use logger function.
Pinescript lacks a native logging implementation. This library would be helpful to mitigate this insufficiency.
This library uses table to print outputs into its view. It is simple, customizable and robust.
You can start using it's .log() method just like any other logging method in other languages.
//////////////////
USAGE
//////////////////
-- Recommended: Please Read The Documentation From Source Code Below. It Is Much More Readable There And Will Be Updated Along With Newer Versions. --
Importing the Library
---------------------
import paragjyoti2012/LoggerLib/ as Logger
.init() : Initializes the library and returns the logger pointer. (Later will be used as a function parameter)
.initTable: Initializes the Table View for the Logger and returns the table id. (Later will be used as a function parameter)
parameters:
logger: The logger pointer got from .init()
max_rows_count: Number of Rows to display in the Logger Table (default is 10)
offset: The offset value for the rows (Used for scrolling the view)
position: Position of the Table View
Values could be:
left
right
top-right
(default is left)
size: Font Size of content
Values could be:
small
normal
large
(default is small)
hide_date: Whether to hide the Date/Time column in the Logger (default is false)
returns: Table
example usage of .initTable()
import paragjyoti2012/LoggerLib/1 as Logger
var logger=Logger.init()
var logTable=Logger.initTable(logger, max_rows_count=20, offset=0, position="top-right")
-------------------
LOGGING
-------------------
.log() : Logging Method
params: (string message, |string| logger, table table_id, string type="message")
logger: pass the logger pointer from .init()
table_id: pass the table pointer from .initTable()
message: The message to log
type: Type of the log message
Values could be:
message
warning
error
info
success
(default is message)
returns: void
///////////////////////////////////////
Full Boilerplate For Using In Indicator
///////////////////////////////////////
P.S: Change the | (pipe) character into square brackets while using in script (or copy it from the source code instead)
offset=input.int(0,"Offset",minval=0)
size=input.string("small","Font Size",options=|"normal","small","large"|)
rows=input.int(15,"No Of Rows")
position=input.string("left","Position",options=|"left","right","top-right"|)
hide_date=input.bool(false,"Hide Time")
import paragjyoti2012/LoggerLib/1 as Logger
var logger=Logger.init()
var logTable=Logger.initTable(logger,rows,offset,position,size,hide_date)
rsi=ta.rsi(close,14)
|macd,signal,hist|=ta.macd(close,12,26,9)
if(ta.crossunder(close,34000))
Logger.log("Dropped Below 34000",logger,logTable,"warning")
if(ta.crossunder(close,35000))
Logger.log("Dropped Below 35000",logger,logTable)
if(ta.crossover(close,38000))
Logger.log("Crossed 38000",logger,logTable,"info")
if(ta.crossunder(rsi,20))
Logger.log("RSI Below 20",logger,logTable,"error")
if(ta.crossover(macd,signal))
Logger.log("Macd Crossed Over Signal",logger,logTable)
if(ta.crossover(rsi,80))
Logger.log("RSI Above 80",logger,logTable,"success")
////////////////////////////
// For Scrolling the Table View
////////////////////////////
There is a subtle way of achieving nice scrolling behaviour for the Table view. Open the input properties panel for the table/indicator. Focus on the input field for "Offset", once it's focused, you could use your mouse scroll wheel to increment/decrement the offset values; It will smoothly scroll the Logger Table Rows as well.
/////////////////////
For any assistance using this library or reporting issues, please write in the comment section below.
I will try my best to guide you and update the library. Thanks :)
/////////////////////
[blackcat] L2 Reversal LabelsLevel: 2
Background
There is a Chinese proverb that says: "The great way leads to simplicity". This indicator is the representative of this meaning. Through the processing of the most common MACD indicator data, it is possible to quickly determine the market price: whether the current price is at a historical high or low, whether a reversal will happen soon, etc. at a glance.
Function
This indicator performs screening and filtering through the fast and slow line data corresponding to the output of the standard MACD indicator, so as to realize the function of judging the top and bottom of the trend.
Inputs
N/A
Key Signal
Near Top --> Top is reached and reversal may happen soon. (red labels)
Near Bottom --> Bottom is reached and reversal may happen soon. (green labels)
Remarks
This is a Level 2 free and open source indicator.
Feedbacks are appreciated.
Vertical LinesThis script plots vertical lines on charts or indicators. Unfortunately pinescript is lacking a vertical line plotting function. Vertical lines are useful to mark events, such as crossover of levels, indicators signals or as a time marker.
After searching the internet for a long time and trying different scripts, this script is the simplest and visually the best. You would think that plotting a vertical line would be relatively easy, it is not! I thank the unknow author for sharing this solution and now I will share it on tradingview to make it readily available to anybody that needs it.
RSI crossover signals are used as an example in this script. When the RSI crosses over 70 or below 30, the script plots a red or green vertical line.
The script plots a vertical line as a histogram bar. The histogram bar must have a height.
Setting the height near infinity like 1e20 will cover all the ranges from top to bottom in most charts, but doesn't work all the time. If the chart range is small in values, the line is not plotted or the chart is visually compressed because the top of the bar is also a data point in the chart. Another solution is to find the highest point in the chart and multiply it by a number from 2 to 10 to set the top of the histogram bar. But this solution doesn't work if the line is drawn in the indicator window. additionally if the chart or indicator includes negative values, a histogram bar with a negative height must be concatenated to the histogram bar with a positive height to cover the positive and negative range.
It would seem intuitive to include a vertical plot function since it is very useful and pinescript already has a horizontal line plot function called Hline. But pinescript is becoming less intuitive, and redundant. A case in point is Version 4 variable declaration and naming, it less intuitive and more redundant than previous versions. I beg Tradingview to adopt a more refined scripting language such as Matlab or Python for charting purposes. These languages can be easily ported to other analysis programs for AI or statistical analysis.
Wick Bodies [vnhilton]I noticed that changing the colour of the wicks through TradingView settings changes the colours of both the top and bottom wicks. I also noticed that the thickness of wicks couldn't be changed either so they remained very hard to see when zoomed out of charts. Wicks have the potential to show zones where price rejects from - this is useful for identifying potential support and resistance zones.
I created an alternative solution to this problem by creating bodies for the wicks. It's recommended that you hide the wicks so it shows candles as bars split into 3 segments (top segment representing top wick; middle segment representing candle; bottom segment representing bottom wick). Colours are customizable. Also includes borders for the wick bodies.