[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Re: AFL for Intraday



PureBytes Links

Trading Reference Links

Hi Jorgen,
Can I request you to please reply as to how to use the same. I tried using the same - which was giving some RED / GREEN color candles.
Please revert.
warm regards...rbhapkar

--- On Wed, 3/11/09, jorgen_wallgren <jorgen.wallgren@xxxxxxxxx> wrote:
From: jorgen_wallgren <jorgen.wallgren@xxxxxxxxx>
Subject: [amibroker] Re: AFL for Intraday
To: amibroker@xxxxxxxxxxxxxxx
Date: Wednesday, March 11, 2009, 10:35 AM

Hi there! There are many indicators which can be used for intraday
buy/sell signals. But I kind of like this Heikin-Ashi code and the
signals it gives. Can't recall where I got it from, but here it is:

_SECTION_BEGIN( "Heikin-Ashi With Reliable Crossovers") ;
Title = "";
function ZeroLagTEMA( array, period )
{
TMA1 = TEMA( array, period );
TMA2 = TEMA( TMA1, period );
Diff = TMA1 - TMA2;
return TMA1 + Diff ;
}

period = Param("Avg. TEMA period", 18, 1, 100 );
SwitchHA = ParamToggle( "Plot Heikin-Ashi? ", "No,Yes", 1);
ModifiedHA = ParamToggle( "Modified Heikin-Ashi? ", "No,Yes", 0);

// Heikin-Ashi code
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 ) );
if(ModifiedHA) // Modified Heikin-Ashi:
HaClose = ( HaClose + HaOpen + HaHigh + HaLow )/4;

// Switch between Heikin-Ashi chart and regular candlestick chart:
if(SwitchHA)
PlotOHLC( HaOpen, HaHigh, HaLow, HaClose, "Heikin Ashi " + Name(),
colorBlack, styleCandle | styleNoTitle | styleNoLabel) ;
else
Plot( C, "Regular candles " + Name(), colorBlack, styleCandle |
styleNoLabel );

Plot(Close," ",colorBrightGre en, styleNoLine );

HaClose = (HaClose + HaOpen + HaHigh + HaLow)/4;
ZLHa = ZeroLagTEMA( HaClose, period);
ZLTyp = ZeroLagTEMA( Avg, period);

if( ParamToggle( "Plot Crossovers?" , "No,Yes", 0 ) )
{
Plot( ZLHa, "ZLTema(Ha," +period+" )", colorRed, styleNoLabel) ;
Plot( ZLTyp, "ZLTema(Typ, "+period+ ")", colorBrightGreen, styleNoLabel) ;
}

Buy = Cross( ZLTyp, ZLHa );
Sell = Cross( ZLHa, ZLTyp );

PlotShapes( shapeUpArrow * Buy, colorGreen, 0, HaLow );
PlotShapes( shapeDownArrow * Sell, colorRed, 0, HaHigh );
_SECTION_END( );

Jorgen




__._,_.___


**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/





Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___