Candlestick: Bullish Abandoned Baby

ICE Data Services -

BullishAbandonedBaby.efs  
EFSLibrary - Discussion Board  

File Name: BullishAbandonedBaby.efs

Description:
Bullish Abandoned Baby

Formula Parameters:

  • Font: Arial Narrow
  • Font Size: 11
  • Font and Shape Color: Green
  • Font BgColor: White

Notes:
This is a three candlestick bullish bearish reversal pattern consisting of a doji which gaps away from the candlesticks (including the shadows) before and after it. The first candlestick is a down candlestick, the second is a doji, and the third is an up candlestick.

Download File:
BullishAbandonedBaby.efs


EFS Code:

/*********************************
Provided By:  
    eSignal (Copyright c eSignal), a division of Interactive Data 
    Corporation. 2009. All rights reserved. This sample eSignal 
    Formula Script (EFS) is for educational purposes only and may be 
    modified and saved under a new file name.  eSignal is not responsible
    for the functionality once modified.  eSignal reserves the right 
    to modify and overwrite this EFS file with each new release.
   

Description:        
    Bullish Abandoned Baby

Version:            1.0  12/24/2009

Formula Parameters:                     Default:
    Font                                Arial Narrow
    Font Size                           11
    Font and Shape Color                Green
    Font BgColor                        White
    
Notes:
    This is a three candlestick bullish bearish reversal pattern consisting of a 
    doji which gaps away from the candlesticks  (including the shadows) before and 
    after it. The first candlestick is a down candlestick, the second is a doji, 
    and the third is an up candlestick.
**********************************/

var fpArray = new Array();

function preMain() {
    setPriceStudy(true);
    setStudyTitle("Bullish Abandoned Baby");
    setShowCursorLabel(false);
    setShowTitleParameters(false);
    var x=0;
    fpArray[x] = new FunctionParameter("nFontSize", FunctionParameter.NUMBER);
	with(fpArray[x++]){
        setName("Font Size")
        setLowerLimit(6);		
        setDefault(11);
    }
    fpArray[x] = new FunctionParameter("cFontColor", FunctionParameter.COLOR);
    with(fpArray[x++]){
        setName("Font and Shape Color");
        setDefault(Color.green);
    }    
    fpArray[x] = new FunctionParameter("cFontBgColor", FunctionParameter.COLOR);
    with(fpArray[x++]){
        setName("Font BgColor");
        setDefault(Color.white);
    }    
    fpArray[x] = new FunctionParameter("sFont", FunctionParameter.STRING);
    with(fpArray[x++]){
        setName("Font");
        setDefault("Arial Narrow");
    }    
}

function main(sFont, nFontSize, cFontColor, cFontBgColor) {
    Find_BullishAbandonedBaby(sFont, nFontSize, cFontColor, cFontBgColor);
    return;
}

function Find_BullishAbandonedBaby(sFont, nFontSize, cFontColor, cFontBgColor) {
var nState = getBarState();
var Open = open(0);
var Close = close(0);
var Open1 = open(-1);
var Close1 = close(-1);
var Open2 = open(-2);
var Close2 = close(-2);
var High1 = high(-1);
var Low2 = low(-2);
var Low = low(0);
var nID = getCurrentBarCount();
    if (nState == BARSTATE_ALLBARS) {
        if (sFont == null) sFont = "Arial Narrow";
        if (nFontSize == null) nFontSize = 11;
        if (cFontColor == null) cFontColor = Color.green;
        if (cFontBgColor == null) cFontBgColor = Color.white;
    }
    if (Close2 < Open2 &&
        Close1 == Open1 &&
        High1 < Low2 &&
        High1 < Low &
        Close > Open) {
        drawTextRelative(-1, BelowBar2, "BuAB", cFontColor, cFontBgColor, Text.PRESET | Text.CENTER, sFont, nFontSize, "T"+nID); 
        drawShapeRelative(-1, BelowBar1, Shape.UPARROW, null, cFontColor, Shape.PRESET, "S"+nID); 
    } else {
        removeText("T"+nID);
        removeShape("S"+nID);
    }
    return;
}