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? … 確率ではなく回数表示する場合はチェックする
Bullbear
Bull Bear Power with Optional Normalization FunctionThis indicator is designed to provide traders with insights into market sentiment and potential trend reversals. This indicator enhances the traditional Bull Bear Power (BBP) by adding valuable visualizations and customization options to assist traders in making informed trading decisions.
Indicator Overview:
The NBBP indicator calculates Bull Bear Power, which measures the strength of bullish and bearish forces in the market. It does so by taking the difference between the high and the exponential moving average (EMA) of the closing price for a specified length. This raw BBP is represented on the chart as a line.
Key Features:
-- Zero Line : The NBBP indicator introduces a central reference line at zero. This line serves as a pivotal point for interpreting market sentiment. When the BBP line is above zero, it is colored green, indicating a predominance of bullish sentiment. Conversely, when the BBP line is below zero, it turns red, signaling a prevalence of bearish sentiment. This coloration helps traders quickly identify shifts in market sentiment.
-- OPTIONAL Normalization Function : One of the standout features of the NBBP indicator is its optional normalization function. When activated in the settings menu, this function scales the BBP values from -1 to +1. This means that BBP values are adjusted to fit within a standardized range, making it easier for traders to compare sentiment across different timeframes or assets. Normalization is particularly valuable for identifying extreme sentiment conditions and potential reversals.
-- Moving Average : To provide additional context and smooth out BBP fluctuations, the indicator includes an exponential moving average (EMA). The EMA of BBP is plotted on the chart as a white line. Traders can use this moving average to identify trends and potential trend reversals.
-- Fill Between Lines : The indicator visually enhances the BBP by filling the area between the BBP line and the zero line with a translucent color. This fill helps traders visualize the strength and duration of bullish or bearish sentiment.
Interpretation:
-- BBP Line : Traders can assess the raw BBP line for shifts in sentiment. When the line crosses above zero, it may suggest a shift from bearish to bullish sentiment, potentially indicating a buying opportunity. Conversely, when the line crosses below zero, it may signal a shift from bullish to bearish sentiment, suggesting a potential selling opportunity.
-- Normalization Function : The optional normalization function allows traders to gauge sentiment on a standardized scale. Values above 0 indicate bullish sentiment, while values below 0 suggest bearish sentiment. The closer the values are to their polar ends (-1 or +1), the stronger the sentiment.
-- Moving Average : The EMA of BBP helps identify trends. When BBP crosses above the EMA, it may indicate a strengthening bullish trend, while a crossover below the EMA may suggest a bearish trend.
Customization:
The NBBP indicator provides traders with flexibility through customizable settings. Users can adjust the BBP length, EMA length, and choose to activate or deactivate the normalization function based on their trading preferences and strategy.
Limitations:
The NBBP indicator is most effective when used in conjunction with other technical analysis tools and market context. Traders should consider multiple factors when making trading decisions.
Normalization function results may vary depending on the chosen length and market conditions. If the desired result is not achieved through default settings, try changing timeframes or toggling on/off the normalization function. Users should exercise caution and combine it with other indicators and analysis techniques.
In conclusion, the NBBP indicator is a versatile tool that empowers traders to assess market sentiment, identify potential reversals, and follow trends. Its intuitive visualizations, normalization function, and customizable settings make it a valuable addition to any trader's toolkit.
Balance of Force (BOF)The script "Balance of Force" is an indicator that aims to provide insight into the bullish and bearish forces present in the market by analyzing the relationship between bullish and bearish true ranges. The indicator first calculates the bearish and bullish true ranges by taking the absolute difference between the open and close prices for each period and summing these values over a user-specified length. It then calculates the ratio of the bullish true range to the bearish true range and takes the natural logarithm of this value, resulting in the "bullish-bearish ratio".
The script then calculates the standard deviation of this ratio over a user-specified length to create a measure of volatility. Using this deviation and the dominant cycle, it then applies an exponential moving average to smooth the ratio. The indicator plots the smoothed ratio, the raw ratio, and the deviation of the ratio multiplied by 1, 2 and 3 in addition to filling the area between the deviation multiplied by 3 and the log(1) with red and green. The user can use the indicator to identify potential bullish or bearish market conditions by analyzing the relationship between the smoothed ratio and the log(1) and the deviation of the ratio.
Stock Market Emotion Index (SMEI)Implementation of Charlie Q. Yang's research paper “The stock market emotion index”, subtitle “A New Sentiment Measure Using Enhanced OBV and Money Flow Indicators”, (2007) where he combined “five simple emotion statistics” - Close Emotion Statistic (CES), Money Flow Statistic (MFS), Supply Demand Statistic (SDS), Relative Strength Statistic (RSS), and Psychological Level Statistic (PLS) - into one indicator.
Quotations:
“The index calculation is solely based on observed short term market volatility as reflected by each day’s trading volume, open, high, low, and close prices”
“The basic premise of Dow theory is that the market discounts everything, including the emotions of all traders. The fundamentals of a company do not change suddenly when its daily stock price is fluctuating as driven by human emotions that are often irrational. However, over a longer time period, a company's fundamentals do change. Again, different types of human emotions, triggered by the flow of material events, are moving the stock price trend up or down. This paper summarizes the author’s attempt in understanding primary trend extent and duration by proposing a new sentiment measure using statistical analysis of stock market human emotion.”
Even though “indicator is intended for identifying primary trend cycles that typically last one year or longer“ where Mr. Yang used a fixed averaging length of 260 days and only days as time frame, my implementation has been changed slightly to accommodate for all time frames and to adapt faster using shorter averaging (timeframe dependent).
How to use it:
Positive values indicating a bullish trend and negative values indicating a bearish trend. Background color is set to green or red accordingly.
Positive and negative bar to bar changes are indicated with green and red to show bar to bar (ultra short term) trends.
(No financial advise, use for testing purposed only)
Tilson Bull-Bear-MarkerThe Tilson Bull-Bear marker is using 2 Tilson moving averages and their divergence to identify bull and bear trends and reversals (potential entry or exit points).
How to use it:
Fast T3 (thick line) above thin line / solid blue fill color = ongoing bull trend
Slow T3 (thin line) above thick line / solid red fill color = ongoing bear trend
Shrinking or expanding divergence between the lines = trend is getting hotter or cooling down
Fast T3 (thick line) changes color from blue to red = potential trend reversal from bullish to bearish
Fast T3 (thick line) changes color from red to blue = potential trend reversal from bearish to bullish
(No financial advise, for testing purposes only)
Combo 2/20 EMA & Bull And Bear Balance This is combo strategies for get a cumulative signal.
First strategy
This indicator plots 2/20 exponential moving average. For the Mov
Avg X 2/20 Indicator, the EMA bar will be painted when the Alert criteria is met.
Second strategy
This new indicator analyzes the balance between bullish and
bearish sentiment.
One can cay that it is an improved analogue of Elder Ray indicator.
To get more information please see "Bull And Bear Balance Indicator"
by Vadim Gimelfarb.
WARNING:
- For purpose educate only
- This script to change bars colors.
Green to Red Gradient for Dynamic / Color Changing IndicatorsI have evenly divided every color between green and red.
This gradient is useful for pine coders who are creating color changing, dynamic, or gradient indicators.
Trend ExplorerAre we in a bull or a bear market?
From the technical analysis point of view, the answer is "It depends". It depends from the parameters of your indicator, the timeframe of the pair you are looking and the volatility of that specific market you are looking to.
After I experimented with various trending indicators I decided to develop a framework that potentially could "embed" already existing logic from well known indicators (e.g. Supertrend OTT etc.).
The most important part is that I managed to abstract that logic away and experiment even further to produce some more robust, market and timeframe resolution agnostic results. While at the same time I was able to switch between market and timeframe resolution specific configuration to take some decision.
Finally, I decided to share this code with you folks! Developed this indicator "Trend Explorer" in an effort to make the aforementioned abstraction of all those trending indicators.
The goal is to enable the user to explore and combine different approaches in order to create a more robust and market general/specific, timeframe resolution invariant/fluctuating and volatility auto/manual adjusted indicator according to his needs.
The logic behind the abstraction is fairly simple. The trending indicator consists of two boundary lines the "bull trend low boundary" (green) and the "bear trend high boundary" (red). The indicator also has a control line (orange). Every time the control line crosses a boundary there is a trend reversal! The boundary lines are defined by the thresholds. To be more precise, boundaries are pulled upwards by thresholds (blue) during a bull market and downwards during a bear market. I challenge the user to experiment with the different ways of calculating the thresholds and the control. I am open to suggestions that might improve and extend the possibilities of this indicator. Any feedback, comments, general thoughts or bug reports are welcome.
Why did I chose those defaults?
For threshold calculation I chose MINMAX which calculates the local minimum and maximum using a sliding window. As far as I know it is not used in any existing trending indicator, but it seems reasonable for a trader to search for local min and max to make a decision. The width of the sliding window a.k.a the "period to remember" the local min and max is 30 days by default, just because I believe that for regular people it is a reasonable period of time to forget too.
Also, compared to the SUBADD method MINMAX does not seem to lag behind, especially when using averages in the SUBADD mode. Moreover, I consider MINMAX to be more general than the margins used by the SUBADD since margins should be configured based on the underlying market volatility.
For a source of min and max I chose the low and high values just because they are timeframe resolution invariant, meaning that they have the same (not exactly due to number precision and rounding, but very close) results for a single pair whether you use "4 hour" or "1 day" time interval! Another popular choice might be (close, close) since many traders wait for the daily candle to close in order to discard outliers. However, this approach is not resolution invariant and it depends from the time interval the user has selected.
Do you have any interesting trending indicator you would like to see how it performs in this framework logic? Let me know!
Do you have in mind any variation of Control or Thresholds calculation you would like to test? Please describe it in the comments below so I can add it in my implementation for you!
Did you find any other bug or you experienced any strange behavior? PM me with a description of the bug, the trading pair the timeframe resolution the exact time (candle) and all the necessary configurations for this indicator so I can reproduce it on my machine!
Please enjoy with caution,
Jason
Bull Bear Power1. Calculate
* Base on RSI status in the same period of price bar, "Bull Bear Power" is counting number of bars moved above 70 then return result to "bull power" series, and counting number of bars moved below 30 then return result to "bear power" series.
* By default RSI period is 2 and Bar period is 15.
2. Interface
* Bull power: green columns.
* Bear power: red columns.
* Info Line: show info of RSI and Bull Bear Power
- Bull Bear Power info: Period, Bull value, Bear value
- RSI info: RSI value, RSI status: overbought (>70), oversold(<30), crossunder 70, crossover 30.
3. Trade:
* Consider place Long oder when Bull power increase from below to above Bear power
* Consider place Short oder when Bear power increase from below to above Bull power
[blackcat] L2 Bull Bear Convergence Divergence (BBCD)Level: 2
Background
A bull market is gaining ground and is economically sound, while a bear market is declining and most stocks are depreciating. The actual origins of these terms are unclear, but one reason could be that bulls attack by pulling their horns up while bears attack by brushing their paws down.
Function
L2 Bull Bear Convergence Divergence (BBCD) disclose the convergence divergence of the bull bear as a market opinion indicator. It tells you the opinion of those who are directly involved with the markets. As a trader, understanding how the convergence divergence of the bull bear works can be of great help. I inherited the traditional MACD expression method, and added golden cross (yellow cross) and dead cross (fuchsia cross) prompts, as well as bottom divergence (lime cross) and top divergence (red cross) prompts.
Key Signal
bbd --> bull bear fast line
bbdsupport --> bull bear slow line and support level
bbdgx --> bull bear gold cross in yellow
bbddx --> bull bear dead cross in fuchsia
bbotdiverg --> bull bear bottom divergence alert in lime cross
btopdiverg --> bull bear top divergence alert in red cross
Pros and Cons
Pros:
1. it can help to see the strength change of a trend in time
2. visual bottom and top divergence alerts are provided
Cons:
1. it disclose the strength change better than price change
Remarks
Bull Bear Convergence Divergence (BBCD) is new.
Readme
In real life, I am a prolific inventor. I have successfully applied for more than 60 international and regional patents in the past 12 years. But in the past two years or so, I have tried to transfer my creativity to the development of trading strategies. Tradingview is the ideal platform for me. I am selecting and contributing some of the hundreds of scripts to publish in Tradingview community. Welcome everyone to interact with me to discuss these interesting pine scripts.
The scripts posted are categorized into 5 levels according to my efforts or manhours put into these works.
Level 1 : interesting script snippets or distinctive improvement from classic indicators or strategy. Level 1 scripts can usually appear in more complex indicators as a function module or element.
Level 2 : composite indicator/strategy. By selecting or combining several independent or dependent functions or sub indicators in proper way, the composite script exhibits a resonance phenomenon which can filter out noise or fake trading signal to enhance trading confidence level.
Level 3 : comprehensive indicator/strategy. They are simple trading systems based on my strategies. They are commonly containing several or all of entry signal, close signal, stop loss, take profit, re-entry, risk management, and position sizing techniques. Even some interesting fundamental and mass psychological aspects are incorporated.
Level 4 : script snippets or functions that do not disclose source code. Interesting element that can reveal market laws and work as raw material for indicators and strategies. If you find Level 1~2 scripts are helpful, Level 4 is a private version that took me far more efforts to develop.
Level 5 : indicator/strategy that do not disclose source code. private version of Level 3 script with my accumulated script processing skills or a large number of custom functions. I had a private function library built in past two years. Level 5 scripts use many of them to achieve private trading strategy.
10/5 Weekly/Daily EMAs with ConfirmationsPlots Daily and Weekly 10 & 5 EMAs (but fully customizable to your own).
In addition to plotting the EMAs it color coordinates trend bias and has cross confirmation signals.
Philosophy and how to read:
I use this indicator when trading strictly on the daily timeframe. I have not tested it on other timeframes.
In my trade system I start with both the monthly and weekly charts to define overall bias.
Here’s the general rule of thumb.
10 EMA is direction (bias) and 5 EMA is price.
If 5EMA is below 10EMA there is a bear bias. If 5EMA is above 10EMA there is a bull bias.
This indicator will plot both the daily and weekly 10 & 5 EMAs.
It will also color code the background based on how these EMAs relate to each other.
Light red typically is just the daily is confirmed bear (typically because it could be either or)
Dark red, both daily and weekly in confirmed bear.
Light green, typically just daily is confirmed bull (typically because it could be either or)
Dark green, both daily and weekly in confirmed bull.
In addition to background highlight there is confirmation crosses.
The daily confirmation cross is default yellow triangle.
Down triangle is 5 crossing the 10 downward.
Up triangle is the 5 crossing the 10 upward.
The weekly confirmation is the same only is aqua color.
Generally, on a color change you want to see one or both confirmation in the direction of the bias change.
If you only want to plot the daily bias in the options unclick the setting: Include Weekly Background Plotting. Unclicking this will remove the background coloring for the weekly bias. This might be helpful if you only want to see the strength of what the weekly timeframe is telling you.
Also, I’m primarily a trend trader but I also do have a reversal system I trade with lower R:R parameters.
A good reversal confirmation signal I’ve noticed is the instrument that you are trading should go through a cycle of light color to dark color.
You could also create alerts with this indicator based on just signals. When the signal fires the value will be 1.
Future Updates:
I want to find some way to correlate the distance between these EMAs to enhance the signal. Also to include a velocity component. Plus a few more things.
If you like this indicator please like and leave a comment down below.
Bill Williams Divergent BarsBill William Bull/Bear divergent bars
See: Book, Trading Chaos by Bill Williams
Coded by polyclick
A bullish (green) divergent bar, signals a trend switch from bear -> bull
-> The current bar has a lower low than the previous bar, but closes in the upper half of the candle.
-> This means the bulls are pushing from below and are trying to take over, potentially resulting in a trend switch to bullish.
-> We also check if this bar is below the three alligator lines to avoid false positives.
A bearish (red) divergent bar, signals a trend switch from bull -> bear
-> The current bar has a higher high than the previous bar, but closes in the lower half of the candle.
-> This means the bears are pushing the price down and are taking over, potentially resulting in a trend switch to bearish.
-> We also check if this bar is above the three alligator lines to avoid false positives.
Best used in combination with the Bill Williams Alligator indicator.