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