Welcome Features News Download Registration Support FAQ Wish list Links
Advanced stock charting and analysis program

AFL Library

This is read-only version of AFL library entry. Ability to add user formulas and comment is only available from members-only area.

Details:

Formula name: HH-LL-PriceBar
Author/Uploader: Rene Nederhand - (email hidden)
Date/Time added: 2008-01-20 17:18:45
Origin:
Keywords: higher high, lower low, pricebar, esignal
Level: basic
Flags: indicator

DISCLAIMER: Most formulas present in AFL on-line library are submitted by the users and are provided here on an "as is" and "as available" basis. AmiBroker.com makes no representations or warranties of any kind to the contents or the operation of material presented here. We do not maintain nor provide technical support for 3rd party formulas.
Description:

This is the Amibroker version of the HH-LL-Pricebar (higher high, lower low pricebar) from eSignal. It shows the usual candlesticks in three distinct colors:
If the closing price is above the previous high (higher high) the outline of the candle will be green; if the closing price is below the previous low (lower low) the outline of the candle will be red. In all other cases the outline will be black.

The advantage of this graph is that it will allow you quickly to see the short term trend and is thereby often used by scalpers.

Note: For now it isn't possible to modify the color of the body of the candle to the color I used for the outline, because you can only assign a color to the Up-candles and another one to the Down-candle. It seems that this will change in future versions. For the mean time you may want to assign "white" to both the Up-Candle and Down-Candle in your preferences.

Formula:

_SECTION_BEGIN("Price");

upbar = C > Ref( H, -1 );
downbar = C < Ref( L, -1 );

/* Colourized price bars drawn here */
Graph0 = Close;
Graph0Style = 128;

barcolor = IIf( downbar, 4, IIf( upbar, 5, 1 ) );
Graph0BarColor = ValueWhen( barcolor != 0, barcolor );
// Only allowed in recent Beta
//SetBarFillColor = ValueWhen( barcolor != 0, barcolor );


SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g,
Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle |
ParamStyle("Style") | GetPriceStyle() ); 
_SECTION_END();

Comments:

Crash
Crashandburn59 [at] hotmail.com
2008-01-27 17:15:49
To change the color of body, go to:
Tools / Preferences / Charting / Candlesticks / Option 4.


About | Privacy | Terms of Use | Contact information
Copyright © 2001 AMIBROKER.COM