Skip to main content

+ve-ve reverses for Amibroker (AFL)

gangadhar about 15 years ago Amibroker (AFL)

  • Rating:
    4 / 5 (Votes 7)
  • Tags:
    trading system, amibroker, exploration, zig zag

we may see reversal system through this afl hope u enjoy

Screenshots

Indicator / Formula

Copy & Paste Friendly
_SECTION_BEGIN("+VE");




Q = Param( "% Change", 2, 0.1, 10, 0.1 );
Z = Zig( C , q ) ;
HH = ( ( Z < Ref( Z, -1 ) AND Ref( Z, -1 ) > Ref( Z, -2 ) ) AND (Peak( z, q, 1 ) > Peak( Z, q, 2 ) ) );
LH = ( ( Z < Ref( Z, -1 ) AND Ref( Z, -1 ) > Ref( Z, -2 ) ) AND (Peak( Z, q, 1 ) < Peak( Z, q, 2 ) ) );
HL = ( ( Z > Ref( Z, -1 ) AND Ref( Z, -1 ) < Ref( Z, -2 ) ) AND (Trough( Z, q, 1 ) > Trough( Z, q, 2 ) ) );
LL = ( ( Z > Ref( Z, -1 ) AND Ref( Z, -1 ) < Ref( Z, -2 ) ) AND (Trough( Z, q, 1 ) < Trough( Z, q, 2 ) ) );
GraphXSpace = 5;
dist = 0.5 * ATR( 20 );

for ( i = 0; i < BarCount; i++ )
{
if ( HH[i] )
PlotText( "- -VE REVERSE", i, H[ i ] + dist[i], colorRed );

if ( LH[i] )
PlotText( "-VE REVERSE", i, H[ i ] + dist[i], colorRed );

if ( HL[i] )
PlotText( "+VE REVERSE", i, L[ i ] - dist[i], colorBrightGreen );

if ( LL[i] )
PlotText( "++ VE REVERSE", i, L[ i ] - dist[i], colorBrightGreen );

}

Filter=HH OR HL OR LH OR LL;
AddColumn(HH,"HH",1);
AddColumn(LH,"LH",1);
AddColumn(HL,"HL",1);
AddColumn (LL,"LL",1); 


Buy = HL OR LL;
Sell = HH OR LH;
SellPrice=ValueWhen(Sell,H,1);
BuyPrice=ValueWhen(Buy,L,1);
//Long=Flip(Buy,Sell);
//Shrt=Flip(Sell,Buy );
Plot( Flip( Buy, Sell ), "BUY", colorDarkGreen,  styleArea | styleOwnScale, 0, 20 );


Shape = (Buy * shapeSmallUpTriangle + Sell * shapeSmallDownTriangle);
PlotShapes( shape, IIf( Buy, colorYellow, colorYellow ),0, IIf( Buy, Low,High ));
_SECTION_END();

15 comments

about 15 years ago

This system mark Buy & Sell signal in back times, on the other it is not possible to trade in past. So avoid using this.

about 15 years ago

Gangadhar, thanks for this code. Rakesh, I modified the %change from 2 to 9, and checked 100 daily bars with the bar replay: for a Swing trader, the results were more than ok.
Good luck to all of you.

3. sanjay
about 15 years ago

I am getting blank screen when the +ve-ve Indicator is applied. Please advise.

about 15 years ago

Hello Sanjay, drag and drop the indicator on your price chart, and it should make it.
Regards,

about 15 years ago

drag and droped the indicator but unable to makeit
it is showing blank screen

almost 15 years ago

Foul AFL. Reverse Activate On 3rd/4th Day when People Start To Out From There.

10. passamol
almost 15 years ago

Showing good results after changing % change to 9 . Thanks Pascal SAMSON for ur findings

11. gangadhar
almost 15 years ago

Dear Pascalsamson

sir though i change the % change 2 to 9 the analysis of scanning is not changed. if percentage change fr 2 to 1 it is suitable for intraday in analysis also we have to modify pl modify that.
12. passamol
almost 15 years ago

Hi,

Signals are awesome but unfortunately are coming late.

Can anyone help on this. If we can rectify this then we have gem in the making

14. MarcosEn
almost 13 years ago

Hi, can anyone help-me with this:
I need this AFL put one signal more in the real time bar that generates the signal (ve) in the past, I mean i like to plot one more signal in exactly bar (actual Bar) when (ve reverse) appears, so i can do some tests. I really thanks if someone could help-me, I’m not good whith formulas…..

Leave Comment

Please login here to leave a comment.