Market Relative Candle Ratio ComparatorIntroducing the Market Relative Candle Ratio Comparator, a visually captivating script that eases the way you compare two financial assets, such as cryptocurrencies and market indices. Leveraging a distinctive calculation method based on percentage changes and their averages, this tool presents a crystal-clear view of how your chosen assets perform in relation to each other, both for individual candles and over a range of previous candles.
Tailoring the script to your preferences is a walk in the park, as it allows you to easily adjust input symbols, moving average lengths, and other parameters to match your analytical approach. The visually arresting column chart it creates employs vivid red and green colors to underscore the differences between the two assets on each candle. Simultaneously, the lower-opacity columns depict the accumulated differences over a specified lookback period. This vibrant blend of colors and opacities results in a dynamic visual experience, enabling you to better grasp market trends relative to each other.
The reverse bool input is a handy feature that lets you invert the effect of the input symbol (DXY by default) in the comparison. When you set the reverse input to true, the script multiplies the calculated DXY percentage change by -1, effectively reversing the comparison. This is particularly useful when examining assets with an inverse relationship or when you'd like to analyze the input symbol's impact in the opposite direction.
For instance, if the input symbol represents a market index that generally moves in the opposite direction of the selected cryptocurrency, enabling the reverse input will help you better visualize and understand the relationship between the two assets by inverting the input symbol's effect on the comparison.
In the accompanying chart, you can observe the comparison of Bitcoin's movement relative to the Dollar, Gold, Bonds, and the S&P 500. The indicator reveals that in the last day, Bitcoin outperformed Bonds, Gold, and the Dollar but not the S&P 500!
Statistics
Arbitrage SpreadThis indicator helps to find spreads between cryptocurrencies, assess their correlation, spread, z score and atr z score.
The graphs are plotted as a percentage. Because of the limitation in pine tradingview for 5000 bars a period was introduced (after which a new starting point of the graph construction will be started), if you want it can be disabled
The multiplier parameter affects only the construction of the joint diagram on which z score and atr z score are calculated (construction of the diagram is done by dividing one pair by another and multiplying by the multiplier parameter) is shown with a red line
To create a notification you have to specify the data for parameters other than zero which you want to monitor. For parameters z score and atr z score data are counted in both directions
The data can be tracked via the data window
Link to image of the data window prnt.sc
Oscillator: Which follows Normal Distribution?When doing machine learning using oscillators, it would be better if the oscillators were normally distributed.
So I analyzed the distribution of oscillators.
The value of the oscillator was divided into 50 groups each from 0 to 100.
ex) if rsi value is 45.43 -> group_44, 58.23 -> group_58
Ocscillators : RSI, Stoch, MFI, WT, RVI, etc....
Caution: The normal distribution was verified through an empirical formula.
[MiV] MA Screener v1.0In my trading I stick to the following strategy: I buy an asset above the 100/200 moving average and then sell it.
The most problematic thing in all this is to look for assets that are above the 100 or 200 moving average, and to assess how "far" the price is from that moving average.
In fact, to solve this problem I created this indicator.
It works with 30 different assets and displays the state of its two moving averages, whether the price is higher or not, and how much higher the price is from that level.
Multiple Moving Average ToolkitFeatures Overview:
Multiple Moving Averages: The script allows you to plot up to five different Moving Averages (MAs) on your chart at the same time. You can choose the type of MA (EMA, SMA, HMA, WMA, DEMA, VWMA, VWAP) and the length of each one.
Color Ribbon: You can turn the MAs into a color ribbon by selecting the "Turn into Color Ribbon?" option. This will make the area between the MAs colored and can help you identify trends more easily.
MA Value Table: You can draw a table on your chart that displays the current values of each MA, whether the trend is bullish or bearish along with the length of the MAs. The current ATR value is also shown in the last cell of the table. You can choose the location of the table (Top Left, Top Right, Bottom Left, Bottom Right) and the transparency of the background color.
Crosses: The script can detect when two MAs cross over each other (1st MA crosses 5th MA and vice versa), indicating a potential trend reversal. It will plot crosses on the chart at the point of the crossover and give an alert if the "Bullish Cross Detected" or "Bearish Cross Detected" condition is met.
How to use:
Once the script is added to your chart, you can customize the settings to fit your preferences. You can choose the type and length of each MA, whether to turn them into a color ribbon, whether to plot crosses, and whether to draw the MA Value Table.
The MA Value Table can be moved to a different location on the chart by selecting the "Location of Table" option and choosing Top Left, Top Right, Bottom Left, or Bottom Right.
Watch for MA crossovers and alerts to identify potential trend reversals. The script can help you identify bullish and bearish trends by color-coding the area between the MAs and displaying the current values of each MA in the table.
Breakdown of the script:
User Inputs
The first section of the script defines several user inputs that allows you to customize the indicator. These include options for turning the MAs into a color ribbon, plotting crosses when there is a bullish or bearish cross of the MAs, drawing a table of the MA values, and setting the transparency of the ribbon. You can also select the location of the MA value table and customize the settings for each individual MA.
Moving Average Calculation
The script defines a function called "getMA" that calculates the moving average for a given type and length. The function uses a switch statement to determine which type of moving average to use, such as an exponential moving average (EMA), simple moving average (SMA), Hull moving average (HMA), weighted moving average (WMA), double exponential moving average (DEMA), volume-weighted moving average (VWMA), or volume-weighted average price (VWAP).
The script then calls this function to calculate the values of up to five different MAs, depending on the user input. The ATR (average true range) is also calculated using the TA library.
Color Filter and Cross Detection
The script sets a color filter based on the relationship between the MAs. If the shorter-term MAs are above the longer-term MAs, the filter is set to green to indicate a bullish trend, and if the shorter-term MAs are below the longer-term MAs, the filter is set to red to indicate a bearish trend. You can adjust the transparency of the ribbon to make it more or less visible.
The script also detects when there is a bullish or bearish cross of the MAs and can generate alerts to notify you.
MA Plotting
The script plots up to five MAs on the chart, depending on the user input. The MAs are plotted as lines with different colors and thicknesses, and you can choose to turn them into a color ribbon if desired.
Cross Plotting
The script plots crosses on the chart when there is a bullish or bearish cross of the MAs. The crosses are plotted as X shapes at the location of the cross and are color-coded to indicate the direction of the cross.
MA Value Table
Finally, the script draws a table of the MA values on the chart, displaying the values of each MA as well as the current trend and the ATR. You can customize the location of the table, and the table is colored to match the color filter of the MAs.
Feel free to message me or comment on the post with any questions or issues!
Much more to come!
Thanks for reading, enjoy!
Employees by Population (Per Million)This script measures the number of employees a company has per million people in the US population, either by total or employed population.
Double Candle Trend Counter [theEccentricTrader]█ OVERVIEW
This indicator counts the number of confirmed double candle trend scenarios on any given candlestick chart and displays the statistics in a table, which can be repositioned and resized at the user's discretion.
█ CONCEPTS
Green and Red Candles
• A green candle is one that closes with a close price equal to or above the price it opened.
• A red candle is one that closes with a close price that is lower than the price it opened.
Upper Candle Trends
• A higher high candle is one that closes with a higher high price than the high price of the preceding candle.
• A lower high candle is one that closes with a lower high price than the high price of the preceding candle.
• A double-top candle is one that closes with a high price that is equal to the high price of the preceding candle.
Lower Candle Trends
• A higher low candle is one that closes with a higher low price than the low price of the preceding candle.
• A lower low candle is one that closes with a lower low price than the low price of the preceding candle.
• A double-bottom candle is one that closes with a low price that is equal to the low price of the preceding candle.
Muti-Part Upper and Lower Candle Trends
• A multi-part higher high trend begins with the formation of a new higher high and continues until a new lower high ends the trend.
• A multi-part lower high trend begins with the formation of a new lower high and continues until a new higher high ends the trend.
• A multi-part higher low trend begins with the formation of a new higher low and continues until a new lower low ends the trend.
• A multi-part lower low trend begins with the formation of a new lower low and continues until a new higher low ends the trend.
Double Candle Trends
• A double uptrend candle trend is formed when a candle closes with both a higher high and a higher low.
• A double downtrend candle trend is formed when a candle closes with both a lower high and a lower low.
Multi-Part Double Candle Trends
• A multi-part double uptrend candle trend begins with the formation of a new double uptrend candle trend and continues until a new lower high or lower low ends the trend.
• A multi-part double downtrend candle trend begins with the formation of a new double downtrend candle trend and continues until a new higher high or higher low ends the trend.
█ FEATURES
Inputs
• Start Date
• End Date
• Position
• Text Size
• Show Plots
Table
The table is colour coded, consists of seven columns and, as many as, thirty-two rows. Blue cells denote the multi-part trend scenarios, green cells denote the corresponding double uptrend candle trend scenarios and red cells denote the corresponding double downtrend candle trend scenarios.
The multi-part double candle trend scenarios are listed in the first column with their corresponding total counts to the right, in the second and fifth columns. The last row in column one, displays the sample period which can be adjusted or hidden via indicator settings.
The third and sixth columns display the double candle trend scenarios as percentages of total 1-part double candle trends. And columns four and seven display the total double candle trend scenarios as percentages of the last, or preceding double candle trend part. For example 4-part double uptrend candle trends as percentages of 3-part double uptrend candle trends.
Plots
I have added plots as a visual aid to the double candle trend scenarios. Green up-arrows, with the number of the trend part, denote double uptrend candle trends. Red down-arrows, with the number of the trend part, denote double downtrend candle trends.
█ HOW TO USE
This indicator is intended for research purposes, strategy development and strategy optimisation. I hope it will be useful in helping to gain a better understanding of the underlying dynamics at play on any given market and timeframe.
It can, for example, give you an idea of whether the current double candle trend will continue or fail, based on the current trend scenario and what has happened in the past under similar circumstances. Such information can be useful when conducting top down analysis across multiple timeframes and making strategic decisions.
What you do with these statistics and how far you decide to take your research is entirely up to you, the possibilities are endless.
█ LIMITATIONS
Some higher timeframe candles on tickers with larger lookbacks such as the DXY , do not actually contain all the open, high, low and close (OHLC) data at the beginning of the chart. Instead, they use the close price for open, high and low prices. So, while we can determine whether the close price is higher or lower than the preceding close price, there is no way of knowing what actually happened intra-bar for these candles. And by default candles that close at the same price as the open price, will be counted as green. You can avoid this problem by utilising the sample period filter.
It is also worth noting that the sample size will be limited to your Trading View subscription plan. Premium users get 20,000 candles worth of data, pro+ and pro users get 10,000, and basic users get 5,000. If upgrading is currently not an option, you can always keep a rolling tally of the statistics in an excel spreadsheet or something of the like.
Statistics: High & Low timings of custom session; 1yr historyGet statistics of the Session High and Session Low timings for any custom session; based on around 1yr of data.
//Purpose:
-To get data on the 'time of day' tendencies of an asset.
-Narrow in on a custom defined session and get statistics on that session.
//Notes:
-Input times are always in New York time (but changing the timezone after setting WILL adust both table stats and background highlight correctly.
-For particularly long sessions, make sure text size is set to 'tiny' (very long vertical table), or adjust table to display horizontally.
-You'll notice most assets show higher readings around NY equities open (9:30am NY time). Other assets will have 'hot-spots' at other times too.
-Timings represent the beginning of a 15m candle. i.e. reading for 15:45 represents a high occurring between 15:45 and 1600.
-Premium users should get 20k bars => around 1year's worth of data on a 15minute chart. Days of history is displayed in the top left corner of the table.
//Limitations
-only designed and working on 15minute timeframe (to gather a full year of meaningful/comparable % stats, need 15minute 'buckets' of time.
-sessions cannot cross through midnight, or start at midnight (00:15 is ok). 00:15 >> 23:45 is the max session length. On BTC, same applies but 01:00 instead of midnight (all in NY time).
-if your session crosses through 'dead time' (e.g. 17:00-18:00 S&P NY time); table will correctly omit these non-existent candles, but it will add on the missing hour before the start time.
//Cautionary note:
-Since markets are not uncommonly in a trending state when your defined session starts or ends, the high/low timings % readings for start and end of session may be misleadingly high. Try to look for unusually high readings that are not at the start/end of your session.
Wheat (ZW1!) 15min chart; Table displayed vertically:
Nasdaq (NQ1!) 15m chart; Table displayed horizontally and with smaller text to view a very long custom session:
Upper and Lower Candle Trend Counter [theEccentricTrader]█ OVERVIEW
This indicator counts the number of confirmed upper and lower candle trend scenarios on any given candlestick chart and displays the statistics in a table, which can be repositioned and resized at the user's discretion.
█ CONCEPTS
Green and Red Candles
• A green candle is one that closes with a close price equal to or above the price it opened.
• A red candle is one that closes with a close price that is lower than the price it opened.
Upper Candle Trends
• A higher high candle is one that closes with a higher high price than the high price of the preceding candle.
• A lower high candle is one that closes with a lower high price than the high price of the preceding candle.
• A double-top candle is one that closes with a high price that is equal to the high price of the preceding candle.
Lower Candle Trends
• A higher low candle is one that closes with a higher low price than the low price of the preceding candle.
• A lower low candle is one that closes with a lower low price than the low price of the preceding candle.
• A double-bottom candle is one that closes with a low price that is equal to the low price of the preceding candle.
Muti-Part Upper and Lower Candle Trends
• A multi-part higher high trend begins with the formation of a new higher high and continues until a new lower high ends the trend.
• A multi-part lower high trend begins with the formation of a new lower high and continues until a new higher high ends the trend.
• A multi-part higher low trend begins with the formation of a new higher low and continues until a new lower low ends the trend.
• A multi-part lower low trend begins with the formation of a new lower low and continues until a new higher low ends the trend.
█ FEATURES
Inputs
• Start Date
• End Date
• Position
• Text Size
Table
The table is colour coded, consists of seven columns and, as many as, sixty-two rows. Blue cells denote the multi-part trend scenarios, green cells denote the corresponding upper candle trend scenarios and red cells denote the corresponding lower candle trend scenarios.
The multi-part candle trend scenarios are listed in the first column with their corresponding total counts to the right, in the second and fifth columns. The last row in column one, displays the sample period which can be adjusted or hidden via indicator settings.
The third and sixth columns display the candle trend scenarios as percentages of total 1-part candle trends. And columns four and seven display the total candle trend scenarios as percentages of the last, or preceding candle trend part. For example 4-part higher high trends as a percentages of 3-part higher high trends. This offers more insight into what might happen next at any given point in time.
Plots
For a visual aid to this indicator please use in conjunction with my Upper Candle Trends and Lower Candle Trends indicators which can both be found on my profile page under scripts, or in community scripts under the same names.
Green up-arrows, with the number of the trend part, denote higher high trends when above bar and higher low trends when below bar. Red down-arrows, with the number of the trend part, denote lower high trends when above bar and lower low trends when below bar.
█ HOW TO USE
This is intended for research purposes, strategy development and strategy optimisation. I hope it will be useful in helping to gain a better understanding of the underlying dynamics at play on any given market and timeframe.
It can, for example, give you an idea of whether the current upper or lower candle trend will continue or fail, based on the current trend scenario and what has happened in the past under similar circumstances. Such information can be useful when conducting top down analysis across multiple timeframes and making strategic decisions.
What you do with these statistics and how far you decide to take your research is entirely up to you, the possibilities are endless.
█ LIMITATIONS
Some higher timeframe candles on tickers with larger lookbacks such as the DXY , do not actually contain all the open, high, low and close (OHLC) data at the beginning of the chart. Instead, they use the close price for open, high and low prices. So, while we can determine whether the close price is higher or lower than the preceding close price, there is no way of knowing what actually happened intra-bar for these candles. And by default candles that close at the same price as the open price, will be counted as green. You can avoid this problem by utilising the sample period filter.
It is also worth noting that the sample size will be limited to your Trading View subscription plan. Premium users get 20,000 candles worth of data, pro+ and pro users get 10,000, and basic users get 5,000. If upgrading is currently not an option, you can always keep a rolling tally of the statistics in an excel spreadsheet or something of the like.
Double Trend Counter [theEccentricTrader]█ OVERVIEW
This indicator counts the number of confirmed double trend scenarios on any given candlestick chart and displays the statistics in a table, which can be repositioned and resized at the user's discretion.
█ CONCEPTS
Green and Red Candles
• A green candle is one that closes with a close price equal to or above the price it opened.
• A red candle is one that closes with a close price that is lower than the price it opened.
Swing Highs and Swing Lows
• A swing high is a green candle or series of consecutive green candles followed by a single red candle to complete the swing and form the peak.
• A swing low is a red candle or series of consecutive red candles followed by a single green candle to complete the swing and form the trough.
Peak and Trough Prices (Basic)
• The peak price of a complete swing high is the high price of either the red candle that completes the swing high or the high price of the preceding green candle, depending on which is higher.
• The trough price of a complete swing low is the low price of either the green candle that completes the swing low or the low price of the preceding red candle, depending on which is lower.
Historic Peaks and Troughs
The current, or most recent, peak and trough occurrences are referred to as occurrence zero. Previous peak and trough occurrences are referred to as historic and ordered numerically from right to left, with the most recent historic peak and trough occurrences being occurrence one.
Upper Trends
• A return line uptrend is formed when the current peak price is higher than the preceding peak price.
• A downtrend is formed when the current peak price is lower than the preceding peak price.
• A double-top is formed when the current peak price is equal to the preceding peak price.
Lower Trends
• An uptrend is formed when the current trough price is higher than the preceding trough price.
• A return line downtrend is formed when the current trough price is lower than the preceding trough price.
• A double-bottom is formed when the current trough price is equal to the preceding trough price.
Muti-Part Upper and Lower Trends
• A multi-part return line uptrend begins with the formation of a new return line uptrend and continues until a new downtrend ends the trend.
• A multi-part downtrend begins with the formation of a new downtrend and continues until a new return line uptrend ends the trend.
• A multi-part uptrend begins with the formation of a new uptrend and continues until a new return line downtrend ends the trend.
• A multi-part return line downtrend begins with the formation of a new return line downtrend and continues until a new uptrend ends the trend.
Double Trends
• A double uptrend is formed when the current trough price is higher than the preceding trough price and the current peak price is higher than the preceding peak price.
• A double downtrend is formed when the current peak price is lower than the preceding peak price and the current trough price is lower than the preceding trough price.
Muti-Part Double Trends
• A multi-part double uptrend begins with the formation of a new uptrend that proceeds a new return line uptrend, and continues until a new downtrend or return line downtrend ends the trend.
• A multi-part double downtrend begins with the formation of a new downtrend that proceeds a new return line downtrend, and continues until a new uptrend or return line uptrend ends the trend.
█ FEATURES
Inputs
• Start Date
• End Date
• Position
• Text Size
Table
The table is colour coded, consists of seven columns and, as many as, fifteen rows. Blue cells denote the multi-part trend scenarios, green cells denote the corresponding double uptrend scenarios and red cells denote the corresponding double downtrend scenarios.
The double trend scenarios are listed in the first column with their corresponding total counts to the right, in the second and fifth columns. The last row in column one, displays the sample period which can be adjusted or hidden via indicator settings.
The third and sixth columns display the double trend scenarios as percentages of total 1-part double trends. And columns four and seven display the total double trend scenarios as percentages of the last, or preceding double trend part. For example, 4-part double trends as percentages of 3-part double trends and so on.
Plots
For a visual aid to this indicator please use in conjunction with my Double Trends indicator which can be found on my profile page under scripts, or in community scripts under the same name.
Green up-arrows, with the number of the double trend part, denote double uptrends. Red down-arrows, with the number of the double trend part, denote double downtrends.
█ HOW TO USE
This indicator is intended for research purposes, strategy development and strategy optimisation. I hope it will be useful in helping to gain a better understanding of the underlying dynamics at play on any given market and timeframe.
It can, for example, give you an idea of whether the current double trend will continue or fail, based on the current double trend scenario and what has happened in the past under similar circumstances. Such information can be very useful when conducting top down analysis across multiple timeframes and making strategic decisions.
What you do with these statistics and how far you decide to take your research is entirely up to you, the possibilities are endless.
█ LIMITATIONS
Some higher timeframe candles on tickers with larger lookbacks such as the DXY , do not actually contain all the open, high, low and close (OHLC) data at the beginning of the chart. Instead, they use the close price for open, high and low prices. So, while we can determine whether the close price is higher or lower than the preceding close price, there is no way of knowing what actually happened intra-bar for these candles. And by default candles that close at the same price as the open price, will be counted as green. You can avoid this problem by utilising the sample period filter.
The green and red candle calculations are based solely on differences between open and close prices, as such I have made no attempt to account for green candles that gap lower and close below the close price of the preceding candle, or red candles that gap higher and close above the close price of the preceding candle. I can only recommend using 24-hour markets, if and where possible, as there are far fewer gaps and, generally, more data to work with. Alternatively, you can replace the scenarios with your own logic to account for the gap anomalies, if you are feeling up to the challenge.
It is also worth noting that the sample size will be limited to your Trading View subscription plan. Premium users get 20,000 candles worth of data, pro+ and pro users get 10,000, and basic users get 5,000. If upgrading is currently not an option, you can always keep a rolling tally of the statistics in an excel spreadsheet or something of the like.
Rangemeter [theEccentricTrader]█ OVERVIEW
This indicator simply displays candle and peak to trough ranges in points or pips, depending on the symbol type, in a table, which can be repositioned and resized at the user's discretion.
█ CONCEPTS
Green and Red Candles
• A green candle is one that closes with a close price equal to or above the price it opened.
• A red candle is one that closes with a close price that is lower than the price it opened.
Open Green and Red Candles
• An open green candle is one that has a close price equal to or above the price it opened, but has not yet closed to confirm the condition.
• An open red candle is one that has a close price lower than the price it opened, but has not yet closed to confirm the condition.
Swing Highs and Swing Lows
• A swing high is a green candle or series of consecutive green candles followed by a single red candle to complete the swing and form the peak.
• A swing low is a red candle or series of consecutive red candles followed by a single green candle to complete the swing and form the trough.
Peak and Trough Prices (Basic)
• The peak price of a complete swing high is the high price of either the red candle that completes the swing high or the high price of the preceding green candle, depending on which is higher.
• The trough price of a complete swing low is the low price of either the green candle that completes the swing low or the low price of the preceding red candle, depending on which is lower.
Historic Peaks and Troughs
The current, or most recent, peak and trough occurrences are referred to as occurrence zero. Previous peak and trough occurrences are referred to as historic and ordered numerically from right to left, with the most recent historic peak and trough occurrences being occurrence one.
Range
The range is simply the difference between the current peak and current trough prices, generally expressed in terms of points or pips.
Open Range
An open range is here defined as one that is forming but has not yet completed. For example, a swing low that has an open green candle proceeding a red candle or series of red candles. Or a swing high that has an open red candle proceeding a green candle or series of green candles.
The table will only display the open range under the aforementioned circumstances, otherwise it will display the current, or previous, range.
█ FEATURES
Inputs
• Show Candle Ranges
• Show Largest and Smallest Candle Ranges
• Average Candle Range Lookback
• Show Ranges
• Show Largest and Smallest Ranges
• Average Range Lookback
• Position
• Text Size
█ HOW TO USE
The indicator can be used for strategy filtering and development, gauging current market conditions versus historic and helping to make more informed discretionary trading decisions. It can also be used like my Wavemeter indicator to objectively set the angle and projection ratio for my Fan Projections and Parallel Projections indicators.
█ LIMITATIONS
Some higher timeframe candles on tickers with larger lookbacks such as the DXY , do not actually contain all the open, high, low and close (OHLC) data at the beginning of the chart. Instead, they use the close price for open, high and low prices. So, while we can determine whether the close price is higher or lower than the preceding close price, there is no way of knowing what actually happened intra-bar for these candles. And by default candles that close at the same price as the open price, will be counted as green. You can avoid this problem by ensuring the lookback for the average range does not reach as far back as the start of the chart. If you are unsure about the candle count you can use my Candle Counter indicator to find out how many candles are displayed on the chart.
The green and red candle calculations are based solely on differences between open and close prices, as such I have made no attempt to account for green candles that gap lower and close below the close price of the preceding candle, or red candles that gap higher and close above the close price of the preceding candle. I can only recommend using 24-hour markets, if and where possible, as there are far fewer gaps and, generally, more data to work with. Alternatively, you can replace the scenarios with your own logic to account for the gap anomalies, if you are feeling up to the challenge.
It is also worth noting that the lookback will be limited to your Trading View subscription plan. Premium users get 20,000 candles worth of data, pro+ and pro users get 10,000, and basic users get 5,000.
Opening Hour/Closing Hour Indices Statistics: high/low times; 5mVery specific indicator designed for 5min timeframe, to show the statistical timings of the highs and lows of Opening hour (9:30-10am) and Closing hour (3pm-4pm) NY time
~~Shown here on SPX 5min chart. Works all variants of the US indices. SPX and SPY typically show more days of history (non-extended session =>> more bars).
//Purpose:
-To get statistics on the timings of the high and low of the opening hour and the high & low of the closing hour.
//Design & Limitations:
- Designed for the 5minute chart ONLY . Need a sweet spot of 'bucket' size for the statistics: to allow meaningful comparison between times.
-Will also display on 1min chart but NOT the statistics panel, only the realtime data (today's opening hour/ closing hour timings).
-Can be slow to load depending on server load at the time. This is becasue of the multiple usage of looping array functions. Please be patient when loading or changing settings.
//User inputs:
-Standard formatting options: highlight color, table text color. Toggle on/off independently
-Decimal % percision (default = 0, i.e. 23%. If set to 1 => 22.8%)
-Show statistics: Show Opening hour statistics, Show Closing hour statistics
//Notes:
-Days of history shown at top of table; this is the size of the dataset. i.e. 254 here (254 trading days) =>> 254 opening hour highs, 254 closing hour lows etc.
--to illustrate with the above: 18% of those 254 closing hour highs occured on the 15:00 5min candle (i.e. between 15:00 and 15:05).
-SPY or SPX offer the largest history/dataset (circa 254 trading days).
-Note that the final timing in each hour is 10:25am and 15:55pm respectively: this is because the 10:25am 5min candle essentially ends at 10:30am =>> we properly captures the opening hour this way
-Pro+ users will get less data history than Premium users (half as much, due to 10k vs 20k bars history limit).
Smart Money Concepts Probability (Expo)█ Overview
The Smart Money Concept Probability (Expo) is an indicator developed to track the actions of institutional investors, commonly known as "smart money." This tool calculates the likelihood of smart money being actively engaged in buying or selling within the market, referred to as the "smart money order flow."
The indicator measures the probability of three key events: Change of Character ( CHoCH ), Shift in Market Structure ( SMS ), and Break of Structure ( BMS ). These probabilities are displayed as percentages alongside their respective levels, providing a straightforward and immediate understanding of the likelihood of smart money order flow.
Finally, the backtested results are shown in a table, which gives traders an understanding of the historical performance of the current order flow direction.
█ Calculations
The algorithm individually computes the likelihood of the events ( CHoCH , SMS , and BMS ). A positive score is assigned for events where the price successfully breaks through the level with the highest probability, and a negative score when the price fails to do so. By doing so, the algorithm determines the probability of each event occurring and calculates the total profitability derived from all the events.
█ Example
In this case, we have an 85% probability that the price will break above the upper range and make a new Break Of Structure and only a 16.36% probability that the price will break below the lower range and make a Change Of Character.
█ Settings
The Structure Period sets the pivot period to use when calculating the market structure.
The Structure Response sets how responsive the market structure should be. A low value returns a more responsive structure. A high value returns a less responsive structure.
█ How to use
This indicator is a perfect tool for anyone that wants to understand the probability of a Change of Character ( CHoCH ), Shift in Market Structure ( SMS ), and Break of Structure ( BMS )
The insights provided by this tool help traders gain an understanding of the smart money order flow direction, which can be used to determine the market trend.
█ Any Alert function call
An alert is sent when the price breaks the upper or lower range, and you can select what should be included in the alert. You can enable the following options:
Ticker ID
Timeframe
Probability percentage
-----------------
Disclaimer
The information contained in my Scripts/Indicators/Ideas/Algos/Systems does not constitute financial advice or a solicitation to buy or sell any securities of any type. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
My Scripts/Indicators/Ideas/Algos/Systems are only for educational purposes!
NIFTY USDNifty in terms of USD value over time.
Nifty 50 index of Indian Stock Market, in terms of US Dollar terms at that specific time.
Leveraged Share Conversion IndicatorHello everyone,
Releasing my leveraged share conversion indicator.
I noticed that the option traders have all the fun and resources but the share traders don't really have many resources in terms of adjusting or profits on leveraged and inverse shares. So, I decided to change that this this indicator!
What it does:
In a nut shell, the calculator converts one share to the price of another through the use of a regression based analysis.
There are multiple pre-stored libraries available in the indicator, including IWM, SPY, BTC and QQQ.
However, if the ticker you want to convert is not in one of the pre-defined libraries, you can select "Use Alternative Ticker" and indicate the stock you wish to convert.
Using Libraries:
If the conversion you want is available in one of the libraries, simply select the conversion you would like. For example, if you want to convert SPY to SPXU, select that conversion. The indicator will then launch up the conversion results which it will display in a dashboard to the right and will also display the plotted conversion on a chart (see imagine below:
In the dashboard, the indicator will show you:
a) The conversion result: This is the most likely price based on the analysis
b) The standard error: This is the degree of error within the conversion. This is the basis of the upper and lower bands. In statistics, we can add and subtract the standard error from the likely result to get the "Upper" and "Lower" Confidence levels of assessment. This is just a fancy way of saying the range in which our predicted result will fall. So, for example, in the image above it shows you the price of SPXU is assessed to be around 16$ based on SPY's price. The standard error range is 15-17. This means that, the majority of the time, based on this SPY close price, SPXU should fall between 15-17$ with the most likely result being the 16$ range.
Why is there error?
Because leveraged shares have an inherent decay in them. The degree of decay can be captured utilizing the standard error. So at any given time, the small changes in price fluctuations caused by the fact that the share is leveraged can be assessed and displayed using standard error measurements.
c) The current correlation: This is important! Because if the stocks are not strongly correlated, it tells you there is a problem. In general, a perfect correlation is 1 or -1 (perfectly negative correlation or inverse correlation) and a bad correlation is anything under 0.5 or -0.5. So, for an INVERSE leveraged share, you would expect the correlation to read a negative value. Ideally -1. Because the inverse share is doing the opposite of the underlying (if the underlying goes up, the inverse goes down and vice versa). For a non-inverse leveraged share, the correlation should read a positive value. As the underlying goes up, so too does the leveraged.
Manual Conversion using Library:
If you are using a pre-defined library but want to convert a manual close price, simply select "Enable manual conversion" at the bottom of the settings and then type in the manual close price. If you are converting SPY to SPXU, type in the manual close price of SPY to get the result in SPXU and vice versa.
Using an Alternative Ticker:
If the ticker you want is not available in a pre-defined library (i.e. UDOW, BOIL, APPU, TSLL, etc.), simply select "Use Alternative Ticker" in the settings menu. When you select this, make sure your chart is set to the dominant chart. The "Dominant chart" is the chart of the underlying. So, if you want TSLA to TSLL, be sure you have the TSLA chart open and then set your Alternative Ticker to TSLL or TSLQ.
The process of using an Alternative Ticker remains the same. If you wish to enter a manual close price, simply select "Enable Manual Conversion".
Special Considerations:
The indicator uses 1 hour candles. Thus, please leave your dominant chart set on the 1 hour time frame to avoid confusing the indicator.
The lookback period of the manual conversion is 10, 1 hour candles. As such, the results should not be used to make longer term predictions (i.e. anything over 6 months is pushing the capabilities of a manual conversion but fair game for the pre-defined library conversions which use more longer-term data).
You can technically use the indicator to make assessments between 2 separate equities. For example, the relationship between QQQ and ARKK, SPY and DIA, IWM and SPY, etc. If there is a good enough correlation, you can use it to make predictions of the opposing ticker. For example, if DIA goes to 340, what would SPY likely do? And vice versa.
As always, I have prepared a tutorial and getting started video for your reference:
As always, let me know your questions and requests/recommendations for the indicator below. This indicator is my final reference indicator in my 3 part reference indicator release. I will be going back over the feedback to make improvements based on the suggestions I have received. So please feel free to leave any suggestions here and I will take them into consideration for improvement!
Thank you for checking this out and as always, safe trades!
Trend Counter [theEccentricTrader]█ OVERVIEW
This indicator counts the number of confirmed trend scenarios on any given candlestick chart and displays the statistics in a table, which can be repositioned and resized at the user's discretion.
█ CONCEPTS
Green and Red Candles
• A green candle is one that closes with a high price equal to or above the price it opened.
• A red candle is one that closes with a low price that is lower than the price it opened.
Swing Highs and Swing Lows
• A swing high is a green candle or series of consecutive green candles followed by a single red candle to complete the swing and form the peak.
• A swing low is a red candle or series of consecutive red candles followed by a single green candle to complete the swing and form the trough.
Peak and Trough Prices (Basic)
• The peak price of a complete swing high is the high price of either the red candle that completes the swing high or the high price of the preceding green candle, depending on which is higher.
• The trough price of a complete swing low is the low price of either the green candle that completes the swing low or the low price of the preceding red candle, depending on which is lower.
Upper Trends
• A return line uptrend is formed when the current peak price is higher than the preceding peak price.
• A downtrend is formed when the current peak price is lower than the preceding peak price.
• A double-top is formed when the current peak price is equal to the preceding peak price.
Lower Trends
• An uptrend is formed when the current trough price is higher than the preceding trough price.
• A return line downtrend is formed when the current trough price is lower than the preceding trough price.
• A double-bottom is formed when the current trough price is equal to the preceding trough price.
Muti-Part Upper and Lower Trends
• A multi-part return line uptrend begins with the formation of a new return line uptrend, or higher peak, and continues until a new downtrend, or lower peak, completes the trend.
• A multi-part downtrend begins with the formation of a new downtrend, or lower peak, and continues until a new return line uptrend, or higher peak, completes the trend.
• A multi-part uptrend begins with the formation of a new uptrend, or higher trough, and continues until a new return line downtrend, or lower trough, completes the trend.
• A multi-part return line downtrend begins with the formation of a new return line downtrend, or lower trough, and continues until a new uptrend, or higher trough, completes the trend.
█ FEATURES
Inputs
Start Date
End Date
Position
Text Size
Show Sample Period
Table
The table is colour coded, consists of seven columns and, as many as, forty-one rows. Blue cells denote the multi-part trend scenarios, green cells denote the corresponding return line uptrend and uptrend scenarios and red cells denote the corresponding downtrend and return line downtrend scenarios.
The trend scenarios are listed in the first column with their corresponding total counts to the right, in the second and fifth columns. The last row in column one, displays the sample period which can be adjusted or hidden via indicator settings.
The third and sixth columns display the trend scenarios as percentage of total 1-part trends. And columns four and seven display the total trend scenarios as percentages of the, last, or preceding trend part. For example 4-part trends as a percentages of 3-part trends. This offers more insight into what might happen next at any given point in time.
Plots
For a visual aid to this indicator please use in conjunction with my Return Line Uptrends, Downtrends, Uptrends and Return Line Downtrends indicators which can all be found on my profile page under scripts, or in community scripts under the same names. Unfortunately, I could not fit all the plots with the correct offsets into one script so I had to make a separate indicator for each trend type. I decided against labels as this would limit the visual data points to 500.
Green up-arrows, with the number of the trend part, denote return line uptrends and uptrends. Red down-arrows, with the number of the trend part, denote downtrends and return line downtrends.
█ HOW TO USE
This is intended for research purposes, strategy development and strategy optimisation. I hope it will be useful in helping to gain a better understanding of the underlying dynamics at play on any given market and timeframe.
It can, for example, give you an idea of whether the current trend will continue or fail, based on the current trend scenario and what has happened in the past under similar circumstances. Such information can be very useful when conducting top down analysis across multiple timeframes and making strategic decisions.
What you do with these statistics and how far you decide to take your research is entirely up to you, the possibilities are endless.
█ LIMITATIONS
Some higher timeframe candles on tickers with larger lookbacks such as the DXY , do not actually contain all the open, high, low and close (OHLC) data at the beginning of the chart. Instead, they use the close price for open, high and low prices. So, while we can determine whether the close price is higher or lower than the preceding close price, there is no way of knowing what actually happened intra-bar for these candles. And by default candles that close at the same price as the open price, will be counted as green. You can avoid this problem by utilising the sample period filter.
The green and red candle calculations are based solely on differences between open and close prices, as such I have made no attempt to account for green candles that gap lower and close below the close price of the preceding candle, or red candles that gap higher and close above the close price of the preceding candle. I can only recommend using 24-hour markets, if and where possible, as there are far fewer gaps and, generally, more data to work with. Alternatively, you can replace the scenarios with your own logic to account for the gap anomalies, if you are feeling up to the challenge.
It is also worth noting that the sample size will be limited to your Trading View subscription plan. Premium users get 20,000 candles worth of data, pro+ and pro users get 10,000, and basic users get 5,000. If upgrading is currently not an option, you can always keep a rolling tally of the statistics in an excel spreadsheet or something of the like.
Candle Trend Counter [theEccentricTrader]█ OVERVIEW
This indicator counts the number of confirmed candle trend scenarios on any given candlestick chart and displays the statistics in a table, which can be repositioned and resized at the user's discretion.
█ CONCEPTS
Green and Red Candles
• A green candle is one that closes with a high price equal to or above the price it opened.
• A red candle is one that closes with a low price that is lower than the price it opened.
Swing Highs and Swing Lows
• A swing high is a green candle or series of consecutive green candles followed by a single red candle to complete the swing and form the peak.
• A swing low is a red candle or series of consecutive red candles followed by a single green candle to complete the swing and form the trough.
Muti-Part Green and Red Candle Trends
• A multi-part green candle trend begins upon the completion of a swing low and continues until a red candle completes the swing high, with each green candle counted as a part of the trend.
• A multi-part red candle trend begins upon the completion of a swing high and continues until a green candle completes the swing low, with each red candle counted as a part of the trend.
█ FEATURES
Inputs
Start Date
End Date
Position
Text Size
Show Sample Period
Show Plots
Table
The table is colour coded, consists of seven columns and, as many as, thirty-one rows. Blue cells denote the multi-part candle trend scenarios, green cells denote the corresponding green candle trend scenarios and red cells denote the corresponding red candle trend scenarios.
The candle trend scenarios are listed in the first column with their corresponding total counts to the right, in the second column. The last row in column one, displays the sample period which can be adjusted or hidden via indicator settings.
The third column displays the total candle trend scenarios as percentages of total 1-candle trends, or complete swing highs and swing lows. And column four displays the total candle trend scenarios as percentages of the, last, or preceding candle trend part. For example 4-candle trends as a percentage of 3-candle trends. This offers more insight into what might happen next at any given point in time.
Plots
I have added plots as a visual aid to the various candle trend scenarios listed in the table. Green up-arrows, with the number of the trend part, denote green candle trends. Red down-arrows, with the number of the trend part, denote red candle trends.
█ HOW TO USE
This indicator is intended for research purposes, strategy development and strategy optimisation. I hope it will be useful in helping to gain a better understanding of the underlying dynamics at play on any given market and timeframe.
It can, for example, give you an idea of whether the next candle will close higher or lower than it opened, based on the current scenario and what has happened in the past under similar circumstances. Such information can be very useful when conducting top down analysis across multiple timeframes and making strategic decisions.
What you do with these statistics and how far you decide to take your research is entirely up to you, the possibilities are endless.
█ LIMITATIONS
Some higher timeframe candles on tickers with larger lookbacks such as the DXY , do not actually contain all the open, high, low and close (OHLC) data at the beginning of the chart. Instead, they use the close price for open, high and low prices. So, while we can determine whether the close price is higher or lower than the preceding close price, there is no way of knowing what actually happened intra-bar for these candles. And by default candles that close at the same price as the open price, will be counted as green. You can avoid this problem by utilising the sample period filter.
The green and red candle calculations are based solely on differences between open and close prices, as such I have made no attempt to account for green candles that gap lower and close below the close price of the preceding candle, or red candles that gap higher and close above the close price of the preceding candle. I can only recommend using 24-hour markets, if and where possible, as there are far fewer gaps and, generally, more data to work with. Alternatively, you can replace the scenarios with your own logic to account for the gap anomalies, if you are feeling up to the challenge.
It is also worth noting that the sample size will be limited to your Trading View subscription plan. Premium users get 20,000 candles worth of data, pro+ and pro users get 10,000, and basic users get 5,000. If upgrading is currently not an option, you can always keep a rolling tally of the statistics in an excel spreadsheet or something of the like.
Swing Counter [theEccentricTrader]█ OVERVIEW
This indicator counts the number of confirmed swing high and swing low scenarios on any given candlestick chart and displays the statistics in a table, which can be repositioned and resized at the user's discretion.
█ CONCEPTS
Green and Red Candles
• A green candle is one that closes with a high price equal to or above the price it opened.
• A red candle is one that closes with a low price that is lower than the price it opened.
Swing Highs and Swing Lows
• A swing high is a green candle or series of consecutive green candles followed by a single red candle to complete the swing and form the peak.
• A swing low is a red candle or series of consecutive red candles followed by a single green candle to complete the swing and form the trough.
Peak and Trough Prices (Basic)
• The peak price of a complete swing high is the high price of either the red candle that completes the swing high or the high price of the preceding green candle, depending on which is higher.
• The trough price of a complete swing low is the low price of either the green candle that completes the swing low or the low price of the preceding red candle, depending on which is lower.
Peak and Trough Prices (Advanced)
• The advanced peak price of a complete swing high is the high price of either the red candle that completes the swing high or the high price of the highest preceding green candle high price, depending on which is higher.
• The advanced trough price of a complete swing low is the low price of either the green candle that completes the swing low or the low price of the lowest preceding red candle low price, depending on which is lower.
Green and Red Peaks and Troughs
• A green peak is one that derives its price from the green candle/s that constitute the swing high.
• A red peak is one that derives its price from the red candle that completes the swing high.
• A green trough is one that derives its price from the green candle that completes the swing low.
• A red trough is one that derives its price from the red candle/s that constitute the swing low.
Historic Peaks and Troughs
The current, or most recent, peak and trough occurrences are referred to as occurrence zero. Previous peak and trough occurrences are referred to as historic and ordered numerically from right to left, with the most recent historic peak and trough occurrences being occurrence one.
Upper Trends
• A return line uptrend is formed when the current peak price is higher than the preceding peak price.
• A downtrend is formed when the current peak price is lower than the preceding peak price.
• A double-top is formed when the current peak price is equal to the preceding peak price.
Lower Trends
• An uptrend is formed when the current trough price is higher than the preceding trough price.
• A return line downtrend is formed when the current trough price is lower than the preceding trough price.
• A double-bottom is formed when the current trough price is equal to the preceding trough price.
█ FEATURES
Inputs
• Start Date
• End Date
• Position
• Text Size
• Show Sample Period
• Show Plots
• Show Lines
Table
The table is colour coded, consists of three columns and nine rows. Blue cells denote neutral scenarios, green cells denote return line uptrend and uptrend scenarios, and red cells denote downtrend and return line downtrend scenarios.
The swing scenarios are listed in the first column with their corresponding total counts to the right, in the second column. The last row in column one, row nine, displays the sample period which can be adjusted or hidden via indicator settings.
Rows three and four in the third column of the table display the total higher peaks and higher troughs as percentages of total peaks and troughs, respectively. Rows five and six in the third column display the total lower peaks and lower troughs as percentages of total peaks and troughs, respectively. And rows seven and eight display the total double-top peaks and double-bottom troughs as percentages of total peaks and troughs, respectively.
Plots
I have added plots as a visual aid to the swing scenarios listed in the table. Green up-arrows with ‘HP’ denote higher peaks, while green up-arrows with ‘HT’ denote higher troughs. Red down-arrows with ‘LP’ denote higher peaks, while red down-arrows with ‘LT’ denote lower troughs. Similarly, blue diamonds with ‘DT’ denote double-top peaks and blue diamonds with ‘DB’ denote double-bottom troughs. These plots can be hidden via indicator settings.
Lines
I have also added green and red trendlines as a further visual aid to the swing scenarios listed in the table. Green lines denote return line uptrends (higher peaks) and uptrends (higher troughs), while red lines denote downtrends (lower peaks) and return line downtrends (lower troughs). These lines can be hidden via indicator settings.
█ HOW TO USE
This indicator is intended for research purposes and strategy development. I hope it will be useful in helping to gain a better understanding of the underlying dynamics at play on any given market and timeframe. It can, for example, give you an idea of any inherent biases such as a greater proportion of higher peaks to lower peaks. Or a greater proportion of higher troughs to lower troughs. Such information can be very useful when conducting top down analysis across multiple timeframes, or considering entry and exit methods.
What I find most fascinating about this logic, is that the number of swing highs and swing lows will always find equilibrium on each new complete wave cycle. If for example the chart begins with a swing high and ends with a swing low there will be an equal number of swing highs to swing lows. If the chart starts with a swing high and ends with a swing high there will be a difference of one between the two total values until another swing low is formed to complete the wave cycle sequence that began at start of the chart. Almost as if it was a fundamental truth of price action, although quite common sensical in many respects. As they say, what goes up must come down.
The objective logic for swing highs and swing lows I hope will form somewhat of a foundational building block for traders, researchers and developers alike. Not only does it facilitate the objective study of swing highs and swing lows it also facilitates that of ranges, trends, double trends, multi-part trends and patterns. The logic can also be used for objective anchor points. Concepts I will introduce and develop further in future publications.
█ LIMITATIONS
Some higher timeframe candles on tickers with larger lookbacks such as the DXY , do not actually contain all the open, high, low and close (OHLC) data at the beginning of the chart. Instead, they use the close price for open, high and low prices. So, while we can determine whether the close price is higher or lower than the preceding close price, there is no way of knowing what actually happened intra-bar for these candles. And by default candles that close at the same price as the open price, will be counted as green. You can avoid this problem by utilising the sample period filter.
The green and red candle calculations are based solely on differences between open and close prices, as such I have made no attempt to account for green candles that gap lower and close below the close price of the preceding candle, or red candles that gap higher and close above the close price of the preceding candle. I can only recommend using 24-hour markets, if and where possible, as there are far fewer gaps and, generally, more data to work with. Alternatively, you can replace the scenarios with your own logic to account for the gap anomalies, if you are feeling up to the challenge.
The sample size will be limited to your Trading View subscription plan. Premium users get 20,000 candles worth of data, pro+ and pro users get 10,000, and basic users get 5,000. If upgrading is currently not an option, you can always keep a rolling tally of the statistics in an excel spreadsheet or something of the like.
█ NOTES
I feel it important to address the mention of advanced peak and trough price logic. While I have introduced the concept, I have not included the logic in my script for a number of reasons. The most pertinent of which being the amount of extra work I would have to do to include it in a public release versus the actual difference it would make to the statistics. Based on my experience, there are actually only a small number of cases where the advanced peak and trough prices are different from the basic peak and trough prices. And with adequate multi-timeframe analysis any high or low prices that are not captured using basic peak and trough price logic on any given time frame, will no doubt be captured on a higher timeframe. See the example below on the 1H FOREXCOM:USDJPY chart (Figure 1), where the basic peak price logic denoted by the indicator plot does not capture what would be the advanced peak price, but on the 2H FOREXCOM:USDJPY chart (Figure 2), the basic peak logic does capture the advanced peak price from the 1H timeframe.
Figure 1.
Figure 2.
█ RAMBLINGS
“Never was there an age that placed economic interests higher than does our own. Never was the need of a scientific foundation for economic affairs felt more generally or more acutely. And never was the ability of practical men to utilize the achievements of science, in all fields of human activity, greater than in our day. If practical men, therefore, rely wholly on their own experience, and disregard our science in its present state of development, it cannot be due to a lack of serious interest or ability on their part. Nor can their disregard be the result of a haughty rejection of the deeper insight a true science would give into the circumstances and relationships determining the outcome of their activity. The cause of such remarkable indifference must not be sought elsewhere than in the present state of our science itself, in the sterility of all past endeavours to find its empirical foundations.” (Menger, 1871, p.45).
█ BIBLIOGRAPHY
Menger, C. (1871) Principles of Economics. Reprint, Auburn, Alabama: Ludwig Von Mises Institute: 2007.
Global GDPThis is the GlobalGDP of the richest and most populous countries
It is measured in USD
The countries included are the same than are included in my Global M2 indicator, as of to be able to compare them side to side.
Candle Counter [theEccentricTrader]█ OVERVIEW
This indicator counts the number of confirmed candle scenarios on any given candlestick chart and displays the statistics in a table, which can be repositioned and resized at the user's discretion.
█ CONCEPTS
Green and Red Candles
A green candle is one that closes with a high price equal to or above the price it opened.
A red candle is one that closes with a low price that is lower than the price it opened.
Upper Candle Trends
A higher high candle is one that closes with a higher high price than the high price of the preceding candle.
A lower high candle is one that closes with a lower high price than the high price of the preceding candle.
A double-top candle is one that closes with a high price that is equal to the high price of the preceding candle.
Lower Candle Trends
A higher low candle is one that closes with a higher low price than the low price of the preceding candle.
A lower low candle is one that closes with a lower low price than the low price of the preceding candle.
A double-bottom candle is one that closes with a low price that is equal to the low price of the preceding candle.
█ FEATURES
Inputs
Start Date
End Date
Position
Text Size
Show Sample Period
Show Plots
Table
The table is colour coded, consists of three columns and twenty-two rows. Blue cells denote all candle scenarios, green cells denote green candle scenarios and red cells denote red candle scenarios.
The candle scenarios are listed in the first column with their corresponding total counts to the right, in the second column. The last row in column one, row twenty-two, displays the sample period which can be adjusted or hidden via indicator settings.
Rows two and three in the third column of the table display the total green and red candles as percentages of total candles. Rows four to nine in column three, coloured blue, display the corresponding candle scenarios as percentages of total candles. Rows ten to fifteen in column three, coloured green, display the corresponding candle scenarios as percentages of total green candles. And lastly, rows sixteen to twenty-one in column three, coloured red, display the corresponding candle scenarios as percentages of total red candles.
Plots
I have added plots as a visual aid to the various candle scenarios listed in the table. Green up-arrows denote higher high candles when above bar and higher low candles when below bar. Red down-arrows denote lower high candles when above bar and lower low candles when below bar. Similarly, blue diamonds when above bar denote double-top candles and when below bar denote double-bottom candles. These plots can also be hidden via indicator settings.
█ HOW TO USE
This indicator is intended for research purposes and strategy development. I hope it will be useful in helping to gain a better understanding of the underlying dynamics at play on any given market and timeframe. It can, for example, give you an idea of any inherent biases such as a greater proportion of green candles to red. Or a greater proportion of higher low green candles to lower low green candles. Such information can be very useful when conducting top down analysis across multiple timeframes, or considering trailing stop loss methods.
What you do with these statistics and how far you decide to take your research is entirely up to you, the possibilities are endless.
This is just the first and most basic in a series of indicators that can be used to study objective price action scenarios and develop a systematic approach to trading.
█ LIMITATIONS
Some higher timeframe candles on tickers with larger lookbacks such as the DXY, do not actually contain all the open, high, low and close (OHLC) data at the beginning of the chart. Instead, they use the close price for open, high and low prices. So, while we can determine whether the close price is higher or lower than the preceding close price, there is no way of knowing what actually happened intra-bar for these candles. And by default candles that close at the same price as the open price, will be counted as green. You can avoid this problem by utilising the sample period filter.
The green and red candle calculations are based solely on differences between open and close prices, as such I have made no attempt to account for green candles that gap lower and close below the close price of the preceding candle, or red candles that gap higher and close above the close price of the preceding candle. I can only recommend using 24-hour markets, if and where possible, as there are far fewer gaps and, generally, more data to work with. Alternatively, you can replace the scenarios with your own logic to account for the gap anomalies, if you are feeling up to the challenge.
It is also worth noting that the sample size will be limited to your Trading View subscription plan. Premium users get 20,000 candles worth of data, pro+ and pro users get 10,000, and basic users get 5,000. If upgrading is currently not an option, you can always keep a rolling tally of the statistics in an excel spreadsheet or something of the like.
Mason’s Line IndicatorThe Macon Strategy is an idea conceived by Didier Darcet , co-founder of Gavekal Intelligence Software. Inspired by the Water Level, an instrument used by masons to check the horizontality or verticality of a wall. This method aims to measure the psychology of financial markets and determine if the market is balanced or tilting towards an unfavorable side, focusing on the behavioral risk of markets rather than economic or political factors.
The strategy examines the satisfaction and frustration of investors based on the distance between the low and high points of the market over a period of one year. Investor satisfaction is influenced by the current price of the index and the path taken to reach that price. The distance to the low point provides satisfaction, while the distance to the high point generates frustration. The balance between the two dictates investors’ desire to hold or sell their positions.
To refine the strategy, it is important to consider the opinion of a group of investors rather than just one individual. The members of a hypothetical investor club invest successively throughout the past year. The overall satisfaction of the market on a given day is a democratic expression of all participants.
If the overall satisfaction is below 50%, investors are frustrated and sell their positions. If it is above, they are satisfied and hold their positions. The position of the group of investors relative to the high and low points represents the position of the air bubble in the water level. Market performance is measured day by day based on participant satisfaction or dissatisfaction.
In conclusion, memory, emotions, and decision-making ability are closely linked, and their interaction influences investment decisions. The Macon Strategy highlights the importance of the behavioral dimension in understanding financial market dynamics. By studying investor behavior through this strategy, it is possible to better anticipate market trends and make more informed investment decisions.
Presentation of the Mason’s Line Indicator:
The main strategy of this indicator is to measure the average satisfaction of investors based on the position of an imaginary air bubble in a tube delimited by the market’s highs and lows over a given period. After calculating the satisfaction level, it is then normalized between 0 and 1, and a moving average can be used to visualize trends.
Key features:
Calculation of highs and lows over a user-defined period.
Determination of the position of the air bubble in the tube based on the closing price.
Calculation of the average satisfaction of investors over a selected period.
Normalization of the average satisfaction between 0 and 1.
Visualization of normalized or non-normalized average satisfaction levels, as well as their corresponding moving averages.
User parameters:
Period for min and max (days) : Sets the period over which highs and lows will be calculated (1 to 365 days).
Period for average satisfaction (days) : Determines the period over which the average satisfaction of investors will be calculated (1 to 365 days).
Period for SMA : Sets the period of the simple moving average used to smooth the data (1 to 1000 days).
Bubble_value : Adjustment of the air bubble value, ranging from 0 to 1, in increments of 0.025.
Normalized average satisfaction : Option to choose whether to display the normalized or non-normalized average satisfaction.
Please note that the Mason’s Line Indicator is not a guarantee of future market performance and should be used in conjunction with proper risk management. Always ensure that you have a thorough understanding of the indicator’s methodology and its limitations before making any investment decisions. Additionally, past performance is not indicative of future results.
Kimchi Premium watchThis indicator provides easy-to-see Kimchi premium information.
It provides three pieces of information.
1. Current premium
2. The highest value of the premium over the last 240 candlesticks in the current timeframe.
3. The highest value of the premium over the last 240 candlesticks in the current timeframe.
I think this script is a very simple indicator.
It is usually recommended to get value in a large time frame.
The basic operation formula is as follows.
premium(percent) = ( BTC KRW - ( BTC USDT x USD KRW ) / ( BTC USDT x USDT USD x USD KRW )) x 100
Thank you.
Сoncentrated Market Maker Strategy by oxowlConcentrated Market Maker Strategy by oxowl. This script plots an upper and lower bound for liquidity provision, and checks for rebalancing conditions. It also includes alert conditions for when the price crosses the upper or lower bounds.
Here's an overview of the script:
It defines the input parameters: liquidity range percentage, rebalance frequency in minutes, and minimum trade size in assets.
It calculates the upper and lower bounds for liquidity provision based on the liquidity range percentage.
It initializes variables for the last rebalance time and price.
It defines a rebalance condition based on the frequency and current price within the specified range.
If the rebalance condition is met, it updates the last rebalance time and price.
It plots the upper and lower bounds on the chart as lines and adds price labels for both bounds.
It defines alert conditions for when the price crosses the upper or lower bounds.
Finally, it creates alert conditions with appropriate messages for when the price crosses the upper or lower bounds.
Concentrated liquidity is a concept often used in decentralized finance (DeFi) market-making strategies. It allows liquidity providers (LPs) to focus their liquidity within a specific price range, rather than across the entire price curve. Using an indicator with concentrated liquidity can offer several advantages:
Increased capital efficiency: Concentrated liquidity allows LPs to allocate their capital within a narrower price range. This means that the same amount of capital can generate more significant price impact and potentially higher returns compared to providing liquidity across a broader range.
Customized risk exposure: LPs can choose the price range they feel most comfortable with, allowing them to better manage their risk exposure. By selecting a range based on their market outlook, they can optimize their positions to maximize potential returns.
Adaptive strategies: Indicators that support concentrated liquidity can help traders adapt their strategies based on market conditions. For example, they can choose to provide liquidity around a stable price range during low-volatility periods or adjust their range when market conditions change.
To continue integrating this script into your trading strategy, follow these steps:
Import the script into your TradingView account. Navigate to the Pine editor, paste the code, and save it as a new script.
Apply the indicator to a trading pair chart. You can customize the input parameters (liquidity range percentage, rebalance frequency, and minimum trade size) based on your preferences and risk tolerance.
Set alerts for when the price crosses the upper or lower bounds. This will notify you when it's time to take action, such as adding or removing liquidity, or rebalancing your position.
Monitor the performance of your strategy over time. Adjust the input parameters as needed to optimize your returns and manage risk effectively.
(Optional) Integrate the script with a trading bot or automation platform. If you're using an API-based trading solution, you can incorporate the logic and conditions from the script into your bot's algorithm to automate the process of providing concentrated liquidity and rebalancing your positions.
Remember that no strategy is foolproof, and past performance is not indicative of future results. Always exercise caution when trading and carefully consider your risk tolerance.