BOX
The Box Percent StratHi guys,
Version Zero (more work needed) of an idea I've been meaning to out into a strategy for a while. 🤯
This uses percent boxes🤔 instead of traditional indicators like RSI, MACD etc. 🤫
Takes the first close price of the series and creates a Top Band 10% up, buys if price reaches that level, and puts a stop on a Bot Band, 10% down
When the first trade is in profit by another 10%, it enters another trade and moves the stop of the first trade to breakeven ~ this way it only has one unit of risk at a time
/// Designed for LONG only on Daily, 2D or 3D Charts👌🏻
/// Uses fixed investment risk amount, meaning you're willing to lose that amount per trade
/// Limit buy to not overpay on entries
/// Idea Based on the Darvas system:
/// System only enters trades on strength, when prices equals of exceeds the green line
/// It ads onto the trades, but only *IF* the previous trade is in profit by the UpBoxSize percent size
/// The trailing stop loss is moved up, with the red line
/// A key idea is to only take one unit of risk at a time, meaning for a new add on trade to be taken, the previous trade should be in profit by the same box size as the new new trade's stop loss
/// This will keep adding trades again and again, and they will stop out at the same stop loss
/// Yellow Circles is an MA that filters out choppy areas -- this system only does really well on trending linear markets like: TQQQ, SSO, SPX, SPY
/// Base setting is 10% UpBox Size and 10% DnBox Size: 15% & 15% will be more accurate but fewer signals. 13% profit and 10% stop loss will give a higher risk to reward ratio
Box Range AlertSimple Script for getting alerts on the crossing of Upper & Lower levels either way.
Good for Free users as they can only use 1 alert at a time. So this indicator will be useful to get alerts on both Breakout Or Breakdowns.
Just add input Price manually and set alerts.
Range Box (Nephew_Sam_)Version 1
Creates a box around a specified time range with the ability to extend the lines to a later time.
Next update:
- Background in box
- Remove historical boxes
- Extend lines in future instead of only till current price
There's similar but complex indicators out there, I'll leave this code as open source and you have permission to reuse and not credit me.
Time Range StatisticsA good amount of users requested a text box showing various price statistics, the following script returns various of these stats in a user-selected range, and include classical ones such as a central tendency measurement (mean), dispersion (normalized range) and percent change, but also include less common statistics such as average traded volume and number of gaps. The script also calculates the correlation between the closing price and another user-selected instrument.
The script is currently the longest one I ever made and took some efforts, as I wasn't satisfied with the statistics to be originally included. Big thx to Gael for the enormous feedback and the idea of the normalized range, to user @Cookiecrush for the feedback ( without ya I would have posted something bad you know umu ? ), and Lulidolce for the support, friendship is magic!
Selected Range
The setting Start determine the bar at which the range starts, while End determine at which bar the range end. To help you select these values, the current bar number (bar index) is displayed at the right of the indicator title in blue.
The setting evaluate to last bar will use a range starting at Start and ending at the last bar, as such you can use a full range by using Start = 0 and select evaluate to last bar
The range is highlighted by an area on the chart. By default Start = 9000 and End = 10000, you might not have this amount of data in your chart, as such use the displayed bar index to select Start and End, then set the settings as default.
Displayed Statistics
The statistics panel is displayed on the right side of the last bar, the panel has 3 sections, a title section who shows the symbol ticker, timeframe, and overall trends represented by a chart emoji, the overall trends are determined by comparing the number of higher highs with the number of lower low.
Below are displayed the date ranges with time format: year/month/day/hour:minute.
The second section shows the general statistics. The first one is the mean, also represented by the orange line in the chart, the blue line displayed represent the highest price value in the range, while the red one represents the lowest price value.
The second stat is the normalized range, and determine how spread is the price in the user-selected range, why not the standard deviation? Because the standard deviation might return results varying widely depending on the scale of the closing price, you could get measures such as 0.0156 or 16 or even 56 depending on the instrument, as such using a normalized range can be more appropriate as it lays in a range of (0,1). Lower values indicate a low degree of price variation. Note that I still want to find another measure in the future.
The percentage change (or relative change) indicates at which percentage the price has increased or decreased, and is calculated by subtracting the closing at bar Start with the price at bar End , divided by the price at bar End , the result is then multiplied by 100.
The average traded volume calculate the mean of the volume in the selected range, I used the same format used by the original volume indicator for clarity.
Finally, the last stats of the section is the number of gaps, this stat is by default hidden. An up gap is detected when the open price is superior to the previous high, while a down gap is detected when the open price is inferior to the previous low, this allow to only retain significant gaps.
The last section of the indicator panel shows the correlation between the closing price and another instrument, by default GOOG, this correlation is also calculated within the user-selected range. Positive values indicate a positive relationship, that is the two instruments tend to move in the same direction. Negative values indicate a negative relationship, both instruments tend to move in a direction opposite to each other. Values closer to 1 or -1 indicate a stronger relationship, while values closer to 0 indicate no relationship.
In Summary
The script shows various stats, each calculated within a user-selected range, in general one would be more interested in how these stats might evolve with time, but checking them in a custom range can be quite interesting.
Thx for reading. umu
[PX] ADX BoxesHello guys,
today I would like to share an indicator that I had in my mind for quite some time. I call it ADX Boxes.
How does it work?
What the indicator does is very simple. Whenever the ADX falls below a certain threshold (which can be managed in the user input settings) a box will appear. The box will continue to grow as long as the ADX stays below the threshold. Once the ADX goes back above the threshold, the box will stop growing and will set its right border.
There are two modes, which can be used to determine the upper and lower border of the box. The first one is called "Extremes", which plots the borders the highest high and lowest low for the range below the threshold. The second one is called "Avg. High/Low", which plots the borders at the average high and average low within the range.
Furthermore, the indicator contains an option to show the average value of the detected range below the ADX threshold.
Just like all my other indicator scripts, this one comes with different styling options for boxes in progress, settled boxes and the average value.
Hopefully, some of you find it useful.
Make sure you leave a follow and a like :)
Happy 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
Darvas Box StrategyWhat 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
Tradingview Screener 52 Week High Low
52 Week High Low
Murreys Math Lines Box OR Ratio PivotsI'm publishing my second script, though nothing extraordinary, I believe there is user group for Murry Math indies and the only "proper one" (According to my usage) I found was of RicardoSantos, here is the link :
He developed that script in 2014 and it is in need of update to Pine V4 and I'm doing the needful as its user.
All the updates from my end are listed below:
1. Updated to Pine V4
2. Automatic octave selection
3. In auto mode one can switch octave
4. This script is color coded with intention of use on dark theme, one can change the colors to use it on white background with simple few clicks as pinelines have been used
Other thing I want to add is that usage of this is not very clear to many users, so I'll do little explaining here;
Lets start with what is Octave? Octave is basically distance between square of two whole numbers, this is hard-fast method to calculate, Murry has made it far more complicated to use practically. In mathematical formula terms it could be something like this for script trading at 11890 (CMP)
Step 1: Square Root of CMP i.e Square Root of 11890 = 109.041 = Rounded to 109
Step 2: You can either take one whole number higher or lower than 109, which is 108 or 110. We will take 108
Step 3: Square of 108 = 11664 and Square of 109 = 11881
Step 4: Octave => Distance between (Lowlevel) 11664 and (Higherlevel) 11881
I've automated it so you don't need to calculate, but there is also manual entry possible if you want to calculate octaves yourself, there are different ways to calculate and some like to just take High and Low's of the day or week or month, whatever you like. When I used it I did it strictly this way, so automation is based on it. This is very subjective matter so don't ask to change the calculation of this, if I started doing that every second person would ask me to modify it to different calculation..and thats...just not possible to do.
This is output for calculation we just did above
This is octave shift option (Which basically shifts to next whole number square in above calculation)
Normal nomenclature on octaves and important color codes
+2/8: Extreme overbought = Blue Color and solid line
+1/8: OverBought
8/8: Hardest line to rise above (overbought) = White Color and solid line
7/8: Fast reverse line (weak)
6/8: Pivot reverse line = Yellow Color and solid line
5/8: Upper trading range
----------------------------------------
4/8: Major reversal line = Green Color and solid line
----------------------------------------
3/8: Lower trading range
2/8: Pivot reverse line = Blue Color and solid line
1/8: Fast reverse line (weak)
0/8: Hardest line to fall below (oversold) = White Color and solid line
-1/8: Oversold
-2/8: Extreme Oversold = Yellow Color and solid line
Other lines that I've not mentioned color codes for are minor and are usually plotted in dotted format.
Resources on complete technique to trade and importance of levels (highly recommended to read carefully before trading), if you don't know how to get this for free don't worry you can just google Murrey math and you will find it somewhere, its just that it would be in little scattered manner.
www.scribd.com
Enjoy!
Percentile Trend Channel [DW]This is an experimental study designed to identify the trend of price action over a specified period using percentiles.
First, the 50th percentile is calculated over the sampling period using the nearest rank method. I've found that this calculation is useful as a proxy for moving averages and other filters of that class.
Next, the channel levels are calculated. In this study, there are three channel methods to choose from:
-Percentile Donchian, which calculates Donchian Channels using the 100th and 0th percentile ranks
-Percentile Keltner, which calculates the 50th percentile true range multiplied by a specified amount, then adds it to and subtracts it from the 50th percentile
-Percentile Bollinger, which calculates 50th percentile standard deviation multiplied by a specified amount, then adds it to and subtracts it from the 50th percentile
I also included a squeeze box option within this script, which is derived from my original Squeeze Box tool.
This option detects squeezes in the specified channel's range by a specific percentage, and plots the channel values where the squeeze begins.
The box also has a range multiplier, which can be used to expand or contract its range.
Custom bar colors are included. The color scheme is based on the perceived trend over the specified sampling period.
DARVAS BOX by KIVANÇ fr3762What 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 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
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.
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.
The Bottom Line
Nicholas Darvas was a dancer, but committed a great deal of time to developing and then mastering his stock trading method. It’s a trend following method based on breakouts to higher boxes. Risk is controlled by placing a stop below new higher boxes as they form. During choppy conditions the strategy won’t be profitable. This is why Darvas also attempted to only trade stocks with increasing volume and rising Earnings . Trading his method requires a lot of discipline, but can produce big profits when strong trends develop.
source: traderhq.com
Creator: Nicholas DARVAS