Saturday, September 04, 2010

Bearish Black Opening Marubozu [DBOM]

Descripton
Rules:
1. The candlestick is a long red candlestick whose high is equal to its open.

Pattern Type:
Bullish Reversal or Bearish Continuation




Variables
TypeIdentifierDescription
Integer_symbolIndexUse for the underlying symbol index on which to calculate the Bearish Black Opening Marubozu .
Number_minCandleSizeUse for the minimum percentage change (open to close) that a candlestick must change in order to be considered a long candlestick.

OnInitialize
Function Parameters
TypeIdentifierDescription
SymbolsymbolIndexUse for the underlying symbol index on which to calculate the Bearish Black Opening Marubozu .
NumberminCandleSizeUse for the minimum percentage change (open to close) that a candlestick must change in order to be considered a long candlestick. [Default 1]
Implementation
	 ' Assign the parameters to script variables.
	_symbolIndex = symbolIndex
	_minCandleSize = minCandleSize

OnPattern
Function Parameters
TypeIdentifierDescription
IntegerbarIndex
Implementation
	 ' Get the opening prices of the symbol, indexed by bar index. 
	Define open() As Number = BarOpen(_symbolIndex, barIndex, 1)
	 ' Get the highest prices of the symbol, indexed by bar index. 
	Define high() As Number = BarHigh(_symbolIndex, barIndex, 1)
	 ' Get the lowest prices of the symbol, indexed by bar index. 
	Define low() As Number = BarLow(_symbolIndex, barIndex, 1)
	 ' Get the closing prices of the symbol, indexed by bar index. 
	Define close() As Number = BarClose(_symbolIndex, barIndex, 1)
	 ' Check whether the first candlestick matches.
	If (open(0) > close(0) And _
		high(0) = open(0) And _ 
		close(0) > low(0) And _
		-100 * (close(0) - open(0)) / open(0) > _minCandleSize) Then
		Return 1
	End If
	Return 0

Copyright © 2010 IQBroker, LLC. All rights reserved.