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

Re: [amibroker] Re: Optimization Question



PureBytes Links

Trading Reference Links

The OR for each individual indicator is written so that a Buy status exists when either the indicator is in Buy territory or is of No ( 0 ) Use ... Thus when the combined Buy is evaluated all indicators should either be in Buy territory or be of No ( 0 ) Use.
 
Another possibly more sophisticated way to attack this might be to have a voting mechanism or a weighted voting mechanism ...

----- Original Message -----
From: brianw468
Date: Thursday, January 8, 2009 4:03 pm
Subject: [amibroker] Re: Optimization Question
To: amibroker@xxxxxxxxxxxxxxx

> Employing "Use" variables as shown below is a clever approach to
> sorting out useful vs non-useful indicators, BUT am I missing
> something basic here? The "OR" parts of each condition seem wrong.
>
> Surely the code should read (e.g):-
> RSIx>Ref(RSIx,-1) AND RSIUse == 1;
> and similar for the other indicators.
>
> Brian
>
>
>
>
>
> --- In amibroker@xxxxxxxxxxxxxxx, ftonetti@xxx wrote:
> >
> > One way to code this is as below ...
> >
> > One could of course code in separate "Use" optimizable
> variables
> for each of the indicators to allow them to be independently
> used or
> not on the buy / sell side.
> >
> > The default values in the optimization statements below were
> arrived at from the best results based on CAR - MDD over the
> entire
> life of a common Index using daily data. Notice that the
> optimization process determined NOT to use the MACD indicator
> i.e.
> MACDUse = 0 but did employ the other two.
> > RSILen = Optimize("RSILen", 43, 1, 100, 1);
> > RSIUse = Optimize("RSIUse", 1, 0, 1, 1);
> > RSIx = RSI(RSILen);
> > RSIBuy = RSIx > Ref(RSIx, -1) OR RSIUse == 0;
> > RSISell = RSIx < Ref(RSIx, -1) OR RSIUse == 0;
> > StoLen1 = Optimize("StoLen1", 16, 1, 100, 1);
> > StoLen2 = Optimize("StoLen2", 25, 1, 100, 1);
> > StoLen3 = Optimize("StoLen3", 99, 1, 100, 1);
> > StoUse = Optimize("StoUse", 1, 0, 1, 1);
> > StoK = StochK(StoLen1, StoLen2);
> > StoD = StochD(StoLen1, StoLen2, StoLen3);
> > StoBuy = StoK > StoD OR StoUse == 0;
> > StoSell = StoK < StoD OR StoUse == 0;
> > MACDLen1 = Optimize("MACDLen1", 32, 1, 100, 1);
> > MACDLen2 = Optimize("MACDLen2", 60, 1, 100, 1);
> > MACDLen3 = Optimize("MACDLen3", 48, 1, 100, 1);
> > MACDUse = Optimize("MACDUse", 0, 0, 1, 1);
> > MACDx = MACD(MACDLen1, MACDLen2);
> > MACDs = Signal(MACDLen1, MACDLen2, MACDLen3);
> > MACDBuy = MACDx > MACDs OR MACDUse == 0;
> > MACDSell = MACDx < MACDs OR MACDUse == 0;
> > Buy = RSIBuy AND StoBuy AND MACDBuy;
> > Sell = RSISell AND StoSell AND MACDSell;
> >
> >
> > ----- Original Message -----
> > From: longarm61
> > Date: Thursday, January 8, 2009 12:49 am
> > Subject: [amibroker] Re: Optimization Question
> > To: amibroker@xxxxxxxxxxxxxxx
> >
> > > Thanks, appreciate it. If it's not too much trouble, could
> you
> > > (or
> > > someone) give me a quick example of how exactly that would
> be
> coded?
> > >
> > >
> > > --- In amibroker@xxxxxxxxxxxxxxx, ftonetti@ wrote:
> > > >
> > > > One way to do this is to have an on/off ( 1/0 )
> optimizable
> > > variable for each indicator so that individual indicators
> are
> > > either
> > > used or not and then let optimzation make the determination.
> > > >
> > > > ----- Original Message -----
> > > > From: longarm61
> > > > Date: Wednesday, January 7, 2009 8:25 pm
> > > > Subject: [amibroker] Optimization Question
> > > > To: amibroker@xxxxxxxxxxxxxxx
> > > >
> > > > > Is there a way to optimize a group of indicators so that
> the
> > > > > results
> > > > > not only give you the optimized values, but also tell
> you
> > > which
> > > > > indicators you'd have better off not using at all?
> Something
> > > > > like
> > > > > this:
> > > > >
> > > > > Best return: Indicator1=80, Indicator2=NO,
> Indicator3=50,
> > > > > Indicator4=NO
> > > > >
> > > > > Thanks in advance,
> > > > >
> > > > > Grant
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > >
> > >
> > >
> >
>
>
>
__._,_.___

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

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

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

For other support material please check also:
http://www.amibroker.com/support.html

*********************************




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

__,_._,___