StockFetcher Forums · Filter Exchange · DOJI<< 1 2 3 4 5 >>Post Follow-up
544 posts
msg #66467
Ignore glgene
8/20/2008 4:48:06 PM

Can someone help me write a 1 or 2-line script for finding Dojis?

Something that would find the stock FXP on 8-19-08.


2,025 posts
msg #66469
Ignore alf44
8/20/2008 5:10:43 PM

gene...this is the code I use in my RangeContraction/Expansion Filter to spot dojis...


Fetcher[/* Doji (H/L Rng above .20 w/Candle Body less than 30% of H/L Rng) */

set{HiLoRng, High - Low}
set{ClOpRng, abs(Close minus Open)}
set{ClOp_HiLo_ratio, ClOpRng / HiLoRng}
set{Range, count(HiLoRng is above .20, 1)}
set{Body, count(ClOp_HiLo_ratio is less than .30, 1)}
set{doji, Range * Body}

Show stocks where doji equals 1
Price between 80 and 100
Average Volume(30) above 100000

add column doji

sort column 2 descending


I added the Price Criteria ($80 to $100) to isolate FXP (for you)...

The "doji column" is added to show a "1"...for those stocks that printed dojis that day...

Stocks are sorted by Price in descending order !



2,025 posts
msg #66474
Ignore alf44
8/20/2008 5:40:08 PM

FYI...I intentionally wrote this (and tweaked it) to find..."doji - like" candles !

By "doji - like" I addition to "dojis" will also locate :


"Inverted Hammers"



As you can see, these "doji-like" candles occur ALOT !

When you pull up an SF chart from the filter can see from the doji plot below the chart...ALL the "doji-like" displayed each time the plot goes to 1...

When they happen at "tops" (or, bottoms for that matter) ...they look pretty impressive...

But...the majority of times that these "doji-like" candles occur...they are showing "indecision"...and often "Range Contraction".

These "Range Contraction" doji days.can also be VERY nice set-ups for volatility breakouts and "Trend Days" (ie Wide Range Days) !!!

The point is..."doji-like candles" are obviously not ALWAYS reversals (top or bottom) like the FXP "top reversal" example you spotted...more times than not they will be continuation candles...

...within a short/intermediate/longer-term trend !!! imo

One thing IS for sure though...these "doji-like" candles bear watching the trade opportunites they sometimes precede...can be explosive !



544 posts
msg #66489
Ignore glgene
8/21/2008 2:14:31 AM

Thank you, so much, Alf.

Your timely scripting and comments are VERY much appreciated.

I wish I had this scripting ability. Maybe some day I will...I hope. And if I do, I will share with others. I owe it.

You guys/gals are great!

2,025 posts
msg #66501
Ignore alf44
8/21/2008 11:00:39 AM

you're VERY welcome, gene !

6,362 posts
msg #70413
Ignore TheRumpledOne
1/6/2009 8:29:46 AM

/* TRO - DOJI */

set{range, high - low}
set{tolerance, range * 0.01}
set{diff, close - open}
set{clop, abs(diff)}
set{v1, count(volume below volume 1 day ago, 1)}
set{v2, count(volume below volume 2 days ago, 1)}
set{v3, count(volume below volume 3 days ago, 1)}
set{v4, count(volume below volume 4 days ago, 1)}

and add column tolerance
and add column clop
and add column v1
and add column v2
and add column v3
and add column v4

range above 1
clop below tolerance
v1 equal 1
average volume(90) above 500000


ollow The Smart $$: Let Candles & Volume Guide The Way

January 2009
By Todd Krueger

Compared to the common bar chart, candlestick charts are visually more capable of revealing the psychology and sentiment behind a price movement. This occurs as a result of the techniques used to create the candlestick. Each candle clearly shows the relationship of the open versus the close price. For example, when the close is higher than the open, a hollow body is displayed (to make the charts easier to see, hollow candles are replaced by green bodied candles for this article), when the close is lower than the open, a filled in, or solid body is assigned (these will appear as red bodies in this article).

To show the overall range of the bar, the high and low are displayed with a line that emerges from the body of the candle, these are known as the upper and lower shadows. It is the interrelationship between the size and position of the body, large or small, and the size and position of the upper and lower shadows, long or short, that create various candle patterns. For this article, I focus on one popular pattern called the doji. But first, let’s talk about Western methodology.


Nearly a century ago while Japanese candlestick charts remained a closely guarded secret in Asia, an American trader by the name of Richard D. Wyckoff began to publish his methods of detecting supply and demand imbalances in the market. In his 1909 book, Wall Street Ventures and Adventures through Forty Years, Wyckoff introduced his discovery that it was possible to measure the force of buying and selling pressures in any freely traded market.

Wyckoff’s research revealed that a trained chart reader could determine, with a high degree of accuracy, the cause behind price movement, whether it was to buy without moving the price up (accumulation), or to mark the price up/down or even to discourage buying or selling by the mass public (the herd).


Wyckoff’s lifetime of research proved that future price moves were foreshadowed on the price chart because the “composite man” or “smart money” must leave its trading footprint on a price chart due to the sheer size of its trading volume. It is the supply and demand imbalances created by smart money that is the cause of price movement. Their activity is measured with four simple variables:

* Price movement (high, low and closing price).

# Trading volume.

# The relationship between price movement and volume.

# The time it takes for the price movement to run its course.


Imagine if you will that Wyckoff and the Japanese rice traders had lived in today’s society where global information is easily shared. By sharing his research with the rice traders, Wyckoff would have discovered that he was...

leaving out an important piece of the puzzle in his analysis: the relationship of the opening price to the closing price and its relationship to the overall trading range. Because he only looked at the high, low and close on a bar chart, his already good analysis could have been greatly improved by adapting his analysis to the candlestick chart. This enhanced view of the market would have further identified and refined the true sentiment and psychology of the smart money, which Wyckoff was measuring.

Also, imagine the true amazement that the rice traders would have experienced when they learned how to apply Wyckoff‘s volume analysis techniques that identify supply and demand imbalances from the smart money. It is debatable whether these early rice traders even incorporated volume into their candlestick analysis, but even if they had, it would not have been as accurate or revealing as the techniques applied by Wyckoff in his analysis of the price and volume relationship.

When these two East and West methodologies are combined, a powerful synergy is formed. Each methodology contributes precisely what the other lacks. This new combined methodology is known as Wyckoff candle volume analysis (WCVA).


For this article, I apply WCVA on a one-bar reversal pattern known as the doji. This is a candlestick pattern that occurs when the opening and closing prices are the same or very close to each other. The shadows can be either long or short, and there can be various types of doji bars. But for the following examples it is not important to distinguish the type of formation, it is only important to be able to recognize what it looks like on a chart (see Figure 1).

click image for larger view

This formation is said to represent market indecision because the market opens, trades throughout the charted period, then closes at or near the opening price. It represents a battle between bulls and bears that neither won. It is widely believed that it represents a better reversal pattern at the top of the market than at the bottom, although you will learn that this is not correct under the proper circumstances. By applying WCVA, you will learn how to distinguish when there is no indecision in a doji formation.

At the bottom of a market, a Wyckoff technician is looking for tests of supply in the market. A test occurs when the price is marked down to see if greater volume comes in at the lower price. If it does, this signifies supply is in the market. This supply must be removed before the market can begin any substantial up move. However, if the market is marked down and no sellers emerge at these lower prices, the price will come back up to close off the low, volume is lower relative to the prior candles. With no supply present at the current price level, the price should rise.

The “doji test” bar must exhibit the following parameters to be valid:

1. It must have a low that is lower than the previous candle’s low.

2. It has to display lower volume than at least several of the prior candles. The lower the volume, the stronger the indication of no supply being present.

Let’s take a look at the first of two examples that are defined as “doji test” bars. Figure 1 is a 15-minute chart of the E-mini S&P. Notice the nice downtrend in the near...

background. Looking left on the chart, five candles prior to the highlighted doji, the high was 1,234.25. Then the market dropped 17.25 points in 75 minutes to the low on the doji of 1,217. This sets up the ideal conditions for this formation to occur. Remember what I wrote earlier, the test candle makes a new recent low, and if there is reduced volume, it shows that no supply is present.


You can see that this doji is making a new low on the chart, and the volume is lower than all of the previous candles. By standard candlestick analysis measures, one would come to the conclusion that this bar represents indecision on the part of the market participants. However, when viewed from a WCVA perspective, it is clear that no indecision exists here. The chart shows that there are few interested sellers at this lower price and the price comes back to close near the open. Within the next four hours of trading this market jumped more than 25 points.

With this formation, it is important to understand that the smart money, which represents a large percentage of the overall trading volume, is not selling as lower price levels are explored. This is clearly evident and is shown by the reduction in total volume. If the smart money is not selling, retail traders need to be aware of this. This will prevent them from selling at market bottoms and allow them the opportunity to establish a long trade into the path of least resistance.

Figure 2 shows a daily chart of Ryder stock. Again, in the near background is a nice downtrend. Because of the size of the chart, it may be hard to see the price scale, but just 10 candles prior to the highlighted candle, the high price was $61.19 per share. The low of this doji test was $54.95, which represents more than a 10 percent drop in the value of the stock in just 10 trading days. Once again, notice how the volume gets lower as the doji candle tests for supply but does not find an increase in interested sellers at these lower price levels.

click image for larger view

If there are no sellers, the price should increase. The price of this stock rose nearly 19 percent in the next nine trading days, as there were no sellers present to stop it from increasing in value. In fact, you can see from the gap-up opening the next day at $57 that the specialists marked the stock up as there were no sellers of size on their books. The price closed on the very high of the day at $59.08 demonstrating the built-in demand that this WCVA formation represents.


Now let’s look at a doji at the top of a market. This formation is called “doji demand drying up.” At the top of a market, a Wyckoff technician is looking for signs that demand is waning. A lack of demand occurs when the price is marked up to see if there are willing buyers at these higher price levels, but as the price moves up, trading volume decreases. This is a telling sign that there is no interest in higher prices from the smart money.

With no professional buying interest at the current price level, the price should fall. The “doji demand drying up” must exhibit the following parameters to be valid:

1. This candle’s close must be higher than the previous candle’s close.

2. It has to display lower volume than at least several of the prior...

candles. The lower the volume, the stronger the indication that demand has dried up.

Figure 3 is a daily chart of the big S&P contract. Preceding the doji marked on the chart, you can see that the market has been in an uptrend for the past 23 trading days. As the market moves up to the highest reached in the last month and a half, the amount of interested buyers is drying up. We know this because the volume is reduced relative to the previous candles, even though the S&P is making a new recent high—strong markets don’t behave this way.

click image for larger view

This occurs at the top of the market, and when we apply WCVA, the “doji demand drying up” indicates that at least this phase of the up move is either close to or at the end.

The close of the doji candle occurred at 1,425.8. Only five trading days later, the market closed at 1,373.4, a drop of more than 50 points. With this formation, it is important to understand that the smart money is not interested in supporting higher prices. This is evidenced by the reduction in overall volume. If the smart money is not interested in higher prices; retail traders can take this knowledge and refrain from buying at market tops, as well as allow them to establish a short trade into the path of least resistance.


By understanding these straightforward examples, you should now be capable of identifying these formations when they occur on your charts at home. I only had the space to review one candle formation in this article, but the analysis applies to every type of candle pattern.

Wyckoff candle volume analysis works in all markets and timeframes, and precisely reveals the true psychology and sentiment of the smart money. By trading in harmony with the smart money, we truly trade in the path of least resistance and increase the probabilities of success. This knowledge will empower the individual trader and help prevent buying market tops and selling market bottoms for all who apply these techniques.

Todd Krueger is a professional trader, creator of Wyckoff Candle Volume Analysis and is the founding president of Traders Code LLC, which provides trading tools and education for traders at all levels of expertise. For more information, please visit Reach Krueger at

2,817 posts
msg #70415
Ignore chetron
1/6/2009 11:04:14 AM


6,362 posts
msg #70417
Ignore TheRumpledOne
1/6/2009 11:13:13 AM


The article seemed interesting.

325 posts
msg #70445
Ignore mktmole
1/7/2009 12:27:10 PM

Yes, thanks TRO.

I have followed the author of the article over many years. He is quite a knowledgeable and accomplished trader. It's good to see him back in the public arena again.

To reflect more on what TK’s article is conveying;
The candle is a doji or hammer, today’s low is lower than yesterdays low, volume is less than volume 1 day ago and volume reached an new X day low. If there is a very wide range bar with close below open and very high volume within the last 30 days, this adds more impact to the pending up move.

If you take TRO’s scan above, for Tues Jan 6th there are 5 hits. ALL, TRV, CRK, BBG, PTR.
Now, move your cursor back to Dec 24th for all of them.


2,817 posts
msg #70447
Ignore chetron
1/7/2009 1:35:40 PM

i would think that the 24th of december is a little tainted, volume is usually low before a mid week holiday.

StockFetcher Forums · Filter Exchange · DOJI<< 1 2 3 4 5 >>Post Follow-up

*** Disclaimer *** does not endorse or suggest any of the securities which are returned in any of the searches or filters. They are provided purely for informational and research purposes. does not recommend particular securities., Vestyl Software, L.L.C. and involved content providers shall not be liable for any errors or delays in the content, or for any actions taken based on the content.

Copyright 2018 - Vestyl Software L.L.C.Terms of Service | License | Questions or comments? Contact Us
EOD Data sources: DDFPlus & CSI Data Quotes delayed during active market hours. Delay times are at least 15 mins for NASDAQ, 20 mins for NYSE and Amex. Delayed intraday data provided by DDFPlus