Zweig Market Breadth Thrust Indicator StrategyThe Breadth Thrust Indicator is a technical indicator which determines market momentum, signaling the start of a potential new bull market.
The Breadth Thrust Indicator was developed by Martin Zweig, an American stock investor, financial analyst, and investment adviser. According to Zweig, the concept is based on the principle that the sudden change of money in the investment markets elevates stocks and signals increased liquidity. In other words, this indicator is all about how quickly the NYSE's advancing and declining numbers go from poor to great in a compressed time period.
A "Thrust" indicates that the stock market has rapidly changed from an oversold condition to one of strength, but has not yet become overbought. This is very rare and has happened only a few times. Dr . Zweig also points out that most bull markets begin with a Breadth Thrust.
More info can be found at www.investopedia.com
I have inspired by indicator introduced in TradingView by LazyBear and adopted the logic from there. Thanks LazyBear !!!
Though indicator signals the new Bull market, but I have not found much information how to use it in daily market. So I had come up with a strategy, which would allow us to trade SPY, QQQ , AMEX and securities under these markets.
I have used MA setting as 65 (since Zweig indicator setting was 10 days , based on that I set 65 for Hourly chart ... 10d x 6.5 Hrs = 65 in my startegy). You have to change this setting if you change the timeframe. Also , note that this strategy is for Stock Market only.
Strategy Rule/Settings
===================
Select the market type based on your security symbol.
SPY => use NYSE
QQQ => use NASDAQ
any other security => check exchange it was listed and select the corresponding market.
if you dont know , use COMBINED option
BUY
====
when indicator cross 0.40 from below
Note:
1. see how well it picks the bottoms ... example : Nov 2020 ....
2. setting 0.45 is also produces good results , only thing is you get more signals.
EXIT
=====
Exit when indicator cross down from 0.60 . I have used RSI (5) for partial exits. These two are available in settings
Close the whole position when indicator crossing down 0.40
STOP LOSS
=========
defaulted to 5%
Please Note , I have tested SPY , QQQ on Horly chart with MA 65. You need to chnage the MA setting based on your time frame and check the results.
WARNING
========
For the use of educational purposes only
Indicateurs d'étendue
Bollinger Bands OBVBB OBV is a Volume-based indicator that shows the balance and performance of the market.
Spots Support and Resistance levels within a growth/decline cycle.
Can be used for different Time Frames.
Length can be changed to a bigger number to adjust it to the smaller TF.
Structure AnalyzerA momentum indicator that uses the highest and lowest values for price in three different lookback lengths to find the performance relative to three timeframes.
- The yellow line is the product of the price performance in three different timeframes.
- The red line is 200 EMA of the performance.
- The blue columns represent the same calculation or the volume(OBV based).
- The aqua line is the 200 EMA of the volume performance.
How to use: Whenever the performance crosses above the 200 EMA, the price is in an uptrend.
Important: When in a downtrend, the performance will stay below the 200 EMA for a long time; hence it is important o wait until the crossover.
The Bayesian Q OscillatorFirst of all the biggest thanks to @tista and @KivancOzbilgic for publishing their open source public indicators Bayesian BBSMA + nQQE Oscillator. And a mighty round of applause for @MarkBench for once again being my superhero pinescript guy that puts these awesome combination Ideas and ES stradegies in my head together. Now let me go ahead and explain what we have here.
I am gonna call it the Bayesian Q Oscillator I suppose. The goal of the script is to solve an issue both indicators on their own suffer from. QQE signals are not new and often the problem has always been false signals for them. They are good for scalping but the difference between a quality move and a small to nearly nonexistent move following a signal is not so clear. Kivanc made his normalized version to help reduce this problem by adding colors to his histogram type verision that would essentially represent if price was a trending move or in a ranging structure. As you can see I have kept this Idea but instead opted for lines as the oscillator. two yellow line (default color) is a ranging sideways area and when there is red or green it is trending up or down. I wanted to take this to the next level with combining the Bayesian probability oscillator that tista put together.
The Bayesian indicator is the opposite for its issue as it is a probability indicator that shows which candle or price movement is more likely to come next. Red rising means possibly down move soon and green means up soon. I will not go into the complex details of this indicator but will suggest others take a look at his and others to understand the idea behind them. The point I am driving at is that it show probabilities or likelyhood without the most effecient signal device to match it. This original was line form and now it is background filled colors.
The idea. is that you can potentially get some stronger and more accurate reversal signals with these two paired together. when you see a sell signal or cross with the towering or rising red... maybe it is a good jump potentially. The same for green. At the same time it is a double added filter effect from just having yellow represent it is ranging... but now if you get a buy signal (example) and have yellow lines (example) along wi5h a red rising or mountain color background... it not only is an indication of ranging, but also that there is potentially even a counter move coming based on the probabilities. Also if you get into a good trade and see dual yellow qqe crosses with no color represented by the bayesian background... it is possible it might only be noise.
I have found them to work decently in the 1 hour timframe. Let me know your experience.
I hope everyone takes a look at the originals to understand them. Full credit goes to those guys for this to be here. Let me know how it is working out for you.
Here are the original links.
bayesian
Normalized QQE
Previous Days High & LowRenders the high and low values from previous days.
Useful alert conditions are provided: "Less than low" and "Greater than high".
Configuration:
The number of days is configurable with a default of 1.
The source of the high and low values.
Use the close value instead of high and low values. Default is false.
The example above uses 2 days to demonstrate an exit strategy.
PRIME - R.o.c.M Ind. W/ TrendsThis experimental script is a variant of a model that allows a separate indicator window to be opened, revealing data for on balance volume, rsi, consumer commodity index and momentum indications. By use of the settings key, you can change the parameter of the source input as well as the desired lengths. After data compilation, the indicator will automatically draw any trend lines applicable to what is presented. The additional code is an attempt to allow the system to apply pivot points for alerts within the indicator itself.
Disclaimer:
Trading success is all about following your trading strategy and the indicators should fit within your trading strategy, and not to be traded upon solely
The script is for informational and educational purposes only. Use of the script does not constitute professional and/or financial advice. You alone have the sole responsibility of evaluating the script output and risks associated with the use of the script. In exchange for using the script, you agree not to hold the publishing TradingView user liable for any possible claim for damages arising from any decision you make based on use of the script
Volume Info from Lower Time FramesHello Traders,
We are now able to get info from lower time frames, Many Thanks to Pine Team .This script gets volume info from lower time frames and give alert if there is extreme volumes on last X lower time frame candles (if last X volumes are higher than volume moving average). so that if you set alerts on different securities then you will be able get alert if there is extreme volume moves and you can check the chart immediately.
The options:
Timeframe in Seconds : you can set lower time frames in seconds. by default it's 5 seconds. if you set it 60 then it will show 1min volumes, if you set it 1 then it will show 1 seconds volumes
MA Length : The script draws simple moving average using this length info. by default it's 20.
Number of Bars to Check for Alert : by default it's 5. meaning that if last 5 candles is greater than moving average and if you set alert then you get the alert "Extreme Volume"
Other options are for colors and line width.
As you can see in following example, chart time frame is 1 hour and the script shows volume info of 5 seconds candles:
Enjoy!
Monte Carlo Simulation - Random WalkHello All,
Monte Carlo Simulation is a model used to predict the probability of different outcomes when the intervention of random variables is present. it is used by professionals in such widely disparate fields as finance, project management etc. You can find many articles about Monte Carlo Simulation on the net.
In this script I tried to make Monte Carlo Simulation and "Random Walk". it calculates results over and over, each time using a different set of random values that is created using historical data (500 times by default) and show min-max and some random paths. number of "random walks" is calculated by using number of bars to predict, so if you change "Number of Bars to Predict" then number of random walks may change. Total number of the lines must be less than 500.
"Number of Simulations " is 500 by default, more simulation better results. but if you increase it a lot then you may get "loop takes too long error"
"Number of Bars to Predict" can be between 10-100
"Number of Bars to use as Data Source" is the number of historical bars to use in simulations
Thanks to Ricardo Santos (@RicardoSantos) for letting me use his Random Number Generator Function.
P.S. I am not mathematician and I tried to make it as far as I understood the method. so if you see any issue let me know please.
Some examples:
Number of Bars to Predict = 100:
Number of Bars to Predict = 10:
if you enable "Keep Past Min-Max Levels" option then min-max levels will stay on the chart
Enjoy!
On Balance Volume + Trend + DivergencesModification of original OBV indicator, with addition of Divergences identification & coloring OBV Line based on line (OBV either above or below EMA20 applied to OBV). Indicator works great in correlation with Volume, Stochastic and DMI and shows potential reversals earlier.
DMI with Oversold/Overbought markingModification of original DMI indicator, simply marking background in case of finding Overbought or Oversold levels - this happens when ADX is above both DI+ and DI- values.
Cumulative Pivot HighLowThis indicator counts number of higher highs/lows and number of lower highs/lows and calculates trend based on that.
Indicator line shows (sum of higher highs/lows - sum of lower highs/lows) derived from last loopback periods. Indicator is green if last two consecutive highs/lows formed are on higher side. Red if on lower side. (Consecutive numbers can be controlled by parameter direction_threshold )
combineHighsAndLows if unselected shows not cumulative version but last consecutive highs and lows marked in red or green according to the trend.
Shares Risk (Long)Ever struggle to know how many shares you should be placing your order with? Risk is different for every person and every stock. This can help.
In the example above, I've added this indicator the the chart.
I then specified:
Risk Amount ($) = $500. (The max amount I'm willing to risk.)
Risk Source = (another indicator) Lower Limit 3 . (See Lower Limits for more details)
Source Risk (%) = 0.0 (The default is 5.0 expecting the Risk Source to be the close.**)
Based upon how much I'm willing to risk, and the price difference between the close and Risk Source , this indicator will show the number of shares to purchase such that if the price drops to the stop level specified, my value loss should be limited to the Risk Amount .
333 shares is the value calculated for this example (latest bar). You can easily see how many shares you need to purchase for the lastest bar as well as track the previous values on the chart and the indicator cursor data.
---
** WARNING: There's no magic here. It's just math. So if you specify another indicator as the source, the values could get a bit strange and if the price is very close to the stop level, the number of shares could be unreasonably high. To help avoid this you can increase the minimum percent.
Multi Time Frame Candles with Volume Info / 3DHello Traders,
This is my second Multi Time Frame Candles script but with this new one, you will have some new features such volume info, remaining time to close of higher time frame candle and also developed using new features of Pine such array of lines. also I tried to make it 3D for better visualization ;) also it shows new highs/lows / breakouts.
I tried to make many things optional, so you can change almost everything using options.
What you can change using options:
- Higher time frame
- Number of Candles
- Candle Colors Up/Down
- Wick Color
- Volume colors Up/Down
- Text color of Remaining Time
- Shadow Color
- Background color
- Start bar of the candles (so you can see many higher times frame candles in same window)
- 3D effect, by default it's enables but you can disable 3D view
Lets see some examples:
Remaining time:
Breakouts:
You can combine different higher time frames:
if you don't want 3D view then combining different higher time frames:
You can change background color:
Enjoy!
Daily High & Low BoundaryDisplays the day's progressive high and low of the day colorized by the day of the week.
US10Y / DXY - 10 Yield correlated This oscillator tracks the US and US10Y , Script is based in SPX/US oscillator by @someguy
Local LimitsDisplays recent higher highs, lower highs, lower lows, and higher lows as a collection of local limit indicators.
In its simplicity is a lot more powerful than might appear at first glance.
Does not rely on volatility calculation.
Can be linked together to create an objective view of recent support and resistance levels.
Makes current trends more visible.
Excellent for use as a trailing stop algorithm.
Parameters
Single Bar Sensitivity: True (default) reacts to individual bars. False only responds to the alignment of 2 bars.
Margin (1-5): Adds extra distance from higher lows and lower highs to reduce the sensitivity of broken trends.
Single indicators with configurable sources:
Local Limit Higher
Local Limit Lower
FCMS - Arrays Exercise - High Low with Arrays - StudyThis is just a script to exercise the use of arrays on pine script.
I think we could say that every for loop we had in pine script before the arrays, is eligible to become an array.
Our script will get more efficient and more reliable.
As every "if" case is elegible to became a function
I confess I was addicted to use if, else if, else in my codes, but recently i've been updating my scripts and it's became more efficient
I couldn't find an array function that insert an value removing the oldest one, so I'm using this condition to "shift" the first value.
I'll update as soon as I find a better way to do it.
In any case, for this specific goal, we already have an built in function, as I let on script
Hariz Hazwan 5 line indicatordetermining the risks by looking for the divergence of price from moving averages support line
All-time high and percentage dropsThis script calculates the ATH of whichever chart you use and plots it in blue
There is also an option to display the following ATH percentages: 90, 80, 70, 60, 50, 40 and 30 in white
1st Hour High and Low ISRDaily Range :
1st Hour High and Low From Market Start Time
ISR = Initial Support Resistance