XLY/XLP RatioThe XLY/XLP ratio is a financial indicator that measures the ratio between the two ETFs (Exchange Traded Funds) Consumer Discretionary Select Sector SPDR Fund (XLY) and Consumer Staples Select Sector SPDR Fund (XLP). This ratio is often used by traders and investors as a measure of the relative success of companies in the consumer goods and consumer services sectors.
A higher XLY/XLP ratio indicates that consumer confidence is higher and people are more willing to spend their money on non-essential items, such as entertainment or luxury goods (discretionary spending). A lower XLY/XLP ratio, on the other hand, indicates that consumer confidence is lower and people are more willing to spend their money on essential items like food and household items (staple spending).
The interpretation of the XLY/XLP ratio depends on the current market situation and the analysis of the economic and political factors that may influence consumption. If the XLY/XLP ratio rises, it could be an indication of a growing economy and increasing consumer sentiment. However, if it falls, it could be an indication of a weakening economy or declining consumer confidence.
It is important to note that the XLY/XLP indicator should not be used as the sole indicator to make trading decisions. It is advisable to also consider other indicators, such as technical and fundamental analysis, before making a decision.
Educational
9:15 AM middle price #rangeofstinoThis indicator will show the middle price of the first one-minute candle of BankNifty at 9:15 AM for every day.
Vertical Lines 2A vertical line plotting function is missing in Pinescript. This is another method to plot vertical line on a chart, and an improvement on my previous script "vertical lines" .
The script hacks the plotcandle function to display just the wicks without the body. This hack simulates a vertical line. The body of the candle is non-existing since the open and close are the same and its color is set to null. The wicks are abutting resulting in a continuous vertical line.
Drawbacks include inability to set width and transparency of the lines. The plotcandle function does not allow setting the width and transparency of the wicks. This feature would be desirable.
The crossing of the RSI of overbought and undersold zones is used as an example in this published script. Any indicator can be used and this script can be executed on any other indicator by using "add indicator" on the desired indicator, and selecting the indicator as the source. I added crossover lines on the plotted RSI as an example.
//////////////////////////////////////////////////////Breakdown of the script////////////////////////////////////////////////////////
The src input determines which price data is used for the highest value calculation. By default, it is set to the close price.
The length input determines the length of the RSI calculation. By default, it is set to 14.
The mult input determines the multiplier of the highest value that is used to determine the height of the vertical lines. By default, it is set to 100%, meaning the lines will reach the highest value in the dataset.
The top and bot inputs determine the overbought and oversold levels for the RSI. By default, they are set to 70 and 30, respectively.
The current_rsi and previous_rsi variables calculate the RSI values for the current bar and the previous bar, respectively.
The hi_value variable finds the highest value in the dataset, and the hi variable calculates the height of the vertical lines based on the highest value and the user-defined multiplier. The lo variable calculates the distance between the highest value and the current price data.
The uph, dnh, upl, and dnl variables determine the height and low of the vertical lines for when the RSI crosses overbought or oversold levels.
The if statements check if the RSI has crossed overbought or oversold levels and set the uph, dnh, upl, and dnl variables accordingly.
Finally, the plotcandle() function is used to plot the vertical lines on the chart. The open and close values are set to the src input, and the high and low values are set to the uph, dnh, upl, and dnl variables. The bordercolor argument is set to na to hide the borders of the lines, and the wickcolor argument is set to green or red, depending on whether the line is an overbought or oversold crossover.
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
DD/RP Calculatortool for calculate drawdown and run-up from order open and close
用來計算潛在獲利跟虧損的工具
導入指標然後拉取範圍,工具會幫你計算到目前為止曾經最大的獲利或虧損點數
注意點數根據當下券商的最小值(symbol.min_tick)而有所不同
--
Tool is for the convenience of use, users should bear all risks for their investment decisions. The tool information is for reference only and does not provide any guarantees.
工具為方便使用,使用者應為自己任何投資決策行為承擔所有風險,工具資訊僅供參考,不提供任何保證。
RSI is in Normal Distribution?Does RSI Follow a Normal Distribution?
The value of RSI was converted to a value between 0~2, 2~4, ..., 98~100, and the number of samples was graphed.
The Z values are expressed so that the values corresponding to 30 and 70 of the RSI can be compared with the standard normal distribution.
Additionally, when using the RSI period correction function of the 'RSI Candle Advanced V2' indicator that I made before, it shows no change in standard deviation.
RSI는 정규분포를 따를까요
RSI의 값을 0~2, 2~4, ..., 98~100 사이 값으로 변환하고 그 표본 갯수를 그래프로 표현하였습니다.
Z 값은 RSI의 30, 70에 해당하는 값을 표준정규분포와 비교할 수 있도록 표현하였습니다.
추가적으로 제가 예전에 만들었던 'RSI Candle Advanced V2' 지표의 RSI 기간 보정 함수를 사용할 경우 표준편차의 변화가 없음을 보입니다.
Global (World) Monetary Supply M2 (measured in USD)This is the Global Monetary Supply M2 of the richest and most populous countries that have info from at least 2008
It is measured in USD (converting the M2 of each of the countries respective currencies and virtually converting them into USD)
This is less than the global liquidity as it does not include the countries' assets in other currencies (on their balance sheets), it only focuses on the monetary supply of each of the countries own currencies.
Global Monetary Supply M2 Vs the Global GDP This indicator compares the Global (world) Monetary Supply (measured in USD) compared to the Global GDP.
This can be useful to measure the "money printing speed" of the world compare to the "world gdp growth", the higher the slope (angle of growth) the more money printing.
It includes the exact same countries of the Global M2 indicator (done by me), to make fair the comparison, which has the richest and most populous countries so to have a clear overview.
There tough a few very populated countries excluded, the details can be found on the Global M2 indicator script and reason for exclusion.
Enjoy!
Filter-Out Weak Pivot highs/lows, Swing highs/lows: MethodJust a simple indicator for refining the standard method of finding Pivot highs & Lows; Allowing user to filter-out weak/flat/rounded Pivot highs/lows
-Aim of this is to get pivot highs & pivot lows coded to print more in line with what the eye would naturally be drawn to as an obvious pivot high/low.
-This uses local moving average around the pivot high/low together with user-input ATR multiple, to create a condition for filtering out lacklustre pivot highs/lows.
-Thought i'd publish this separately as a tool that other coders might find useful.
//inputs//
~adjust looback/lookforward for Pivot highs/lows
~adjust 'spikiness' index to filter out less impressive pivot highs/lows (higher number = more selective)
US Treasuries Yield CurveNews about the yield curve became pretty crucial for all the trades in the last year.
So in the team, we decided to implement a nice widget that will allow you to track the current yield curve in your chart directly.
It's possible to compare the current yield curve with past yield curves. You can choose to display the number of curves weeks, months, and years ago. So you can see the dynamics of the yield curve change.
When the Y2 > Y10 curve is considered invested, so you'll see an "Inverted" notification on the chart.
Thanks to @MUQWISHI for helping code it.
Disclaimer
Please remember that past performance may not indicate future results.
Due to various factors, including changing market conditions, the strategy may no longer perform as well as in historical backtesting.
This post and the script don’t provide any financial advice.
Ultimate [Milind_k]NSE:BANKNIFTY
Hello traders,
This indicator shows you 5 different types of signals which servers different roles while taking the trades. Thses signals are being drawn by calculating the average of OHLC values and MA's.
Indicator works in any time-frame and on any chart(Indices, stocks, crypto, forex, futures , bonds) which shows OHLC values.
How to use it:
(please follow the image below to understand these 5 points.)
1) Minor/Shorter trend signal: It is the line on the candles. It's is Green in up-trend and turns Red in down-trend.
- You can buy the Call when it turns Green and buy the Put when it turns Red. But you can't trade every time it changes the color, that will be over-trading.
To solve this problem signal-4(trend reversal) has been created which will guide you(see the point 4 for details).
2) Major/Longer trend signal: This is indicated by a stream of small triangles.
- Continuous Green upward triangles shows the major up-trend and continuous Red downward triangles shows the major down-trend.
- If you have bought the Call as per the signal given by the indicator and if Minor trend Red you can exit the trade. But if the Major trend is still Green you can hold the trade and exit when Major trend turns Red.
- Likewise,
if you have bought the Put as per the signal given by the indicator and if Minor trend Green you can exit the trade. But if the Major trend is still Red you can hold the trade and exit when Major trend turns Green.
3) Bullish and Bearish candle signal: These are the small triangles at the top.
- If you have bought Call as per the signal given by the indicator and if a red candle is formed during the trade. At the same time see the color of the triangle being formed at the top. If it's Green then there is nothing to worry, you can wait and decide on the next candle if you want to exit.
Likewise,
- If you have bought Put as per the signal given by the indicator and if a green candle is formed during the trade. At the same time see the color of the triangle being formed at the top. If it's Red then there is nothing to worry, you can wait and decide on the next candle if you want to exit.
- And if an empty area is continuously being built where no triangles are being formed, then understand that the market is range bound(sideways).
4) Trend reversal signal: It is formed just above or below the candle. This is the early entry signal for buying.
- The big advantage of this signal is that you are taking the entry on trend reversal, so your SL will be very less.
- If Minor trend turns Green and "green color upward triangle" is formed just Below the candle you can buy the Call and SL will be at swing low.
- Likewise, if Minor trend turns Red and "purple color downward triangle" is formed just Above the candle you can buy the Put and SL will be at swing high.
- If 2-3 trend reversal signals are made continuously then there is no need to get confused. It means that if you did not take the trade on the first signal, then you can take it on the second candle, and if there is a signal on the third candle also, then you can take it on the third signal as well.
- Note: Keep in mind that you must ignore a "purple color downward triangle" while up-trend likewise a "green color upward triangle" while downtrend. These are false signals and you must not take the trades in these situations.
5) Buying signal: It is formed just above or below the candle. It's denoted by capital letter "B". Green label-up means you can buy the Call. Purple label-down means you can buy the put.
Inputs tab in the indicator settings:
1) Base: Controls the trend reversal signal, default length is 1.
2) Minor Trend: Controls the smoothness of Minor trend, default length is 3.
3) Major Trend: Controls the smoothness of Major trend, default length is 15.
4) PD-HLC: Shows previous day's high, low and close values. These values serves as support and resistance .
Style tab in the settings:
You can switch on/off and set the styles of the signals as per your need.
Disclaimer:
The information provided in the indicator is intended solely for educational purposes, use it at your own risk.
The information contained in the indicator isn't a promise or guarantee or financial advice or a solicitation to buy or sell any securities of any type. It is your responsibility to confirm and decide which trades to make. I cannot be held responsible for your loss in any way. Past results are no indication of future performance. If you do not fully understand these risks you must seek independent advice from your financial adviser.
All the very best and safe trading.
Bitcoin Relative Value IndicatorThis script retrieves the close price data for Bitcoin, DXY, CPIAUCSL, M2 money supply, and SPX and calculates the average of the four data points. It then calculates the relative value of Bitcoin by dividing the Bitcoin close price by the average of the four data points. The script determines whether the relative value is increasing or decreasing and plots the relative value on the chart using a green line if it's increasing and a red line if it's decreasing.
BTC CorrelationsIn this script, we define the symbols we want to compare Bitcoin to, and the timeframe we want to use. We then calculate the correlation coefficient between Bitcoin and each symbol over a 20-bar period. Finally, we plot the correlation signals for each symbol and set threshold lines at 0, 1, and -1 to indicate positive, neutral, and negative correlations.
basilPort Portfolio Tracker Pro [basilChart]This script is helps giving detailed information about the portfolio.
Prominent features of this portfolio tracking indicator are:
- Chart of your portfolio: This portfolio tracker let’s you view the chart of your portfolio real-time.
- Visualized Profit/Loss: Indicator will let you know of your profit and loss on the chart.
- In-Depth Monitoring: Most Gained 1st, 2nd, 3rd and Most Lost 1st, 2nd, 3rd.
- All Time Highs: Let’s us view All Time Highs on the portfolio chart for each equity on the chart.
- 40 Different Symbols: Supports monitoring 40 different symbols at the same time, real-time.
- 10 Pair Detailed View: For the first 10 symbol in our portfolio, indicator supports viewing detailed info about each of them. Such as: Price, Cost, Qty, Profit Percentage, Chart TF Profit Percentage, Weight
basilPort Portfolio Tracker Pro indicator can be used to:
- Track your investments: The basilPort Portfolio Tracker allows you to enter all your investments and their associated details, such as the ticker symbol, purchase price, and quantity. It then calculates your total portfolio value, including gains and losses.
- Monitor portfolio performance: Provides an overview of your portfolio's performance over time. You can see how your portfolio is performing on a daily, weekly, or monthly basis, and compare it to the performance of the overall market.
- Analyze asset allocation: Helps you analyze your portfolio's asset allocation, which is the percentage of your portfolio invested in different symbols. You can use this information to adjust your portfolio and diversify your holdings.
- Set investment goals: You can use the Portfolio Tracker to set investment goals and track your progress towards achieving them. For example, you can set a goal of achieving a certain rate of return or accumulating a specific amount of wealth by a certain date.
Overall, the Portfolio Tracker is a useful tool for investors who want to monitor their portfolio's performance, evaluate their investment strategies, and make informed investment decisions.
Best and worst 3 performers in our portfolio:
From Data Window, script let’s us see the best and worst 3 performers in our portfolio. To know how to read it we follow this pattern:
- Check 1st Gained value.
- Find the nth symbol from script’s Inputs tab.
- Check 1st Gained to see its Profit Percentage.
An example scenario to reading Data Window is explained at the very end of the description.
Using the script:
- Add this script to the chart from indicators tab
- Set starting date for the basilGrid Portfolio Tracker Pro either by dragging and dropping the vertical line or by the date-time picker from indicator Inputs tab.
- Set symbols and enable them to monitor with this indicator.
- Set quantity and price information for the symbols you have selected.
- Set visual settings to tailor your experience.
basilPort Portfolio Tracker is an indicator that allows you to track and analyze the performance of your investment portfolio over time. It's a helpful tool for investors who want to monitor their holdings and evaluate their investment strategies.
In this example we used pair BTCUSDT 1h timeframe, our settings are:
Inputs Tab:
- Start Date: 2022-12-13 13:00
- Show All Time Highs: Unchecked
- Show Pair Data (First 10): Checked
- Show Total Data: Checked
Symbols:
- BINANCE:ETHUSDT Qty 4.2 Price 1 332
- BINANCE:BTCUSDT Qty 0.5 Price 17 469
- BINANCE:BNBUSDT Qty 20 Price 270
- BINANCE:AVAXUSDT Qty 200 Price 13.61
- BATS:PYPL Qty 50 Price 78.5
- BATS:AMZN Qty 40 Price 95.4
- BATS:ETSY Qty 40 Price 135.64
For example, if you check Data Window, you'll see the following:
An example scenario:
- Bought Portfolio Value 39142.98 => The cost of the portfolio
- Current Portfolio Value 39142.98 => The current value of the portfolio
- 1st Gained 2.00 => The most gained symbol's index. (Checking the Symbols what we see on the 2nd spot is this symbol, we can see this value indicates BINANCE:BTCUSDT)
- 1st Gained 28.09 => Means BINANCE:BTCUSDT is +%28.09
- 2nd Gained 4.00 => Again, after checking the Symbols, we now know what this value indicates. It is AVAXUSDT.
- 2nd Gained 18.59 => Means BINANCE:AVAXUSDT is +%18.59
..
And so on to Lost section. Only difference between Gained and Lost section indicates Lost equities.
This script's purpose is to make easier to have more control over the portfolio. With in depth data that’ll help with decision-making.
Ticker Ratio LevelsIndicator for constructing levels of price ratios from other tickers.
The user can choose from predefined tickers such as Gold(XAU), DXY, BTC, etc.
How it works:
Takes the important extremum of the closing candle from your current chart and builds a level based on the chart selected in the settings.
This function allows you to determine the price level based on the current price and the price at the time of a certain date. To do this, it first determines the time when the last candle before the specified date occurred. Then the price at the time of this candle and at the current moment is calculated. Finally, the price level is calculated relative to the price at the time of the candle. The result of this calculation will be the price level.
How to Use:
By default, the indicator is set to 1D for the BTC chart. But you can adjust any levels on the assets you are interested in.
You can adjust the levels both in the settings and by moving them around the chart.
Simply click on the indicator name or level, and vertical lines will appear, which you can drag to any location. (The vertical lines serve as the beginning of the calculation point)
Example of work on ETH paired with DXY.
The Strat [LuxAlgo]The Strat indicator is a full toolkit regarding most of the concepts within "The Strat" methodology with features such as candle numbering, pivot machine gun (PMG) highlighting, custom combo highlighting, and various statistics included.
Alerts are also included for the detection of specific candle numbers, custom combos, and PMGs.
🔶 SETTINGS
Show Numbers on Chart: Shows candle numbering on the chart.
Style Candles: Style candles based on the detected number. Only effective on non-line charts and if the script is brought to the front.
🔹 Custom Combo Search
Combo: User defined combo to be searched by the script. Combos can be composed of any series of numbers including (1, 2, -2, 3), e.g : 2-21. No spaces or other characters should be used.
🔹 Pivot Machine Gun
Show Labels: Highlight detected PMGs with a label.
Min Sequence Length: Minimum sequence length of consecutive higher lows/lower highs required to detect a PMG.
Min Breaks: Minimum amount of broken previous highs/lows required to detect a PMG.
Show Levels: Show levels of the broken highs/lows.
🔹 Pivot Combos
Pivot Lookback: Lookback period used for detecting pivot points.
Right Bars Scan: Number of bars scanned to the right side of a detected pivot.
Left Bars Scan: Number of bars scanned to the left side of a detected pivot.
🔹 Dashboard
Show Dashboard: Displays statistics dashboard on chart.
Numbers Counter: Displays the numbers counter section on the dashboard.
Pivot Combos: Displays pivots combo section on the dashboard.
%: Display the percentage of detected pivot combos on the dashboard instead of absolute numbers.
Pivot Combos Rows: Number of rows displayed by the "Pivots Combo" dashboard section.
Show MTF: Showa MTF candle numbering on the dashboard.
Location: Location of the dashboard on the chart.
Size: Size of the displayed dashboard.
🔶 USAGE
This script allows users with an understanding of The Strat to quickly highlight elements such as candle numbers, pivot machine guns, and custom combos. The usage for these concepts is given in the sub-sections below.
🔹 Candle Numbers
The Strat assigns a number to individual candles, this number is determined by the current candle position relative to the precedent candle, these include:
Number 1 - Inside bar, occurs when the previous candle range engulfs the current one.
Number 2 Up - Upside Directional Bar, occurs when the current price high breaks the previous high while the current low is lower than the previous high.
Number 2 Down - Downside Directional Bar, occurs when the current price low breaks the previous low while the current high is higher than the previous low.
Number 3 - Outside bar, occurs when the current candle range engulfs the previous one.
The script can highlight the number of a candle by using labels but can also style candles by depending on the candle number. Inside bars (1) only have their candle wick highlighted, directional bars (2) (-2) only have their candle body highlighted. Outside bars have their candle range highlighted.
Note that downside directional bars are highlighted with the number -2.
Users can see the total amount of times a specific candle number is detected on the historical data on the dashboard available within the settings, as well as the number of times a candle number is detected relative to the total amount of detected candle numbers expressed as a percentage.
It is also possible to see the current candle numbers returned by multiple timeframes on the dashboard.
🔹 Searching For Custom Combos
Combos are made of a sequence of two or more candle numbers. These combos can highlight multiple reversals/continuation scenarios. Various common combos are documented by The Strat community.
This script allows users to search for custom combos by entering them on the Combo user setting field.
When a user combo is found, it is highlighted on the chart as a box highlighting the combo range.
🔹 Pivot Combos
It can be of interest to a user to display the combo associated with a pivot high/low. This script will highlight the location of pivot points on the chart and display its associated combo by default. These are based on the Pivot Combo lookback and not displayed in real-time.
Users can see on the dashboard the combos associated with a pivot high/low, these are ranked by frequency.
🔹 Pivot Machine Gun (PMG)
Pivot Machine Guns (PMG)s describe the scenario where a single price variation breaks the value of multiple past successive higher lows/lower highs. This can highlight a self-exciting behavior, where even more past successive higher lows/lower highs get broken.
Users can select the minimum sequence length of successive higher lows/lower highs required for a PMG to be detected, as well the amount of these successive higher lows/lower highs that must be broken.
Transmit signals to overlayThis indicator transmits signals from another indicator panel to the main panel through the chart.
It may be suitable when it is not possible to use the main indicator with the "overlay=true" attribute.
For the script to work, the input signal must be "1" for BUY and "0" for SELL.
Alternative words: transmit signals, send, connect, broadcast, copy signals, duplicate.
---
You can change display style:
---
You can use alerts:
Time of Day - Volatility Report█ OVERVIEW
The indicator analyses the volatility and reports statistics by the time of day.
█ CONCEPTS
Around the world and at various times, different market participants get involved in the markets. How does this affect the market?
Knowing this gets you better prepared and improves your trading. Here are some ideas to explore:
When is the market busy and quiet?
What time is it the most volatile?
Which pairs in your watchlist are moving while you are actively trading?
Should you adjust your trading time? Should you change your trading pairs?
When does your strategy perform the best?
What entry times do your winners have in common? What about the exit times of your losers?
Is it worth keeping your trade open overnight?
Bitcoin (UTC+0)
Gold (UTC+0)
Tesla, Inc. (UTC+0)
█ FEATURES
Selectable time zones
Display the statistics in your geographical time zone (or other market participants), the exchange time zone, or UTC+0.
Configurable outputs
Output the report statistics as mean or median.
█ HOW TO USE
Plot the indicator and visit the 1H timeframe.
█ NOTES
Gaps
The indicator includes the volatility from gaps.
Calculation
The statistics are not reported from absolute prices (does not favor trending markets) nor percentage prices (does not depict the different periods of volatility that markets can go through). Instead, the script uses the prices relative to the average range of previous days (daily ATR).
Extended trading session
The script analyses extended hours when activated on the chart.
Daylight Saving Time (DST)
The exchange time or geographical time zone selected may observe Daylight Saving Time. For example, NASDAQ:TSLA always opens at 9:30 AM New York time but may see different opening times in another part of the globe (New York time corresponds to UTC-4 and UTC-5 during the year).
TSG 5% Daily CalculatorThis is a calculator I've created to help visualize Target and Risk Levels based on leverage use to trade crypto.
How to use it ?
Basic Use:
- Set the Direction of your trade - either Long or Short
- Set the Leverage you use in your trade - it is crutial to define the risk and target levels
- Set the Risk Amount you want to risk (in %) of your total balance ( Advised 2-3% )
- Set the Target Amount you want to profit at the target (the idea of this is 5% daily, so 5%).
- Set Entry Price if you have opened a position, and you will visually see your progress. Otherwise the levels will be adjusted to the Close of the candle.
Additions:
- Set your Initial Balance - to help you visualize on the Table your progress
- Set your Current Balance - for visualization purposes on ongoing trades and on the Table
- Entry Date - Advised to set it when you open a trade - you will be tracking the progress of your trade since the candle on which you opened it
- Show Table - to show the table of 5% daily and the target it is set on per day
- Table Size - Set table to be small or normal
- Together with the Table you have a big blue area behind that ends on the day you will become a Millionaire based on the Initial Balance, Current balance and Target % in your inputs
Flare🔶 METHODS
• Pine Script™ introduces methods ( 1 , 2 )! Much kuddos for the developers, Tradingview, and all who has worked on it!
• This educational script will show the simplified way of writing built-in methods, not to create a new method.
🔹 Simplified way of writing built-in methods:
· Instead of:
newArray = array.new()
array.unshift(newArray, 1)
lin = line.new(na, na, na, na)
line.set_xy1(lin, bar_index , close)
line.set_xy2(lin, bar_index + 10, close)
label newLabel = label.new(bar_index, high)
if barstate.islast
label.delete(newLabel)
· We now can write it like this:
newArray = array.new()
newArray.unshift(1)
lin = line.new(na, na, na, na)
lin.set_xy1(bar_index , close)
lin.set_xy2(bar_index + 10, close)
label newLabel = label.new(bar_index, high)
if barstate.islast
newLabel.delete()
——————————————————————————————————————————————————————————
· When using sometimes brackets are necessary:
label lab = label.new(bar_index, high)
if barstate.islast
label.set_color(lab, color.red)
label.delete(lab )
· ->
label lab = label.new(bar_index, high)
if barstate.islast
lab.set_color(color.red)
(lab ).delete() // lab .delete() doesn't compile at the moment
——————————————————————————————————————————————————————————
🔶 OVERVIEW OF SCRIPT
• The basic principles are:
· Find 1 point ( close ) x bars back from current bar ( settings: 'x close back').
· Create a 'Flare' shaped object from that point to current bar or further (dependable of "Width of Flare").
· Calculate where current close is located versus the Flare lines.
· On that bases, change colour and draw plotshapes.
· Below bar if current close is located in the upper part of the Flare
· Above bar if current close is located in the lower part of the Flare
· Above & Below if located in the middle part of the Flare
-> Above & Below colours has 3 different colours (adjustable), dependable on the position
🔶 EXAMPLES
· Neutral zone:
· Light Bullish zone:
· Bullish zone:
· Very Bullish / Overbought zone:
· Light Bearish zone:
· Bearish zone:
· Very Bearish / Oversold zone:
🔶 TECHNIQUES
🔹 I. Make a User Defined Type (UDT) Flare, with:
· 5x linefill - array of linefill
· int iDir, which captures the direction (current location of close in Flare)
· color cCol, this is a colour variable in relation to the direction.
🔹 II. Different functions will add a new Flare object, and update the values on each bar.
· Explanation of each function can be found in the script.
🔶 EXTRA's
· The input.color() is located in the function set_flare_B(flare obj)
· Best to put the inputs at the beginning of the script, I included this alternative just to show it is possible (but mostly not ideal)
· Background colour (settings: Bgcolor) can be enabled for better visibility of colours
Global Unemployment RateThe Global Unemployment rate estimates what is the rate of unemployment of the whole world, taking same data from multiple countries and normalizing them.
It includes the Eurozone + 19 countries from all the continents, which are some of the richest countries as well as some of the most populous.
It sadly does not include India as its unemployment data on trading view as of today (Feb 2023) is only since year 2019, which is too short
Entry Percent: EssamThis Pine Script code is designed to perform the task of computing and showcasing the profit percentage, profit value, and the duration for which a specific asset is held, all in real-time. The script effectively leverages the built-in resources to provide a seamless and robust experience, as it presents the calculated figures in an easily readable format on the chart, without causing any lag or disruptions to the chart.
ICT MTF FVG [MK]FVGs (Fair Value Gaps) are significant levels that may act as support or resistance to price. The script finds FVGs as per ICT trading system, then plots the full FVG to the right side of the chart. FVG boxes do not change size when they are semi-mitigated as its important to know where the original FVG midpoint lies. Plotting to the right side of price allows for a cleaner chart. The script is MTF and can display FVG boxes for the following timeframes. Chart, 5,10,15,30,1hr,4hr,8hr,12hr,D,W,M.
Below shows 1hr FVGs marked out. NOTE: this is not what the script does, this is for explanation only.
Below shows what the script will do. 1hr FVGs shown on 15min chart
SMT Divergence [promuckaj]SMT Divergence indicator will track your main symbol on the chart against other one you set, for example you can use it on S&P 500 chart while you set there to track and compare it with Nasdaq, it will search for divergence between them, according to swing points, and print it on the chart for you.
There is option to set custom swing points period, colors, lines, debug info panel that will show you in real time values and times of last two swing highs and lows points that is formed on second symbol you want to track.
You can activate also alerts for bullish and bearish divergences separately, as you wish.
There is option to setup divergence types you want to get:
#1
100% aligned divergences only - means both swing points are aligned at the same bar and time between two assets.
#2
all divergences - means you will get also the rest potential divergences that is not 100% aligned between two assets according to swing points. This means that, while swing points is formed on main symbol, indicator will compare their bars and times to the second symbol and if it looks like divergence you will get it on the chart.
Just to clarify "divergence" between two symbols, it means that for bearish one symbol need to form higher low while the other need to form higher high, and vice versa for bullish, lower low / lower high.
Everyone enjoy !