Skip to main content

HH-LL-PriceBar for Amibroker (AFL)

ccc over 15 years ago Amibroker (AFL)

  • Rating:
    3 / 5 (Votes 2)
  • Tags:
    amibroker

HH-LL-PriceBar

his 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.

Screenshots

Indicator / Formula

Copy & Paste Friendly
_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();

1 comments

Leave Comment

Please login here to leave a comment.