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

Re: [amibroker] Re: Properties of lines and graphs



PureBytes Links

Trading Reference Links

Hello John,

There is a zip file in the file section which contains 20 optimized and
20 non optimized trading systems. As for Bollinger Band trading system,
Here is one:

//Bollinger Band Swing Trader ***Optimized***

//Enters long/short when a moving average of the lows/highs goes outside
(below/above) bollinger band.

//Note: Run Optimization first, insert optimized figure in ( Opt1= )and
( Opt2= ) statements, then ( // ) out optimization line, click on
backtest.


MA1=MA(L,3);
MA2=MA(H,3);

Opt1=Optimize("opt1",14,5,25,4);
Opt2=Optimize("opt2",1,1,2.5,0.5);

p1=MA(L,Opt1)-(Opt2*StDev(L,Opt1));
p2=MA(H,Opt1)+(Opt2*StDev(H,Opt1));

Buy=Ref(MA1,-1) < Ref(p1,-1)AND Ref(MA1,-1) < MA1;
Sell=Ref(MA2,-1) > Ref(p2,-1) AND Ref(MA2,-1) > MA2;
Short=Ref(MA2,-1) > Ref(p2,-1) AND Ref(MA2,-1) > MA2;
Cover=Ref(MA1,-1) < Ref(p1,-1)AND Ref(MA1,-1) < MA1;

Filter=Buy OR Sell OR Short OR Cover;
Buy=ExRem(Buy,Sell); Sell=ExRem(Sell,Buy); Short=ExRem(Short,Cover);
Cover=ExRem(Cover,Short);

AddColumn(Buy,"Buy");
AddColumn(Sell,"sell");
AddColumn(Short,"short");
AddColumn(Cover,"cover");


Anthony

John Nelson wrote:

>
> Can I safely "override" the BB indicator that is already there or am I
>
> applying my own custom indicator and ignoring your "built in"?
>
> Actually, now that we're on the topic of Bollinger Bands, does anyone
> have
> any particular AFL based BB trading systems they'd like to post? BB's
> are
> very useful, particularly in conjunction with candlesticks.
>
> -- John
>
>
> On Sat, 13 Jul 2002, Tomasz Janeczko wrote:
>
> > Date: Sat, 13 Jul 2002 10:58:20 +0200
> > From: Tomasz Janeczko <amibroker@xxxx>
> > Reply-To: amibroker@xxxxxxxxxxxxxxx
> > To: amibroker@xxxxxxxxxxxxxxx
> > Subject: Re: [amibroker] Re: Properties of lines and graphs
> >
> > John,
> >
> > The only way to get fatter bollinger bands is to use custom formula
> with thick style:
> > Plot(Close,"Price", 1, 64 );
> > Plot( BBandTop( Close, 15, 2 ), "BBandTop", 2, 4 );
> > Plot( BBandBot( Close, 15, 2 ), "BBandBot", 2, 4 );
> >
> > Best regards,
> > Tomasz Janeczko
> > amibroker.com
>
>
> Yahoo! Groups Sponsor
[Click here to visit our exclusive feature of ACUVUE2 Colours at LensExpress.com!]
Click here to find your contact lenses!
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.