This script implements the Darvas Box strategy Nicolas Darvas described in his seminal book How I Made $2,000,000 in the Stock Market.
The Darvas Box script is so bespoke (compared to our other scripts) that we ended up creating a new, custom version of our Whitebox Strategy Engine just for this strategy. While you may find similarities between the engine powering the Darvas Box script and the other strategies that are based on the Whitebox Strategy Engine, we will go into detail about everything you need to know to use this strategy.
💡 Before you start using this strategy, we highly recommend reading Darvas's book. Not only because it will give you a good understanding of the strategy but because you will also learn about the difficulties he had to go through before he was able to make a fortune on the stock market.
Darvas only used his Box method for trading stocks, so we will also focus on using the script on stocks.
However, nothing should stop you from applying the strategy to other markets, such as Crypto, Forex, Commodities, etc.
Darvas' journey in the stock market began with a speculative investment in a Canadian mining company, and from there, he developed his Box Theory and applied it to the U.S. stock market. His methods and strategies were tailored to the characteristics and behaviours of stocks, and that's where he found his success.
In his book, Darvas described himself as a "techno-fundamentalist". He used both technical and fundamental analysis to choose the stocks he considered worthwhile buying.
He would look for companies in industries where he expected the company to do well over the next 20 years.
Then, he filtered the stocks by looking at their price action and volume. If a stock were trading near its all-time high, especially on unusually large volume, he would pay close attention to it. Once he selected a stock based on these criteria, he waited for his boxes to begin forming.
Once a box formed, he would place a buy-stop order just above the top and a stop-loss order below the top. He would automatically enter a long position if the price broke above the box. If the price then fell back below the top of the box, his automatic stop-loss order immediately took him out of the trade, resulting in a slight loss. A key aspect of his strategy was to cut his losses small and let his winners run. Even if he suffered several losses in a row, given how close his stop-loss order was to his entry price, those losses were relatively negligible. However, once he bet on the right stock and at the right time, without being stopped out, he recovered from all his losses and won big money.