Bull/Bear Ratio By Month Table [MsF]Japanese below / 日本語説明は英文の後にあります。
-------------------------
This is an indicator that shows monthly bull-bear ratio in a table.
By specifying the start year and end year, the ratio will be calculated and showed based on the number of bullish and bearish lines in the monthly bar. It allows you to analyze the trend of each symbol and month (bullish / bearish). Up to 10 symbols can be specified.
You can take monthly bull-bear ratio for the past 10 or 20 years on the web, but with this indicator, you can narrow it down to the period in which you want to see the symbols you want to see. It is very convenient because you can take statistics at will.
Furthermore, if the specified ratio is exceeded, the font color can be changed to any color, making it very easy to read.
=== Parameter description ===
- From … Year of start of aggregation
- To … Year of end of aggregation
- Row Background Color … Row title background color
- Col Background Color … Column title background color
- Base Text Color … Text color
- Background Color … Background Color
- Border Color … Border Color
- Location … Location
- Text Size … Text Size
- Highlight Threshold … Ratio threshold, and color
- Display in counter? … Check if you want to show the number of times instead of the ratio
-------------------------
月別陰陽確率をテーブル表示するインジケータです。
開始年から終了年を指定することで、月足における陽線数および陰線数を元に確率を計算して表示します。
この機能により各シンボルおよび各月の特徴(買われやすい/売られやすい)を認識することができアノマリー分析が可能です。
シンボルは10個まで指定可能です。
過去10年、20年の月別陰陽確率は、Web上でよく見かけますが、このインジケータでは見たいシンボルを見たい期間に絞って、
自由自在に統計を取ることができるため大変便利です。
なお、指定した確率を上回った場合、文字色を任意の色に変更することができるため、大変見やすくなっています。
=== パラメータの説明 ===
- From … 集計開始年
- To … 集計終了年
- Row Background Color … 行タイトルの背景色
- Col Background Color … 列タイトルの背景色
- Base Text Color … テキストカラー
- Background Color … 背景色
- Border Color … 区切り線の色
- Location … 配置
- Text Size … テキストサイズ
- Highlight Threshold … 色変更する確率の閾値、および色
- Display in counter? … 確率ではなく回数表示する場合はチェックする
Count
FiboSequFiboSequ: Fibonacci Sequence Marking
Leonardo Fibonacci was an Italian mathematician who lived in the 12th century. His real name was Leonardo of Pisa, but he is commonly known as "Fibonacci." Fibonacci is famous for introducing the Hindu-Arabic numeral system to the Western world. This system is the basis of the modern decimal number system we use today.
Fibonacci Sequence
The Fibonacci sequence is a series of numbers that frequently appears in mathematics and nature. The first two numbers in the sequence are 0 and 1, and each subsequent number is the sum of the two preceding numbers.
The sequence is as follows:
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, ...
Fibonacci Time Zones:
Fibonacci time zones are used to identify potential turning points in the market at specific time intervals. These time zones correspond to the Fibonacci sequence in terms of consecutive days or weeks.
The Fibonacci sequence has a wide range of applications in both mathematics and nature. Leonardo Fibonacci's work has had a significant impact on the development of modern mathematics and numeral systems. In financial markets, the Fibonacci sequence and ratios are frequently used by technical analysts to predict and analyze market movements.
Description:
Overview:
The FiboSequ indicator marks significant days on a price chart based on the Fibonacci sequence. This can help traders identify potential turning points or areas of interest in the market. The Fibonacci sequence is a series of numbers where each number is the sum of the two preceding ones, often found in nature and financial markets.
Fibonacci Sequence:
The sequence used in this indicator includes: 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, and 2584.
These numbers represent the days to be marked on the chart, highlighting possible significant market movements.
How It Works:
User Input:
Users can input the starting date (Year, Month, and Day) from which the Fibonacci sequence will begin to be calculated.
This allows flexibility and customization based on the trader's analysis needs.
Calculation:
The starting date is converted into a timestamp in seconds.
For each bar on the chart, the number of days since the starting date is calculated.
The indicator checks if the current day matches any of the Fibonacci sequence days, the previous day, or the next day.
In this indicator, Fibonacci numbers can be displayed on the chart as plus and minus 2 days. For example, for the 145th day, signals start to appear as 143,144 and 145. This is due to dates that sometimes coincide with weekends and public holidays.
Marking the Chart:
When a match is found, a label is placed above the bar indicating the day number from the Fibonacci sequence.
These labels are colored blue with white text for easy visibility.
Usage:
This indicator can be used on any timeframe and market to help identify potential areas where price might react.
It is especially useful for those who employ Fibonacci analysis in their trading strategy.
Example:
If the starting date is January 1, 2020, the indicator will mark significant Fibonacci days (e.g., 1, 3, 5, 8 days, etc.) on the chart from this date onward.
Community Guidelines Compliance:
This indicator adheres to TradingView's Pine Script community guidelines.
It provides customizable user inputs and does not violate any terms of use.
By using the FiboSequ indicator, traders can enhance their technical analysis by incorporating time-based Fibonacci levels, potentially leading to better market timing and decision-making.
Frequently Asked Questions (FAQ)
Q: What is the FiboSequ indicator?
A: The FiboSequ indicator is a technical analysis tool that marks significant days on a price chart based on the Fibonacci sequence. This indicator helps traders identify potential turning points or areas of interest in the market.
Q: What is the Fibonacci sequence and why is it important?
A: The Fibonacci sequence is a series of numbers where each number is the sum of the two preceding ones. The first two numbers are 0 and 1. This sequence frequently appears in nature and financial markets and is used in technical analysis to identify important support and resistance levels.
Q: How do the Fibonacci time zones in the indicator work?
A: Fibonacci time zones are used to identify potential market turning points at specific time intervals. The indicator calculates days based on the Fibonacci sequence (e.g., 1, 3, 5, 8 days, etc.) from the starting date and marks them on the chart.
Q: How can users set the starting date?
A: Users can input the starting date by specifying the year, month, and day. This sets the date from which the indicator begins its calculations, providing flexibility for user analysis.
Q: What do the labels in the indicator represent?
A: The labels mark specific days in the Fibonacci sequence. For example, 1st day, 3rd day, 5th day, etc. These labels are displayed in blue with white text for easy visibility.
Q: Which timeframes can I use the FiboSequ indicator on?
A: The FiboSequ indicator can be used on any timeframe. This includes daily, weekly, or monthly charts, as well as shorter timeframes.
Q: Which markets can the FiboSequ indicator be used in?
A: The FiboSequ indicator can be used in various financial markets, including stocks, forex, cryptocurrencies, commodities, and more.
Q: How can I achieve better market timing with the FiboSequ indicator?
A: The FiboSequ indicator helps identify potential market turning points using time-based Fibonacci levels. This can lead to better market timing and more informed trading decisions for traders.
-Please feel free to write your valuable comments and opinions. I attach importance to your valuable opinions so that I can improve myself.
Weekend Analysis
There are always discussions about how the weekend affects Crypto-Coins.
It seems that on Monday, the price usually returns to Friday's level.
To make a qualified statement, I wrote this script that tests exactly that
and provides an evaluation.
It displays a candle for Saturday and Sunday.
Either green or red, but also blue if there was hardly any movement.
This threshold is set at 2%, but can be changed in the settings.
If the relative distance from Saturday's open to Friday's close is less than this value,
it counts as the same.
The timeframe should be between day and hour so that Tradingview goes back far enough in the past.
The output (here for BTC)
Total: 477
Lower: 20%
Equal: 55%
Higher: 25%
is displayed in the chart, but also output via the log function.
Candle StrategyThis strategy is based candle count number also strategy analysis -
Rules for buy-
1) choose Candle Number(Ex.-47) For Trade
2) Trade Sell if price is above high of day 1st candle that mean direction is upside
3) We are taking stop loss on lowest low of candle since day first candle to trade no.
4) close Trade at last bar of the day
5) Trader Can Choose Trade Direction From input
Rules for Sell-
1) Choose Candle Number(Ex.-47) For Trade
2) Trade Sell if price is below low of day 1st candle that mean direction is downside
3) We are taking stop loss on highest of candle since day first candle to trade no.
4) close Trade at last bar of the day
5) Trader Can Choose Trade Direction From input
Note - this strategy can be also use for static to understand which candle will make low/high of the day high chance Example in bank nifty 5 minutes chart candle no 47 have highest trade
opportunity appear on long side ...this data is small based on 5000 previous bar ...
Disclaimer: market involves significant risks, including complete possible loss of funds. Consequently trading is not suitable for all investors and traders. By increasing leverage risk increases as well.With the demo account you can test any trading strategies you wish in a risk-free environment. Please bear in mind that the results of the transactions of the practice account are virtual, and do not reflect any real profit or loss or a real trading environment, whereas market conditions may affect both the quotation and execution
Trend Direction Sequence | Auto-Multi-TimeframeThe main benefit of this indicator is the ability to see multiple higher timeframes at ones to get a better overview of signals that could mark possible trend reversals with more weight than those on the selected timeframe. Since the higher timeframes are calculated automatically, the user needs to set a Period Multiplier that multiplies the selected timeframe several times to determine the higher timeframes. Equal periods are filtered out. And the current highest timeframe is capped at 1 year by TradingView.
It is possible to alter the sequence Count Limit and the underlying Wavelength. The Wavelength defines the distance between the starting and ending candle. This builds the minimum condition to find a trend. A longer Wavelength means that the distortions between the start and end candle can be bigger, so it can become easier to find a trending sequence. But be careful not to set the length too high as this could mean that the resulting sequence does not really represent a trend anymore. The Count Limit defines the completion of a trending sequence. A higher number makes it more difficult to find a completed sequence, but also makes the result more reliable. If the Wavelength is changed, the Count Limit should be adjusted accordingly.
There is also a qualifier for the completion of a sequence. A completed sequence only will be labeled on the chart, if it is proved that the lowest low/highest high of the last two candlesticks of a period is lower/higher than that of the previous two candlesticks. It does not require the trend to be continuous on the last candlestick. On the contrary, a trend shift may already have begun.
By default, the labeling of completed sequences will appear on the highs and lows of the specific periods. Because the higher periods will take time and several candlesticks to appear, the labels will be redrawn accordingly. As an option it is possible to disable the Count Limit for completed sequences so that the labels will be fluently redrawn until the corresponding sequences are interrupted by trend breaks. Only activate this option, if it can serve a plausible strategy.
The count status of all sequences in the specific timeframe periods is listed in a table. Also the results of the trends in higher timeframes are accumulated and combined into an overall trend. Positive trends are counted as positive, negative in the opposite case. To see the resulting Trend Shift Signals, the user can set a filter under 100% so that not all of them will be filtered out and therefore labeled on the chart (this signals cannot be redrawn). An “External Indicator Analysis Overlay” can be used to analyze the profitability with the provided Trend Shift Signal (TSS) which switches from 0 to 1, if the trend becomes positive or from 0 to -1, if the trend becomes negative.
Highest/Lowest value since X time ago, various indicatorsThis script will count the bars back since the last time the current bar indicator value was either this low or this high.
It will provide the time in either, seconds, minutes, hours, days, weeks, months, or years.
please note:
There are currently no alerts setup for this script.
the length options only apply to the sources that have the "(MA)" in their name.
There is a horizontal line display issue which corrects once you adjust the amount of sources you want to use.
Once you select the amount of sources you would like to use, align the indicator so the horizontal lines match up with the table lines.
If find any bugs in the script, let me know.
HTF Bar Close CountdownThis simple indicator displays a countdown for the amount of time left until a bar of your chosen timeframe closes.
Displays up to 5 different HTF countdowns.
Fully Customizable to fit any style, change the text colors, background colors, frame colors, display size and border & frame widths.
Flat display option for a sleek look to mesh with your charts.
Notes/Tips:
Higher Time Frames only! This is only intended to view HTF countdowns, will not work when trying to use a timeframe lower than your current chart's.
Some weird timeframes do not work, you'll know when.
Only works on live charts! Will display "Closed" when on an inactive chart.
Does not work for replay! A countdown is pretty pointless on a replay that is not real-time anyways...
Enjoy!
FunctionPatternFrequencyLibrary "FunctionPatternFrequency"
Counts the word or integer number pattern frequency on a array.
reference:
rosettacode.org
count(pattern)
counts the number a pattern is repeated.
Parameters:
pattern : : array : array with patterns to be counted.
Returns:
array : list of unique patterns.
array : list of counters per pattern.
usage:
count(array.from('a','b','c','a','b','a'))
count(pattern)
counts the number a pattern is repeated.
Parameters:
pattern : : array : array with patterns to be counted.
Returns:
array : list of unique patterns.
array : list of counters per pattern.
usage:
count(array.from(1,2,3,1,2,1))
Intraday Bar CountingAs a day-trader, revising is the most important habit.
This script adds numbers on intraday bars to help you revise and analyze patterns and your entries/exits. Great help!
How To Count DecimalsCustom f_nDecimals() function returns precision of decimal numbers of the following forms:
const, input, simple, and series of the following types: float, integer, and string.
Error checking is performed for valid numbers and invalid values return NaN.
NOTICE: This is an example script and not meant to be used as an actual strategy. By using this script or any portion thereof, you acknowledge that you have read and understood that this is for research purposes only and I am not responsible for any financial losses you may incur by using this script!
FunctionElementsInArrayLibrary "FunctionElementsInArray"
Methods to count number of elements in arrays
count_float(sample, value) Counts the number of elements equal to provided value in array.
Parameters:
sample : float array, sample data to process.
value : float value to check for equality.
Returns: int.
count_int(sample, value) Counts the number of elements equal to provided value in array.
Parameters:
sample : int array, sample data to process.
value : int value to check for equality.
Returns: int.
count_string(sample, value) Counts the number of elements equal to provided value in array.
Parameters:
sample : string array, sample data to process.
value : string value to check for equality.
Returns: int.
count_bool(sample, value) Counts the number of elements equal to provided value in array.
Parameters:
sample : bool array, sample data to process.
value : bool value to check for equality.
Returns: int.
count_color(sample, value) Counts the number of elements equal to provided value in array.
Parameters:
sample : color array, sample data to process.
value : color value to check for equality.
Returns: int.
extract_indices_float(sample, value) Counts the number of elements equal to provided value in array, and returns its indices.
Parameters:
sample : float array, sample data to process.
value : float value to check for equality.
Returns: int.
extract_indices_int(sample, value) Counts the number of elements equal to provided value in array, and returns its indices.
Parameters:
sample : int array, sample data to process.
value : int value to check for equality.
Returns: int.
extract_indices_string(sample, value) Counts the number of elements equal to provided value in array, and returns its indices.
Parameters:
sample : string array, sample data to process.
value : string value to check for equality.
Returns: int.
extract_indices_bool(sample, value) Counts the number of elements equal to provided value in array, and returns its indices.
Parameters:
sample : bool array, sample data to process.
value : bool value to check for equality.
Returns: int.
extract_indices_color(sample, value) Counts the number of elements equal to provided value in array, and returns its indices.
Parameters:
sample : color array, sample data to process.
value : color value to check for equality.
Returns: int.
count pivot high/lowthis script count pivot higher high and pivot lower low ...its useful understanding swing of market bull pressure and bear pressure ..
when price make swing high it count +1 ..this script can help in price action manual trading understading high and low also newbie pinescript coder to learn counter ..i learn these thing from al brook price action trading books .
to make this script i took pivot high and low inbuild script from Tradingview ...to code this idea one of good friend @fikira helped me ..
in v2 version i hope will able to count intraday piovt high and low ..
candle countsmall script for count bar ...it count bar from open of day till end of day ...
in lower time its deleting candle count because of tradingview label limit 50
. bar counting it help me to teach trader bar by bar ...some of bar in all world chart are very important ..in al brook sir book and his website he marked many imortant bar no
for reference al brook sir said about bar counting method
the highest probability trade was the one that I said. When bar 62 was happening, I said, “Traders are buying,” you know, “I’m buying, it’s going up,” right? So 62 is the highest probability trade, but that does not mean it’s the easiest trade. It just means the probability that we’re going to get some kind of a measured move out of 62 is very high, probably 70 percent.
thanks to stack overflow that code is ans there
in this script many people help me thanks to @HappyBaby86 and @Kjaerbye#7503
sorry my english is not good.my native language is Hindi ..
Multi-time-Frame number of days in the chartHelps to see the number of days in any default timeframe chart. (Not yet tested with custom time frames!)
Please like and favorite this script if you like it!
Any donations of tradingview coins to help me buy a tradingview pro membership would also be highly appreciated! Thank you!
Higher High and Lower Low Bar CountThe importance of counting HH&LL is to find the possible extreme of the current leg and the potential reversal.
This script helps you count the number of bars which are constantly higher or lower than the previous ones.
I set the script to count from the first one, but only display the number from the third, in order to eliminate too much noise.
Note : I have loosened the criteria of HH and LL.
Let's take "higher high" as an example, I will count the number If the current bar's low is higher than the previous one's and its high is higher or equal to the previous one's , and vice versa.
If you prefer the strict definition of HH or LL, you can modify the code as you wish.
counting candlesSimple script to count all plotted ticks in a given timeframe.
Can be used to verify if TradingView base data is not complete for executing your own scripts.
How To Limit n Round Trips Per Day [Alerts]Example how to limit the number of round trips per day. If entry condition is never met logic will force a round trip at end of day. Set chart to a timeframe that is lower than 1 Day period.
NOTICE: This is an example script and not meant to be used as an actual strategy. By using this script or any portion thereof, you acknowledge that you have read and understood that this is for research purposes only and I am not responsible for any financial losses you may incur by using this script!
Backward Number of BarsThis indicator was written in order to apply bar limit in strategies and it was published as open code so that everyone can use it. When backtesting with stock market api data, we determine how many bars should be, not from which date the data will be drawn. For example, we can draw 1000 bar data from stock exchange and perform the backtest on this data. You can plan your strategy by checking the number of bars you test with the window () == 1 parameter here while checking through Tradingview to check that the test we performed gives correct results.
B3 Clear Method Streak CountAbout Clear Method -- to repeat my prior post on the bar painter script:
This indicator is translated out of Technical Analysis of Stocks & Commodities , September 2010, (I take zero design credit). The script simply looks for the price action to break or "clear" the most recent action, and only changes the paintbar color if the action indeed clears the previous candles. Simple to use, just add to your chart from your favorites and change the colors in the UI. It does the rest.
This version can replace my previous Clear Method Bar Painter as it also paints the bars.
What is different is this share is a lower study that counts the streak of the bars shown via histogram.
The way to use the streak is to notice the previous streaks and get a sense of how long the current trend is lasting versus prior trends of the same direction.
@Tradestation recently posted their "price streak" study, and this one is quite similar in nature.
Enjoy, the code open to view,
_B3
d^.^b
Consecutive Candle Count Momentum StrategyVery simple strategy based on consecutive candle count. Simple but can be very profitable if you know how to execute.
Example:
- Buy when consecutive up closes exceeds 3
- Sell when consecutive down closes exceeds 3
For a buy signal, if price closes higher within 5 candles, it is defined as a win.
For a sell signal, if price closes lower within 5 candles, it is defined as a win.
Win rates for buy/sell signals are calculated over history of security.
Bar's direction InfoBar's direction Info show number of case which bars have same direction and counting percent of next bar's direction.
This info may be useful to trade Binary Option.