Category Archives: Uncategorized
AIQ: THREE BLACK CROWS PATTERN
The Fibonacci time zones discussed in “Automated
Techniques For Intraday Traders” by Andrew Coles in this issue (August 2011 Stocks & Commodities) can be
implemented using the Fibonacci time zone chart tool in AIQ with no additional programming required.
Thus, I am instead providing code for the “Three Black Crows” candle pattern
that is discussed in Thomas Bulkowski’s June 2011 article, “Top
10 Candles That Work.”
Coding candlestick patterns requires quite a bit of interpretation, since
these patterns are described in relative terms like a “tall” candle or “closes
in the lower portion of the bar.” Depending on the interpretation given to these
relative terms, we can get different results. In my code set, shown below, I
provide inputs that allow for some of the adjustments. The three black crows
pattern has the following rules:
- Must have three tall candles in a row
- Pattern occurs in an uptrend and the first candle is the highest high
- The last two candles must open in the real body range of the prior candle
- All three must close near the low
- The last two candles must have lows that are lower than the prior low.
“Tall” means that the bars’ high–low range is greater than the 10-day average
range that occurs just prior to the start of the pattern. An uptrend is defined
as a linear regression slope of the closes greater than zero. “Closing near the
low” is based on how many candle zones are input, which are then used to divide
the range of the bar into zones. “Closing near the low” means that the close
must fall in the lowest zone. In addition, the author suggests testing in a bull
market. Bull market is defined here as when the 200-bar moving average
of the Standard & Poor’s 500 is greater than it was 10 bars ago. A bear
market occurs whenever it is not a bull market.
I tested the pattern by entering at the close on the day the pattern is
complete and exiting at the close six days later. This provides a test with five
overnights and five full bars held after the pattern completes. I used the
Russell 3000 list of stocks and tested from 1/15/1970 to 6/13/2011. In the table
in Figure 8, I show the comparative results of bull, bear, and combined bull and
bear. It appears that this pattern works in both bull and bear markets, but
there may not be enough signals to build a trading system from just this pattern
alone.
test period
The AIQ code is shown here and the Eds file for this technique can be downloaded from www.TradersEdgeSystems.com/traderstips.htm.
AIQ code for three black crows pattern
!TOP 10 CANDLES THAT WORK: THREE BLACK CROWS
!Author: Thomas N. Bulkowski, TASC June 2011
!Coded by: Richard Denning 6/14/11
!INPUTS:
RangeLen is 10.
CandleZones is 4.
HHLen is 10.
UpTrendLen is 10.
! ABBREVIATIONS:
C is [close].
C1 is valresult(C,1).
C2 is valresult(C,2).
H is [high].
L is [low].
L1 is valresult(L,1).
O is [open].
O1 is valresult(O,1).
OSD is offSetToDate(month(),day(),year()).
!BULL / BEAR MARKET DETERMINATION:
SPXc is TickerUDF("SPX",C).
Bull if simpleavg(C,200) > simpleavg(C,200,10).
Bear if not Bull.
!FUNCTIONS AND RULES FOR THREE BLACK CROWS CANDLE PATTERN:
Range is H - L.
HHoffset is scanany(H = ∧highresult(H,HHLen),HHLen) then OSD.
AvgRng is simpleavg(Range,RangeLen,∧HHoffset).
LowerZoneC if C < L + (Range * 1/CandleZones).
Tall if Range > AvgRng.
BlackCrow1 if Tall
and LowerZoneC
and slope2(C,UpTrendLen) > 0
and H = highresult(H,HHLen).
BlackCrow2 if Tall
and LowerZoneC
and O <= O1
and O >= C1.
ThreeBlackCrows if valrule(BlackCrow1,2)
and countof(BlackCrow2,2)=2
and countof(L < L1,2)=2.
Bull3BlackCrows if Bull and ThreeBlackCrows.
Bear3BlackCrows if Bear and ThreeBlackCrows.
Time Tested Trading Tips, July 17…
The market has three basic modes. It can be going up, down, or sideways. Over time the markets movement is made up of combinations of these three different behaviors. None of these behaviors lasts for long, the market is always switching between them. This is one of the keys to trading. Traders need to recognize that the market moves between these three modes and have the ability to recognize then the change has arrived and be able to switch to trading tools suitable for the new environment. This is a process I call Market Adaptive Trading. The market will not adapt to us. It does not care what we want or think. Therefor we must adapt to it.
If I know how a trading system, or trading tool as I refer to them, performs in each of the three different market conditions; then I can watch the market to determine what type of condition we are currently experiencing and then use the tools that have shown good results in that type of market condition. This is the process of Market Adaptive Trading. It takes some practice to quickly recognize the current market conditions, but this is a lot easier that trying to predict where the market is going.
No one has consistently predicted where the market is going over the long run. Remember all those empty suits on the TV news shows telling us everything was fine just before the 2008 crash. They did the same thing before the 2000 crash. Not even (or perhaps especially) the experts can successfully predict market direction consistently. However you can learn to look at a chart and tell if the market is going up, down, or sideways. And that is actionable information, as opposed to someone’s guess of where the market is going to be in three months or a year.
The successful trader has a tool box with a variety of trading tools for use in different market conditions. The trader, like the carpenter, must go beyond just acquiring the tools. Traders must understand which tool to use for a specific task, and have a clear understanding of how the tool works, and what can and cannot be done with it. I have extensively tested several trading systems, the results of this testing on specific trading trading tools are outlined in ‘How to Take Money from the Markets’, and Money-Making Candlestick Patterns. The testing process helps us understand how stocks usually behave after forming a specific pattern such as being outside the Bollinger Bands, showing strong distribution or accumulation, or pulling back or retracing during a trend. Understanding what a stock is most likely to do forms the beginning of a trading strategy. Trading without this information is taking unknown risks.
Adding VIX as an indicator to AIQ Charts
As discussed in the free webinar on Thursday July 14, 2011. Recording is available at http://prowebinars.adobeconnect.com/p6efx0lc7kf/
To add the VIX with a 10-day average of the VIX to an AIQ Chart follow these instructions
- Click on this link below to download the EDS file required, save it to c:wintes32EDS Strategies folder http://aiqsystems.com/VIX_as_an_indicator.EDS
- Open AIQ Charts and chart the ticker SPY end of day.
- From the menu in Charts, click on Chart, Settings, Indicator Library, EDS Indicators
- In the Custom Indicators click on Add
- In Look in: locate c:wintes32EDS Strategies folder and select the file VIX_as_an_indicator.EDS. Click Open.
- In Plot Type, select Histogram with Plotted Line, click Next.
- In Histogram with Line Indicator, for Description I use VIX and 10-day. UDF to Plot: select Close_VIX from the pull down. UDF for Line: select VIX_10day from the pull down. Click Finish.
- Click on Done in the Custom Indicators screen. The indicator will be at the very bottom in your Indicator Control Panel, click on the indicator to add it to the SPY chart. Note: custom indicators do not have barometers
TIme Tested Trading Tips, July 9…
In addition to knowing how often a particular trading pattern produces profitable trades, traders should understand if there are observable parameters that can strongly influence results. Some of the questions traders should address before using a trading pattern are: How long should a position be held? What are good profit target points? What type of orders should be used? Where should stop loss orders be entered? There are a number of effective tools for the trader’s tool box. However, like any other tool the user needs to understand exactly what it is designed for, and how to use it effectively. Carpenters can make beautiful things with a table saw; however they need to understand how to use it, and also know when another tool might be more appropriate for the task at hand. They also need to know the safety rules, how to avoid kickback, and the importance of using a push tool. At least the carpenters that still have all their fingers do. Some traders gain a better understanding of trading patterns, and the environments in which to use them, though experience. After trading for a number of years they begin to understand what variations of a particular trading pattern work best, and which ones are more prone to failure. Experience often produces good results when we are listening closely, however it can be costly.
A less expensive way to develop an in depth understanding of how trading patterns work is by backtesting the pattern. Backtesting also allows us to test how simple variations or changes in the trading pattern effect results. Backtesting can be done over a variety of time periods and even in specific market conditions. The more traders understand exactly how and when their trading patterns work, the more effective use they will be able to make of each tool in the trading toolbox. The Timely Trades Letter provides additional information on trading tools and techniques on a weekly basis. The successful trader has a tool box with a variety of trading tools for use in different market conditions. The trader, like the carpenter, must go beyond just acquiring the tools. Traders must understand which tool to use for a specific task, and have a clear understanding of how the tool works, and what can and cannot be done with it. I have extensively tested several trading systems, the results of this testing on specific trading trading tools are outlined in ‘How to Take Money from the Markets’, and Money-Making Candlestick Patterns. The testing process helps us understand how stocks usually behave after forming a specific pattern such as being outside the Bollinger Bands, showing strong distribution or accumulation, or pulling back or retracing during a trend. Understanding what a stock is most likely to do forms the beginning of a trading strategy. Trading without this information is taking unknown risks.
