Skip to main content

Heiken Ashi, Bolinger Bands And ADX for Amibroker (AFL)

vole_00 almost 15 years ago Amibroker (AFL)

  • Rating:
    3 / 5 (Votes 3)
  • Tags:
    amibroker, bands, chart

Rules: http://srsc.com.vn/forum/trading-system/1942-trading-system-ket-hop-giua-heiken-ashi-bolinger-bands-va-adx.html#axzz1X93e2600

Source: http://srsc.com.vn/forum/trading-system/1954-code-trading-system-heiken-ashi-bollinger-bands-va-adx.html#ixzz1X93xxZwS
(My nick in forum Srsc is vole_00 too.)

Screenshots

Indicator / Formula

Copy & Paste Friendly
//================================================== ======================
// HBA Trading system (Heiken Ashi, Bolinger Bands, ADX)
// AFL by HuyNQ. (SRSR 4rum member)
//================================================== ==================================
SetChartOptions(0,chartShowArrows | chartShowDates);

// 1. Heiken Ashi
HaClose = (O + H + L + C)/4;
HaOpen = AMA( Ref( HaClose, -1 ), 0.5 );
HaHigh = Max( H, Max( HaClose, HaOpen ) );
HaLow = Min( L, Min( HaClose, HaOpen ) );
xDiff = (HaHigh - Halow);
barcolor = IIf(HaClose >= HaOpen,colorGreen,colorRed);
PlotOHLC( HaOpen, HaHigh, HaLow, HaClose, "", barcolor, styleCandle );

// 2. Bolinger Bands
BBTop=BBandTop(H,10,2);
BBBot=BBandBot(L,10,2);
BBMid=(BBTop+BBBot)/2;

Plot(BBTop,"",12,1);
Plot(BBMid,"",12,1);
Plot(BBBot,"",12,1);


// Buy, sell
EntryLong = Cross(C,BBMid) AND HaClose>HaOpen AND xDiff>1 AND ADX(14)<40;
ExitLong = Cross(BBMid,C) AND HaClose<HaOpen AND xDiff>1;
PlotShapes(IIf(EntryLong , shapeSmallUpTriangle, shapeNone) ,colorGreen, 0,L,-30);
PlotShapes(IIf( ExitLong , shapeSmallDownTriangle, shapeNone) ,colorOrange, 0,H,-25);


2 comments

over 14 years ago

Using Google translate from Vietnamese to English, we got:

Trading system combining Heiken Ashi, Bollinger Bands and ADX

This is a simple trading system for gold and foreign exchange.

The indicators used in the system:
1. Heiken Ashi
2. Bollinger Bands: period(20), deviations(2)
3. ADX : period(14)
Suitable timeframe: 1h, 4h, daily

[I] Entry rules

Long rules:
1. Price range beyond the Bollinger Bands.
2. Heiken Ashi: a tree appears to increase the average length or more.
3. ADX <40

Short rules:
1. Price range beyond the Bolinger Bands.
2. Heiken Ashi tree appears a reduction in average length or more.
3. ADX <40

[II] Exit rules: – For prices decline trend (ADX> 40). This technique
will help traders get the maximum benefit to having a long trend, strong.

Exit long rules:
1. Bollinger Bands on price exceeded.
2. Heiken Ashi tree appears a reduction in average length or more.

Exit short rules:
1. Price exceeds Bolinger Bands below.
2. Heiken Ashi a tree appears to increase the average length or more.

=================
- For the tendency to reduce the average prices, weak (ADX <30), the trader uses the following techniques that will help to anticipate & avoid price reversal.

Exit Long rules:
Bollinger Bands Price exceeds or appears on a Heiken Ashi trees
down.

Exit short rules:
Price over Bollinger Bands appearing under a tree or Heiken Ashi up.
=================

Leave Comment

Please login here to leave a comment.