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

RE: [amibroker] Re: Watchlist sorting



PureBytes Links

Trading Reference Links

Hello wayne,

It appears your post may not have reached subscribers, at least I have no
pevious post under this topic.

You could limit trades, or whatever, by counting them in a StaticVariables,
this variable will retain its count accross multiple backtests or passes
when portfolio trading. You could also make the count Stock-Specific by
appending the ticker name to the counter variable name. For example:

StaticVarSet("Cnt-"+name()",n);

where n is the count. On each pass you can check it's value and disable
trdaes when the value exceeds the required count.

There are also many ways to create random trading systems, see the Random()
function.

Without some sample code it is difficult to give more detailed solutions.

best regards,
herman
  -----Original Message-----
  From: seneca_kw [mailto:wwells@xxxxxxxxxx]
  Sent: Tuesday, August 17, 2004 12:53 PM
  To: amibroker@xxxxxxxxxxxxxxx
  Subject: [amibroker] Re: How to limit number of trades?


  I appreciate the valuable information provided by this forum, and
  though I'm a little disappointed that no one responded to my request
  for help, I understand that there are so many messages being posted
  that a few "orphans" are left behind.

  I'll wrap this up with a summary of what I learned through my own
  further efforts in hopes that it might help someone else in the
  future.

  My proposed code was actually working in a fashion.  In the example,
  I wanted to produce 4 trades total.  Instead, it produced 4 trades
  PER stock (99 stocks x 4 = 396 total trades).

  I could think of no way to limit the trades to less than 1 trade per
  stock (eg to produce a total of 50 trades distributed randomly
  between 99 stocks).  I ultimately gave up on this approach when
  experimentation convinced me that the formula was not producing truly
  random trades.  Now I'm exporting the trade lists to Excel and
  working there.  In my view, its very important to compare your
  backtest results to random trades to see if they're statistically
  significant.

  Wayne



  Check AmiBroker web page at:
  http://www.amibroker.com/

  Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html


        Yahoo! Groups Sponsor
              ADVERTISEMENT





----------------------------------------------------------------------------
--
  Yahoo! Groups Links

    a.. To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

    b.. To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

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



[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/