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

RE: [amibroker] Re: How to Optimize an AddToComposite



PureBytes Links

Trading Reference Links




<FONT color=#000080 
size=2>Dimitris,
<FONT color=#000080 
size=2> 
Yes, I have tried 
this code today but did not have a chance to look into it in detail.  

<FONT color=#000080 
size=2><FONT color=#000080 
size=2> 
I can see what 
you are saying and you raise a valid point.  I will have to check to see if 
MyComposite actually totals all optimizations they way you describe.  
My instinct tells me that each optimization run initializes MyComposite to zero 
and starts over.
<FONT color=#000080 
size=2> 
I'm leaving to go 
out of town in an hour.  Perhaps someone could check this out.  I'll 
be back Monday and will check to see if there is any interesting 
observations. 
 
<FONT face="Vladimir Script" color=#000080 
size=5>Rick

  <FONT face=Tahoma 
  size=2>-----Original Message-----From: DIMITRIS TSOKAKIS 
  [mailto:TSOKAKIS@xxxxxxxxx]Sent: Wednesday, May 07, 2003 3:13 
  PMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] Re: 
  How to Optimize an AddToCompositeRick,Have you 
  tried this code ?There are some questions:Suppose for simplicity you 
  run a database of 10 stocks and, before the optimization procedure, the 
  MyComposite is 7,ie 7/10 stocks are bullish [macd>signal]Per1 = 
  Optimize("Per1", Per1, 3, 13, 2);Per2 = Optimize("Per2", Per2, 3, 13, 
  2);C = Foreign("AA", "C", Fixup = True);Bullish=MACD(Per1,Per2) >= 
  Signal(Per1,Per2);ZL = IIf(bullish==1, 1, -1)MyComposite = MyComposite 
  + ZL;After this line, if all 6X6=36 combinations for AA are bullish, 
  MyComposite will become 7+36=43 which sounds strange.It would be 
  better to see a full example, how MyComposite is involved in the 
  procedure.Dimitris Tsokakis --- In amibroker@xxxxxxxxxxxxxxx, 
  "Rick Parsons" <RickParsons@xxxx> wrote:> Dimitris, Chuck and 
  Junya,> > I found a way to optimize an AddToComposite in another 
  way.  Instead of using AddToComposite, do this:> (this is a 
  modification of my code to simplify it for illustration purposes.  
  There may be coding errors)> > This counts the number of stocks 
  above or below the MACD Signal line.> > Per1 = 5; Per2 = 
  8;> Per1 = Optimize("Per1", Per1, 3, 13, 2);> Per2 = 
  Optimize("Per2", Per2, 3, 13, 2);> > C = Foreign("AA", "C", 
  Fixup = True);> Bullish=MACD(Per1,Per2) >= 
  Signal(Per1,Per2);> ZL = IIf(bullish==1, 1, -1)> MyComposite = 
  MyComposite + ZL;> > C = Foreign("AXP", "C", Fixup = 
  True);> Bullish=MACD(Per1,Per2) >= Signal(Per1,Per2);> ZL = 
  IIf(bullish==1, 1, -1)> MyComposite = MyComposite + ZL;> 
  > Repeat for each stock in the watchlist you want to scan.> One 
  can then use MyComposite as if it were a real "~MyComposite" data 
  file.> And one can optimize as shown in the top lines.> One 
  would insert the BUY/SELL lines after this code.> > It can also 
  be used in IB to plot the MyComposite results in real time without having 
  to run a SCAN.> > A little awkward but with cut and paste, the 
  code can be setup pretty fast.> > > 
  Rick>   -----Original Message----->   From: 
  Chuck Rademacher [mailto:chuck_rademacher@xxxx]>   Sent: 
  Tuesday, May 06, 2003 3:00 PM>   To: 
  amibroker@xxxxxxxxxxxxxxx>   Subject: RE: [amibroker] 
  Optimizing AddToComposite> > >   G'day, 
  Rick.> >   I'm not sure how you could determine the 
  best to use, but you could do six runs at once by using the O,H,L.C.V and 
  OI fields in your composite to hold the results from six different 
  periods.   This might not be the answer you are looking for, but 
  it may give you an idea.>     -----Original 
  Message----->     From: Rick Parsons 
  [mailto:RickParsons@xxxx]>     Sent: Tuesday, May 
  06, 2003 2:53 PM>     To: 
  amibroker@xxxx>     Subject: [amibroker] Optimizing 
  AddToComposite> > >     I have a 
  system similar to Dimitri's Trade the Market where I use AddToComposite to 
  count the number of stocks above or below the MACD Signal line.> 
  >     Question is, what is the best MACD period to 
  use?  It is very cumbersome to change the periods, run the Scan to 
  create an AddToComposite, then backtest it.> 
  >     Does anyone have a creative idea on how to 
  "optimize" the periods used to create the AddToComposite?> 
  >     Thanks,>     
  Rick> > > >     Send BUG 
  REPORTS to bugs@xxxx>     Send SUGGESTIONS to 
  suggest@xxxx>     
  ----------------------------------------->     Post 
  AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
  >     (Web page: <A 
  href="">http://groups.yahoo.com/group/amiquote/messages/)>     
  -------------------------------------------->     
  Check group FAQ at: <A 
  href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
  > >     Your use of Yahoo! Groups is subject 
  to the Yahoo! Terms of Service. > > 
  >         Yahoo! Groups Sponsor 
  >        
  >        > 
  >   Send BUG REPORTS to bugs@xxxx>   Send 
  SUGGESTIONS to suggest@xxxx>   
  ----------------------------------------->   Post 
  AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
  >   (Web page: <A 
  href="">http://groups.yahoo.com/group/amiquote/messages/)>   
  -------------------------------------------->   Check group 
  FAQ at: <A 
  href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
  > >   Your use of Yahoo! Groups is subject to the 
  Yahoo! Terms of Service.Send 
  BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
  suggest@xxxxxxxxxxxxx-----------------------------------------Post 
  AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
  href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
  group FAQ at: <A 
  href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
  Your use of Yahoo! Groups is subject to the <A 
  href="">Yahoo! Terms of Service. 







Yahoo! Groups Sponsor












Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.