Market Breadth: Trends & BreakoutsVisualize the percentage of stocks in an index participating in trends and breakouts/breakdowns.
The default data source is the S & P 500: the percent of stocks above/below the 200 and 50 day moving averages, and the percentage of stocks making new 52 week breakouts/breakdowns. You can pick new data sources in the settings.
The blue band represents the percentage of stocks above/below the 200 day moving average. (It's always 100% in width, unlike say Bollinger bands). The thin blue lines are the same but for the 50 day moving average. The red and green areas represent the percentage of stocks making new 52 week highs/lows.
In the example chart you can see a divergence between the market as a whole which continues up and to the right throughout 2021, where as fewer and fewer stocks were above their own 200 day moving average, causing the blue band to trend down. Before the market turns beginning 2022 you can see more stocks making new 52 week lows, even as other stocks make 52 week highs. After the market tops, the percentage of 52 week lows intensifies and the percentage of stocks below their 200 day moving average is already over 50%.
52weeklows
52 Weeks High/Low WidgetSome time ago I published my "All-Time High/Low Widget". I was asked to build and 52w weeks version.
So finally it's ready. It works pretty much the same way but uses a time period only of 52weeks.
You can also change the number of weeks in the parameters.
You can plot the levels and display some stats when 52W high/low happened and how far away are we at this moment.
Also, you can create alerts to get notified on 52W levels breakouts.
Disclaimer
Please remember that past performance may not be indicative of future results.
Due to various factors, including changing market conditions, the strategy may no longer perform as well as in historical backtesting.
This post and the script don’t provide any financial advice.
52/N Weeks High/LowPlots 52 Weeks historical high and low with respect to each bar.
Works on all timeframes - minute, days, weeks, months - and always plots 52 weeks historical high and low.
The 52 weeks lookback window slides backwards as we plot for older / historical bars on the chart.
Instead of 52 weeks, number of weeks to look back can be specified using 'No. of weeks to lookback' parameter in Settings --> Inputs.
Style and color for 'High' and 'Low' plots can be changed through Settings --> Style
MA 10,20,50,200Indicator consist of moving averages (MA).
This indicator make it easier for me to switch between few MA lines.
1. MA10
- used for intraday.
2. MA50 and Ichimoku
- to analyze swing trend
- display only MA50 and ichimoku cloud
3. MA20, MA50 and MA200
- to analyze the trend
- for swing trade
4. Lines 52 Week High / Low
- display both lines as guide when trading
Darvas Box Strategy V2What Is the Darvas Box?
The Darvas Box strategy was developed by Nicholas Darvas. Aside from being a well known dancer, he began trading stock in the 1950s. Based on his success in trading, he was approached to write a book on his strategy. The book, “How I Made $2,000,000 in the Stock Market,” outlines his rather simple approach … simple once you understand the basic concepts and rationale of the strategy.
Darvas originally started with $10,000. He was willing to plunk the whole amount into one stock. This is because he always used a stop loss to control risk, so the whole amount of capital was not fully in jeopardy. As his capital grew, he would allocate capital to various stocks.
Darvas Box Strategy
As the name implies, Darvas Box is based on boxes that a price was trading in. For example, if the price is moving between $45 and $50, that is a box. Mr. Darvas’s goal was to only buy stocks that were moving into higher and higher boxes.
If the price moved above $50, to $50.50, Mr. Darvas bought the stock because it was now moving into a higher box. If the price dropped below $45 (of the $45 to $50 box), to $44.50, then the stock was moving down a box, and therefore was negated as a purchase candidate.
The box limit is not set, but is determined by market forces. If the price is moving between $47 and $48, that creates a box. If it moves higher, the next box may be between $50 and $53, which is the next point where the price stalls and moves back and forth.
A price can stay in a box for as long as it wants. As long as it doesn’t drop below the low of the box, it remains a buy candidate if it moves above the upper limit of the box.
Mr. Darvas gives the following example in his book, of a stock breaking higher into a new box:
If the stock acted right, it started to push from its 45/50 box into another, upper box. Then its movement began to read something like this: 48 – 52 – 50 – 55 – 51 – 50 – 53 – 52.
It has now quite clearly establishing itself in its next box—the 50/55 box.
Darvas Box is an indicator that simply draws lines along highs and lows, and then adjusts them as new highs and lows form. The indicator is available on many trading platforms, such as Thinkorswim. Traders may wish to draw their own boxes though, based on recent highs and lows; Darvas was able to do so (based on telegram quotes) more than half a century ago.
Darvas Box Rules
Darvas established some rules, not just for his strategy, but for himself. After going though his initial learning period of subscribing to a whole bunch of “advisory services,” he found that none of them worked, and they often contradicted each other. Therefore, he proposed seven basic rules to impose on himself.
The following are summarized from his book.
I shall not follow advisory services.
I shall be cautious of broker advice.
I shall ignore Wall Street sayings or truisms, no matter how ancient or revered.
I shall only trade stocks on major exchanges with adequate volume .
I shall not listen to (or trade off of) rumors or tips, no matter how well researched they may sound.
I will use a sound strategy instead of gamble…I must study this strategy (originally this approach was fundamental analysis , which didn’t work for him, so he developed his Darvas Box trading method).
I will hold one position for longer, as opposed to juggling a bunch of positions for a short period of time.
See also 7 Rules Every Contrarian Investor Must Follow
These rules helped Nicholas Darvas develop his strategy, and have the discipline to stick to it. The basic Darvas Box strategy rules are as follows:
Darvas looked for increasing volume when selecting stocks to trade; this alerted him to stocks that were being accumulated and were likely to see strong trends.
Darvas believed in buying stocks that presented an upper box limit breakout, but also had an upward Earnings trend. This was especially the case when the major indexes had experienced a decline.
When an upper box limit is broken, buy. From his book, the entry price was usually about 1 to 2% above the upper box limit.
If you enter a trade and the price proceeds to drop out of the new box, and back into the old box, exit the trade.
Entry and stop loss orders should be set in advance, so trades aren’t missed and risk is controlled.
Place, and trail the stop loss order to below the low of the most recent box. This initial stop loss was pretty tight, because Darvas assumed when a price broke out of an old box, it was entering a new box. Therefore, the stop was placed just below the high of old box which was just broken (low of new box).
Record trades, including reasons why you entered and exited.
General conditions of the market must favor buying. Don’t buy stocks when the major indexes are in a bear market, or when volume is flat or declining.
If you are stopped out, but the price moves back into the higher box again providing another buy signal, buy again, using the same stop loss location.
Since the stop is being trailed up, more funds can be added on each consecutive breakout.
Risks and Considerations
During choppy market conditions the strategy is likely to produce many small losses in a row. This is a trend following method, so a trend needs to develop to produce a profit.
Based on his book, the initial stop loss was set just below the breakout price (likely low of the new box). It was then trailed up as new boxes formed. This method takes a lot of discipline, and a trader can’t get emotionally attached to a stock. Buy and sell when the signals say so.
Traders also need the intestinal fortitude to get back into a trade, if the signals say so, even if they were stopped out. Darvas also added to positions as breakouts to higher boxes occurred. This means bigger gains on trades that work out, but if the trend doesn’t continue, adding to positions near (what ends up being) the top of a move can work against you.
The method could also be employed using short selling when the boxes are dropping. An entry occurs when the price moves below the lower limit of the box; a stop is placed just above the entry price (in the old box) and then trailed down above the top of new lower boxes.
A stop loss won’t save you from losing more than expected if the price gaps through your order. Consider this when assessing how much capital you are willing to commit to a stock.
traderhq.com
Note : Sorry an error occurred in the first version, i installed the second version (security(syminfo.tickerid, 'D', high)v4 not working in different time periods
Tradingview Screener 52 Week High Low
52 Week High Low
X Period High/Low/MidToday we have a simple, but endlessly versatile, indicator that plots the X Period High/Low/Mid of your chosen market.
Traditionally the 52 week High/Low is used as a breakout signal. However, by changing to an X period, and adding a midway line, we create a more versatile indicator that can be tailored to various markets.
By default it's set at 250 periods (because I like the 250 period moving average), and I generally trade H4 and Daily time frames. But tweak it to your liking, you just have to modify the length periods by your desired time frame and lookback length. E.g. to create a 52 week indicator on the daily time frame, enter a length of 260 in the indicator (5 days per week * 52 weeks = 260).
For the above reason, I haven't made this indicator MTF, as there's no real need. However, if users find it easier I can look at adding it later.
Also, the mid point between an X period high/low is often a good trend-follower, as well as acting as support/resistance . I encourage you to experiment with different ways of using this indicator. Entire systems (if your risk management is correct) can be built and traded from this one indicator.
Good luck.
DD
52 Week High/Low to YesterdayThis script adds the 52 weeks (one year) high/low to the chart but it wouldn't update the value on the current trading day, so that it would remain at the same level for the whole trading day. It can come really handy for day trading the day of the 52 weeks high/low breakout/breakdown.