Stock Portfolio Organizer

The ultimate porfolio management solution.

Shares, Margin, CFD's, Futures and Forex
EOD and Realtime
Dividends and Trust Distributions
And Much More ....
For Portfolio Manager Click Here

WiseTrader Toolbox

#1 Selling Amibroker Plugin featuring:

Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
Find Out More Here

V-Bottom for Amibroker (AFL)
BobCat
about 7 years ago
Amibroker (AFL)

Rating:
3 / 5 (Votes 2)
Tags:
trading system, amibroker, exploration, fractal

Uses fractal to identify buying points. 4% applied stop or close below the lowest previous fractal point.

Screenshots

Indicator / Formula

Copy & Paste Friendly
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", colorDefault ), styleNoTitle ) ; //| ParamStyle("Style") | GetPriceStyle() ); 
//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
_SECTION_BEGIN("V-Bottom");
XX = Optimize("trailpercent",4,1,25,1);

/*The following builds Fractal Down*/
var2= 
(Ref(L,-2) <= Ref(L, -1)) AND
(Ref(L,-2) <= Ref(L, 0)) AND
(Ref(L,-2) <= Ref(L, -3)) AND
(Ref(L,-2) <= Ref(L, -4));
FractalDown=ValueWhen( var2,Ref(L,-2),1);

// FRACTAL
 
// Fraktal Naik
fUpA =
    ( Ref( H, -2 )  > Ref( H, -4 ) ) AND
    ( Ref( H, -2 )  > Ref( H, -3 ) ) AND
    ( Ref( H, -2 )  > Ref( H, -1 ) ) AND
    ( Ref( H, -2 )  > H );
 
fUpB =
    ( Ref( H, -2 )  > Ref( H, -5 ) ) AND
    ( Ref( H, -2 )  > Ref( H, -4 ) ) AND
    ( Ref( H, -2 ) == Ref( H, -3 ) ) AND
    ( Ref( H, -2 )  > Ref( H, -1 ) ) AND
    ( Ref( H, -2 )  > H );
 
fUpC =
    ( Ref( H, -2 )  > Ref( H, -6 ) ) AND
    ( Ref( H, -2 )  > Ref( H, -5 ) ) AND
    ( Ref( H, -2 ) == Ref( H, -4 ) ) AND
    ( Ref( H, -2 ) == Ref( H, -3 ) ) AND
    ( Ref( H, -2 )  > Ref( H, -1 ) ) AND
    ( Ref( H, -2 )  > H );
 
fUpD =
    ( Ref( H, -2 )  > Ref( H, -6 ) ) AND
    ( Ref( H, -2 )  > Ref( H, -5 ) ) AND
    ( Ref( H, -2 ) == Ref( H, -4 ) ) AND
    ( Ref( H, -2 )  > Ref( H, -3 ) ) AND
    ( Ref( H, -2 )  > Ref( H, -1 ) ) AND
    ( Ref( H, -2 )  > H );
 
fUpE =
    ( Ref( H, -2 )  > Ref( H, -8 ) ) AND
    ( Ref( H, -2 )  > Ref( H, -7 ) ) AND
    ( Ref( H, -2 ) == Ref( H, -6 ) ) AND
    ( Ref( H, -2 )  > Ref( H, -5 ) ) AND
    ( Ref( H, -2 ) == Ref( H, -4 ) ) AND
    ( Ref( H, -2 )  > Ref( H, -3 ) ) AND
    ( Ref( H, -2 )  > Ref( H, -1 ) ) AND
    ( Ref( H, -2 )  > H );
 
// Fraktal Turun
fDnA =
    ( Ref( L, -2 )  < Ref( L, -4 ) ) AND
    ( Ref( L, -2 )  < Ref( L, -3 ) ) AND
    ( Ref( L, -2 )  < Ref( L, -1 ) ) AND
    ( Ref( L, -2 )  < L );
 
fDnB =
    ( Ref( L, -2 )  < Ref( L, -5 ) ) AND
    ( Ref( L, -2 )  < Ref( L, -4 ) ) AND
    ( Ref( L, -2 ) == Ref( L, -3 ) ) AND
    ( Ref( L, -2 )  < Ref( L, -1 ) ) AND
    ( Ref( L, -2 )  < L );
 
fDnC =
    ( Ref( L, -2 )  < Ref( L, -6 ) ) AND
    ( Ref( L, -2 )  < Ref( L, -5 ) ) AND
    ( Ref( L, -2 ) == Ref( L, -4 ) ) AND
    ( Ref( L, -2 ) == Ref( L, -3 ) ) AND
    ( Ref( L, -2 )  < Ref( L, -1 ) ) AND
    ( Ref( L, -2 )  < L );
 
fDnD =
    ( Ref( L, -2 )  < Ref( L, -6 ) ) AND
    ( Ref( L, -2 )  < Ref( L, -5 ) ) AND
    ( Ref( L, -2 ) == Ref( L, -4 ) ) AND
    ( Ref( L, -2 )  < Ref( L, -3 ) ) AND
    ( Ref( L, -2 )  < Ref( L, -1 ) ) AND
    ( Ref( L, -2 )  < L );
 
fDnE =
    ( Ref( L, -2 )  < Ref( L, -8 ) ) AND
    ( Ref( L, -2 )  < Ref( L, -7 ) ) AND
    ( Ref( L, -2 ) == Ref( L, -6 ) ) AND
    ( Ref( L, -2 )  < Ref( L, -5 ) ) AND
    ( Ref( L, -2 ) == Ref( L, -4 ) ) AND
    ( Ref( L, -2 )  < Ref( L, -3 ) ) AND
    ( Ref( L, -2 )  < Ref( L, -1 ) ) AND
    ( Ref( L, -2 )  < L );
 
var1    = ValueWhen( fUpE OR fUpD OR fUpC OR fUpB OR fUpA, Ref( H, -2 ), 1 );
var2    = ValueWhen( fDnE OR fDnD OR fDnC OR fDnB OR fDnA, Ref( L, -2 ), 1 );
FrakNaik    = HighestSince( var1 > 0, var1, 1 );
FrakTurun   = LowestSince ( var2 > 0, var2, 1 );
LowerLL = Ref(FrakTurun,-1) < Ref(FrakTurun,-2 ) AND H > Ref(H,-1) ;
LowerL = Ref(FrakTurun,-1) < Ref(FrakTurun,-2 ) ;
SetTradeDelays(0,0,0,0) ;
Test= IIf( O > Ref( High, -1 ), O, Ref( High, -1 ) );
LLS = LowestSince(FrakTurun,FrakTurun,1);

Buy= LowerLL ; //  AND Ref(H,2) > H ; //Ref(H,-1) ;
Sell = C< Ref(FrakTurun,-1) ; //C < Ref(LLV(l,10),-1 ) ;
ApplyStop(1,1,4,1,False,0,0,-1) ;
BuyPrice=   test + 0.01 ;
Buy = ExRem( Buy, Sell ); //*removes extra signals
Sell = ExRem( Sell, Buy );
 
PlotShapes(Buy*shapeUpArrow,colorGreen,0,Low);
PlotShapes(Sell*shapeDownArrow,colorPink,0,High);
PlotShapes(Ref(LowerL,3)*shapeUpArrow,colorYellow,0,Low);
Plot( Close, "Down Frankturn", IIf( Ref(FrakTurun,2) < Ref(FrakTurun,1 ), colorYellow, colorRed ), styleBar | styleThick );
Plot( FrakTurun, "Down Frankturn",  colorGold , styleDashed ) ;


 /////////////////////////////////////////////////////////
 ///////////////////////// end ///////////////////////////
_SECTION_END();

filter = Ref(FrakTurun,-1)- FrakTurun >0 ;
 
AddColumn( FrakTurun, "Todays LL", 1.2);
AddColumn( Ref(FrakTurun,-1), "Yesterdays LL Change", 1.2);
AddColumn( Ref(FrakTurun,-1)- FrakTurun, "LL Change", 1.2);
AddColumn( LLS, "LowestSince", 1.2);
 
 
_SECTION_END();

9 comments

1. chetan ninganiya

@admin
sir can this formula be converted into sell only signals too ?? as it produces buy only signals.

please reply asap sir.

thanks.

2. chetan ninganiya

@bobcat

sir can you please also provide sell only formula for the same code above mentioned please.

this one is quite great work sir.

please reply asap.

thanks.

3. administrator

@chetan I have changed the formula so it plots the sell signal too.

4. chetan ninganiya

@admin
sir it is showing too many arguments in Ln 110, Cl 30

5. administrator

You probably have an ancient version of Amibroker. Try changing that line to the following: ApplyStop(1,1,4,1,False);

6. chetan ninganiya

@admin thanks a ton sir….

7. liquidice

LOL, Ancient version of Amibroker, this made my day, thanks Admin.

8. liquidice

sorry

9. liquidice

sorry

Leave Comment

Please login here to leave a comment.

Back